diff --git a/Gopkg.lock b/Gopkg.lock
index 9b394a177..b3cdeefd1 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -14,8 +14,8 @@
[[projects]]
name = "cloud.google.com/go"
packages = ["compute/metadata"]
- revision = "29f476ffa9c4cd4fd14336b6043090ac1ad76733"
- version = "v0.21.0"
+ revision = "0fd7230b2a7505833d5f69b75cbd6c9582401479"
+ version = "v0.23.0"
[[projects]]
name = "github.com/Azure/azure-sdk-for-go"
@@ -23,8 +23,8 @@
"storage",
"version"
]
- revision = "4650843026a7fdec254a8d9cf893693a254edd0b"
- version = "v16.2.1"
+ revision = "cd93ccfe0395e70031704ca68f14606588eec120"
+ version = "v17.3.0"
[[projects]]
name = "github.com/Azure/go-autorest"
@@ -34,8 +34,8 @@
"autorest/azure",
"autorest/date"
]
- revision = "eaa7994b2278094c904d31993d26f56324db3052"
- version = "v10.8.1"
+ revision = "f04d503958a4fe854c1b41667c73f8813c9dd9c3"
+ version = "v10.11.2"
[[projects]]
branch = "master"
@@ -74,6 +74,7 @@
"aws/credentials/ec2rolecreds",
"aws/credentials/endpointcreds",
"aws/credentials/stscreds",
+ "aws/csm",
"aws/defaults",
"aws/ec2metadata",
"aws/endpoints",
@@ -84,6 +85,8 @@
"internal/sdkrand",
"internal/shareddefaults",
"private/protocol",
+ "private/protocol/eventstream",
+ "private/protocol/eventstream/eventstreamapi",
"private/protocol/query",
"private/protocol/query/queryutil",
"private/protocol/rest",
@@ -94,8 +97,8 @@
"service/s3/s3manager",
"service/sts"
]
- revision = "4f5d298bd2dcb34b06d944594f458d1f77ac4d66"
- version = "v1.13.42"
+ revision = "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff"
+ version = "v1.14.8"
[[projects]]
name = "github.com/billziss-gh/cgofuse"
@@ -154,8 +157,8 @@
[[projects]]
name = "github.com/go-ini/ini"
packages = ["."]
- revision = "6529cf7c58879c08d927016dde4477f18a0634cb"
- version = "v1.36.0"
+ revision = "06f5f3d67269ccec1fe5fe4134ba6e982984f7f5"
+ version = "v1.37.0"
[[projects]]
name = "github.com/golang/protobuf"
@@ -193,10 +196,10 @@
revision = "ae77be60afb1dcacde03767a8c37337fad28ac14"
[[projects]]
- branch = "master"
name = "github.com/kr/fs"
packages = ["."]
- revision = "2788f0dbd16903de03cb8186e5c7d97b69ad387b"
+ revision = "1455def202f6e05b95cc7bfc7e8ae67ae5141eba"
+ version = "v0.1.0"
[[projects]]
name = "github.com/marstr/guid"
@@ -217,16 +220,16 @@
revision = "887eb06ab6a255fbf5744b5812788e884078620a"
[[projects]]
- branch = "master"
name = "github.com/ncw/swift"
packages = ["."]
revision = "b2a7479cf26fa841ff90dd932d0221cb5c50782d"
+ version = "v1.0.39"
[[projects]]
branch = "master"
name = "github.com/nsf/termbox-go"
packages = ["."]
- revision = "5a49b82160547cc98fca189a677a1c14eff796f8"
+ revision = "5c94acc5e6eb520f1bcd183974e01171cc4c23b3"
[[projects]]
branch = "master"
@@ -249,8 +252,8 @@
"log",
"reopen"
]
- revision = "b98065a377794d577e2a0e32869378b9ce4b8952"
- version = "v0.1.1"
+ revision = "807ee759d82c84982a89fb3dc875ef884942f1e5"
+ version = "v0.2.0"
[[projects]]
name = "github.com/pkg/errors"
@@ -261,8 +264,8 @@
[[projects]]
name = "github.com/pkg/sftp"
packages = ["."]
- revision = "5bf2a174b604c6b5549dd9740d924ff2f02e3ad7"
- version = "1.6.0"
+ revision = "57673e38ea946592a59c26592b7e6fbda646975b"
+ version = "1.8.0"
[[projects]]
name = "github.com/pmezard/go-difflib"
@@ -292,7 +295,7 @@
branch = "master"
name = "github.com/sevlyar/go-daemon"
packages = ["."]
- revision = "45a2ba1b7c6710a044163fa109bf08d060bc3afa"
+ revision = "f9261e73885de99b1647d68bedadf2b9a99ad11f"
[[projects]]
branch = "master"
@@ -306,8 +309,8 @@
".",
"doc"
]
- revision = "a1f051bc3eba734da4772d60e2d677f47cf93ef4"
- version = "v0.0.2"
+ revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385"
+ version = "v0.0.3"
[[projects]]
name = "github.com/spf13/pflag"
@@ -321,8 +324,8 @@
"assert",
"require"
]
- revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71"
- version = "v1.2.1"
+ revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686"
+ version = "v1.2.2"
[[projects]]
branch = "master"
@@ -351,8 +354,8 @@
"service",
"utils"
]
- revision = "9e88dc1b83728e1462fd74bb61b0f5e28ac95bb6"
- version = "v2.2.12"
+ revision = "4f9ac88c5fec7350e960aabd0de1f1ede0ad2895"
+ version = "v2.2.14"
[[projects]]
branch = "master"
@@ -364,6 +367,7 @@
"ed25519",
"ed25519/internal/edwards25519",
"internal/chacha20",
+ "internal/subtle",
"nacl/secretbox",
"pbkdf2",
"poly1305",
@@ -373,7 +377,7 @@
"ssh/agent",
"ssh/terminal"
]
- revision = "4ec37c66abab2c7e02ae775328b2ff001c3f025a"
+ revision = "027cca12c2d63e3d62b670d901e8a2c95854feec"
[[projects]]
branch = "master"
@@ -387,13 +391,12 @@
"http2",
"http2/hpack",
"idna",
- "lex/httplex",
"publicsuffix",
"webdav",
"webdav/internal/xml",
"websocket"
]
- revision = "640f4622ab692b87c2f3a94265e6f579fe38263d"
+ revision = "db08ff08e8622530d9ed3a0e8ac279f6d4c02196"
[[projects]]
branch = "master"
@@ -405,7 +408,7 @@
"jws",
"jwt"
]
- revision = "cdc340f7c179dbbfa4afd43b7614e8fcadde4269"
+ revision = "1e0a3fa8ba9a5c9eb35c271780101fdaf1b205d7"
[[projects]]
branch = "master"
@@ -414,7 +417,7 @@
"unix",
"windows"
]
- revision = "6f686a352de66814cdd080d970febae7767857a3"
+ revision = "6c888cc515d3ed83fc103cf1d84468aad274b0a7"
[[projects]]
name = "golang.org/x/text"
@@ -453,7 +456,7 @@
"googleapi/internal/uritemplates",
"storage/v1"
]
- revision = "bb395b674c9930450ea7243b3e3c8f43150f4c11"
+ revision = "2eea9ba0a3d94f6ab46508083e299a00bbbc65f6"
[[projects]]
name = "google.golang.org/appengine"
@@ -470,8 +473,8 @@
"log",
"urlfetch"
]
- revision = "150dc57a1b433e64154302bdc40b6bb8aefa313a"
- version = "v1.0.0"
+ revision = "b1f26356af11148e710935ed1ac8a7f5702c7612"
+ version = "v1.1.0"
[[projects]]
name = "gopkg.in/yaml.v2"
@@ -482,6 +485,6 @@
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
- inputs-digest = "e250c0e18b90fecd81621d7ffcc1580931e668bac9048de910fdf6df8e4a140c"
+ inputs-digest = "c1378c5fc821e27711155958ff64b3c74b56818ba4733dbfe0c86d518c32880e"
solver-name = "gps-cdcl"
solver-version = 1
diff --git a/Gopkg.toml b/Gopkg.toml
index dbfa2627e..2bfb4f7da 100644
--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -1,20 +1,11 @@
-# github.com/yunify/qingstor-sdk-go depends on an old version of
-# github.com/pengsrc/go-shared - pin the version here
-#
-# When the version here moves on, we can unpin
-# https://github.com/yunify/qingstor-sdk-go/blob/master/glide.yaml
-[[override]]
- version = "=v0.1.1"
- name = "github.com/pengsrc/go-shared"
-
# pin this to master to pull in the macOS changes
-# can likely remove for 1.42
+# can likely remove for 1.43
[[override]]
branch = "master"
name = "github.com/sevlyar/go-daemon"
# pin this to master to pull in the fix for linux/mips
-# can likely remove for 1.42
+# can likely remove for 1.43
[[override]]
branch = "master"
name = "github.com/coreos/bbolt"
diff --git a/RELEASE.md b/RELEASE.md
index 30881f179..9195e5aea 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -31,6 +31,7 @@ Making a release
* # announce with forum post, twitter post, G+ post
Early in the next release cycle update the vendored dependencies
+ * Review any pinned packages in Gopkg.toml and remove if possible
* make update
* git status
* git add new files
diff --git a/vendor/cloud.google.com/go/.travis.yml b/vendor/cloud.google.com/go/.travis.yml
index 59594d41c..7dd0be2e0 100644
--- a/vendor/cloud.google.com/go/.travis.yml
+++ b/vendor/cloud.google.com/go/.travis.yml
@@ -14,6 +14,7 @@ script:
GCLOUD_TESTS_GOLANG_KEY="$(pwd)/dulcet-port-762-key.json"
GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID="gcloud-golang-firestore-tests"
GCLOUD_TESTS_GOLANG_FIRESTORE_KEY="$(pwd)/gcloud-golang-firestore-tests-key.json"
+ GCLOUD_TESTS_GOLANG_KEYRING="projects/dulcet-port-762/locations/us/keyRings/go-integration-test"
./run-tests.sh $TRAVIS_COMMIT
env:
matrix:
diff --git a/vendor/cloud.google.com/go/CONTRIBUTING.md b/vendor/cloud.google.com/go/CONTRIBUTING.md
index 95c94a48b..09ded8fb2 100644
--- a/vendor/cloud.google.com/go/CONTRIBUTING.md
+++ b/vendor/cloud.google.com/go/CONTRIBUTING.md
@@ -31,11 +31,11 @@ To run the integrations tests, creating and configuration of a project in the
Google Developers Console is required.
After creating a project, you must [create a service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount).
-Ensure the project-level **Owner**
+Ensure the project-level **Owner**
[IAM role](console.cloud.google.com/iam-admin/iam/project) role is added to the
service account. Alternatively, the account can be granted all of the following roles:
-- **Editor**
-- **Logs Configuration Writer**
+- **Editor**
+- **Logs Configuration Writer**
- **PubSub Admin**
Once you create a project, set the following environment variables to be able to
@@ -43,13 +43,19 @@ run the against the actual APIs.
- **GCLOUD_TESTS_GOLANG_PROJECT_ID**: Developers Console project's ID (e.g. bamboo-shift-455)
- **GCLOUD_TESTS_GOLANG_KEY**: The path to the JSON key file.
-- **GCLOUD_TESTS_API_KEY**: Your API key.
-Firestore requires a different project and key:
+Some packages require additional environment variables to be set:
-- **GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID**: Developers Console project's ID
- supporting Firestore
-- **GCLOUD_TESTS_GOLANG_FIRESTORE_KEY**: The path to the JSON key file.
+- firestore
+ - **GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID**: project ID for Firestore.
+ - **GCLOUD_TESTS_GOLANG_FIRESTORE_KEY**: The path to the JSON key file.
+- storage
+ - **GCLOUD_TESTS_GOLANG_KEYRING**: The full name of the keyring for the tests, in the
+ form "projects/P/locations/L/keyRings/R".
+- translate
+ - **GCLOUD_TESTS_API_KEY**: API key for using the Translate API.
+- profiler
+ - **GCLOUD_TESTS_GOLANG_ZONE**: Compute Engine zone.
Install the [gcloud command-line tool][gcloudcli] to your machine and use it
to create some resources used in integration tests.
@@ -80,11 +86,20 @@ $ gcloud beta spanner instances create go-integration-test --config regional-us-
# NOTE: Spanner instances are priced by the node-hour, so you may want to delete
# the instance after testing with 'gcloud beta spanner instances delete'.
-
+# For Storage integration tests:
+# Enable KMS for your project in the Cloud Console.
+# Create a KMS keyring, in the same location as the default location for your project's buckets.
+$ gcloud kms keyrings create MY_KEYRING --location MY_LOCATION
+# Create two keys in the keyring, named key1 and key2.
+$ gcloud kms keys create key1 --keyring MY_KEYRING --location MY_LOCATION --purpose encryption
+$ gcloud kms keys create key2 --keyring MY_KEYRING --location MY_LOCATION --purpose encryption
+# As mentioned above, set the GCLOUD_TESTS_GOLANG_KEYRING environment variable.
+$ export GCLOUD_TESTS_GOLANG_KEYRING=projects/$GCLOUD_TESTS_GOLANG_PROJECT_ID/locations/MY_LOCATION/keyRings/MY_KEYRING
+# Authorize Google Cloud Storage to encrypt and decrypt using key1.
+gsutil kms authorize -p $GCLOUD_TESTS_GOLANG_PROJECT_ID -k $GCLOUD_TESTS_GOLANG_KEYRING/cryptoKeys/key1
```
-Once you've set the environment variables, you can run the integration tests by
-running:
+Once you've done the necessary setup, you can run the integration tests by running:
``` sh
$ go test -v cloud.google.com/go/...
diff --git a/vendor/cloud.google.com/go/README.md b/vendor/cloud.google.com/go/README.md
index 769a731b8..ac66000bc 100644
--- a/vendor/cloud.google.com/go/README.md
+++ b/vendor/cloud.google.com/go/README.md
@@ -33,6 +33,73 @@ make backwards-incompatible changes.
## News
+_May 18, 2018_
+
+*v0.23.0*
+
+- bigquery: Add DDL stats to query statistics.
+- bigtable:
+ - cbt: Add cells-per-column limit for row lookup.
+ - cbt: Make it possible to combine read filters.
+- dlp: v2beta2 client removed. Use the v2 client instead.
+- firestore, spanner: Fix compilation errors due to protobuf changes.
+
+_May 8, 2018_
+
+*v0.22.0*
+
+- bigtable:
+ - cbt: Support cells per column limit for row read.
+ - bttest: Correctly handle empty RowSet.
+ - Fix ReadModifyWrite operation in emulator.
+ - Fix API path in GetCluster.
+
+- bigquery:
+ - BEHAVIOR CHANGE: Retry on 503 status code.
+ - Add dataset.DeleteWithContents.
+ - Add SchemaUpdateOptions for query jobs.
+ - Add Timeline to QueryStatistics.
+ - Add more stats to ExplainQueryStage.
+ - Support Parquet data format.
+
+- datastore:
+ - Support omitempty for times.
+
+- dlp:
+ - **BREAKING CHANGE:** Remove v1beta1 client. Please migrate to the v2 client,
+ which is now out of beta.
+ - Add v2 client.
+
+- firestore:
+ - BEHAVIOR CHANGE: Treat set({}, MergeAll) as valid.
+
+- iam:
+ - Support JWT signing via SignJwt callopt.
+
+- profiler:
+ - BEHAVIOR CHANGE: PollForSerialOutput returns an error when context.Done.
+ - BEHAVIOR CHANGE: Increase the initial backoff to 1 minute.
+ - Avoid returning empty serial port output.
+
+- pubsub:
+ - BEHAVIOR CHANGE: Don't backoff during next retryable error once stream is healthy.
+ - BEHAVIOR CHANGE: Don't backoff on EOF.
+ - pstest: Support Acknowledge and ModifyAckDeadline RPCs.
+
+- redis:
+ - Add v1 beta Redis client.
+
+- spanner:
+ - Support SessionLabels.
+
+- speech:
+ - Add api v1 beta1 client.
+
+- storage:
+ - BEHAVIOR CHANGE: Retry reads when retryable error occurs.
+ - Fix delete of object in requester-pays bucket.
+ - Support KMS integration.
+
_April 9, 2018_
*v0.21.0*
diff --git a/vendor/cloud.google.com/go/RELEASING.md b/vendor/cloud.google.com/go/RELEASING.md
new file mode 100644
index 000000000..c2735c53b
--- /dev/null
+++ b/vendor/cloud.google.com/go/RELEASING.md
@@ -0,0 +1,13 @@
+# How to Release this Repo
+
+1. Determine the current release version with `git tag -l`. It should look
+ something like `vX.Y.Z`. We'll call the current
+ version `$CV` and the new version `$NV`.
+1. On master, run `git log $CV..` to list all the changes since the last
+ release.
+1. Edit the News section of `README.md` to include a summary of the changes.
+1. Mail the CL containing the `README.md` changes. When the CL is approved, submit it.
+1. Without submitting any other CLs:
+ a. Switch to master.
+ b. Tag the repo with the next version: `git tag $NV`.
+ c. Push the tag: `git push origin $NV`.
diff --git a/vendor/cloud.google.com/go/authexample_test.go b/vendor/cloud.google.com/go/authexample_test.go
index fe75467f9..9fc8d2855 100644
--- a/vendor/cloud.google.com/go/authexample_test.go
+++ b/vendor/cloud.google.com/go/authexample_test.go
@@ -16,16 +16,18 @@ package cloud_test
import (
"cloud.google.com/go/datastore"
+ "cloud.google.com/go/pubsub"
"golang.org/x/net/context"
+ "golang.org/x/oauth2/google"
"google.golang.org/api/option"
)
+// Google Application Default Credentials is the recommended way to authorize
+// and authenticate clients.
+//
+// For information on how to create and obtain Application Default Credentials, see
+// https://developers.google.com/identity/protocols/application-default-credentials.
func Example_applicationDefaultCredentials() {
- // Google Application Default Credentials is the recommended way to authorize
- // and authenticate clients.
- //
- // See the following link on how to create and obtain Application Default Credentials:
- // https://developers.google.com/identity/protocols/application-default-credentials.
client, err := datastore.NewClient(context.Background(), "project-id")
if err != nil {
// TODO: handle error.
@@ -33,15 +35,36 @@ func Example_applicationDefaultCredentials() {
_ = client // Use the client.
}
-func Example_serviceAccountFile() {
- // Use a JSON key file associated with a Google service account to
- // authenticate and authorize. Service Account keys can be created and
- // downloaded from https://console.developers.google.com/permissions/serviceaccounts.
- //
- // Note: This example uses the datastore client, but the same steps apply to
- // the other client libraries underneath this package.
+// You can use a file with credentials to authenticate and authorize, such as a JSON
+// key file associated with a Google service account. Service Account keys can be
+// created and downloaded from
+// https://console.developers.google.com/permissions/serviceaccounts.
+//
+// This example uses the Datastore client, but the same steps apply to
+// the other client libraries underneath this package.
+func Example_credentialsFile() {
client, err := datastore.NewClient(context.Background(),
- "project-id", option.WithServiceAccountFile("/path/to/service-account-key.json"))
+ "project-id", option.WithCredentialsFile("/path/to/service-account-key.json"))
+ if err != nil {
+ // TODO: handle error.
+ }
+ _ = client // Use the client.
+}
+
+// In some cases (for instance, you don't want to store secrets on disk), you can
+// create credentials from in-memory JSON and use the WithCredentials option.
+//
+// The google package in this example is at golang.org/x/oauth2/google.
+//
+// This example uses the PubSub client, but the same steps apply to
+// the other client libraries underneath this package.
+func Example_credentialsFromJSON() {
+ ctx := context.Background()
+ creds, err := google.CredentialsFromJSON(ctx, []byte("JSON creds"), pubsub.ScopePubSub)
+ if err != nil {
+ // TODO: handle error.
+ }
+ client, err := pubsub.NewClient(ctx, "project-id", option.WithCredentials(creds))
if err != nil {
// TODO: handle error.
}
diff --git a/vendor/cloud.google.com/go/bigquery/bigquery.go b/vendor/cloud.google.com/go/bigquery/bigquery.go
index 6427a5ccf..a32f2ba4c 100644
--- a/vendor/cloud.google.com/go/bigquery/bigquery.go
+++ b/vendor/cloud.google.com/go/bigquery/bigquery.go
@@ -147,7 +147,10 @@ func runWithRetry(ctx context.Context, call func() error) error {
})
}
-// This is the correct definition of retryable according to the BigQuery team.
+// This is the correct definition of retryable according to the BigQuery team. It
+// also considers 502 ("Bad Gateway") and 503 ("Service Unavailable") errors
+// retryable; these are returned by systems between the client and the BigQuery
+// service.
func retryableError(err error) bool {
e, ok := err.(*googleapi.Error)
if !ok {
@@ -157,5 +160,5 @@ func retryableError(err error) bool {
if len(e.Errors) > 0 {
reason = e.Errors[0].Reason
}
- return e.Code == http.StatusBadGateway || reason == "backendError" || reason == "rateLimitExceeded"
+ return e.Code == http.StatusServiceUnavailable || e.Code == http.StatusBadGateway || reason == "backendError" || reason == "rateLimitExceeded"
}
diff --git a/vendor/cloud.google.com/go/bigquery/dataset.go b/vendor/cloud.google.com/go/bigquery/dataset.go
index 6a4e56db1..a9938210a 100644
--- a/vendor/cloud.google.com/go/bigquery/dataset.go
+++ b/vendor/cloud.google.com/go/bigquery/dataset.go
@@ -147,12 +147,21 @@ func accessListToBQ(a []*AccessEntry) ([]*bq.DatasetAccess, error) {
return q, nil
}
-// Delete deletes the dataset.
+// Delete deletes the dataset. Delete will fail if the dataset is not empty.
func (d *Dataset) Delete(ctx context.Context) (err error) {
+ return d.deleteInternal(ctx, false)
+}
+
+// DeleteWithContents deletes the dataset, as well as contained resources.
+func (d *Dataset) DeleteWithContents(ctx context.Context) (err error) {
+ return d.deleteInternal(ctx, true)
+}
+
+func (d *Dataset) deleteInternal(ctx context.Context, deleteContents bool) (err error) {
ctx = trace.StartSpan(ctx, "cloud.google.com/go/bigquery.Dataset.Delete")
defer func() { trace.EndSpan(ctx, err) }()
- call := d.c.bqs.Datasets.Delete(d.ProjectID, d.DatasetID).Context(ctx)
+ call := d.c.bqs.Datasets.Delete(d.ProjectID, d.DatasetID).Context(ctx).DeleteContents(deleteContents)
setClientHeader(call.Header())
return call.Do()
}
@@ -336,6 +345,9 @@ func (it *TableIterator) fetch(pageSize int, pageToken string) (string, error) {
}
func bqToTable(tr *bq.TableReference, c *Client) *Table {
+ if tr == nil {
+ return nil
+ }
return &Table{
ProjectID: tr.ProjectId,
DatasetID: tr.DatasetId,
diff --git a/vendor/cloud.google.com/go/bigquery/doc.go b/vendor/cloud.google.com/go/bigquery/doc.go
index 7a19b3702..5269af514 100644
--- a/vendor/cloud.google.com/go/bigquery/doc.go
+++ b/vendor/cloud.google.com/go/bigquery/doc.go
@@ -20,6 +20,9 @@ Note: This package is in beta. Some backwards-incompatible changes may occur.
The following assumes a basic familiarity with BigQuery concepts.
See https://cloud.google.com/bigquery/docs.
+See https://godoc.org/cloud.google.com/go for authentication, timeouts,
+connection pooling and similar aspects of this package.
+
Creating a Client
@@ -294,10 +297,5 @@ Extractor, then optionally configure it, and lastly call its Run method.
extractor.DisableHeader = true
job, err = extractor.Run(ctx)
// Poll the job for completion if desired, as above.
-
-Authentication
-
-See examples of authorization and authentication at
-https://godoc.org/cloud.google.com/go#pkg-examples.
*/
package bigquery // import "cloud.google.com/go/bigquery"
diff --git a/vendor/cloud.google.com/go/bigquery/external.go b/vendor/cloud.google.com/go/bigquery/external.go
index 36eb9d9a3..fe9836d9a 100644
--- a/vendor/cloud.google.com/go/bigquery/external.go
+++ b/vendor/cloud.google.com/go/bigquery/external.go
@@ -32,6 +32,7 @@ const (
DatastoreBackup DataFormat = "DATASTORE_BACKUP"
GoogleSheets DataFormat = "GOOGLE_SHEETS"
Bigtable DataFormat = "BIGTABLE"
+ Parquet DataFormat = "PARQUET"
)
// ExternalData is a table which is stored outside of BigQuery. It is implemented by
diff --git a/vendor/cloud.google.com/go/bigquery/file.go b/vendor/cloud.google.com/go/bigquery/file.go
index c44c90296..e5573068d 100644
--- a/vendor/cloud.google.com/go/bigquery/file.go
+++ b/vendor/cloud.google.com/go/bigquery/file.go
@@ -48,8 +48,8 @@ func (r *ReaderSource) populateLoadConfig(lc *bq.JobConfigurationLoad) io.Reader
// file may live in Google Cloud Storage (see GCSReference), or it may be
// loaded into a table via the Table.LoaderFromReader.
type FileConfig struct {
- // SourceFormat is the format of the GCS data to be read.
- // Allowed values are: CSV, Avro, JSON, DatastoreBackup. The default is CSV.
+ // SourceFormat is the format of the data to be read.
+ // Allowed values are: CSV, Avro, Parquet, JSON, DatastoreBackup. The default is CSV.
SourceFormat DataFormat
// Indicates if we should automatically infer the options and
diff --git a/vendor/cloud.google.com/go/bigquery/integration_test.go b/vendor/cloud.google.com/go/bigquery/integration_test.go
index 622998eb0..12bdeba92 100644
--- a/vendor/cloud.google.com/go/bigquery/integration_test.go
+++ b/vendor/cloud.google.com/go/bigquery/integration_test.go
@@ -34,6 +34,7 @@ import (
"cloud.google.com/go/internal"
"cloud.google.com/go/internal/pretty"
"cloud.google.com/go/internal/testutil"
+ "cloud.google.com/go/internal/uid"
"cloud.google.com/go/storage"
"golang.org/x/net/context"
"google.golang.org/api/googleapi"
@@ -55,8 +56,8 @@ var (
testTableExpiration time.Time
// BigQuery does not accept hyphens in dataset or table IDs, so we create IDs
// with underscores.
- datasetIDs = testutil.NewUIDSpaceSep("dataset", '_')
- tableIDs = testutil.NewUIDSpaceSep("table", '_')
+ datasetIDs = uid.NewSpace("dataset", &uid.Options{Sep: '_'})
+ tableIDs = uid.NewSpace("table", &uid.Options{Sep: '_'})
)
// Note: integration tests cannot be run in parallel, because TestIntegration_Location
@@ -105,28 +106,12 @@ func initIntegrationTest() func() {
}
testTableExpiration = time.Now().Add(10 * time.Minute).Round(time.Second)
return func() {
- if err := deleteDataset(ctx, dataset); err != nil {
+ if err := dataset.DeleteWithContents(ctx); err != nil {
log.Printf("could not delete %s", dataset.DatasetID)
}
}
}
-func deleteDataset(ctx context.Context, ds *Dataset) error {
- it := ds.Tables(ctx)
- for {
- tbl, err := it.Next()
- if err == iterator.Done {
- break
- }
- if err != nil {
- return err
- }
- if err := tbl.Delete(ctx); err != nil {
- return err
- }
- }
- return ds.Delete(ctx)
-}
func TestIntegration_TableCreate(t *testing.T) {
// Check that creating a record field with an empty schema is an error.
if client == nil {
@@ -167,7 +152,9 @@ func TestIntegration_TableCreateView(t *testing.T) {
if err != nil {
t.Fatalf("table.create: Did not expect an error, got: %v", err)
}
- view.Delete(ctx)
+ if err := view.Delete(ctx); err != nil {
+ t.Fatal(err)
+ }
}
func TestIntegration_TableMetadata(t *testing.T) {
@@ -312,6 +299,28 @@ func TestIntegration_DatasetDelete(t *testing.T) {
}
}
+func TestIntegration_DatasetDeleteWithContents(t *testing.T) {
+ if client == nil {
+ t.Skip("Integration tests skipped")
+ }
+ ctx := context.Background()
+ ds := client.Dataset(datasetIDs.New())
+ if err := ds.Create(ctx, nil); err != nil {
+ t.Fatalf("creating dataset %s: %v", ds.DatasetID, err)
+ }
+ table := ds.Table(tableIDs.New())
+ if err := table.Create(ctx, nil); err != nil {
+ t.Fatalf("creating table %s in dataset %s: %v", table.TableID, table.DatasetID, err)
+ }
+ // We expect failure here
+ if err := ds.Delete(ctx); err == nil {
+ t.Fatalf("non-recursive delete of dataset %s succeeded unexpectedly.", ds.DatasetID)
+ }
+ if err := ds.DeleteWithContents(ctx); err != nil {
+ t.Fatalf("deleting recursively dataset %s: %v", ds.DatasetID, err)
+ }
+}
+
func TestIntegration_DatasetUpdateETags(t *testing.T) {
if client == nil {
t.Skip("Integration tests skipped")
@@ -1570,7 +1579,7 @@ func TestIntegration_TableUseLegacySQL(t *testing.T) {
} else if !gotErr && test.err {
t.Errorf("%+v:\nsucceeded, but want error", test)
}
- view.Delete(ctx)
+ _ = view.Delete(ctx)
}
}
diff --git a/vendor/cloud.google.com/go/bigquery/job.go b/vendor/cloud.google.com/go/bigquery/job.go
index f01a0310d..afdae06b9 100644
--- a/vendor/cloud.google.com/go/bigquery/job.go
+++ b/vendor/cloud.google.com/go/bigquery/job.go
@@ -404,6 +404,9 @@ type QueryStatistics struct {
// statements INSERT, UPDATE or DELETE.
NumDMLAffectedRows int64
+ // Describes a timeline of job execution.
+ Timeline []*QueryTimelineSample
+
// ReferencedTables: [Output-only, Experimental] Referenced tables for
// the job. Queries that reference more than 50 tables will not have a
// complete list.
@@ -413,25 +416,59 @@ type QueryStatistics struct {
// non-legacy SQL queries.
Schema Schema
+ // Slot-milliseconds consumed by this query job.
+ SlotMillis int64
+
// Standard SQL: list of undeclared query parameter names detected during a
// dry run validation.
UndeclaredQueryParameterNames []string
+
+ // DDL target table.
+ DDLTargetTable *Table
+
+ // DDL Operation performed on the target table. Used to report how the
+ // query impacted the DDL target table.
+ DDLOperationPerformed string
}
// ExplainQueryStage describes one stage of a query.
type ExplainQueryStage struct {
+ // CompletedParallelInputs: Number of parallel input segments completed.
+ CompletedParallelInputs int64
+
+ // ComputeAvg: Duration the average shard spent on CPU-bound tasks.
+ ComputeAvg time.Duration
+
+ // ComputeMax: Duration the slowest shard spent on CPU-bound tasks.
+ ComputeMax time.Duration
+
// Relative amount of the total time the average shard spent on CPU-bound tasks.
ComputeRatioAvg float64
// Relative amount of the total time the slowest shard spent on CPU-bound tasks.
ComputeRatioMax float64
+ // EndTime: Stage end time.
+ EndTime time.Time
+
// Unique ID for stage within plan.
ID int64
+ // InputStages: IDs for stages that are inputs to this stage.
+ InputStages []int64
+
// Human-readable name for stage.
Name string
+ // ParallelInputs: Number of parallel input segments to be processed.
+ ParallelInputs int64
+
+ // ReadAvg: Duration the average shard spent reading input.
+ ReadAvg time.Duration
+
+ // ReadMax: Duration the slowest shard spent reading input.
+ ReadMax time.Duration
+
// Relative amount of the total time the average shard spent reading input.
ReadRatioAvg float64
@@ -444,6 +481,16 @@ type ExplainQueryStage struct {
// Number of records written by the stage.
RecordsWritten int64
+ // ShuffleOutputBytes: Total number of bytes written to shuffle.
+ ShuffleOutputBytes int64
+
+ // ShuffleOutputBytesSpilled: Total number of bytes written to shuffle
+ // and spilled to disk.
+ ShuffleOutputBytesSpilled int64
+
+ // StartTime: Stage start time.
+ StartTime time.Time
+
// Current status for the stage.
Status string
@@ -451,12 +498,24 @@ type ExplainQueryStage struct {
// chronological).
Steps []*ExplainQueryStep
+ // WaitAvg: Duration the average shard spent waiting to be scheduled.
+ WaitAvg time.Duration
+
+ // WaitMax: Duration the slowest shard spent waiting to be scheduled.
+ WaitMax time.Duration
+
// Relative amount of the total time the average shard spent waiting to be scheduled.
WaitRatioAvg float64
// Relative amount of the total time the slowest shard spent waiting to be scheduled.
WaitRatioMax float64
+ // WriteAvg: Duration the average shard spent on writing output.
+ WriteAvg time.Duration
+
+ // WriteMax: Duration the slowest shard spent on writing output.
+ WriteMax time.Duration
+
// Relative amount of the total time the average shard spent on writing output.
WriteRatioAvg float64
@@ -473,6 +532,25 @@ type ExplainQueryStep struct {
Substeps []string
}
+// QueryTimelineSample represents a sample of execution statistics at a point in time.
+type QueryTimelineSample struct {
+
+ // Total number of units currently being processed by workers, represented as largest value since last sample.
+ ActiveUnits int64
+
+ // Total parallel units of work completed by this query.
+ CompletedUnits int64
+
+ // Time elapsed since start of query execution.
+ Elapsed time.Duration
+
+ // Total parallel units of work remaining for the active stages.
+ PendingUnits int64
+
+ // Cumulative slot-milliseconds consumed by the query.
+ SlotMillis int64
+}
+
func (*ExtractStatistics) implementsStatistics() {}
func (*LoadStatistics) implementsStatistics() {}
func (*QueryStatistics) implementsStatistics() {}
@@ -667,12 +745,16 @@ func (j *Job) setStatistics(s *bq.JobStatistics, c *Client) {
js.Details = &QueryStatistics{
BillingTier: s.Query.BillingTier,
CacheHit: s.Query.CacheHit,
+ DDLTargetTable: bqToTable(s.Query.DdlTargetTable, c),
+ DDLOperationPerformed: s.Query.DdlOperationPerformed,
StatementType: s.Query.StatementType,
TotalBytesBilled: s.Query.TotalBytesBilled,
TotalBytesProcessed: s.Query.TotalBytesProcessed,
NumDMLAffectedRows: s.Query.NumDmlAffectedRows,
QueryPlan: queryPlanFromProto(s.Query.QueryPlan),
Schema: bqToSchema(s.Query.Schema),
+ SlotMillis: s.Query.TotalSlotMs,
+ Timeline: timelineFromProto(s.Query.Timeline),
ReferencedTables: tables,
UndeclaredQueryParameterNames: names,
}
@@ -691,20 +773,49 @@ func queryPlanFromProto(stages []*bq.ExplainQueryStage) []*ExplainQueryStage {
})
}
res = append(res, &ExplainQueryStage{
- ComputeRatioAvg: s.ComputeRatioAvg,
- ComputeRatioMax: s.ComputeRatioMax,
- ID: s.Id,
- Name: s.Name,
- ReadRatioAvg: s.ReadRatioAvg,
- ReadRatioMax: s.ReadRatioMax,
- RecordsRead: s.RecordsRead,
- RecordsWritten: s.RecordsWritten,
- Status: s.Status,
- Steps: steps,
- WaitRatioAvg: s.WaitRatioAvg,
- WaitRatioMax: s.WaitRatioMax,
- WriteRatioAvg: s.WriteRatioAvg,
- WriteRatioMax: s.WriteRatioMax,
+ CompletedParallelInputs: s.CompletedParallelInputs,
+ ComputeAvg: time.Duration(s.ComputeMsAvg) * time.Millisecond,
+ ComputeMax: time.Duration(s.ComputeMsMax) * time.Millisecond,
+ ComputeRatioAvg: s.ComputeRatioAvg,
+ ComputeRatioMax: s.ComputeRatioMax,
+ EndTime: time.Unix(0, s.EndMs*1e6),
+ ID: s.Id,
+ InputStages: s.InputStages,
+ Name: s.Name,
+ ParallelInputs: s.ParallelInputs,
+ ReadAvg: time.Duration(s.ReadMsAvg) * time.Millisecond,
+ ReadMax: time.Duration(s.ReadMsMax) * time.Millisecond,
+ ReadRatioAvg: s.ReadRatioAvg,
+ ReadRatioMax: s.ReadRatioMax,
+ RecordsRead: s.RecordsRead,
+ RecordsWritten: s.RecordsWritten,
+ ShuffleOutputBytes: s.ShuffleOutputBytes,
+ ShuffleOutputBytesSpilled: s.ShuffleOutputBytesSpilled,
+ StartTime: time.Unix(0, s.StartMs*1e6),
+ Status: s.Status,
+ Steps: steps,
+ WaitAvg: time.Duration(s.WaitMsAvg) * time.Millisecond,
+ WaitMax: time.Duration(s.WaitMsMax) * time.Millisecond,
+ WaitRatioAvg: s.WaitRatioAvg,
+ WaitRatioMax: s.WaitRatioMax,
+ WriteAvg: time.Duration(s.WriteMsAvg) * time.Millisecond,
+ WriteMax: time.Duration(s.WriteMsMax) * time.Millisecond,
+ WriteRatioAvg: s.WriteRatioAvg,
+ WriteRatioMax: s.WriteRatioMax,
+ })
+ }
+ return res
+}
+
+func timelineFromProto(timeline []*bq.QueryTimelineSample) []*QueryTimelineSample {
+ var res []*QueryTimelineSample
+ for _, s := range timeline {
+ res = append(res, &QueryTimelineSample{
+ ActiveUnits: s.ActiveUnits,
+ CompletedUnits: s.CompletedUnits,
+ Elapsed: time.Duration(s.ElapsedMs) * time.Millisecond,
+ PendingUnits: s.PendingUnits,
+ SlotMillis: s.TotalSlotMs,
})
}
return res
diff --git a/vendor/cloud.google.com/go/bigquery/load.go b/vendor/cloud.google.com/go/bigquery/load.go
index c09d4cc37..d833002e6 100644
--- a/vendor/cloud.google.com/go/bigquery/load.go
+++ b/vendor/cloud.google.com/go/bigquery/load.go
@@ -47,8 +47,8 @@ type LoadConfig struct {
// Custom encryption configuration (e.g., Cloud KMS keys).
DestinationEncryptionConfig *EncryptionConfig
- // SchemaUpdateOptions allows the schema of the destination table to be
- // updated as a side effect of the load job.
+ // Allows the schema of the destination table to be updated as a side effect of
+ // the load job.
SchemaUpdateOptions []string
}
diff --git a/vendor/cloud.google.com/go/bigquery/query.go b/vendor/cloud.google.com/go/bigquery/query.go
index b0a473b33..96c2893af 100644
--- a/vendor/cloud.google.com/go/bigquery/query.go
+++ b/vendor/cloud.google.com/go/bigquery/query.go
@@ -119,6 +119,10 @@ type QueryConfig struct {
// Custom encryption configuration (e.g., Cloud KMS keys).
DestinationEncryptionConfig *EncryptionConfig
+
+ // Allows the schema of the destination table to be updated as a side effect of
+ // the query job.
+ SchemaUpdateOptions []string
}
func (qc *QueryConfig) toBQ() (*bq.JobConfiguration, error) {
@@ -131,6 +135,7 @@ func (qc *QueryConfig) toBQ() (*bq.JobConfiguration, error) {
MaximumBytesBilled: qc.MaxBytesBilled,
TimePartitioning: qc.TimePartitioning.toBQ(),
DestinationEncryptionConfiguration: qc.DestinationEncryptionConfig.toBQ(),
+ SchemaUpdateOptions: qc.SchemaUpdateOptions,
}
if len(qc.TableDefinitions) > 0 {
qconf.TableDefinitions = make(map[string]bq.ExternalDataConfiguration)
@@ -162,11 +167,12 @@ func (qc *QueryConfig) toBQ() (*bq.JobConfiguration, error) {
if len(qc.Parameters) > 0 && qc.UseLegacySQL {
return nil, errors.New("bigquery: cannot provide both Parameters (implying standard SQL) and UseLegacySQL")
}
+ ptrue := true
+ pfalse := false
if qc.UseLegacySQL {
- qconf.UseLegacySql = true
+ qconf.UseLegacySql = &ptrue
} else {
- qconf.UseLegacySql = false
- qconf.ForceSendFields = append(qconf.ForceSendFields, "UseLegacySql")
+ qconf.UseLegacySql = &pfalse
}
if qc.Dst != nil && !qc.Dst.implicitTable() {
qconf.DestinationTable = qc.Dst.toBQ()
@@ -188,18 +194,21 @@ func (qc *QueryConfig) toBQ() (*bq.JobConfiguration, error) {
func bqToQueryConfig(q *bq.JobConfiguration, c *Client) (*QueryConfig, error) {
qq := q.Query
qc := &QueryConfig{
- Labels: q.Labels,
- DryRun: q.DryRun,
- Q: qq.Query,
- CreateDisposition: TableCreateDisposition(qq.CreateDisposition),
- WriteDisposition: TableWriteDisposition(qq.WriteDisposition),
- AllowLargeResults: qq.AllowLargeResults,
- Priority: QueryPriority(qq.Priority),
- MaxBytesBilled: qq.MaximumBytesBilled,
- UseLegacySQL: qq.UseLegacySql,
- UseStandardSQL: !qq.UseLegacySql,
- TimePartitioning: bqToTimePartitioning(qq.TimePartitioning),
+ Labels: q.Labels,
+ DryRun: q.DryRun,
+ Q: qq.Query,
+ CreateDisposition: TableCreateDisposition(qq.CreateDisposition),
+ WriteDisposition: TableWriteDisposition(qq.WriteDisposition),
+ AllowLargeResults: qq.AllowLargeResults,
+ Priority: QueryPriority(qq.Priority),
+ MaxBytesBilled: qq.MaximumBytesBilled,
+ UseLegacySQL: qq.UseLegacySql == nil || *qq.UseLegacySql,
+ TimePartitioning: bqToTimePartitioning(qq.TimePartitioning),
+ DestinationEncryptionConfig: bqToEncryptionConfig(qq.DestinationEncryptionConfiguration),
+ SchemaUpdateOptions: qq.SchemaUpdateOptions,
}
+ qc.UseStandardSQL = !qc.UseLegacySQL
+
if len(qq.TableDefinitions) > 0 {
qc.TableDefinitions = make(map[string]ExternalData)
}
diff --git a/vendor/cloud.google.com/go/bigquery/query_test.go b/vendor/cloud.google.com/go/bigquery/query_test.go
index 68ed63ea6..bfeb3ffd5 100644
--- a/vendor/cloud.google.com/go/bigquery/query_test.go
+++ b/vendor/cloud.google.com/go/bigquery/query_test.go
@@ -26,6 +26,7 @@ import (
)
func defaultQueryJob() *bq.Job {
+ pfalse := false
return &bq.Job{
JobReference: &bq.JobReference{JobId: "RANDOM", ProjectId: "client-project-id"},
Configuration: &bq.JobConfiguration{
@@ -40,8 +41,7 @@ func defaultQueryJob() *bq.Job {
ProjectId: "def-project-id",
DatasetId: "def-dataset-id",
},
- UseLegacySql: false,
- ForceSendFields: []string{"UseLegacySql"},
+ UseLegacySql: &pfalse,
},
},
}
@@ -271,7 +271,8 @@ func TestQuery(t *testing.T) {
},
want: func() *bq.Job {
j := defaultQueryJob()
- j.Configuration.Query.UseLegacySql = true
+ ptrue := true
+ j.Configuration.Query.UseLegacySql = &ptrue
j.Configuration.Query.ForceSendFields = nil
return j
}(),
@@ -351,9 +352,12 @@ func TestConfiguringQuery(t *testing.T) {
query.DefaultDatasetID = "def-dataset-id"
query.TimePartitioning = &TimePartitioning{Expiration: 1234 * time.Second, Field: "f"}
query.DestinationEncryptionConfig = &EncryptionConfig{KMSKeyName: "keyName"}
+ query.SchemaUpdateOptions = []string{"ALLOW_FIELD_ADDITION"}
+
// Note: Other configuration fields are tested in other tests above.
// A lot of that can be consolidated once Client.Copy is gone.
+ pfalse := false
want := &bq.Job{
Configuration: &bq.JobConfiguration{
Query: &bq.JobConfigurationQuery{
@@ -362,10 +366,10 @@ func TestConfiguringQuery(t *testing.T) {
ProjectId: "def-project-id",
DatasetId: "def-dataset-id",
},
- UseLegacySql: false,
+ UseLegacySql: &pfalse,
TimePartitioning: &bq.TimePartitioning{ExpirationMs: 1234000, Field: "f", Type: "DAY"},
DestinationEncryptionConfiguration: &bq.EncryptionConfiguration{KmsKeyName: "keyName"},
- ForceSendFields: []string{"UseLegacySql"},
+ SchemaUpdateOptions: []string{"ALLOW_FIELD_ADDITION"},
},
},
JobReference: &bq.JobReference{
diff --git a/vendor/cloud.google.com/go/bigtable/admin.go b/vendor/cloud.google.com/go/bigtable/admin.go
index 2d81b32d8..75979373d 100644
--- a/vendor/cloud.google.com/go/bigtable/admin.go
+++ b/vendor/cloud.google.com/go/bigtable/admin.go
@@ -867,7 +867,7 @@ func (iac *InstanceAdminClient) Clusters(ctx context.Context, instanceId string)
// GetCluster fetches a cluster in an instance
func (iac *InstanceAdminClient) GetCluster(ctx context.Context, instanceID, clusterID string) (*ClusterInfo, error) {
ctx = mergeOutgoingMetadata(ctx, iac.md)
- req := &btapb.GetClusterRequest{Name: "projects/" + iac.project + "/instances/" + instanceID + "/clusters" + clusterID}
+ req := &btapb.GetClusterRequest{Name: "projects/" + iac.project + "/instances/" + instanceID + "/clusters/" + clusterID}
c, err := iac.iClient.GetCluster(ctx, req)
if err != nil {
return nil, err
diff --git a/vendor/cloud.google.com/go/bigtable/admin_test.go b/vendor/cloud.google.com/go/bigtable/admin_test.go
index 052844191..f248521d4 100644
--- a/vendor/cloud.google.com/go/bigtable/admin_test.go
+++ b/vendor/cloud.google.com/go/bigtable/admin_test.go
@@ -15,18 +15,17 @@
package bigtable
import (
+ "fmt"
"math"
"sort"
+ "strings"
"testing"
"time"
"cloud.google.com/go/internal/testutil"
-
- "fmt"
"golang.org/x/net/context"
"google.golang.org/api/iterator"
btapb "google.golang.org/genproto/googleapis/bigtable/admin/v2"
- "strings"
)
func TestAdminIntegration(t *testing.T) {
@@ -102,7 +101,7 @@ func TestAdminIntegration(t *testing.T) {
t.Errorf("adminClient.Tables returned %#v, want %#v", got, want)
}
- adminClient.WaitForReplication(ctx, "mytable")
+ must(adminClient.WaitForReplication(ctx, "mytable"))
if err := adminClient.DeleteTable(ctx, "myothertable"); err != nil {
t.Fatalf("Deleting table: %v", err)
@@ -172,13 +171,13 @@ func TestAdminIntegration(t *testing.T) {
}
var gotRowCount int
- tbl.ReadRows(ctx, RowRange{}, func(row Row) bool {
+ must(tbl.ReadRows(ctx, RowRange{}, func(row Row) bool {
gotRowCount += 1
if !strings.HasPrefix(row.Key(), "b") {
t.Errorf("Invalid row after dropping range: %v", row)
}
return true
- })
+ }))
if gotRowCount != 5 {
t.Errorf("Invalid row count after dropping range: got %v, want %v", gotRowCount, 5)
}
diff --git a/vendor/cloud.google.com/go/bigtable/bigtable.go b/vendor/cloud.google.com/go/bigtable/bigtable.go
index 69e261d97..7e2c8f1db 100644
--- a/vendor/cloud.google.com/go/bigtable/bigtable.go
+++ b/vendor/cloud.google.com/go/bigtable/bigtable.go
@@ -192,6 +192,9 @@ func (t *Table) ReadRows(ctx context.Context, arg RowSet, f func(Row) bool, opts
tracePrintf(ctx, attrMap, "Retry details in ReadRows")
return err
}
+ attrMap["time_secs"] = time.Since(startTime).Seconds()
+ attrMap["rowCount"] = len(res.Chunks)
+ tracePrintf(ctx, attrMap, "Details in ReadRows")
for _, cc := range res.Chunks {
row, err := cr.Process(cc)
diff --git a/vendor/cloud.google.com/go/bigtable/bttest/inmem.go b/vendor/cloud.google.com/go/bigtable/bttest/inmem.go
index c925e25f4..0c1b6897d 100644
--- a/vendor/cloud.google.com/go/bigtable/bttest/inmem.go
+++ b/vendor/cloud.google.com/go/bigtable/bttest/inmem.go
@@ -317,7 +317,8 @@ func (s *server) ReadRows(req *btpb.ReadRowsRequest, stream btpb.Bigtable_ReadRo
return true
}
- if req.Rows != nil {
+ if req.Rows != nil &&
+ len(req.Rows.RowKeys)+len(req.Rows.RowRanges) > 0 {
// Add the explicitly given keys
for _, key := range req.Rows.RowKeys {
k := string(key)
@@ -698,8 +699,7 @@ func (s *server) MutateRows(req *btpb.MutateRowsRequest, stream btpb.Bigtable_Mu
}
r.mu.Unlock()
}
- stream.Send(res)
- return nil
+ return stream.Send(res)
}
func (s *server) CheckAndMutateRow(ctx context.Context, req *btpb.CheckAndMutateRowRequest) (*btpb.CheckAndMutateRowResponse, error) {
@@ -861,12 +861,13 @@ func (s *server) ReadModifyWriteRow(ctx context.Context, req *btpb.ReadModifyWri
if !ok {
return nil, status.Errorf(codes.NotFound, "table %q not found", req.TableName)
}
- updates := make(map[string]cell) // copy of updated cells; keyed by full column name
fs := tbl.columnFamilies()
rowKey := string(req.RowKey)
r := tbl.mutableRow(rowKey)
+ resultRow := newRow(rowKey) // copy of updated cells
+
// This must be done before the row lock, acquired below, is released.
r.mu.Lock()
defer r.mu.Unlock()
@@ -914,35 +915,37 @@ func (s *server) ReadModifyWriteRow(ctx context.Context, req *btpb.ReadModifyWri
binary.BigEndian.PutUint64(val[:], uint64(v))
newCell = cell{ts: ts, value: val[:]}
}
- key := strings.Join([]string{fam, col}, ":")
- updates[key] = newCell
+
+ // Store the new cell
f.cells[col] = appendOrReplaceCell(f.cellsByColumn(col), newCell)
+
+ // Store a copy for the result row
+ resultFamily := resultRow.getOrCreateFamily(fam, fs[fam].order)
+ resultFamily.cellsByColumn(col) // create the column
+ resultFamily.cells[col] = []cell{newCell} // overwrite the cells
}
+ // Build the response using the result row
res := &btpb.Row{
- Key: req.RowKey,
+ Key: req.RowKey,
+ Families: make([]*btpb.Family, len(resultRow.families)),
}
- for col, cell := range updates {
- i := strings.Index(col, ":")
- fam, qual := col[:i], col[i+1:]
- var f *btpb.Family
- for _, ff := range res.Families {
- if ff.Name == fam {
- f = ff
- break
+
+ for i, family := range resultRow.sortedFamilies() {
+ res.Families[i] = &btpb.Family{
+ Name: family.name,
+ Columns: make([]*btpb.Column, len(family.colNames)),
+ }
+
+ for j, colName := range family.colNames {
+ res.Families[i].Columns[j] = &btpb.Column{
+ Qualifier: []byte(colName),
+ Cells: []*btpb.Cell{{
+ TimestampMicros: family.cells[colName][0].ts,
+ Value: family.cells[colName][0].value,
+ }},
}
}
- if f == nil {
- f = &btpb.Family{Name: fam}
- res.Families = append(res.Families, f)
- }
- f.Columns = append(f.Columns, &btpb.Column{
- Qualifier: []byte(qual),
- Cells: []*btpb.Cell{{
- TimestampMicros: cell.ts,
- Value: cell.value,
- }},
- })
}
return &btpb.ReadModifyWriteRowResponse{Row: res}, nil
}
diff --git a/vendor/cloud.google.com/go/bigtable/bttest/inmem_test.go b/vendor/cloud.google.com/go/bigtable/bttest/inmem_test.go
index 8b5c6d83f..e63da2203 100644
--- a/vendor/cloud.google.com/go/bigtable/bttest/inmem_test.go
+++ b/vendor/cloud.google.com/go/bigtable/bttest/inmem_test.go
@@ -23,6 +23,8 @@ import (
"testing"
"time"
+ "github.com/google/go-cmp/cmp"
+ "github.com/google/go-cmp/cmp/cmpopts"
"golang.org/x/net/context"
btapb "google.golang.org/genproto/googleapis/bigtable/admin/v2"
btpb "google.golang.org/genproto/googleapis/bigtable/v2"
@@ -99,7 +101,9 @@ func TestConcurrentMutationsReadModifyAndGC(t *testing.T) {
RowKey: []byte(fmt.Sprint(rand.Intn(100))),
Mutations: ms(),
}
- s.MutateRow(ctx, req)
+ if _, err := s.MutateRow(ctx, req); err != nil {
+ panic(err) // can't use t.Fatal in goroutine
+ }
}
}()
wg.Add(1)
@@ -548,7 +552,9 @@ func TestReadRowsOrder(t *testing.T) {
}
}
for i := count; i > 0; i-- {
- s.ReadModifyWriteRow(ctx, rmw(i))
+ if _, err := s.ReadModifyWriteRow(ctx, rmw(i)); err != nil {
+ t.Fatal(err)
+ }
}
req = &btpb.ReadRowsRequest{
TableName: tblInfo.Name,
@@ -621,6 +627,87 @@ func TestCheckAndMutateRowWithoutPredicate(t *testing.T) {
}
}
+func TestServer_ReadModifyWriteRow(t *testing.T) {
+ s := &server{
+ tables: make(map[string]*table),
+ }
+
+ ctx := context.Background()
+ newTbl := btapb.Table{
+ ColumnFamilies: map[string]*btapb.ColumnFamily{
+ "cf": {GcRule: &btapb.GcRule{Rule: &btapb.GcRule_MaxNumVersions{MaxNumVersions: 1}}},
+ },
+ }
+ tbl, err := s.CreateTable(ctx, &btapb.CreateTableRequest{Parent: "cluster", TableId: "t", Table: &newTbl})
+ if err != nil {
+ t.Fatalf("Creating table: %v", err)
+ }
+
+ req := &btpb.ReadModifyWriteRowRequest{
+ TableName: tbl.Name,
+ RowKey: []byte("row-key"),
+ Rules: []*btpb.ReadModifyWriteRule{
+ {
+ FamilyName: "cf",
+ ColumnQualifier: []byte("q1"),
+ Rule: &btpb.ReadModifyWriteRule_AppendValue{
+ AppendValue: []byte("a"),
+ },
+ },
+ // multiple ops for same cell
+ {
+ FamilyName: "cf",
+ ColumnQualifier: []byte("q1"),
+ Rule: &btpb.ReadModifyWriteRule_AppendValue{
+ AppendValue: []byte("b"),
+ },
+ },
+ // different cell whose qualifier should sort before the prior rules
+ {
+ FamilyName: "cf",
+ ColumnQualifier: []byte("q0"),
+ Rule: &btpb.ReadModifyWriteRule_IncrementAmount{
+ IncrementAmount: 1,
+ },
+ },
+ },
+ }
+
+ got, err := s.ReadModifyWriteRow(ctx, req)
+
+ if err != nil {
+ t.Fatalf("ReadModifyWriteRow error: %v", err)
+ }
+
+ want := &btpb.ReadModifyWriteRowResponse{
+ Row: &btpb.Row{
+ Key: []byte("row-key"),
+ Families: []*btpb.Family{{
+ Name: "cf",
+ Columns: []*btpb.Column{
+ {
+ Qualifier: []byte("q0"),
+ Cells: []*btpb.Cell{{
+ Value: []byte{0, 0, 0, 0, 0, 0, 0, 1},
+ }},
+ },
+ {
+ Qualifier: []byte("q1"),
+ Cells: []*btpb.Cell{{
+ Value: []byte("ab"),
+ }},
+ },
+ },
+ }},
+ },
+ }
+
+ diff := cmp.Diff(got, want, cmpopts.IgnoreFields(btpb.Cell{}, "TimestampMicros"))
+ if diff != "" {
+ t.Errorf("unexpected response: %s", diff)
+ }
+}
+
// helper function to populate table data
func populateTable(ctx context.Context, s *server) (*btapb.Table, error) {
newTbl := btapb.Table{
diff --git a/vendor/cloud.google.com/go/bigtable/cmd/cbt/cbt.go b/vendor/cloud.google.com/go/bigtable/cmd/cbt/cbt.go
index 203564774..452b28dfc 100644
--- a/vendor/cloud.google.com/go/bigtable/cmd/cbt/cbt.go
+++ b/vendor/cloud.google.com/go/bigtable/cmd/cbt/cbt.go
@@ -332,7 +332,8 @@ var commands = []struct {
Name: "lookup",
Desc: "Read from a single row",
do: doLookup,
- Usage: "cbt lookup
[app-profile=]\n" +
+ Usage: "cbt lookup [cells-per-column=] [app-profile=]\n" +
+ " cells-per-column= Read only this many cells per column\n" +
" app-profile= The app profile id to use for the request (replication alpha)\n",
Required: cbtconfig.ProjectAndInstanceRequired,
},
@@ -356,12 +357,13 @@ var commands = []struct {
Desc: "Read rows",
do: doRead,
Usage: "cbt read [start=] [end=] [prefix=]" +
- " [regex=] [count=] [app-profile=]\n" +
+ " [regex=] [count=] [cells-per-column=] [app-profile=]\n" +
" start= Start reading at this row\n" +
" end= Stop reading before this row\n" +
" prefix= Read rows with this prefix\n" +
" regex= Read rows with keys matching this regex\n" +
" count= Read only this many rows\n" +
+ " cells-per-column= Read only this many cells per column\n" +
" app-profile= The app profile id to use for the request (replication alpha)\n",
Required: cbtconfig.ProjectAndInstanceRequired,
},
@@ -850,19 +852,34 @@ func doListClusters(ctx context.Context, args ...string) {
func doLookup(ctx context.Context, args ...string) {
if len(args) < 2 {
- log.Fatalf("usage: cbt lookup [app-profile=]")
+ log.Fatalf("usage: cbt lookup [cells-per-column=] [app-profile=]")
}
- var appProfile string
- if len(args) > 2 {
- i := strings.Index(args[2], "=")
+
+ parsed := make(map[string]string)
+ for _, arg := range args[2:] {
+ i := strings.Index(arg, "=")
if i < 0 {
- log.Fatalf("Bad arg %q", args[2])
+ log.Fatalf("Bad arg %q", arg)
}
- appProfile = strings.Split(args[2], "=")[1]
+ key, val := arg[:i], arg[i+1:]
+ switch key {
+ default:
+ log.Fatalf("Unknown arg key %q", key)
+ case "cells-per-column", "app-profile":
+ parsed[key] = val
+ }
+ }
+ var opts []bigtable.ReadOption
+ if cellsPerColumn := parsed["cells-per-column"]; cellsPerColumn != "" {
+ n, err := strconv.Atoi(cellsPerColumn)
+ if err != nil {
+ log.Fatalf("Bad number of cells per column %q: %v", cellsPerColumn, err)
+ }
+ opts = append(opts, bigtable.RowFilter(bigtable.LatestNFilter(n)))
}
table, row := args[0], args[1]
- tbl := getClient(bigtable.ClientConfig{AppProfile: appProfile}).Open(table)
- r, err := tbl.ReadRow(ctx, row)
+ tbl := getClient(bigtable.ClientConfig{AppProfile: parsed["app-profile"]}).Open(table)
+ r, err := tbl.ReadRow(ctx, row, opts...)
if err != nil {
log.Fatalf("Reading row: %v", err)
}
@@ -995,7 +1012,7 @@ func doRead(ctx context.Context, args ...string) {
case "limit":
// Be nicer; we used to support this, but renamed it to "end".
log.Fatalf("Unknown arg key %q; did you mean %q?", key, "end")
- case "start", "end", "prefix", "count", "regex", "app-profile":
+ case "start", "end", "prefix", "count", "cells-per-column", "regex", "app-profile":
parsed[key] = val
}
}
@@ -1021,8 +1038,22 @@ func doRead(ctx context.Context, args ...string) {
}
opts = append(opts, bigtable.LimitRows(n))
}
+
+ var filters []bigtable.Filter
+ if cellsPerColumn := parsed["cells-per-column"]; cellsPerColumn != "" {
+ n, err := strconv.Atoi(cellsPerColumn)
+ if err != nil {
+ log.Fatalf("Bad number of cells per column %q: %v", cellsPerColumn, err)
+ }
+ filters = append(filters, bigtable.LatestNFilter(n))
+ }
if regex := parsed["regex"]; regex != "" {
- opts = append(opts, bigtable.RowFilter(bigtable.RowKeyFilter(regex)))
+ filters = append(filters, bigtable.RowKeyFilter(regex))
+ }
+ if len(filters) > 1 {
+ opts = append(opts, bigtable.RowFilter(bigtable.ChainFilters(filters...)))
+ } else if len(filters) == 1 {
+ opts = append(opts, bigtable.RowFilter(filters[0]))
}
// TODO(dsymonds): Support filters.
diff --git a/vendor/cloud.google.com/go/bigtable/cmd/loadtest/loadtest.go b/vendor/cloud.google.com/go/bigtable/cmd/loadtest/loadtest.go
index 1c86ed87c..daafb3594 100644
--- a/vendor/cloud.google.com/go/bigtable/cmd/loadtest/loadtest.go
+++ b/vendor/cloud.google.com/go/bigtable/cmd/loadtest/loadtest.go
@@ -123,7 +123,7 @@ func main() {
go func() {
s := <-c
log.Printf("Caught %v, cleaning scratch table.", s)
- adminClient.DeleteTable(context.Background(), *scratchTable)
+ _ = adminClient.DeleteTable(context.Background(), *scratchTable)
os.Exit(1)
}()
diff --git a/vendor/cloud.google.com/go/bigtable/doc.go b/vendor/cloud.google.com/go/bigtable/doc.go
index 0d7706f07..f371eb797 100644
--- a/vendor/cloud.google.com/go/bigtable/doc.go
+++ b/vendor/cloud.google.com/go/bigtable/doc.go
@@ -19,6 +19,10 @@ Package bigtable is an API to Google Cloud Bigtable.
See https://cloud.google.com/bigtable/docs/ for general product documentation.
+See https://godoc.org/cloud.google.com/go for authentication, timeouts,
+connection pooling and similar aspects of this package.
+
+
Setup and Credentials
Use NewClient or NewAdminClient to create a client that can be used to access
@@ -92,12 +96,6 @@ If a read or write operation encounters a transient error it will be retried unt
response, an unretryable error or the context deadline is reached. Non-idempotent writes (where
the timestamp is set to ServerTime) will not be retried. In the case of ReadRows, retried calls
will not re-scan rows that have already been processed.
-
-Authentication
-
-See examples of authorization and authentication at
-https://godoc.org/cloud.google.com/go#pkg-examples.
-
*/
package bigtable // import "cloud.google.com/go/bigtable"
diff --git a/vendor/cloud.google.com/go/bigtable/internal/gax/invoke_test.go b/vendor/cloud.google.com/go/bigtable/internal/gax/invoke_test.go
index 6d3c67e96..b10ec5961 100644
--- a/vendor/cloud.google.com/go/bigtable/internal/gax/invoke_test.go
+++ b/vendor/cloud.google.com/go/bigtable/internal/gax/invoke_test.go
@@ -34,7 +34,7 @@ func TestRandomizedDelays(t *testing.T) {
deadline := time.Now().Add(1 * time.Second)
ctx, _ := context.WithDeadline(context.Background(), deadline)
var invokeTime time.Time
- Invoke(ctx, func(childCtx context.Context) error {
+ _ = Invoke(ctx, func(childCtx context.Context) error {
// Keep failing, make sure we never slept more than max (plus a fudge factor)
if !invokeTime.IsZero() {
if got, want := time.Since(invokeTime), max; got > (want + 20*time.Millisecond) {
diff --git a/vendor/cloud.google.com/go/bigtable/internal/stat/stats.go b/vendor/cloud.google.com/go/bigtable/internal/stat/stats.go
index 5fb047f60..9baa5421b 100644
--- a/vendor/cloud.google.com/go/bigtable/internal/stat/stats.go
+++ b/vendor/cloud.google.com/go/bigtable/internal/stat/stats.go
@@ -123,10 +123,15 @@ func (agg *Aggregate) String() string {
// WriteCSV writes a csv file to the given Writer,
// with a header row and one row per aggregate.
-func WriteCSV(aggs []*Aggregate, iow io.Writer) error {
+func WriteCSV(aggs []*Aggregate, iow io.Writer) (err error) {
w := csv.NewWriter(iow)
- defer w.Flush()
- err := w.Write([]string{"name", "count", "errors", "min", "median", "max", "p75", "p90", "p95", "p99"})
+ defer func() {
+ w.Flush()
+ if err == nil {
+ err = w.Error()
+ }
+ }()
+ err = w.Write([]string{"name", "count", "errors", "min", "median", "max", "p75", "p90", "p95", "p99"})
if err != nil {
return err
}
diff --git a/vendor/cloud.google.com/go/bigtable/reader_test.go b/vendor/cloud.google.com/go/bigtable/reader_test.go
index f2028917c..e1a7f0629 100644
--- a/vendor/cloud.google.com/go/bigtable/reader_test.go
+++ b/vendor/cloud.google.com/go/bigtable/reader_test.go
@@ -60,10 +60,10 @@ func TestSingleCell(t *testing.T) {
func TestMultipleCells(t *testing.T) {
cr := newChunkReader()
- cr.Process(cc("rs", "fm1", "col1", 0, "val1", 0, false))
- cr.Process(cc("rs", "fm1", "col1", 1, "val2", 0, false))
- cr.Process(cc("rs", "fm1", "col2", 0, "val3", 0, false))
- cr.Process(cc("rs", "fm2", "col1", 0, "val4", 0, false))
+ mustProcess(t, cr, cc("rs", "fm1", "col1", 0, "val1", 0, false))
+ mustProcess(t, cr, cc("rs", "fm1", "col1", 1, "val2", 0, false))
+ mustProcess(t, cr, cc("rs", "fm1", "col2", 0, "val3", 0, false))
+ mustProcess(t, cr, cc("rs", "fm2", "col1", 0, "val4", 0, false))
row, err := cr.Process(cc("rs", "fm2", "col2", 1, "extralongval5", 0, true))
if err != nil {
t.Fatalf("Processing chunk: %v", err)
@@ -95,8 +95,8 @@ func TestMultipleCells(t *testing.T) {
func TestSplitCells(t *testing.T) {
cr := newChunkReader()
- cr.Process(cc("rs", "fm1", "col1", 0, "hello ", 11, false))
- cr.Process(ccData("world", 0, false))
+ mustProcess(t, cr, cc("rs", "fm1", "col1", 0, "hello ", 11, false))
+ mustProcess(t, cr, ccData("world", 0, false))
row, err := cr.Process(cc("rs", "fm1", "col2", 0, "val2", 0, true))
if err != nil {
t.Fatalf("Processing chunk: %v", err)
@@ -171,12 +171,11 @@ func TestBlankQualifier(t *testing.T) {
func TestReset(t *testing.T) {
cr := newChunkReader()
-
- cr.Process(cc("rs", "fm1", "col1", 0, "val1", 0, false))
- cr.Process(cc("rs", "fm1", "col1", 1, "val2", 0, false))
- cr.Process(cc("rs", "fm1", "col2", 0, "val3", 0, false))
- cr.Process(ccReset())
- row, _ := cr.Process(cc("rs1", "fm1", "col1", 1, "val1", 0, true))
+ mustProcess(t, cr, cc("rs", "fm1", "col1", 0, "val1", 0, false))
+ mustProcess(t, cr, cc("rs", "fm1", "col1", 1, "val2", 0, false))
+ mustProcess(t, cr, cc("rs", "fm1", "col2", 0, "val3", 0, false))
+ mustProcess(t, cr, ccReset())
+ row := mustProcess(t, cr, cc("rs1", "fm1", "col1", 1, "val1", 0, true))
want := []ReadItem{ri("rs1", "fm1", "col1", 1, "val1")}
if !testutil.Equal(row["fm1"], want) {
t.Fatalf("Reset: got: %v\nwant: %v\n", row["fm1"], want)
@@ -189,13 +188,21 @@ func TestReset(t *testing.T) {
func TestNewFamEmptyQualifier(t *testing.T) {
cr := newChunkReader()
- cr.Process(cc("rs", "fm1", "col1", 0, "val1", 0, false))
+ mustProcess(t, cr, cc("rs", "fm1", "col1", 0, "val1", 0, false))
_, err := cr.Process(cc(nilStr, "fm2", nilStr, 0, "val2", 0, true))
if err == nil {
t.Fatalf("Expected error on second chunk with no qualifier set")
}
}
+func mustProcess(t *testing.T, cr *chunkReader, cc *btspb.ReadRowsResponse_CellChunk) Row {
+ row, err := cr.Process(cc)
+ if err != nil {
+ t.Fatal(err)
+ }
+ return row
+}
+
// The read rows acceptance test reads a json file specifying a number of tests,
// each consisting of one or more cell chunk text protos and one or more resulting
// cells or errors.
diff --git a/vendor/cloud.google.com/go/bigtable/retry_test.go b/vendor/cloud.google.com/go/bigtable/retry_test.go
index 03a9389e5..ca19543c7 100644
--- a/vendor/cloud.google.com/go/bigtable/retry_test.go
+++ b/vendor/cloud.google.com/go/bigtable/retry_test.go
@@ -179,28 +179,28 @@ func TestRetryApplyBulk(t *testing.T) {
f = func(ss grpc.ServerStream) error {
var err error
req := new(btpb.MutateRowsRequest)
- ss.RecvMsg(req)
+ must(ss.RecvMsg(req))
switch errCount {
case 0:
// Retryable request failure
err = status.Errorf(codes.Unavailable, "")
case 1:
// Two mutations fail
- writeMutateRowsResponse(ss, codes.Unavailable, codes.OK, codes.Aborted)
+ must(writeMutateRowsResponse(ss, codes.Unavailable, codes.OK, codes.Aborted))
err = nil
case 2:
// Two failures were retried. One will succeed.
if want, got := 2, len(req.Entries); want != got {
t.Errorf("2 bulk retries, got: %d, want %d", got, want)
}
- writeMutateRowsResponse(ss, codes.OK, codes.Aborted)
+ must(writeMutateRowsResponse(ss, codes.OK, codes.Aborted))
err = nil
case 3:
// One failure was retried and will succeed.
if want, got := 1, len(req.Entries); want != got {
t.Errorf("1 bulk retry, got: %d, want %d", got, want)
}
- writeMutateRowsResponse(ss, codes.OK)
+ must(writeMutateRowsResponse(ss, codes.OK))
err = nil
}
errCount++
@@ -218,12 +218,12 @@ func TestRetryApplyBulk(t *testing.T) {
f = func(ss grpc.ServerStream) error {
var err error
req := new(btpb.MutateRowsRequest)
- ss.RecvMsg(req)
+ must(ss.RecvMsg(req))
switch errCount {
case 0:
// Give non-idempotent mutation a retryable error code.
// Nothing should be retried.
- writeMutateRowsResponse(ss, codes.FailedPrecondition, codes.Aborted)
+ must(writeMutateRowsResponse(ss, codes.FailedPrecondition, codes.Aborted))
err = nil
case 1:
t.Errorf("unretryable errors: got one retry, want no retries")
@@ -245,8 +245,7 @@ func TestRetryApplyBulk(t *testing.T) {
// Test individual errors and a deadline exceeded
f = func(ss grpc.ServerStream) error {
- writeMutateRowsResponse(ss, codes.FailedPrecondition, codes.OK, codes.Aborted)
- return nil
+ return writeMutateRowsResponse(ss, codes.FailedPrecondition, codes.OK, codes.Aborted)
}
ctx, _ = context.WithTimeout(ctx, 100*time.Millisecond)
errors, err = tbl.ApplyBulk(ctx, []string{"row1", "row2", "row3"}, []*Mutation{m1, m2, m3})
@@ -320,7 +319,7 @@ func TestRetryReadRows(t *testing.T) {
f = func(ss grpc.ServerStream) error {
var err error
req := new(btpb.ReadRowsRequest)
- ss.RecvMsg(req)
+ must(ss.RecvMsg(req))
switch errCount {
case 0:
// Retryable request failure
@@ -330,7 +329,7 @@ func TestRetryReadRows(t *testing.T) {
if want, got := "a", string(req.Rows.RowRanges[0].GetStartKeyClosed()); want != got {
t.Errorf("first retry, no data received yet: got %q, want %q", got, want)
}
- writeReadRowsResponse(ss, "a", "b")
+ must(writeReadRowsResponse(ss, "a", "b"))
err = status.Errorf(codes.Unavailable, "")
case 2:
// Retryable request failure
@@ -340,7 +339,7 @@ func TestRetryReadRows(t *testing.T) {
err = status.Errorf(codes.Unavailable, "")
case 3:
// Write two more rows
- writeReadRowsResponse(ss, "c", "d")
+ must(writeReadRowsResponse(ss, "c", "d"))
err = nil
}
errCount++
@@ -348,10 +347,10 @@ func TestRetryReadRows(t *testing.T) {
}
var got []string
- tbl.ReadRows(ctx, NewRange("a", "z"), func(r Row) bool {
+ must(tbl.ReadRows(ctx, NewRange("a", "z"), func(r Row) bool {
got = append(got, r.Key())
return true
- })
+ }))
want := []string{"a", "b", "c", "d"}
if !testutil.Equal(got, want) {
t.Errorf("retry range integration: got %v, want %v", got, want)
@@ -370,3 +369,9 @@ func writeReadRowsResponse(ss grpc.ServerStream, rowKeys ...string) error {
}
return ss.SendMsg(&btpb.ReadRowsResponse{Chunks: chunks})
}
+
+func must(err error) {
+ if err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/cloud.google.com/go/cloud.go b/vendor/cloud.google.com/go/cloud.go
index 0be0df33f..5c8522146 100644
--- a/vendor/cloud.google.com/go/cloud.go
+++ b/vendor/cloud.google.com/go/cloud.go
@@ -17,8 +17,26 @@ Package cloud is the root of the packages used to access Google Cloud
Services. See https://godoc.org/cloud.google.com/go for a full list
of sub-packages.
-Examples in this package show ways to authorize and authenticate the
-sub packages.
+
+Authentication and Authorization
+
+All the clients in sub-packages support authentication via Google Application Default
+Credentials (see https://cloud.google.com/docs/authentication/production), or
+by providing a JSON key file for a Service Account. See the authentication examples
+in this package for details.
+
+
+Timeouts and Cancellation
+
+By default, all requests in sub-packages will run indefinitely, retrying on transient
+errors when correctness allows. To set timeouts or arrange for cancellation, use
+contexts. See the examples for details.
+
+Do not attempt to control the initial connection (dialing) of a service by setting a
+timeout on the context passed to NewClient. Dialing is non-blocking, so timeouts
+would be ineffective and would only interfere with credential refreshing, which uses
+the same context.
+
Connection Pooling
@@ -36,5 +54,18 @@ of cloud client libraries may specify option.WithGRPCConnectionPool(n) as a clie
option to NewClient calls. This configures the underlying gRPC connections to be
pooled and addressed in a round robin fashion.
+
+Using the Libraries with Docker
+
+Minimal docker images like Alpine lack CA certificates. This causes RPCs to appear to
+hang, because gRPC retries indefinitely. See https://github.com/GoogleCloudPlatform/google-cloud-go/issues/928
+for more information.
+
+Debugging
+
+To see gRPC logs, set the environment variable GRPC_GO_LOG_SEVERITY_LEVEL. See
+https://godoc.org/google.golang.org/grpc/grpclog for more information.
+
+For HTTP logging, set the GODEBUG environment variable to "http2debug=1" or "http2debug=2".
*/
package cloud // import "cloud.google.com/go"
diff --git a/vendor/cloud.google.com/go/cloudtasks/apiv2beta2/cloud_tasks_client.go b/vendor/cloud.google.com/go/cloudtasks/apiv2beta2/cloud_tasks_client.go
new file mode 100644
index 000000000..c68cb59cd
--- /dev/null
+++ b/vendor/cloud.google.com/go/cloudtasks/apiv2beta2/cloud_tasks_client.go
@@ -0,0 +1,763 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package cloudtasks
+
+import (
+ "math"
+ "time"
+
+ "cloud.google.com/go/internal/version"
+ gax "github.com/googleapis/gax-go"
+ "golang.org/x/net/context"
+ "google.golang.org/api/iterator"
+ "google.golang.org/api/option"
+ "google.golang.org/api/transport"
+ taskspb "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2"
+ iampb "google.golang.org/genproto/googleapis/iam/v1"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+)
+
+// CallOptions contains the retry settings for each method of Client.
+type CallOptions struct {
+ ListQueues []gax.CallOption
+ GetQueue []gax.CallOption
+ CreateQueue []gax.CallOption
+ UpdateQueue []gax.CallOption
+ DeleteQueue []gax.CallOption
+ PurgeQueue []gax.CallOption
+ PauseQueue []gax.CallOption
+ ResumeQueue []gax.CallOption
+ GetIamPolicy []gax.CallOption
+ SetIamPolicy []gax.CallOption
+ TestIamPermissions []gax.CallOption
+ ListTasks []gax.CallOption
+ GetTask []gax.CallOption
+ CreateTask []gax.CallOption
+ DeleteTask []gax.CallOption
+ LeaseTasks []gax.CallOption
+ AcknowledgeTask []gax.CallOption
+ RenewLease []gax.CallOption
+ CancelLease []gax.CallOption
+ RunTask []gax.CallOption
+}
+
+func defaultClientOptions() []option.ClientOption {
+ return []option.ClientOption{
+ option.WithEndpoint("cloudtasks.googleapis.com:443"),
+ option.WithScopes(DefaultAuthScopes()...),
+ }
+}
+
+func defaultCallOptions() *CallOptions {
+ retry := map[[2]string][]gax.CallOption{
+ {"default", "idempotent"}: {
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.3,
+ })
+ }),
+ },
+ }
+ return &CallOptions{
+ ListQueues: retry[[2]string{"default", "idempotent"}],
+ GetQueue: retry[[2]string{"default", "idempotent"}],
+ CreateQueue: retry[[2]string{"default", "non_idempotent"}],
+ UpdateQueue: retry[[2]string{"default", "non_idempotent"}],
+ DeleteQueue: retry[[2]string{"default", "non_idempotent"}],
+ PurgeQueue: retry[[2]string{"default", "non_idempotent"}],
+ PauseQueue: retry[[2]string{"default", "non_idempotent"}],
+ ResumeQueue: retry[[2]string{"default", "non_idempotent"}],
+ GetIamPolicy: retry[[2]string{"default", "idempotent"}],
+ SetIamPolicy: retry[[2]string{"default", "non_idempotent"}],
+ TestIamPermissions: retry[[2]string{"default", "idempotent"}],
+ ListTasks: retry[[2]string{"default", "idempotent"}],
+ GetTask: retry[[2]string{"default", "idempotent"}],
+ CreateTask: retry[[2]string{"default", "non_idempotent"}],
+ DeleteTask: retry[[2]string{"default", "idempotent"}],
+ LeaseTasks: retry[[2]string{"default", "non_idempotent"}],
+ AcknowledgeTask: retry[[2]string{"default", "non_idempotent"}],
+ RenewLease: retry[[2]string{"default", "non_idempotent"}],
+ CancelLease: retry[[2]string{"default", "non_idempotent"}],
+ RunTask: retry[[2]string{"default", "non_idempotent"}],
+ }
+}
+
+// Client is a client for interacting with Cloud Tasks API.
+type Client struct {
+ // The connection to the service.
+ conn *grpc.ClientConn
+
+ // The gRPC API client.
+ client taskspb.CloudTasksClient
+
+ // The call options for this service.
+ CallOptions *CallOptions
+
+ // The x-goog-* metadata to be sent with each request.
+ xGoogMetadata metadata.MD
+}
+
+// NewClient creates a new cloud tasks client.
+//
+// Cloud Tasks allows developers to manage the execution of background
+// work in their applications.
+func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) {
+ conn, err := transport.DialGRPC(ctx, append(defaultClientOptions(), opts...)...)
+ if err != nil {
+ return nil, err
+ }
+ c := &Client{
+ conn: conn,
+ CallOptions: defaultCallOptions(),
+
+ client: taskspb.NewCloudTasksClient(conn),
+ }
+ c.setGoogleClientInfo()
+ return c, nil
+}
+
+// Connection returns the client's connection to the API service.
+func (c *Client) Connection() *grpc.ClientConn {
+ return c.conn
+}
+
+// Close closes the connection to the API service. The user should invoke this when
+// the client is no longer required.
+func (c *Client) Close() error {
+ return c.conn.Close()
+}
+
+// setGoogleClientInfo sets the name and version of the application in
+// the `x-goog-api-client` header passed on each request. Intended for
+// use by Google-written clients.
+func (c *Client) setGoogleClientInfo(keyval ...string) {
+ kv := append([]string{"gl-go", version.Go()}, keyval...)
+ kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
+ c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
+}
+
+// ListQueues lists queues.
+//
+// Queues are returned in lexicographical order.
+func (c *Client) ListQueues(ctx context.Context, req *taskspb.ListQueuesRequest, opts ...gax.CallOption) *QueueIterator {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.ListQueues[0:len(c.CallOptions.ListQueues):len(c.CallOptions.ListQueues)], opts...)
+ it := &QueueIterator{}
+ it.InternalFetch = func(pageSize int, pageToken string) ([]*taskspb.Queue, string, error) {
+ var resp *taskspb.ListQueuesResponse
+ req.PageToken = pageToken
+ if pageSize > math.MaxInt32 {
+ req.PageSize = math.MaxInt32
+ } else {
+ req.PageSize = int32(pageSize)
+ }
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.ListQueues(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, "", err
+ }
+ return resp.Queues, resp.NextPageToken, nil
+ }
+ fetch := func(pageSize int, pageToken string) (string, error) {
+ items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
+ if err != nil {
+ return "", err
+ }
+ it.items = append(it.items, items...)
+ return nextPageToken, nil
+ }
+ it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
+ return it
+}
+
+// GetQueue gets a queue.
+func (c *Client) GetQueue(ctx context.Context, req *taskspb.GetQueueRequest, opts ...gax.CallOption) (*taskspb.Queue, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.GetQueue[0:len(c.CallOptions.GetQueue):len(c.CallOptions.GetQueue)], opts...)
+ var resp *taskspb.Queue
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.GetQueue(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// CreateQueue creates a queue.
+//
+// Queues created with this method allow tasks to live for a maximum of 31
+// days. After a task is 31 days old, the task will be deleted regardless of whether
+// it was dispatched or not.
+//
+// WARNING: Using this method may have unintended side effects if you are
+// using an App Engine queue.yaml or queue.xml file to manage your queues.
+// Read
+// Overview of Queue Management and queue.yaml (at /cloud-tasks/docs/queue-yaml)
+// before using this method.
+func (c *Client) CreateQueue(ctx context.Context, req *taskspb.CreateQueueRequest, opts ...gax.CallOption) (*taskspb.Queue, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.CreateQueue[0:len(c.CallOptions.CreateQueue):len(c.CallOptions.CreateQueue)], opts...)
+ var resp *taskspb.Queue
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.CreateQueue(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// UpdateQueue updates a queue.
+//
+// This method creates the queue if it does not exist and updates
+// the queue if it does exist.
+//
+// Queues created with this method allow tasks to live for a maximum of 31
+// days. After a task is 31 days old, the task will be deleted regardless of whether
+// it was dispatched or not.
+//
+// WARNING: Using this method may have unintended side effects if you are
+// using an App Engine queue.yaml or queue.xml file to manage your queues.
+// Read
+// Overview of Queue Management and queue.yaml (at /cloud-tasks/docs/queue-yaml)
+// before using this method.
+func (c *Client) UpdateQueue(ctx context.Context, req *taskspb.UpdateQueueRequest, opts ...gax.CallOption) (*taskspb.Queue, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.UpdateQueue[0:len(c.CallOptions.UpdateQueue):len(c.CallOptions.UpdateQueue)], opts...)
+ var resp *taskspb.Queue
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.UpdateQueue(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// DeleteQueue deletes a queue.
+//
+// This command will delete the queue even if it has tasks in it.
+//
+// Note: If you delete a queue, a queue with the same name can't be created
+// for 7 days.
+//
+// WARNING: Using this method may have unintended side effects if you are
+// using an App Engine queue.yaml or queue.xml file to manage your queues.
+// Read
+// Overview of Queue Management and queue.yaml (at /cloud-tasks/docs/queue-yaml)
+// before using this method.
+func (c *Client) DeleteQueue(ctx context.Context, req *taskspb.DeleteQueueRequest, opts ...gax.CallOption) error {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.DeleteQueue[0:len(c.CallOptions.DeleteQueue):len(c.CallOptions.DeleteQueue)], opts...)
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ _, err = c.client.DeleteQueue(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ return err
+}
+
+// PurgeQueue purges a queue by deleting all of its tasks.
+//
+// All tasks created before this method is called are permanently deleted.
+//
+// Purge operations can take up to one minute to take effect. Tasks
+// might be dispatched before the purge takes effect. A purge is irreversible.
+func (c *Client) PurgeQueue(ctx context.Context, req *taskspb.PurgeQueueRequest, opts ...gax.CallOption) (*taskspb.Queue, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.PurgeQueue[0:len(c.CallOptions.PurgeQueue):len(c.CallOptions.PurgeQueue)], opts...)
+ var resp *taskspb.Queue
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.PurgeQueue(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// PauseQueue pauses the queue.
+//
+// If a queue is paused then the system will stop dispatching tasks
+// until the queue is resumed via
+// [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added
+// when the queue is paused. A queue is paused if its
+// [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
+func (c *Client) PauseQueue(ctx context.Context, req *taskspb.PauseQueueRequest, opts ...gax.CallOption) (*taskspb.Queue, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.PauseQueue[0:len(c.CallOptions.PauseQueue):len(c.CallOptions.PauseQueue)], opts...)
+ var resp *taskspb.Queue
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.PauseQueue(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// ResumeQueue resume a queue.
+//
+// This method resumes a queue after it has been
+// [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or
+// [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored
+// in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it
+// will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING].
+//
+// WARNING: Resuming many high-QPS queues at the same time can
+// lead to target overloading. If you are resuming high-QPS
+// queues, follow the 500/50/5 pattern described in
+// Managing Cloud Tasks Scaling Risks (at /cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf).
+func (c *Client) ResumeQueue(ctx context.Context, req *taskspb.ResumeQueueRequest, opts ...gax.CallOption) (*taskspb.Queue, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.ResumeQueue[0:len(c.CallOptions.ResumeQueue):len(c.CallOptions.ResumeQueue)], opts...)
+ var resp *taskspb.Queue
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.ResumeQueue(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// GetIamPolicy gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue].
+// Returns an empty policy if the resource exists and does not have a policy
+// set.
+//
+// Authorization requires the following Google IAM (at /iam) permission on the
+// specified resource parent:
+//
+// cloudtasks.queues.getIamPolicy
+func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.GetIamPolicy[0:len(c.CallOptions.GetIamPolicy):len(c.CallOptions.GetIamPolicy)], opts...)
+ var resp *iampb.Policy
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// SetIamPolicy sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing
+// policy.
+//
+// Note: The Cloud Console does not check queue-level IAM permissions yet.
+// Project-level permissions are required to use the Cloud Console.
+//
+// Authorization requires the following Google IAM (at /iam) permission on the
+// specified resource parent:
+//
+// cloudtasks.queues.setIamPolicy
+func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.SetIamPolicy[0:len(c.CallOptions.SetIamPolicy):len(c.CallOptions.SetIamPolicy)], opts...)
+ var resp *iampb.Policy
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// TestIamPermissions returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue].
+// If the resource does not exist, this will return an empty set of
+// permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+//
+// Note: This operation is designed to be used for building permission-aware
+// UIs and command-line tools, not for authorization checking. This operation
+// may "fail open" without warning.
+func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.TestIamPermissions[0:len(c.CallOptions.TestIamPermissions):len(c.CallOptions.TestIamPermissions)], opts...)
+ var resp *iampb.TestIamPermissionsResponse
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// ListTasks lists the tasks in a queue.
+//
+// By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved
+// due to performance considerations;
+// [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the
+// subset of information which is returned.
+func (c *Client) ListTasks(ctx context.Context, req *taskspb.ListTasksRequest, opts ...gax.CallOption) *TaskIterator {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.ListTasks[0:len(c.CallOptions.ListTasks):len(c.CallOptions.ListTasks)], opts...)
+ it := &TaskIterator{}
+ it.InternalFetch = func(pageSize int, pageToken string) ([]*taskspb.Task, string, error) {
+ var resp *taskspb.ListTasksResponse
+ req.PageToken = pageToken
+ if pageSize > math.MaxInt32 {
+ req.PageSize = math.MaxInt32
+ } else {
+ req.PageSize = int32(pageSize)
+ }
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.ListTasks(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, "", err
+ }
+ return resp.Tasks, resp.NextPageToken, nil
+ }
+ fetch := func(pageSize int, pageToken string) (string, error) {
+ items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
+ if err != nil {
+ return "", err
+ }
+ it.items = append(it.items, items...)
+ return nextPageToken, nil
+ }
+ it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
+ return it
+}
+
+// GetTask gets a task.
+func (c *Client) GetTask(ctx context.Context, req *taskspb.GetTaskRequest, opts ...gax.CallOption) (*taskspb.Task, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.GetTask[0:len(c.CallOptions.GetTask):len(c.CallOptions.GetTask)], opts...)
+ var resp *taskspb.Task
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.GetTask(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// CreateTask creates a task and adds it to a queue.
+//
+// To add multiple tasks at the same time, use
+// HTTP batching (at /storage/docs/json_api/v1/how-tos/batch)
+// or the batching documentation for your client library, for example
+// https://developers.google.com/api-client-library/python/guide/batch.
+//
+// Tasks cannot be updated after creation; there is no UpdateTask command.
+//
+// For App Engine queues (at google.cloud.tasks.v2beta2.AppEngineHttpTarget),
+// the maximum task size is 100KB.
+//
+// For pull queues (at google.cloud.tasks.v2beta2.PullTarget), this
+// the maximum task size is 1MB.
+func (c *Client) CreateTask(ctx context.Context, req *taskspb.CreateTaskRequest, opts ...gax.CallOption) (*taskspb.Task, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.CreateTask[0:len(c.CallOptions.CreateTask):len(c.CallOptions.CreateTask)], opts...)
+ var resp *taskspb.Task
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.CreateTask(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// DeleteTask deletes a task.
+//
+// A task can be deleted if it is scheduled or dispatched. A task
+// cannot be deleted if it has completed successfully or permanently
+// failed.
+func (c *Client) DeleteTask(ctx context.Context, req *taskspb.DeleteTaskRequest, opts ...gax.CallOption) error {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.DeleteTask[0:len(c.CallOptions.DeleteTask):len(c.CallOptions.DeleteTask)], opts...)
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ _, err = c.client.DeleteTask(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ return err
+}
+
+// LeaseTasks leases tasks from a pull queue for
+// [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+//
+// This method is invoked by the worker to obtain a lease. The
+// worker must acknowledge the task via
+// [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have
+// performed the work associated with the task.
+//
+// The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that
+// the worker needs to perform the work associated with the task. To
+// return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set
+// [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to
+// [FULL][google.cloud.tasks.v2beta2.Task.View.FULL].
+//
+// A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]
+// requests are allowed per
+// queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
+// is returned when this limit is
+// exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
+// is also returned when
+// [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
+// is exceeded.
+func (c *Client) LeaseTasks(ctx context.Context, req *taskspb.LeaseTasksRequest, opts ...gax.CallOption) (*taskspb.LeaseTasksResponse, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.LeaseTasks[0:len(c.CallOptions.LeaseTasks):len(c.CallOptions.LeaseTasks)], opts...)
+ var resp *taskspb.LeaseTasksResponse
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.LeaseTasks(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// AcknowledgeTask acknowledges a pull task.
+//
+// The worker, that is, the entity that
+// [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method
+// to indicate that the work associated with the task has finished.
+//
+// The worker must acknowledge a task within the
+// [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease
+// will expire and the task will become available to be leased
+// again. After the task is acknowledged, it will not be returned
+// by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks],
+// [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or
+// [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
+//
+// To acknowledge multiple tasks at the same time, use
+// HTTP batching (at /storage/docs/json_api/v1/how-tos/batch)
+// or the batching documentation for your client library, for example
+// https://developers.google.com/api-client-library/python/guide/batch.
+func (c *Client) AcknowledgeTask(ctx context.Context, req *taskspb.AcknowledgeTaskRequest, opts ...gax.CallOption) error {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.AcknowledgeTask[0:len(c.CallOptions.AcknowledgeTask):len(c.CallOptions.AcknowledgeTask)], opts...)
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ _, err = c.client.AcknowledgeTask(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ return err
+}
+
+// RenewLease renew the current lease of a pull task.
+//
+// The worker can use this method to extend the lease by a new
+// duration, starting from now. The new task lease will be
+// returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
+func (c *Client) RenewLease(ctx context.Context, req *taskspb.RenewLeaseRequest, opts ...gax.CallOption) (*taskspb.Task, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.RenewLease[0:len(c.CallOptions.RenewLease):len(c.CallOptions.RenewLease)], opts...)
+ var resp *taskspb.Task
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.RenewLease(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// CancelLease cancel a pull task's lease.
+//
+// The worker can use this method to cancel a task's lease by
+// setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will
+// make the task available to be leased to the next caller of
+// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
+func (c *Client) CancelLease(ctx context.Context, req *taskspb.CancelLeaseRequest, opts ...gax.CallOption) (*taskspb.Task, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.CancelLease[0:len(c.CallOptions.CancelLease):len(c.CallOptions.CancelLease)], opts...)
+ var resp *taskspb.Task
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.CancelLease(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// RunTask forces a task to run now.
+//
+// When this method is called, Cloud Tasks will dispatch the task, even if
+// the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or
+// is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
+//
+// This command is meant to be used for manual debugging. For
+// example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed
+// task after a fix has been made or to manually force a task to be
+// dispatched now.
+//
+// The dispatched task is returned. That is, the task that is returned
+// contains the [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but
+// before the task is received by its target.
+//
+// If Cloud Tasks receives a successful response from the task's
+// target, then the task will be deleted; otherwise the task's
+// [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that
+// [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified
+// in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig].
+//
+// [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns
+// [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
+// task that has already succeeded or permanently failed.
+//
+// [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a
+// [pull task][google.cloud.tasks.v2beta2.PullMessage].
+func (c *Client) RunTask(ctx context.Context, req *taskspb.RunTaskRequest, opts ...gax.CallOption) (*taskspb.Task, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.RunTask[0:len(c.CallOptions.RunTask):len(c.CallOptions.RunTask)], opts...)
+ var resp *taskspb.Task
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.RunTask(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// QueueIterator manages a stream of *taskspb.Queue.
+type QueueIterator struct {
+ items []*taskspb.Queue
+ pageInfo *iterator.PageInfo
+ nextFunc func() error
+
+ // InternalFetch is for use by the Google Cloud Libraries only.
+ // It is not part of the stable interface of this package.
+ //
+ // InternalFetch returns results from a single call to the underlying RPC.
+ // The number of results is no greater than pageSize.
+ // If there are no more results, nextPageToken is empty and err is nil.
+ InternalFetch func(pageSize int, pageToken string) (results []*taskspb.Queue, nextPageToken string, err error)
+}
+
+// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
+func (it *QueueIterator) PageInfo() *iterator.PageInfo {
+ return it.pageInfo
+}
+
+// Next returns the next result. Its second return value is iterator.Done if there are no more
+// results. Once Next returns Done, all subsequent calls will return Done.
+func (it *QueueIterator) Next() (*taskspb.Queue, error) {
+ var item *taskspb.Queue
+ if err := it.nextFunc(); err != nil {
+ return item, err
+ }
+ item = it.items[0]
+ it.items = it.items[1:]
+ return item, nil
+}
+
+func (it *QueueIterator) bufLen() int {
+ return len(it.items)
+}
+
+func (it *QueueIterator) takeBuf() interface{} {
+ b := it.items
+ it.items = nil
+ return b
+}
+
+// TaskIterator manages a stream of *taskspb.Task.
+type TaskIterator struct {
+ items []*taskspb.Task
+ pageInfo *iterator.PageInfo
+ nextFunc func() error
+
+ // InternalFetch is for use by the Google Cloud Libraries only.
+ // It is not part of the stable interface of this package.
+ //
+ // InternalFetch returns results from a single call to the underlying RPC.
+ // The number of results is no greater than pageSize.
+ // If there are no more results, nextPageToken is empty and err is nil.
+ InternalFetch func(pageSize int, pageToken string) (results []*taskspb.Task, nextPageToken string, err error)
+}
+
+// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
+func (it *TaskIterator) PageInfo() *iterator.PageInfo {
+ return it.pageInfo
+}
+
+// Next returns the next result. Its second return value is iterator.Done if there are no more
+// results. Once Next returns Done, all subsequent calls will return Done.
+func (it *TaskIterator) Next() (*taskspb.Task, error) {
+ var item *taskspb.Task
+ if err := it.nextFunc(); err != nil {
+ return item, err
+ }
+ item = it.items[0]
+ it.items = it.items[1:]
+ return item, nil
+}
+
+func (it *TaskIterator) bufLen() int {
+ return len(it.items)
+}
+
+func (it *TaskIterator) takeBuf() interface{} {
+ b := it.items
+ it.items = nil
+ return b
+}
diff --git a/vendor/cloud.google.com/go/privacy/dlp/apiv2beta2/dlp_client_example_test.go b/vendor/cloud.google.com/go/cloudtasks/apiv2beta2/cloud_tasks_client_example_test.go
similarity index 56%
rename from vendor/cloud.google.com/go/privacy/dlp/apiv2beta2/dlp_client_example_test.go
rename to vendor/cloud.google.com/go/cloudtasks/apiv2beta2/cloud_tasks_client_example_test.go
index 17527d7a6..b954225b8 100644
--- a/vendor/cloud.google.com/go/privacy/dlp/apiv2beta2/dlp_client_example_test.go
+++ b/vendor/cloud.google.com/go/cloudtasks/apiv2beta2/cloud_tasks_client_example_test.go
@@ -14,18 +14,19 @@
// AUTO-GENERATED CODE. DO NOT EDIT.
-package dlp_test
+package cloudtasks_test
import (
- "cloud.google.com/go/privacy/dlp/apiv2beta2"
+ "cloud.google.com/go/cloudtasks/apiv2beta2"
"golang.org/x/net/context"
"google.golang.org/api/iterator"
- dlppb "google.golang.org/genproto/googleapis/privacy/dlp/v2beta2"
+ taskspb "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2"
+ iampb "google.golang.org/genproto/googleapis/iam/v1"
)
func ExampleNewClient() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := cloudtasks.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
@@ -33,197 +34,17 @@ func ExampleNewClient() {
_ = c
}
-func ExampleClient_InspectContent() {
+func ExampleClient_ListQueues() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := cloudtasks.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
- req := &dlppb.InspectContentRequest{
+ req := &taskspb.ListQueuesRequest{
// TODO: Fill request struct fields.
}
- resp, err := c.InspectContent(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
-}
-
-func ExampleClient_RedactImage() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.RedactImageRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.RedactImage(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
-}
-
-func ExampleClient_DeidentifyContent() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.DeidentifyContentRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.DeidentifyContent(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
-}
-
-func ExampleClient_ReidentifyContent() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.ReidentifyContentRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.ReidentifyContent(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
-}
-
-func ExampleClient_InspectDataSource() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.InspectDataSourceRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.InspectDataSource(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
-}
-
-func ExampleClient_AnalyzeDataSourceRisk() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.AnalyzeDataSourceRiskRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.AnalyzeDataSourceRisk(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
-}
-
-func ExampleClient_ListInfoTypes() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.ListInfoTypesRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.ListInfoTypes(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
-}
-
-func ExampleClient_CreateInspectTemplate() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.CreateInspectTemplateRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.CreateInspectTemplate(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
-}
-
-func ExampleClient_UpdateInspectTemplate() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.UpdateInspectTemplateRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.UpdateInspectTemplate(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
-}
-
-func ExampleClient_GetInspectTemplate() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.GetInspectTemplateRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.GetInspectTemplate(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
-}
-
-func ExampleClient_ListInspectTemplates() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.ListInspectTemplatesRequest{
- // TODO: Fill request struct fields.
- }
- it := c.ListInspectTemplates(ctx, req)
+ it := c.ListQueues(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
@@ -237,33 +58,17 @@ func ExampleClient_ListInspectTemplates() {
}
}
-func ExampleClient_DeleteInspectTemplate() {
+func ExampleClient_GetQueue() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := cloudtasks.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
- req := &dlppb.DeleteInspectTemplateRequest{
+ req := &taskspb.GetQueueRequest{
// TODO: Fill request struct fields.
}
- err = c.DeleteInspectTemplate(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
-}
-
-func ExampleClient_CreateDeidentifyTemplate() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.CreateDeidentifyTemplateRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.CreateDeidentifyTemplate(ctx, req)
+ resp, err := c.GetQueue(ctx, req)
if err != nil {
// TODO: Handle error.
}
@@ -271,17 +76,17 @@ func ExampleClient_CreateDeidentifyTemplate() {
_ = resp
}
-func ExampleClient_UpdateDeidentifyTemplate() {
+func ExampleClient_CreateQueue() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := cloudtasks.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
- req := &dlppb.UpdateDeidentifyTemplateRequest{
+ req := &taskspb.CreateQueueRequest{
// TODO: Fill request struct fields.
}
- resp, err := c.UpdateDeidentifyTemplate(ctx, req)
+ resp, err := c.CreateQueue(ctx, req)
if err != nil {
// TODO: Handle error.
}
@@ -289,17 +94,17 @@ func ExampleClient_UpdateDeidentifyTemplate() {
_ = resp
}
-func ExampleClient_GetDeidentifyTemplate() {
+func ExampleClient_UpdateQueue() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := cloudtasks.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
- req := &dlppb.GetDeidentifyTemplateRequest{
+ req := &taskspb.UpdateQueueRequest{
// TODO: Fill request struct fields.
}
- resp, err := c.GetDeidentifyTemplate(ctx, req)
+ resp, err := c.UpdateQueue(ctx, req)
if err != nil {
// TODO: Handle error.
}
@@ -307,17 +112,141 @@ func ExampleClient_GetDeidentifyTemplate() {
_ = resp
}
-func ExampleClient_ListDeidentifyTemplates() {
+func ExampleClient_DeleteQueue() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := cloudtasks.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
- req := &dlppb.ListDeidentifyTemplatesRequest{
+ req := &taskspb.DeleteQueueRequest{
// TODO: Fill request struct fields.
}
- it := c.ListDeidentifyTemplates(ctx, req)
+ err = c.DeleteQueue(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+}
+
+func ExampleClient_PurgeQueue() {
+ ctx := context.Background()
+ c, err := cloudtasks.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &taskspb.PurgeQueueRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.PurgeQueue(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleClient_PauseQueue() {
+ ctx := context.Background()
+ c, err := cloudtasks.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &taskspb.PauseQueueRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.PauseQueue(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleClient_ResumeQueue() {
+ ctx := context.Background()
+ c, err := cloudtasks.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &taskspb.ResumeQueueRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.ResumeQueue(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleClient_GetIamPolicy() {
+ ctx := context.Background()
+ c, err := cloudtasks.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &iampb.GetIamPolicyRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.GetIamPolicy(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleClient_SetIamPolicy() {
+ ctx := context.Background()
+ c, err := cloudtasks.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &iampb.SetIamPolicyRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.SetIamPolicy(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleClient_TestIamPermissions() {
+ ctx := context.Background()
+ c, err := cloudtasks.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &iampb.TestIamPermissionsRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.TestIamPermissions(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleClient_ListTasks() {
+ ctx := context.Background()
+ c, err := cloudtasks.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &taskspb.ListTasksRequest{
+ // TODO: Fill request struct fields.
+ }
+ it := c.ListTasks(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
@@ -331,57 +260,17 @@ func ExampleClient_ListDeidentifyTemplates() {
}
}
-func ExampleClient_DeleteDeidentifyTemplate() {
+func ExampleClient_GetTask() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := cloudtasks.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
- req := &dlppb.DeleteDeidentifyTemplateRequest{
+ req := &taskspb.GetTaskRequest{
// TODO: Fill request struct fields.
}
- err = c.DeleteDeidentifyTemplate(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
-}
-
-func ExampleClient_ListDlpJobs() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.ListDlpJobsRequest{
- // TODO: Fill request struct fields.
- }
- it := c.ListDlpJobs(ctx, req)
- for {
- resp, err := it.Next()
- if err == iterator.Done {
- break
- }
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
- }
-}
-
-func ExampleClient_GetDlpJob() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.GetDlpJobRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.GetDlpJob(ctx, req)
+ resp, err := c.GetTask(ctx, req)
if err != nil {
// TODO: Handle error.
}
@@ -389,34 +278,124 @@ func ExampleClient_GetDlpJob() {
_ = resp
}
-func ExampleClient_DeleteDlpJob() {
+func ExampleClient_CreateTask() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := cloudtasks.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
- req := &dlppb.DeleteDlpJobRequest{
+ req := &taskspb.CreateTaskRequest{
// TODO: Fill request struct fields.
}
- err = c.DeleteDlpJob(ctx, req)
+ resp, err := c.CreateTask(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleClient_DeleteTask() {
+ ctx := context.Background()
+ c, err := cloudtasks.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &taskspb.DeleteTaskRequest{
+ // TODO: Fill request struct fields.
+ }
+ err = c.DeleteTask(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
-func ExampleClient_CancelDlpJob() {
+func ExampleClient_LeaseTasks() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := cloudtasks.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
- req := &dlppb.CancelDlpJobRequest{
+ req := &taskspb.LeaseTasksRequest{
// TODO: Fill request struct fields.
}
- err = c.CancelDlpJob(ctx, req)
+ resp, err := c.LeaseTasks(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleClient_AcknowledgeTask() {
+ ctx := context.Background()
+ c, err := cloudtasks.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &taskspb.AcknowledgeTaskRequest{
+ // TODO: Fill request struct fields.
+ }
+ err = c.AcknowledgeTask(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
+
+func ExampleClient_RenewLease() {
+ ctx := context.Background()
+ c, err := cloudtasks.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &taskspb.RenewLeaseRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.RenewLease(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleClient_CancelLease() {
+ ctx := context.Background()
+ c, err := cloudtasks.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &taskspb.CancelLeaseRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.CancelLease(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleClient_RunTask() {
+ ctx := context.Background()
+ c, err := cloudtasks.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &taskspb.RunTaskRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.RunTask(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
diff --git a/vendor/cloud.google.com/go/dlp/apiv2beta1/doc.go b/vendor/cloud.google.com/go/cloudtasks/apiv2beta2/doc.go
similarity index 81%
rename from vendor/cloud.google.com/go/dlp/apiv2beta1/doc.go
rename to vendor/cloud.google.com/go/cloudtasks/apiv2beta2/doc.go
index 28a2d8237..43946f494 100644
--- a/vendor/cloud.google.com/go/dlp/apiv2beta1/doc.go
+++ b/vendor/cloud.google.com/go/cloudtasks/apiv2beta2/doc.go
@@ -14,15 +14,15 @@
// AUTO-GENERATED CODE. DO NOT EDIT.
-// Package dlp is an auto-generated package for the
-// DLP API.
+// Package cloudtasks is an auto-generated package for the
+// Cloud Tasks API.
//
// NOTE: This package is in alpha. It is not stable, and is likely to change.
//
-// The Google Data Loss Prevention API provides methods for detection of
-// privacy-sensitive fragments in text, images, and Google Cloud Platform
-// storage repositories.
-package dlp // import "cloud.google.com/go/dlp/apiv2beta1"
+// Manages the execution of large numbers of distributed requests. Cloud
+// Tasks
+// is in Alpha.
+package cloudtasks // import "cloud.google.com/go/cloudtasks/apiv2beta2"
import (
"golang.org/x/net/context"
diff --git a/vendor/cloud.google.com/go/cloudtasks/apiv2beta2/mock_test.go b/vendor/cloud.google.com/go/cloudtasks/apiv2beta2/mock_test.go
new file mode 100644
index 000000000..9119fa9c5
--- /dev/null
+++ b/vendor/cloud.google.com/go/cloudtasks/apiv2beta2/mock_test.go
@@ -0,0 +1,1554 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package cloudtasks
+
+import (
+ durationpb "github.com/golang/protobuf/ptypes/duration"
+ emptypb "github.com/golang/protobuf/ptypes/empty"
+ timestamppb "github.com/golang/protobuf/ptypes/timestamp"
+ taskspb "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2"
+ iampb "google.golang.org/genproto/googleapis/iam/v1"
+)
+
+import (
+ "flag"
+ "fmt"
+ "io"
+ "log"
+ "net"
+ "os"
+ "strings"
+ "testing"
+
+ "github.com/golang/protobuf/proto"
+ "github.com/golang/protobuf/ptypes"
+ "golang.org/x/net/context"
+ "google.golang.org/api/option"
+ status "google.golang.org/genproto/googleapis/rpc/status"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+ gstatus "google.golang.org/grpc/status"
+)
+
+var _ = io.EOF
+var _ = ptypes.MarshalAny
+var _ status.Status
+
+type mockCloudTasksServer struct {
+ // Embed for forward compatibility.
+ // Tests will keep working if more methods are added
+ // in the future.
+ taskspb.CloudTasksServer
+
+ reqs []proto.Message
+
+ // If set, all calls return this error.
+ err error
+
+ // responses to return if err == nil
+ resps []proto.Message
+}
+
+func (s *mockCloudTasksServer) ListQueues(ctx context.Context, req *taskspb.ListQueuesRequest) (*taskspb.ListQueuesResponse, 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].(*taskspb.ListQueuesResponse), nil
+}
+
+func (s *mockCloudTasksServer) GetQueue(ctx context.Context, req *taskspb.GetQueueRequest) (*taskspb.Queue, 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].(*taskspb.Queue), nil
+}
+
+func (s *mockCloudTasksServer) CreateQueue(ctx context.Context, req *taskspb.CreateQueueRequest) (*taskspb.Queue, 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].(*taskspb.Queue), nil
+}
+
+func (s *mockCloudTasksServer) UpdateQueue(ctx context.Context, req *taskspb.UpdateQueueRequest) (*taskspb.Queue, 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].(*taskspb.Queue), nil
+}
+
+func (s *mockCloudTasksServer) DeleteQueue(ctx context.Context, req *taskspb.DeleteQueueRequest) (*emptypb.Empty, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*emptypb.Empty), nil
+}
+
+func (s *mockCloudTasksServer) PurgeQueue(ctx context.Context, req *taskspb.PurgeQueueRequest) (*taskspb.Queue, 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].(*taskspb.Queue), nil
+}
+
+func (s *mockCloudTasksServer) PauseQueue(ctx context.Context, req *taskspb.PauseQueueRequest) (*taskspb.Queue, 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].(*taskspb.Queue), nil
+}
+
+func (s *mockCloudTasksServer) ResumeQueue(ctx context.Context, req *taskspb.ResumeQueueRequest) (*taskspb.Queue, 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].(*taskspb.Queue), nil
+}
+
+func (s *mockCloudTasksServer) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest) (*iampb.Policy, 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].(*iampb.Policy), nil
+}
+
+func (s *mockCloudTasksServer) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest) (*iampb.Policy, 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].(*iampb.Policy), nil
+}
+
+func (s *mockCloudTasksServer) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, 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].(*iampb.TestIamPermissionsResponse), nil
+}
+
+func (s *mockCloudTasksServer) ListTasks(ctx context.Context, req *taskspb.ListTasksRequest) (*taskspb.ListTasksResponse, 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].(*taskspb.ListTasksResponse), nil
+}
+
+func (s *mockCloudTasksServer) GetTask(ctx context.Context, req *taskspb.GetTaskRequest) (*taskspb.Task, 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].(*taskspb.Task), nil
+}
+
+func (s *mockCloudTasksServer) CreateTask(ctx context.Context, req *taskspb.CreateTaskRequest) (*taskspb.Task, 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].(*taskspb.Task), nil
+}
+
+func (s *mockCloudTasksServer) DeleteTask(ctx context.Context, req *taskspb.DeleteTaskRequest) (*emptypb.Empty, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*emptypb.Empty), nil
+}
+
+func (s *mockCloudTasksServer) LeaseTasks(ctx context.Context, req *taskspb.LeaseTasksRequest) (*taskspb.LeaseTasksResponse, 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].(*taskspb.LeaseTasksResponse), nil
+}
+
+func (s *mockCloudTasksServer) AcknowledgeTask(ctx context.Context, req *taskspb.AcknowledgeTaskRequest) (*emptypb.Empty, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*emptypb.Empty), nil
+}
+
+func (s *mockCloudTasksServer) RenewLease(ctx context.Context, req *taskspb.RenewLeaseRequest) (*taskspb.Task, 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].(*taskspb.Task), nil
+}
+
+func (s *mockCloudTasksServer) CancelLease(ctx context.Context, req *taskspb.CancelLeaseRequest) (*taskspb.Task, 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].(*taskspb.Task), nil
+}
+
+func (s *mockCloudTasksServer) RunTask(ctx context.Context, req *taskspb.RunTaskRequest) (*taskspb.Task, 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].(*taskspb.Task), nil
+}
+
+// clientOpt is the option tests should use to connect to the test server.
+// It is initialized by TestMain.
+var clientOpt option.ClientOption
+
+var (
+ mockCloudTasks mockCloudTasksServer
+)
+
+func TestMain(m *testing.M) {
+ flag.Parse()
+
+ serv := grpc.NewServer()
+ taskspb.RegisterCloudTasksServer(serv, &mockCloudTasks)
+
+ lis, err := net.Listen("tcp", "localhost:0")
+ if err != nil {
+ log.Fatal(err)
+ }
+ go serv.Serve(lis)
+
+ conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure())
+ if err != nil {
+ log.Fatal(err)
+ }
+ clientOpt = option.WithGRPCConn(conn)
+
+ os.Exit(m.Run())
+}
+
+func TestCloudTasksListQueues(t *testing.T) {
+ var nextPageToken string = ""
+ var queuesElement *taskspb.Queue = &taskspb.Queue{}
+ var queues = []*taskspb.Queue{queuesElement}
+ var expectedResponse = &taskspb.ListQueuesResponse{
+ NextPageToken: nextPageToken,
+ Queues: queues,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]")
+ var request = &taskspb.ListQueuesRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListQueues(context.Background(), request).Next()
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+ want := (interface{})(expectedResponse.Queues[0])
+ got := (interface{})(resp)
+ var ok bool
+
+ switch want := (want).(type) {
+ case proto.Message:
+ ok = proto.Equal(want, got.(proto.Message))
+ default:
+ ok = want == got
+ }
+ if !ok {
+ t.Errorf("wrong response %q, want %q)", got, want)
+ }
+}
+
+func TestCloudTasksListQueuesError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]")
+ var request = &taskspb.ListQueuesRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListQueues(context.Background(), request).Next()
+
+ 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 TestCloudTasksGetQueue(t *testing.T) {
+ var name2 string = "name2-1052831874"
+ var expectedResponse = &taskspb.Queue{
+ Name: name2,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &taskspb.GetQueueRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetQueue(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksGetQueueError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &taskspb.GetQueueRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetQueue(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 TestCloudTasksCreateQueue(t *testing.T) {
+ var name string = "name3373707"
+ var expectedResponse = &taskspb.Queue{
+ Name: name,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]")
+ var queue *taskspb.Queue = &taskspb.Queue{}
+ var request = &taskspb.CreateQueueRequest{
+ Parent: formattedParent,
+ Queue: queue,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CreateQueue(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksCreateQueueError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]")
+ var queue *taskspb.Queue = &taskspb.Queue{}
+ var request = &taskspb.CreateQueueRequest{
+ Parent: formattedParent,
+ Queue: queue,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CreateQueue(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 TestCloudTasksUpdateQueue(t *testing.T) {
+ var name string = "name3373707"
+ var expectedResponse = &taskspb.Queue{
+ Name: name,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var queue *taskspb.Queue = &taskspb.Queue{}
+ var request = &taskspb.UpdateQueueRequest{
+ Queue: queue,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.UpdateQueue(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksUpdateQueueError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var queue *taskspb.Queue = &taskspb.Queue{}
+ var request = &taskspb.UpdateQueueRequest{
+ Queue: queue,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.UpdateQueue(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 TestCloudTasksDeleteQueue(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &taskspb.DeleteQueueRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteQueue(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestCloudTasksDeleteQueueError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &taskspb.DeleteQueueRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteQueue(context.Background(), request)
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestCloudTasksPurgeQueue(t *testing.T) {
+ var name2 string = "name2-1052831874"
+ var expectedResponse = &taskspb.Queue{
+ Name: name2,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &taskspb.PurgeQueueRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.PurgeQueue(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksPurgeQueueError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &taskspb.PurgeQueueRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.PurgeQueue(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 TestCloudTasksPauseQueue(t *testing.T) {
+ var name2 string = "name2-1052831874"
+ var expectedResponse = &taskspb.Queue{
+ Name: name2,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &taskspb.PauseQueueRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.PauseQueue(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksPauseQueueError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &taskspb.PauseQueueRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.PauseQueue(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 TestCloudTasksResumeQueue(t *testing.T) {
+ var name2 string = "name2-1052831874"
+ var expectedResponse = &taskspb.Queue{
+ Name: name2,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &taskspb.ResumeQueueRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ResumeQueue(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksResumeQueueError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &taskspb.ResumeQueueRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ResumeQueue(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 TestCloudTasksGetIamPolicy(t *testing.T) {
+ var version int32 = 351608024
+ var etag []byte = []byte("21")
+ var expectedResponse = &iampb.Policy{
+ Version: version,
+ Etag: etag,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &iampb.GetIamPolicyRequest{
+ Resource: formattedResource,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetIamPolicy(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksGetIamPolicyError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &iampb.GetIamPolicyRequest{
+ Resource: formattedResource,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetIamPolicy(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 TestCloudTasksSetIamPolicy(t *testing.T) {
+ var version int32 = 351608024
+ var etag []byte = []byte("21")
+ var expectedResponse = &iampb.Policy{
+ Version: version,
+ Etag: etag,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var policy *iampb.Policy = &iampb.Policy{}
+ var request = &iampb.SetIamPolicyRequest{
+ Resource: formattedResource,
+ Policy: policy,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.SetIamPolicy(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksSetIamPolicyError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var policy *iampb.Policy = &iampb.Policy{}
+ var request = &iampb.SetIamPolicyRequest{
+ Resource: formattedResource,
+ Policy: policy,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.SetIamPolicy(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 TestCloudTasksTestIamPermissions(t *testing.T) {
+ var expectedResponse *iampb.TestIamPermissionsResponse = &iampb.TestIamPermissionsResponse{}
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var permissions []string = nil
+ var request = &iampb.TestIamPermissionsRequest{
+ Resource: formattedResource,
+ Permissions: permissions,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.TestIamPermissions(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksTestIamPermissionsError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var permissions []string = nil
+ var request = &iampb.TestIamPermissionsRequest{
+ Resource: formattedResource,
+ Permissions: permissions,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.TestIamPermissions(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 TestCloudTasksListTasks(t *testing.T) {
+ var nextPageToken string = ""
+ var tasksElement *taskspb.Task = &taskspb.Task{}
+ var tasks = []*taskspb.Task{tasksElement}
+ var expectedResponse = &taskspb.ListTasksResponse{
+ NextPageToken: nextPageToken,
+ Tasks: tasks,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &taskspb.ListTasksRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListTasks(context.Background(), request).Next()
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+ want := (interface{})(expectedResponse.Tasks[0])
+ got := (interface{})(resp)
+ var ok bool
+
+ switch want := (want).(type) {
+ case proto.Message:
+ ok = proto.Equal(want, got.(proto.Message))
+ default:
+ ok = want == got
+ }
+ if !ok {
+ t.Errorf("wrong response %q, want %q)", got, want)
+ }
+}
+
+func TestCloudTasksListTasksError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var request = &taskspb.ListTasksRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListTasks(context.Background(), request).Next()
+
+ 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 TestCloudTasksGetTask(t *testing.T) {
+ var name2 string = "name2-1052831874"
+ var expectedResponse = &taskspb.Task{
+ Name: name2,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]")
+ var request = &taskspb.GetTaskRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetTask(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksGetTaskError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]")
+ var request = &taskspb.GetTaskRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetTask(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 TestCloudTasksCreateTask(t *testing.T) {
+ var name string = "name3373707"
+ var expectedResponse = &taskspb.Task{
+ Name: name,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var task *taskspb.Task = &taskspb.Task{}
+ var request = &taskspb.CreateTaskRequest{
+ Parent: formattedParent,
+ Task: task,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CreateTask(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksCreateTaskError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var task *taskspb.Task = &taskspb.Task{}
+ var request = &taskspb.CreateTaskRequest{
+ Parent: formattedParent,
+ Task: task,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CreateTask(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 TestCloudTasksDeleteTask(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]")
+ var request = &taskspb.DeleteTaskRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteTask(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestCloudTasksDeleteTaskError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]")
+ var request = &taskspb.DeleteTaskRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteTask(context.Background(), request)
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestCloudTasksLeaseTasks(t *testing.T) {
+ var expectedResponse *taskspb.LeaseTasksResponse = &taskspb.LeaseTasksResponse{}
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var leaseDuration *durationpb.Duration = &durationpb.Duration{}
+ var request = &taskspb.LeaseTasksRequest{
+ Parent: formattedParent,
+ LeaseDuration: leaseDuration,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.LeaseTasks(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksLeaseTasksError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]")
+ var leaseDuration *durationpb.Duration = &durationpb.Duration{}
+ var request = &taskspb.LeaseTasksRequest{
+ Parent: formattedParent,
+ LeaseDuration: leaseDuration,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.LeaseTasks(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 TestCloudTasksAcknowledgeTask(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]")
+ var scheduleTime *timestamppb.Timestamp = ×tamppb.Timestamp{}
+ var request = &taskspb.AcknowledgeTaskRequest{
+ Name: formattedName,
+ ScheduleTime: scheduleTime,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.AcknowledgeTask(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestCloudTasksAcknowledgeTaskError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]")
+ var scheduleTime *timestamppb.Timestamp = ×tamppb.Timestamp{}
+ var request = &taskspb.AcknowledgeTaskRequest{
+ Name: formattedName,
+ ScheduleTime: scheduleTime,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.AcknowledgeTask(context.Background(), request)
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestCloudTasksRenewLease(t *testing.T) {
+ var name2 string = "name2-1052831874"
+ var expectedResponse = &taskspb.Task{
+ Name: name2,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]")
+ var scheduleTime *timestamppb.Timestamp = ×tamppb.Timestamp{}
+ var leaseDuration *durationpb.Duration = &durationpb.Duration{}
+ var request = &taskspb.RenewLeaseRequest{
+ Name: formattedName,
+ ScheduleTime: scheduleTime,
+ LeaseDuration: leaseDuration,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.RenewLease(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksRenewLeaseError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]")
+ var scheduleTime *timestamppb.Timestamp = ×tamppb.Timestamp{}
+ var leaseDuration *durationpb.Duration = &durationpb.Duration{}
+ var request = &taskspb.RenewLeaseRequest{
+ Name: formattedName,
+ ScheduleTime: scheduleTime,
+ LeaseDuration: leaseDuration,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.RenewLease(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 TestCloudTasksCancelLease(t *testing.T) {
+ var name2 string = "name2-1052831874"
+ var expectedResponse = &taskspb.Task{
+ Name: name2,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]")
+ var scheduleTime *timestamppb.Timestamp = ×tamppb.Timestamp{}
+ var request = &taskspb.CancelLeaseRequest{
+ Name: formattedName,
+ ScheduleTime: scheduleTime,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CancelLease(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksCancelLeaseError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]")
+ var scheduleTime *timestamppb.Timestamp = ×tamppb.Timestamp{}
+ var request = &taskspb.CancelLeaseRequest{
+ Name: formattedName,
+ ScheduleTime: scheduleTime,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CancelLease(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 TestCloudTasksRunTask(t *testing.T) {
+ var name2 string = "name2-1052831874"
+ var expectedResponse = &taskspb.Task{
+ Name: name2,
+ }
+
+ mockCloudTasks.err = nil
+ mockCloudTasks.reqs = nil
+
+ mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]")
+ var request = &taskspb.RunTaskRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.RunTask(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudTasks.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 TestCloudTasksRunTaskError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudTasks.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]")
+ var request = &taskspb.RunTaskRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.RunTask(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
+}
diff --git a/vendor/cloud.google.com/go/datastore/datastore_test.go b/vendor/cloud.google.com/go/datastore/datastore_test.go
index 7b184fd57..e59a27a64 100644
--- a/vendor/cloud.google.com/go/datastore/datastore_test.go
+++ b/vendor/cloud.google.com/go/datastore/datastore_test.go
@@ -152,17 +152,19 @@ type NoOmit struct {
}
type OmitAll struct {
- A string `datastore:",omitempty"`
- B int `datastore:"Bb,omitempty"`
- C bool `datastore:",omitempty,noindex"`
- F []int `datastore:",omitempty"`
+ A string `datastore:",omitempty"`
+ B int `datastore:"Bb,omitempty"`
+ C bool `datastore:",omitempty,noindex"`
+ D time.Time `datastore:",omitempty"`
+ F []int `datastore:",omitempty"`
}
type Omit struct {
- A string `datastore:",omitempty"`
- B int `datastore:"Bb,omitempty"`
- C bool `datastore:",omitempty,noindex"`
- F []int `datastore:",omitempty"`
+ A string `datastore:",omitempty"`
+ B int `datastore:"Bb,omitempty"`
+ C bool `datastore:",omitempty,noindex"`
+ D time.Time `datastore:",omitempty"`
+ F []int `datastore:",omitempty"`
S `datastore:",omitempty"`
}
diff --git a/vendor/cloud.google.com/go/datastore/doc.go b/vendor/cloud.google.com/go/datastore/doc.go
index 1a05abb41..6a8e0ae96 100644
--- a/vendor/cloud.google.com/go/datastore/doc.go
+++ b/vendor/cloud.google.com/go/datastore/doc.go
@@ -15,6 +15,9 @@
/*
Package datastore provides a client for Google Cloud Datastore.
+See https://godoc.org/cloud.google.com/go for authentication, timeouts,
+connection pooling and similar aspects of this package.
+
Basic Operations
@@ -481,11 +484,5 @@ directed to the emulator instead of the production Datastore service.
To install and set up the emulator and its environment variables, see the documentation
at https://cloud.google.com/datastore/docs/tools/datastore-emulator.
-
-Authentication
-
-See examples of authorization and authentication at
-https://godoc.org/cloud.google.com/go#pkg-examples.
-
*/
package datastore // import "cloud.google.com/go/datastore"
diff --git a/vendor/cloud.google.com/go/datastore/query_test.go b/vendor/cloud.google.com/go/datastore/query_test.go
index 795fa6d88..14abaf850 100644
--- a/vendor/cloud.google.com/go/datastore/query_test.go
+++ b/vendor/cloud.google.com/go/datastore/query_test.go
@@ -475,6 +475,7 @@ func TestNamespaceQuery(t *testing.T) {
var gs []Gopher
+ // Ignore errors for the rest of this test.
client.GetAll(ctx, NewQuery("gopher"), &gs)
if got, want := <-gotNamespace, ""; got != want {
t.Errorf("GetAll: got namespace %q, want %q", got, want)
diff --git a/vendor/cloud.google.com/go/datastore/save.go b/vendor/cloud.google.com/go/datastore/save.go
index b96d07c90..b23421e20 100644
--- a/vendor/cloud.google.com/go/datastore/save.go
+++ b/vendor/cloud.google.com/go/datastore/save.go
@@ -438,6 +438,10 @@ func isEmptyValue(v reflect.Value) bool {
return v.Float() == 0
case reflect.Interface, reflect.Ptr:
return v.IsNil()
+ case reflect.Struct:
+ if t, ok := v.Interface().(time.Time); ok {
+ return t.IsZero()
+ }
}
return false
}
diff --git a/vendor/cloud.google.com/go/datastore/transaction.go b/vendor/cloud.google.com/go/datastore/transaction.go
index b480d60ef..6eb5c766e 100644
--- a/vendor/cloud.google.com/go/datastore/transaction.go
+++ b/vendor/cloud.google.com/go/datastore/transaction.go
@@ -167,7 +167,7 @@ func (c *Client) RunInTransaction(ctx context.Context, f func(tx *Transaction) e
return nil, err
}
if err := f(tx); err != nil {
- tx.Rollback()
+ _ = tx.Rollback()
return nil, err
}
if cmt, err := tx.Commit(); err != ErrConcurrentTransaction {
diff --git a/vendor/cloud.google.com/go/dialogflow/apiv2/agents_client.go b/vendor/cloud.google.com/go/dialogflow/apiv2/agents_client.go
new file mode 100644
index 000000000..00703719d
--- /dev/null
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/agents_client.go
@@ -0,0 +1,599 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package dialogflow
+
+import (
+ "math"
+ "time"
+
+ "cloud.google.com/go/internal/version"
+ "cloud.google.com/go/longrunning"
+ lroauto "cloud.google.com/go/longrunning/autogen"
+ structpbpb "github.com/golang/protobuf/ptypes/struct"
+ gax "github.com/googleapis/gax-go"
+ "golang.org/x/net/context"
+ "google.golang.org/api/iterator"
+ "google.golang.org/api/option"
+ "google.golang.org/api/transport"
+ dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
+ longrunningpb "google.golang.org/genproto/googleapis/longrunning"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+)
+
+// AgentsCallOptions contains the retry settings for each method of AgentsClient.
+type AgentsCallOptions struct {
+ GetAgent []gax.CallOption
+ SearchAgents []gax.CallOption
+ TrainAgent []gax.CallOption
+ ExportAgent []gax.CallOption
+ ImportAgent []gax.CallOption
+ RestoreAgent []gax.CallOption
+}
+
+func defaultAgentsClientOptions() []option.ClientOption {
+ return []option.ClientOption{
+ option.WithEndpoint("dialogflow.googleapis.com:443"),
+ option.WithScopes(DefaultAuthScopes()...),
+ }
+}
+
+func defaultAgentsCallOptions() *AgentsCallOptions {
+ retry := map[[2]string][]gax.CallOption{
+ {"default", "idempotent"}: {
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.3,
+ })
+ }),
+ },
+ }
+ return &AgentsCallOptions{
+ GetAgent: retry[[2]string{"default", "idempotent"}],
+ SearchAgents: retry[[2]string{"default", "idempotent"}],
+ TrainAgent: retry[[2]string{"default", "idempotent"}],
+ ExportAgent: retry[[2]string{"default", "idempotent"}],
+ ImportAgent: retry[[2]string{"default", "non_idempotent"}],
+ RestoreAgent: retry[[2]string{"default", "idempotent"}],
+ }
+}
+
+// AgentsClient is a client for interacting with Dialogflow API.
+type AgentsClient struct {
+ // The connection to the service.
+ conn *grpc.ClientConn
+
+ // The gRPC API client.
+ agentsClient dialogflowpb.AgentsClient
+
+ // LROClient is used internally to handle longrunning operations.
+ // It is exposed so that its CallOptions can be modified if required.
+ // Users should not Close this client.
+ LROClient *lroauto.OperationsClient
+
+ // The call options for this service.
+ CallOptions *AgentsCallOptions
+
+ // The x-goog-* metadata to be sent with each request.
+ xGoogMetadata metadata.MD
+}
+
+// NewAgentsClient creates a new agents client.
+//
+// Agents are best described as Natural Language Understanding (NLU) modules
+// that transform user requests into actionable data. You can include agents
+// in your app, product, or service to determine user intent and respond to the
+// user in a natural way.
+//
+// After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents], [Contexts][google.cloud.dialogflow.v2.Contexts],
+// [Entity Types][google.cloud.dialogflow.v2.EntityTypes], [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to
+// manage the flow of a conversation and match user input to predefined intents
+// and actions.
+//
+// You can create an agent using both Dialogflow Standard Edition and
+// Dialogflow Enterprise Edition. For details, see
+// Dialogflow Editions (at /dialogflow-enterprise/docs/editions).
+//
+// You can save your agent for backup or versioning by exporting the agent by
+// using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved
+// agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
+//
+// Dialogflow provides several
+// prebuilt agents (at https://dialogflow.com/docs/prebuilt-agents) for common
+// conversation scenarios such as determining a date and time, converting
+// currency, and so on.
+//
+// For more information about agents, see the
+// Dialogflow documentation (at https://dialogflow.com/docs/agents).
+func NewAgentsClient(ctx context.Context, opts ...option.ClientOption) (*AgentsClient, error) {
+ conn, err := transport.DialGRPC(ctx, append(defaultAgentsClientOptions(), opts...)...)
+ if err != nil {
+ return nil, err
+ }
+ c := &AgentsClient{
+ conn: conn,
+ CallOptions: defaultAgentsCallOptions(),
+
+ agentsClient: dialogflowpb.NewAgentsClient(conn),
+ }
+ c.setGoogleClientInfo()
+
+ c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn))
+ if err != nil {
+ // This error "should not happen", since we are just reusing old connection
+ // and never actually need to dial.
+ // If this does happen, we could leak conn. However, we cannot close conn:
+ // If the user invoked the function with option.WithGRPCConn,
+ // we would close a connection that's still in use.
+ // TODO(pongad): investigate error conditions.
+ return nil, err
+ }
+ return c, nil
+}
+
+// Connection returns the client's connection to the API service.
+func (c *AgentsClient) Connection() *grpc.ClientConn {
+ return c.conn
+}
+
+// Close closes the connection to the API service. The user should invoke this when
+// the client is no longer required.
+func (c *AgentsClient) Close() error {
+ return c.conn.Close()
+}
+
+// setGoogleClientInfo sets the name and version of the application in
+// the `x-goog-api-client` header passed on each request. Intended for
+// use by Google-written clients.
+func (c *AgentsClient) setGoogleClientInfo(keyval ...string) {
+ kv := append([]string{"gl-go", version.Go()}, keyval...)
+ kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
+ c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
+}
+
+// GetAgent retrieves the specified agent.
+func (c *AgentsClient) GetAgent(ctx context.Context, req *dialogflowpb.GetAgentRequest, opts ...gax.CallOption) (*dialogflowpb.Agent, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.GetAgent[0:len(c.CallOptions.GetAgent):len(c.CallOptions.GetAgent)], opts...)
+ var resp *dialogflowpb.Agent
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.agentsClient.GetAgent(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// SearchAgents returns the list of agents.
+//
+// Since there is at most one conversational agent per project, this method is
+// useful primarily for listing all agents across projects the caller has
+// access to. One can achieve that with a wildcard project collection id "-".
+// Refer to List
+// Sub-Collections (at https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
+func (c *AgentsClient) SearchAgents(ctx context.Context, req *dialogflowpb.SearchAgentsRequest, opts ...gax.CallOption) *AgentIterator {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.SearchAgents[0:len(c.CallOptions.SearchAgents):len(c.CallOptions.SearchAgents)], opts...)
+ it := &AgentIterator{}
+ it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Agent, string, error) {
+ var resp *dialogflowpb.SearchAgentsResponse
+ req.PageToken = pageToken
+ if pageSize > math.MaxInt32 {
+ req.PageSize = math.MaxInt32
+ } else {
+ req.PageSize = int32(pageSize)
+ }
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.agentsClient.SearchAgents(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, "", err
+ }
+ return resp.Agents, resp.NextPageToken, nil
+ }
+ fetch := func(pageSize int, pageToken string) (string, error) {
+ items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
+ if err != nil {
+ return "", err
+ }
+ it.items = append(it.items, items...)
+ return nextPageToken, nil
+ }
+ it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
+ return it
+}
+
+// TrainAgent trains the specified agent.
+//
+// Operation
+func (c *AgentsClient) TrainAgent(ctx context.Context, req *dialogflowpb.TrainAgentRequest, opts ...gax.CallOption) (*TrainAgentOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.TrainAgent[0:len(c.CallOptions.TrainAgent):len(c.CallOptions.TrainAgent)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.agentsClient.TrainAgent(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &TrainAgentOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// ExportAgent exports the specified agent to a ZIP file.
+//
+// Operation
+func (c *AgentsClient) ExportAgent(ctx context.Context, req *dialogflowpb.ExportAgentRequest, opts ...gax.CallOption) (*ExportAgentOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.ExportAgent[0:len(c.CallOptions.ExportAgent):len(c.CallOptions.ExportAgent)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.agentsClient.ExportAgent(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &ExportAgentOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// ImportAgent imports the specified agent from a ZIP file.
+//
+// Uploads new intents and entity types without deleting the existing ones.
+// Intents and entity types with the same name are replaced with the new
+// versions from ImportAgentRequest.
+//
+// Operation
+func (c *AgentsClient) ImportAgent(ctx context.Context, req *dialogflowpb.ImportAgentRequest, opts ...gax.CallOption) (*ImportAgentOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.ImportAgent[0:len(c.CallOptions.ImportAgent):len(c.CallOptions.ImportAgent)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.agentsClient.ImportAgent(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &ImportAgentOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// RestoreAgent restores the specified agent from a ZIP file.
+//
+// Replaces the current agent version with a new one. All the intents and
+// entity types in the older version are deleted.
+//
+// Operation
+func (c *AgentsClient) RestoreAgent(ctx context.Context, req *dialogflowpb.RestoreAgentRequest, opts ...gax.CallOption) (*RestoreAgentOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.RestoreAgent[0:len(c.CallOptions.RestoreAgent):len(c.CallOptions.RestoreAgent)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.agentsClient.RestoreAgent(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &RestoreAgentOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// AgentIterator manages a stream of *dialogflowpb.Agent.
+type AgentIterator struct {
+ items []*dialogflowpb.Agent
+ pageInfo *iterator.PageInfo
+ nextFunc func() error
+
+ // InternalFetch is for use by the Google Cloud Libraries only.
+ // It is not part of the stable interface of this package.
+ //
+ // InternalFetch returns results from a single call to the underlying RPC.
+ // The number of results is no greater than pageSize.
+ // If there are no more results, nextPageToken is empty and err is nil.
+ InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.Agent, nextPageToken string, err error)
+}
+
+// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
+func (it *AgentIterator) PageInfo() *iterator.PageInfo {
+ return it.pageInfo
+}
+
+// Next returns the next result. Its second return value is iterator.Done if there are no more
+// results. Once Next returns Done, all subsequent calls will return Done.
+func (it *AgentIterator) Next() (*dialogflowpb.Agent, error) {
+ var item *dialogflowpb.Agent
+ if err := it.nextFunc(); err != nil {
+ return item, err
+ }
+ item = it.items[0]
+ it.items = it.items[1:]
+ return item, nil
+}
+
+func (it *AgentIterator) bufLen() int {
+ return len(it.items)
+}
+
+func (it *AgentIterator) takeBuf() interface{} {
+ b := it.items
+ it.items = nil
+ return b
+}
+
+// ExportAgentOperation manages a long-running operation from ExportAgent.
+type ExportAgentOperation struct {
+ lro *longrunning.Operation
+}
+
+// ExportAgentOperation returns a new ExportAgentOperation from a given name.
+// The name must be that of a previously created ExportAgentOperation, possibly from a different process.
+func (c *AgentsClient) ExportAgentOperation(name string) *ExportAgentOperation {
+ return &ExportAgentOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *ExportAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.ExportAgentResponse, error) {
+ var resp dialogflowpb.ExportAgentResponse
+ if err := op.lro.WaitWithInterval(ctx, &resp, 5000*time.Millisecond, opts...); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully,
+// op.Done will return true, and the response of the operation is returned.
+// If Poll succeeds and the operation has not completed, the returned response and error are both nil.
+func (op *ExportAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.ExportAgentResponse, error) {
+ var resp dialogflowpb.ExportAgentResponse
+ if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
+ return nil, err
+ }
+ if !op.Done() {
+ return nil, nil
+ }
+ return &resp, nil
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *ExportAgentOperation) Metadata() (*structpbpb.Struct, error) {
+ var meta structpbpb.Struct
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *ExportAgentOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *ExportAgentOperation) Name() string {
+ return op.lro.Name()
+}
+
+// ImportAgentOperation manages a long-running operation from ImportAgent.
+type ImportAgentOperation struct {
+ lro *longrunning.Operation
+}
+
+// ImportAgentOperation returns a new ImportAgentOperation from a given name.
+// The name must be that of a previously created ImportAgentOperation, possibly from a different process.
+func (c *AgentsClient) ImportAgentOperation(name string) *ImportAgentOperation {
+ return &ImportAgentOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning any error encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *ImportAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.WaitWithInterval(ctx, nil, 5000*time.Millisecond, opts...)
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully, op.Done will return true.
+func (op *ImportAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.Poll(ctx, nil, opts...)
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *ImportAgentOperation) Metadata() (*structpbpb.Struct, error) {
+ var meta structpbpb.Struct
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *ImportAgentOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *ImportAgentOperation) Name() string {
+ return op.lro.Name()
+}
+
+// RestoreAgentOperation manages a long-running operation from RestoreAgent.
+type RestoreAgentOperation struct {
+ lro *longrunning.Operation
+}
+
+// RestoreAgentOperation returns a new RestoreAgentOperation from a given name.
+// The name must be that of a previously created RestoreAgentOperation, possibly from a different process.
+func (c *AgentsClient) RestoreAgentOperation(name string) *RestoreAgentOperation {
+ return &RestoreAgentOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning any error encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *RestoreAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.WaitWithInterval(ctx, nil, 5000*time.Millisecond, opts...)
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully, op.Done will return true.
+func (op *RestoreAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.Poll(ctx, nil, opts...)
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *RestoreAgentOperation) Metadata() (*structpbpb.Struct, error) {
+ var meta structpbpb.Struct
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *RestoreAgentOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *RestoreAgentOperation) Name() string {
+ return op.lro.Name()
+}
+
+// TrainAgentOperation manages a long-running operation from TrainAgent.
+type TrainAgentOperation struct {
+ lro *longrunning.Operation
+}
+
+// TrainAgentOperation returns a new TrainAgentOperation from a given name.
+// The name must be that of a previously created TrainAgentOperation, possibly from a different process.
+func (c *AgentsClient) TrainAgentOperation(name string) *TrainAgentOperation {
+ return &TrainAgentOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning any error encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *TrainAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.WaitWithInterval(ctx, nil, 5000*time.Millisecond, opts...)
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully, op.Done will return true.
+func (op *TrainAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.Poll(ctx, nil, opts...)
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *TrainAgentOperation) Metadata() (*structpbpb.Struct, error) {
+ var meta structpbpb.Struct
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *TrainAgentOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *TrainAgentOperation) Name() string {
+ return op.lro.Name()
+}
diff --git a/vendor/cloud.google.com/go/dialogflow/apiv2/agents_client_example_test.go b/vendor/cloud.google.com/go/dialogflow/apiv2/agents_client_example_test.go
new file mode 100644
index 000000000..92c18f552
--- /dev/null
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/agents_client_example_test.go
@@ -0,0 +1,156 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package dialogflow_test
+
+import (
+ "cloud.google.com/go/dialogflow/apiv2"
+ "golang.org/x/net/context"
+ "google.golang.org/api/iterator"
+ dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
+)
+
+func ExampleNewAgentsClient() {
+ ctx := context.Background()
+ c, err := dialogflow.NewAgentsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use client.
+ _ = c
+}
+
+func ExampleAgentsClient_GetAgent() {
+ ctx := context.Background()
+ c, err := dialogflow.NewAgentsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.GetAgentRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.GetAgent(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleAgentsClient_SearchAgents() {
+ ctx := context.Background()
+ c, err := dialogflow.NewAgentsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.SearchAgentsRequest{
+ // TODO: Fill request struct fields.
+ }
+ it := c.SearchAgents(ctx, req)
+ for {
+ resp, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
+
+func ExampleAgentsClient_TrainAgent() {
+ ctx := context.Background()
+ c, err := dialogflow.NewAgentsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.TrainAgentRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.TrainAgent(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ err = op.Wait(ctx)
+ // TODO: Handle error.
+}
+
+func ExampleAgentsClient_ExportAgent() {
+ ctx := context.Background()
+ c, err := dialogflow.NewAgentsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.ExportAgentRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.ExportAgent(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ resp, err := op.Wait(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleAgentsClient_ImportAgent() {
+ ctx := context.Background()
+ c, err := dialogflow.NewAgentsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.ImportAgentRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.ImportAgent(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ err = op.Wait(ctx)
+ // TODO: Handle error.
+}
+
+func ExampleAgentsClient_RestoreAgent() {
+ ctx := context.Background()
+ c, err := dialogflow.NewAgentsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.RestoreAgentRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.RestoreAgent(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ err = op.Wait(ctx)
+ // TODO: Handle error.
+}
diff --git a/vendor/cloud.google.com/go/dialogflow/apiv2/contexts_client.go b/vendor/cloud.google.com/go/dialogflow/apiv2/contexts_client.go
new file mode 100644
index 000000000..1ef1e336e
--- /dev/null
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/contexts_client.go
@@ -0,0 +1,293 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package dialogflow
+
+import (
+ "math"
+ "time"
+
+ "cloud.google.com/go/internal/version"
+ gax "github.com/googleapis/gax-go"
+ "golang.org/x/net/context"
+ "google.golang.org/api/iterator"
+ "google.golang.org/api/option"
+ "google.golang.org/api/transport"
+ dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+)
+
+// ContextsCallOptions contains the retry settings for each method of ContextsClient.
+type ContextsCallOptions struct {
+ ListContexts []gax.CallOption
+ GetContext []gax.CallOption
+ CreateContext []gax.CallOption
+ UpdateContext []gax.CallOption
+ DeleteContext []gax.CallOption
+ DeleteAllContexts []gax.CallOption
+}
+
+func defaultContextsClientOptions() []option.ClientOption {
+ return []option.ClientOption{
+ option.WithEndpoint("dialogflow.googleapis.com:443"),
+ option.WithScopes(DefaultAuthScopes()...),
+ }
+}
+
+func defaultContextsCallOptions() *ContextsCallOptions {
+ retry := map[[2]string][]gax.CallOption{
+ {"default", "idempotent"}: {
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.3,
+ })
+ }),
+ },
+ }
+ return &ContextsCallOptions{
+ ListContexts: retry[[2]string{"default", "idempotent"}],
+ GetContext: retry[[2]string{"default", "idempotent"}],
+ CreateContext: retry[[2]string{"default", "non_idempotent"}],
+ UpdateContext: retry[[2]string{"default", "non_idempotent"}],
+ DeleteContext: retry[[2]string{"default", "idempotent"}],
+ DeleteAllContexts: retry[[2]string{"default", "idempotent"}],
+ }
+}
+
+// ContextsClient is a client for interacting with Dialogflow API.
+type ContextsClient struct {
+ // The connection to the service.
+ conn *grpc.ClientConn
+
+ // The gRPC API client.
+ contextsClient dialogflowpb.ContextsClient
+
+ // The call options for this service.
+ CallOptions *ContextsCallOptions
+
+ // The x-goog-* metadata to be sent with each request.
+ xGoogMetadata metadata.MD
+}
+
+// NewContextsClient creates a new contexts client.
+//
+// A context represents additional information included with user input or with
+// an intent returned by the Dialogflow API. Contexts are helpful for
+// differentiating user input which may be vague or have a different meaning
+// depending on additional details from your application such as user setting
+// and preferences, previous user input, where the user is in your application,
+// geographic location, and so on.
+//
+// You can include contexts as input parameters of a
+// [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
+// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) request,
+// or as output contexts included in the returned intent.
+// Contexts expire when an intent is matched, after the number of DetectIntent
+// requests specified by the lifespan_count parameter, or after 10 minutes
+// if no intents are matched for a DetectIntent request.
+//
+// For more information about contexts, see the
+// Dialogflow documentation (at https://dialogflow.com/docs/contexts).
+func NewContextsClient(ctx context.Context, opts ...option.ClientOption) (*ContextsClient, error) {
+ conn, err := transport.DialGRPC(ctx, append(defaultContextsClientOptions(), opts...)...)
+ if err != nil {
+ return nil, err
+ }
+ c := &ContextsClient{
+ conn: conn,
+ CallOptions: defaultContextsCallOptions(),
+
+ contextsClient: dialogflowpb.NewContextsClient(conn),
+ }
+ c.setGoogleClientInfo()
+ return c, nil
+}
+
+// Connection returns the client's connection to the API service.
+func (c *ContextsClient) Connection() *grpc.ClientConn {
+ return c.conn
+}
+
+// Close closes the connection to the API service. The user should invoke this when
+// the client is no longer required.
+func (c *ContextsClient) Close() error {
+ return c.conn.Close()
+}
+
+// setGoogleClientInfo sets the name and version of the application in
+// the `x-goog-api-client` header passed on each request. Intended for
+// use by Google-written clients.
+func (c *ContextsClient) setGoogleClientInfo(keyval ...string) {
+ kv := append([]string{"gl-go", version.Go()}, keyval...)
+ kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
+ c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
+}
+
+// ListContexts returns the list of all contexts in the specified session.
+func (c *ContextsClient) ListContexts(ctx context.Context, req *dialogflowpb.ListContextsRequest, opts ...gax.CallOption) *ContextIterator {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.ListContexts[0:len(c.CallOptions.ListContexts):len(c.CallOptions.ListContexts)], opts...)
+ it := &ContextIterator{}
+ it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Context, string, error) {
+ var resp *dialogflowpb.ListContextsResponse
+ req.PageToken = pageToken
+ if pageSize > math.MaxInt32 {
+ req.PageSize = math.MaxInt32
+ } else {
+ req.PageSize = int32(pageSize)
+ }
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.contextsClient.ListContexts(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, "", err
+ }
+ return resp.Contexts, resp.NextPageToken, nil
+ }
+ fetch := func(pageSize int, pageToken string) (string, error) {
+ items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
+ if err != nil {
+ return "", err
+ }
+ it.items = append(it.items, items...)
+ return nextPageToken, nil
+ }
+ it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
+ return it
+}
+
+// GetContext retrieves the specified context.
+func (c *ContextsClient) GetContext(ctx context.Context, req *dialogflowpb.GetContextRequest, opts ...gax.CallOption) (*dialogflowpb.Context, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.GetContext[0:len(c.CallOptions.GetContext):len(c.CallOptions.GetContext)], opts...)
+ var resp *dialogflowpb.Context
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.contextsClient.GetContext(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// CreateContext creates a context.
+func (c *ContextsClient) CreateContext(ctx context.Context, req *dialogflowpb.CreateContextRequest, opts ...gax.CallOption) (*dialogflowpb.Context, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.CreateContext[0:len(c.CallOptions.CreateContext):len(c.CallOptions.CreateContext)], opts...)
+ var resp *dialogflowpb.Context
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.contextsClient.CreateContext(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// UpdateContext updates the specified context.
+func (c *ContextsClient) UpdateContext(ctx context.Context, req *dialogflowpb.UpdateContextRequest, opts ...gax.CallOption) (*dialogflowpb.Context, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.UpdateContext[0:len(c.CallOptions.UpdateContext):len(c.CallOptions.UpdateContext)], opts...)
+ var resp *dialogflowpb.Context
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.contextsClient.UpdateContext(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// DeleteContext deletes the specified context.
+func (c *ContextsClient) DeleteContext(ctx context.Context, req *dialogflowpb.DeleteContextRequest, opts ...gax.CallOption) error {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.DeleteContext[0:len(c.CallOptions.DeleteContext):len(c.CallOptions.DeleteContext)], opts...)
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ _, err = c.contextsClient.DeleteContext(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ return err
+}
+
+// DeleteAllContexts deletes all active contexts in the specified session.
+func (c *ContextsClient) DeleteAllContexts(ctx context.Context, req *dialogflowpb.DeleteAllContextsRequest, opts ...gax.CallOption) error {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.DeleteAllContexts[0:len(c.CallOptions.DeleteAllContexts):len(c.CallOptions.DeleteAllContexts)], opts...)
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ _, err = c.contextsClient.DeleteAllContexts(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ return err
+}
+
+// ContextIterator manages a stream of *dialogflowpb.Context.
+type ContextIterator struct {
+ items []*dialogflowpb.Context
+ pageInfo *iterator.PageInfo
+ nextFunc func() error
+
+ // InternalFetch is for use by the Google Cloud Libraries only.
+ // It is not part of the stable interface of this package.
+ //
+ // InternalFetch returns results from a single call to the underlying RPC.
+ // The number of results is no greater than pageSize.
+ // If there are no more results, nextPageToken is empty and err is nil.
+ InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.Context, nextPageToken string, err error)
+}
+
+// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
+func (it *ContextIterator) PageInfo() *iterator.PageInfo {
+ return it.pageInfo
+}
+
+// Next returns the next result. Its second return value is iterator.Done if there are no more
+// results. Once Next returns Done, all subsequent calls will return Done.
+func (it *ContextIterator) Next() (*dialogflowpb.Context, error) {
+ var item *dialogflowpb.Context
+ if err := it.nextFunc(); err != nil {
+ return item, err
+ }
+ item = it.items[0]
+ it.items = it.items[1:]
+ return item, nil
+}
+
+func (it *ContextIterator) bufLen() int {
+ return len(it.items)
+}
+
+func (it *ContextIterator) takeBuf() interface{} {
+ b := it.items
+ it.items = nil
+ return b
+}
diff --git a/vendor/cloud.google.com/go/dialogflow/apiv2/contexts_client_example_test.go b/vendor/cloud.google.com/go/dialogflow/apiv2/contexts_client_example_test.go
new file mode 100644
index 000000000..75adedb5d
--- /dev/null
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/contexts_client_example_test.go
@@ -0,0 +1,144 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package dialogflow_test
+
+import (
+ "cloud.google.com/go/dialogflow/apiv2"
+ "golang.org/x/net/context"
+ "google.golang.org/api/iterator"
+ dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
+)
+
+func ExampleNewContextsClient() {
+ ctx := context.Background()
+ c, err := dialogflow.NewContextsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use client.
+ _ = c
+}
+
+func ExampleContextsClient_ListContexts() {
+ ctx := context.Background()
+ c, err := dialogflow.NewContextsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.ListContextsRequest{
+ // TODO: Fill request struct fields.
+ }
+ it := c.ListContexts(ctx, req)
+ for {
+ resp, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
+
+func ExampleContextsClient_GetContext() {
+ ctx := context.Background()
+ c, err := dialogflow.NewContextsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.GetContextRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.GetContext(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleContextsClient_CreateContext() {
+ ctx := context.Background()
+ c, err := dialogflow.NewContextsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.CreateContextRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.CreateContext(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleContextsClient_UpdateContext() {
+ ctx := context.Background()
+ c, err := dialogflow.NewContextsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.UpdateContextRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.UpdateContext(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleContextsClient_DeleteContext() {
+ ctx := context.Background()
+ c, err := dialogflow.NewContextsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.DeleteContextRequest{
+ // TODO: Fill request struct fields.
+ }
+ err = c.DeleteContext(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+}
+
+func ExampleContextsClient_DeleteAllContexts() {
+ ctx := context.Background()
+ c, err := dialogflow.NewContextsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.DeleteAllContextsRequest{
+ // TODO: Fill request struct fields.
+ }
+ err = c.DeleteAllContexts(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+}
diff --git a/vendor/cloud.google.com/go/privacy/dlp/apiv2beta2/doc.go b/vendor/cloud.google.com/go/dialogflow/apiv2/doc.go
similarity index 80%
rename from vendor/cloud.google.com/go/privacy/dlp/apiv2beta2/doc.go
rename to vendor/cloud.google.com/go/dialogflow/apiv2/doc.go
index 43eb41e42..0a2c071ac 100644
--- a/vendor/cloud.google.com/go/privacy/dlp/apiv2beta2/doc.go
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/doc.go
@@ -14,15 +14,14 @@
// AUTO-GENERATED CODE. DO NOT EDIT.
-// Package dlp is an auto-generated package for the
-// DLP API.
+// Package dialogflow is an auto-generated package for the
+// Dialogflow API.
//
// NOTE: This package is in alpha. It is not stable, and is likely to change.
//
-// The Google Data Loss Prevention API provides methods for detection of
-// privacy-sensitive fragments in text, images, and Google Cloud Platform
-// storage repositories.
-package dlp // import "cloud.google.com/go/privacy/dlp/apiv2beta2"
+// An end-to-end development suite for conversational interfaces (e.g.,
+// chatbots, voice-powered apps and devices).
+package dialogflow // import "cloud.google.com/go/dialogflow/apiv2"
import (
"golang.org/x/net/context"
diff --git a/vendor/cloud.google.com/go/dialogflow/apiv2/entity_types_client.go b/vendor/cloud.google.com/go/dialogflow/apiv2/entity_types_client.go
new file mode 100644
index 000000000..96b71da2b
--- /dev/null
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/entity_types_client.go
@@ -0,0 +1,718 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package dialogflow
+
+import (
+ "math"
+ "time"
+
+ "cloud.google.com/go/internal/version"
+ "cloud.google.com/go/longrunning"
+ lroauto "cloud.google.com/go/longrunning/autogen"
+ structpbpb "github.com/golang/protobuf/ptypes/struct"
+ gax "github.com/googleapis/gax-go"
+ "golang.org/x/net/context"
+ "google.golang.org/api/iterator"
+ "google.golang.org/api/option"
+ "google.golang.org/api/transport"
+ dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
+ longrunningpb "google.golang.org/genproto/googleapis/longrunning"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+)
+
+// EntityTypesCallOptions contains the retry settings for each method of EntityTypesClient.
+type EntityTypesCallOptions struct {
+ ListEntityTypes []gax.CallOption
+ GetEntityType []gax.CallOption
+ CreateEntityType []gax.CallOption
+ UpdateEntityType []gax.CallOption
+ DeleteEntityType []gax.CallOption
+ BatchUpdateEntityTypes []gax.CallOption
+ BatchDeleteEntityTypes []gax.CallOption
+ BatchCreateEntities []gax.CallOption
+ BatchUpdateEntities []gax.CallOption
+ BatchDeleteEntities []gax.CallOption
+}
+
+func defaultEntityTypesClientOptions() []option.ClientOption {
+ return []option.ClientOption{
+ option.WithEndpoint("dialogflow.googleapis.com:443"),
+ option.WithScopes(DefaultAuthScopes()...),
+ }
+}
+
+func defaultEntityTypesCallOptions() *EntityTypesCallOptions {
+ retry := map[[2]string][]gax.CallOption{
+ {"default", "idempotent"}: {
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.3,
+ })
+ }),
+ },
+ }
+ return &EntityTypesCallOptions{
+ ListEntityTypes: retry[[2]string{"default", "idempotent"}],
+ GetEntityType: retry[[2]string{"default", "idempotent"}],
+ CreateEntityType: retry[[2]string{"default", "non_idempotent"}],
+ UpdateEntityType: retry[[2]string{"default", "non_idempotent"}],
+ DeleteEntityType: retry[[2]string{"default", "idempotent"}],
+ BatchUpdateEntityTypes: retry[[2]string{"default", "non_idempotent"}],
+ BatchDeleteEntityTypes: retry[[2]string{"default", "idempotent"}],
+ BatchCreateEntities: retry[[2]string{"default", "non_idempotent"}],
+ BatchUpdateEntities: retry[[2]string{"default", "non_idempotent"}],
+ BatchDeleteEntities: retry[[2]string{"default", "idempotent"}],
+ }
+}
+
+// EntityTypesClient is a client for interacting with Dialogflow API.
+type EntityTypesClient struct {
+ // The connection to the service.
+ conn *grpc.ClientConn
+
+ // The gRPC API client.
+ entityTypesClient dialogflowpb.EntityTypesClient
+
+ // LROClient is used internally to handle longrunning operations.
+ // It is exposed so that its CallOptions can be modified if required.
+ // Users should not Close this client.
+ LROClient *lroauto.OperationsClient
+
+ // The call options for this service.
+ CallOptions *EntityTypesCallOptions
+
+ // The x-goog-* metadata to be sent with each request.
+ xGoogMetadata metadata.MD
+}
+
+// NewEntityTypesClient creates a new entity types client.
+//
+// Entities are extracted from user input and represent parameters that are
+// meaningful to your application. For example, a date range, a proper name
+// such as a geographic location or landmark, and so on. Entities represent
+// actionable data for your application.
+//
+// When you define an entity, you can also include synonyms that all map to
+// that entity. For example, "soft drink", "soda", "pop", and so on.
+//
+// There are three types of entities:
+//
+// * **System** - entities that are defined by the Dialogflow API for common
+// data types such as date, time, currency, and so on. A system entity is
+// represented by the `EntityType` type.
+//
+// * **Developer** - entities that are defined by you that represent
+// actionable data that is meaningful to your application. For example,
+// you could define a `pizza.sauce` entity for red or white pizza sauce,
+// a `pizza.cheese` entity for the different types of cheese on a pizza,
+// a `pizza.topping` entity for different toppings, and so on. A developer
+// entity is represented by the `EntityType` type.
+//
+// * **User** - entities that are built for an individual user such as
+// favorites, preferences, playlists, and so on. A user entity is
+// represented by the [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] type.
+//
+// For more information about entity types, see the
+// [Dialogflow documentation](https://dialogflow.com/docs/entities).
+func NewEntityTypesClient(ctx context.Context, opts ...option.ClientOption) (*EntityTypesClient, error) {
+ conn, err := transport.DialGRPC(ctx, append(defaultEntityTypesClientOptions(), opts...)...)
+ if err != nil {
+ return nil, err
+ }
+ c := &EntityTypesClient{
+ conn: conn,
+ CallOptions: defaultEntityTypesCallOptions(),
+
+ entityTypesClient: dialogflowpb.NewEntityTypesClient(conn),
+ }
+ c.setGoogleClientInfo()
+
+ c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn))
+ if err != nil {
+ // This error "should not happen", since we are just reusing old connection
+ // and never actually need to dial.
+ // If this does happen, we could leak conn. However, we cannot close conn:
+ // If the user invoked the function with option.WithGRPCConn,
+ // we would close a connection that's still in use.
+ // TODO(pongad): investigate error conditions.
+ return nil, err
+ }
+ return c, nil
+}
+
+// Connection returns the client's connection to the API service.
+func (c *EntityTypesClient) Connection() *grpc.ClientConn {
+ return c.conn
+}
+
+// Close closes the connection to the API service. The user should invoke this when
+// the client is no longer required.
+func (c *EntityTypesClient) Close() error {
+ return c.conn.Close()
+}
+
+// setGoogleClientInfo sets the name and version of the application in
+// the `x-goog-api-client` header passed on each request. Intended for
+// use by Google-written clients.
+func (c *EntityTypesClient) setGoogleClientInfo(keyval ...string) {
+ kv := append([]string{"gl-go", version.Go()}, keyval...)
+ kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
+ c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
+}
+
+// ListEntityTypes returns the list of all entity types in the specified agent.
+func (c *EntityTypesClient) ListEntityTypes(ctx context.Context, req *dialogflowpb.ListEntityTypesRequest, opts ...gax.CallOption) *EntityTypeIterator {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.ListEntityTypes[0:len(c.CallOptions.ListEntityTypes):len(c.CallOptions.ListEntityTypes)], opts...)
+ it := &EntityTypeIterator{}
+ it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.EntityType, string, error) {
+ var resp *dialogflowpb.ListEntityTypesResponse
+ req.PageToken = pageToken
+ if pageSize > math.MaxInt32 {
+ req.PageSize = math.MaxInt32
+ } else {
+ req.PageSize = int32(pageSize)
+ }
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.entityTypesClient.ListEntityTypes(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, "", err
+ }
+ return resp.EntityTypes, resp.NextPageToken, nil
+ }
+ fetch := func(pageSize int, pageToken string) (string, error) {
+ items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
+ if err != nil {
+ return "", err
+ }
+ it.items = append(it.items, items...)
+ return nextPageToken, nil
+ }
+ it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
+ return it
+}
+
+// GetEntityType retrieves the specified entity type.
+func (c *EntityTypesClient) GetEntityType(ctx context.Context, req *dialogflowpb.GetEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.EntityType, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.GetEntityType[0:len(c.CallOptions.GetEntityType):len(c.CallOptions.GetEntityType)], opts...)
+ var resp *dialogflowpb.EntityType
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.entityTypesClient.GetEntityType(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// CreateEntityType creates an entity type in the specified agent.
+func (c *EntityTypesClient) CreateEntityType(ctx context.Context, req *dialogflowpb.CreateEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.EntityType, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.CreateEntityType[0:len(c.CallOptions.CreateEntityType):len(c.CallOptions.CreateEntityType)], opts...)
+ var resp *dialogflowpb.EntityType
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.entityTypesClient.CreateEntityType(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// UpdateEntityType updates the specified entity type.
+func (c *EntityTypesClient) UpdateEntityType(ctx context.Context, req *dialogflowpb.UpdateEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.EntityType, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.UpdateEntityType[0:len(c.CallOptions.UpdateEntityType):len(c.CallOptions.UpdateEntityType)], opts...)
+ var resp *dialogflowpb.EntityType
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.entityTypesClient.UpdateEntityType(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// DeleteEntityType deletes the specified entity type.
+func (c *EntityTypesClient) DeleteEntityType(ctx context.Context, req *dialogflowpb.DeleteEntityTypeRequest, opts ...gax.CallOption) error {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.DeleteEntityType[0:len(c.CallOptions.DeleteEntityType):len(c.CallOptions.DeleteEntityType)], opts...)
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ _, err = c.entityTypesClient.DeleteEntityType(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ return err
+}
+
+// BatchUpdateEntityTypes updates/Creates multiple entity types in the specified agent.
+//
+// Operation
+func (c *EntityTypesClient) BatchUpdateEntityTypes(ctx context.Context, req *dialogflowpb.BatchUpdateEntityTypesRequest, opts ...gax.CallOption) (*BatchUpdateEntityTypesOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.BatchUpdateEntityTypes[0:len(c.CallOptions.BatchUpdateEntityTypes):len(c.CallOptions.BatchUpdateEntityTypes)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.entityTypesClient.BatchUpdateEntityTypes(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &BatchUpdateEntityTypesOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// BatchDeleteEntityTypes deletes entity types in the specified agent.
+//
+// Operation
+func (c *EntityTypesClient) BatchDeleteEntityTypes(ctx context.Context, req *dialogflowpb.BatchDeleteEntityTypesRequest, opts ...gax.CallOption) (*BatchDeleteEntityTypesOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.BatchDeleteEntityTypes[0:len(c.CallOptions.BatchDeleteEntityTypes):len(c.CallOptions.BatchDeleteEntityTypes)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.entityTypesClient.BatchDeleteEntityTypes(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &BatchDeleteEntityTypesOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// BatchCreateEntities creates multiple new entities in the specified entity type (extends the
+// existing collection of entries).
+//
+// Operation
+func (c *EntityTypesClient) BatchCreateEntities(ctx context.Context, req *dialogflowpb.BatchCreateEntitiesRequest, opts ...gax.CallOption) (*BatchCreateEntitiesOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.BatchCreateEntities[0:len(c.CallOptions.BatchCreateEntities):len(c.CallOptions.BatchCreateEntities)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.entityTypesClient.BatchCreateEntities(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &BatchCreateEntitiesOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// BatchUpdateEntities updates entities in the specified entity type (replaces the existing
+// collection of entries).
+//
+// Operation
+func (c *EntityTypesClient) BatchUpdateEntities(ctx context.Context, req *dialogflowpb.BatchUpdateEntitiesRequest, opts ...gax.CallOption) (*BatchUpdateEntitiesOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.BatchUpdateEntities[0:len(c.CallOptions.BatchUpdateEntities):len(c.CallOptions.BatchUpdateEntities)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.entityTypesClient.BatchUpdateEntities(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &BatchUpdateEntitiesOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// BatchDeleteEntities deletes entities in the specified entity type.
+//
+// Operation
+func (c *EntityTypesClient) BatchDeleteEntities(ctx context.Context, req *dialogflowpb.BatchDeleteEntitiesRequest, opts ...gax.CallOption) (*BatchDeleteEntitiesOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.BatchDeleteEntities[0:len(c.CallOptions.BatchDeleteEntities):len(c.CallOptions.BatchDeleteEntities)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.entityTypesClient.BatchDeleteEntities(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &BatchDeleteEntitiesOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// EntityTypeIterator manages a stream of *dialogflowpb.EntityType.
+type EntityTypeIterator struct {
+ items []*dialogflowpb.EntityType
+ pageInfo *iterator.PageInfo
+ nextFunc func() error
+
+ // InternalFetch is for use by the Google Cloud Libraries only.
+ // It is not part of the stable interface of this package.
+ //
+ // InternalFetch returns results from a single call to the underlying RPC.
+ // The number of results is no greater than pageSize.
+ // If there are no more results, nextPageToken is empty and err is nil.
+ InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.EntityType, nextPageToken string, err error)
+}
+
+// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
+func (it *EntityTypeIterator) PageInfo() *iterator.PageInfo {
+ return it.pageInfo
+}
+
+// Next returns the next result. Its second return value is iterator.Done if there are no more
+// results. Once Next returns Done, all subsequent calls will return Done.
+func (it *EntityTypeIterator) Next() (*dialogflowpb.EntityType, error) {
+ var item *dialogflowpb.EntityType
+ if err := it.nextFunc(); err != nil {
+ return item, err
+ }
+ item = it.items[0]
+ it.items = it.items[1:]
+ return item, nil
+}
+
+func (it *EntityTypeIterator) bufLen() int {
+ return len(it.items)
+}
+
+func (it *EntityTypeIterator) takeBuf() interface{} {
+ b := it.items
+ it.items = nil
+ return b
+}
+
+// BatchCreateEntitiesOperation manages a long-running operation from BatchCreateEntities.
+type BatchCreateEntitiesOperation struct {
+ lro *longrunning.Operation
+}
+
+// BatchCreateEntitiesOperation returns a new BatchCreateEntitiesOperation from a given name.
+// The name must be that of a previously created BatchCreateEntitiesOperation, possibly from a different process.
+func (c *EntityTypesClient) BatchCreateEntitiesOperation(name string) *BatchCreateEntitiesOperation {
+ return &BatchCreateEntitiesOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning any error encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *BatchCreateEntitiesOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.WaitWithInterval(ctx, nil, 5000*time.Millisecond, opts...)
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully, op.Done will return true.
+func (op *BatchCreateEntitiesOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.Poll(ctx, nil, opts...)
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *BatchCreateEntitiesOperation) Metadata() (*structpbpb.Struct, error) {
+ var meta structpbpb.Struct
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *BatchCreateEntitiesOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *BatchCreateEntitiesOperation) Name() string {
+ return op.lro.Name()
+}
+
+// BatchDeleteEntitiesOperation manages a long-running operation from BatchDeleteEntities.
+type BatchDeleteEntitiesOperation struct {
+ lro *longrunning.Operation
+}
+
+// BatchDeleteEntitiesOperation returns a new BatchDeleteEntitiesOperation from a given name.
+// The name must be that of a previously created BatchDeleteEntitiesOperation, possibly from a different process.
+func (c *EntityTypesClient) BatchDeleteEntitiesOperation(name string) *BatchDeleteEntitiesOperation {
+ return &BatchDeleteEntitiesOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning any error encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *BatchDeleteEntitiesOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.WaitWithInterval(ctx, nil, 5000*time.Millisecond, opts...)
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully, op.Done will return true.
+func (op *BatchDeleteEntitiesOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.Poll(ctx, nil, opts...)
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *BatchDeleteEntitiesOperation) Metadata() (*structpbpb.Struct, error) {
+ var meta structpbpb.Struct
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *BatchDeleteEntitiesOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *BatchDeleteEntitiesOperation) Name() string {
+ return op.lro.Name()
+}
+
+// BatchDeleteEntityTypesOperation manages a long-running operation from BatchDeleteEntityTypes.
+type BatchDeleteEntityTypesOperation struct {
+ lro *longrunning.Operation
+}
+
+// BatchDeleteEntityTypesOperation returns a new BatchDeleteEntityTypesOperation from a given name.
+// The name must be that of a previously created BatchDeleteEntityTypesOperation, possibly from a different process.
+func (c *EntityTypesClient) BatchDeleteEntityTypesOperation(name string) *BatchDeleteEntityTypesOperation {
+ return &BatchDeleteEntityTypesOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning any error encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *BatchDeleteEntityTypesOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.WaitWithInterval(ctx, nil, 5000*time.Millisecond, opts...)
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully, op.Done will return true.
+func (op *BatchDeleteEntityTypesOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.Poll(ctx, nil, opts...)
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *BatchDeleteEntityTypesOperation) Metadata() (*structpbpb.Struct, error) {
+ var meta structpbpb.Struct
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *BatchDeleteEntityTypesOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *BatchDeleteEntityTypesOperation) Name() string {
+ return op.lro.Name()
+}
+
+// BatchUpdateEntitiesOperation manages a long-running operation from BatchUpdateEntities.
+type BatchUpdateEntitiesOperation struct {
+ lro *longrunning.Operation
+}
+
+// BatchUpdateEntitiesOperation returns a new BatchUpdateEntitiesOperation from a given name.
+// The name must be that of a previously created BatchUpdateEntitiesOperation, possibly from a different process.
+func (c *EntityTypesClient) BatchUpdateEntitiesOperation(name string) *BatchUpdateEntitiesOperation {
+ return &BatchUpdateEntitiesOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning any error encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *BatchUpdateEntitiesOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.WaitWithInterval(ctx, nil, 5000*time.Millisecond, opts...)
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully, op.Done will return true.
+func (op *BatchUpdateEntitiesOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.Poll(ctx, nil, opts...)
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *BatchUpdateEntitiesOperation) Metadata() (*structpbpb.Struct, error) {
+ var meta structpbpb.Struct
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *BatchUpdateEntitiesOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *BatchUpdateEntitiesOperation) Name() string {
+ return op.lro.Name()
+}
+
+// BatchUpdateEntityTypesOperation manages a long-running operation from BatchUpdateEntityTypes.
+type BatchUpdateEntityTypesOperation struct {
+ lro *longrunning.Operation
+}
+
+// BatchUpdateEntityTypesOperation returns a new BatchUpdateEntityTypesOperation from a given name.
+// The name must be that of a previously created BatchUpdateEntityTypesOperation, possibly from a different process.
+func (c *EntityTypesClient) BatchUpdateEntityTypesOperation(name string) *BatchUpdateEntityTypesOperation {
+ return &BatchUpdateEntityTypesOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *BatchUpdateEntityTypesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.BatchUpdateEntityTypesResponse, error) {
+ var resp dialogflowpb.BatchUpdateEntityTypesResponse
+ if err := op.lro.WaitWithInterval(ctx, &resp, 5000*time.Millisecond, opts...); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully,
+// op.Done will return true, and the response of the operation is returned.
+// If Poll succeeds and the operation has not completed, the returned response and error are both nil.
+func (op *BatchUpdateEntityTypesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.BatchUpdateEntityTypesResponse, error) {
+ var resp dialogflowpb.BatchUpdateEntityTypesResponse
+ if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
+ return nil, err
+ }
+ if !op.Done() {
+ return nil, nil
+ }
+ return &resp, nil
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *BatchUpdateEntityTypesOperation) Metadata() (*structpbpb.Struct, error) {
+ var meta structpbpb.Struct
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *BatchUpdateEntityTypesOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *BatchUpdateEntityTypesOperation) Name() string {
+ return op.lro.Name()
+}
diff --git a/vendor/cloud.google.com/go/dialogflow/apiv2/entity_types_client_example_test.go b/vendor/cloud.google.com/go/dialogflow/apiv2/entity_types_client_example_test.go
new file mode 100644
index 000000000..e5580d9ce
--- /dev/null
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/entity_types_client_example_test.go
@@ -0,0 +1,227 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package dialogflow_test
+
+import (
+ "cloud.google.com/go/dialogflow/apiv2"
+ "golang.org/x/net/context"
+ "google.golang.org/api/iterator"
+ dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
+)
+
+func ExampleNewEntityTypesClient() {
+ ctx := context.Background()
+ c, err := dialogflow.NewEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use client.
+ _ = c
+}
+
+func ExampleEntityTypesClient_ListEntityTypes() {
+ ctx := context.Background()
+ c, err := dialogflow.NewEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.ListEntityTypesRequest{
+ // TODO: Fill request struct fields.
+ }
+ it := c.ListEntityTypes(ctx, req)
+ for {
+ resp, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
+
+func ExampleEntityTypesClient_GetEntityType() {
+ ctx := context.Background()
+ c, err := dialogflow.NewEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.GetEntityTypeRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.GetEntityType(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleEntityTypesClient_CreateEntityType() {
+ ctx := context.Background()
+ c, err := dialogflow.NewEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.CreateEntityTypeRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.CreateEntityType(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleEntityTypesClient_UpdateEntityType() {
+ ctx := context.Background()
+ c, err := dialogflow.NewEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.UpdateEntityTypeRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.UpdateEntityType(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleEntityTypesClient_DeleteEntityType() {
+ ctx := context.Background()
+ c, err := dialogflow.NewEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.DeleteEntityTypeRequest{
+ // TODO: Fill request struct fields.
+ }
+ err = c.DeleteEntityType(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+}
+
+func ExampleEntityTypesClient_BatchUpdateEntityTypes() {
+ ctx := context.Background()
+ c, err := dialogflow.NewEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.BatchUpdateEntityTypesRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.BatchUpdateEntityTypes(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ resp, err := op.Wait(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleEntityTypesClient_BatchDeleteEntityTypes() {
+ ctx := context.Background()
+ c, err := dialogflow.NewEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.BatchDeleteEntityTypesRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.BatchDeleteEntityTypes(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ err = op.Wait(ctx)
+ // TODO: Handle error.
+}
+
+func ExampleEntityTypesClient_BatchCreateEntities() {
+ ctx := context.Background()
+ c, err := dialogflow.NewEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.BatchCreateEntitiesRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.BatchCreateEntities(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ err = op.Wait(ctx)
+ // TODO: Handle error.
+}
+
+func ExampleEntityTypesClient_BatchUpdateEntities() {
+ ctx := context.Background()
+ c, err := dialogflow.NewEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.BatchUpdateEntitiesRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.BatchUpdateEntities(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ err = op.Wait(ctx)
+ // TODO: Handle error.
+}
+
+func ExampleEntityTypesClient_BatchDeleteEntities() {
+ ctx := context.Background()
+ c, err := dialogflow.NewEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.BatchDeleteEntitiesRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.BatchDeleteEntities(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ err = op.Wait(ctx)
+ // TODO: Handle error.
+}
diff --git a/vendor/cloud.google.com/go/dialogflow/apiv2/intents_client.go b/vendor/cloud.google.com/go/dialogflow/apiv2/intents_client.go
new file mode 100644
index 000000000..fc5a98a97
--- /dev/null
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/intents_client.go
@@ -0,0 +1,482 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package dialogflow
+
+import (
+ "math"
+ "time"
+
+ "cloud.google.com/go/internal/version"
+ "cloud.google.com/go/longrunning"
+ lroauto "cloud.google.com/go/longrunning/autogen"
+ structpbpb "github.com/golang/protobuf/ptypes/struct"
+ gax "github.com/googleapis/gax-go"
+ "golang.org/x/net/context"
+ "google.golang.org/api/iterator"
+ "google.golang.org/api/option"
+ "google.golang.org/api/transport"
+ dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
+ longrunningpb "google.golang.org/genproto/googleapis/longrunning"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+)
+
+// IntentsCallOptions contains the retry settings for each method of IntentsClient.
+type IntentsCallOptions struct {
+ ListIntents []gax.CallOption
+ GetIntent []gax.CallOption
+ CreateIntent []gax.CallOption
+ UpdateIntent []gax.CallOption
+ DeleteIntent []gax.CallOption
+ BatchUpdateIntents []gax.CallOption
+ BatchDeleteIntents []gax.CallOption
+}
+
+func defaultIntentsClientOptions() []option.ClientOption {
+ return []option.ClientOption{
+ option.WithEndpoint("dialogflow.googleapis.com:443"),
+ option.WithScopes(DefaultAuthScopes()...),
+ }
+}
+
+func defaultIntentsCallOptions() *IntentsCallOptions {
+ retry := map[[2]string][]gax.CallOption{
+ {"default", "idempotent"}: {
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.3,
+ })
+ }),
+ },
+ }
+ return &IntentsCallOptions{
+ ListIntents: retry[[2]string{"default", "idempotent"}],
+ GetIntent: retry[[2]string{"default", "idempotent"}],
+ CreateIntent: retry[[2]string{"default", "non_idempotent"}],
+ UpdateIntent: retry[[2]string{"default", "non_idempotent"}],
+ DeleteIntent: retry[[2]string{"default", "idempotent"}],
+ BatchUpdateIntents: retry[[2]string{"default", "non_idempotent"}],
+ BatchDeleteIntents: retry[[2]string{"default", "idempotent"}],
+ }
+}
+
+// IntentsClient is a client for interacting with Dialogflow API.
+type IntentsClient struct {
+ // The connection to the service.
+ conn *grpc.ClientConn
+
+ // The gRPC API client.
+ intentsClient dialogflowpb.IntentsClient
+
+ // LROClient is used internally to handle longrunning operations.
+ // It is exposed so that its CallOptions can be modified if required.
+ // Users should not Close this client.
+ LROClient *lroauto.OperationsClient
+
+ // The call options for this service.
+ CallOptions *IntentsCallOptions
+
+ // The x-goog-* metadata to be sent with each request.
+ xGoogMetadata metadata.MD
+}
+
+// NewIntentsClient creates a new intents client.
+//
+// An intent represents a mapping between input from a user and an action to
+// be taken by your application. When you pass user input to the
+// [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
+// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method, the
+// Dialogflow API analyzes the input and searches
+// for a matching intent. If no match is found, the Dialogflow API returns a
+// fallback intent (`is_fallback` = true).
+//
+// You can provide additional information for the Dialogflow API to use to
+// match user input to an intent by adding the following to your intent.
+//
+// * **Contexts** - provide additional context for intent analysis. For
+// example, if an intent is related to an object in your application that
+// plays music, you can provide a context to determine when to match the
+// intent if the user input is “turn it off”. You can include a context
+// that matches the intent when there is previous user input of
+// "play music", and not when there is previous user input of
+// "turn on the light".
+//
+// * **Events** - allow for matching an intent by using an event name
+// instead of user input. Your application can provide an event name and
+// related parameters to the Dialogflow API to match an intent. For
+// example, when your application starts, you can send a welcome event
+// with a user name parameter to the Dialogflow API to match an intent with
+// a personalized welcome message for the user.
+//
+// * **Training phrases** - provide examples of user input to train the
+// Dialogflow API agent to better match intents.
+//
+// For more information about intents, see the
+// [Dialogflow documentation](https://dialogflow.com/docs/intents).
+func NewIntentsClient(ctx context.Context, opts ...option.ClientOption) (*IntentsClient, error) {
+ conn, err := transport.DialGRPC(ctx, append(defaultIntentsClientOptions(), opts...)...)
+ if err != nil {
+ return nil, err
+ }
+ c := &IntentsClient{
+ conn: conn,
+ CallOptions: defaultIntentsCallOptions(),
+
+ intentsClient: dialogflowpb.NewIntentsClient(conn),
+ }
+ c.setGoogleClientInfo()
+
+ c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn))
+ if err != nil {
+ // This error "should not happen", since we are just reusing old connection
+ // and never actually need to dial.
+ // If this does happen, we could leak conn. However, we cannot close conn:
+ // If the user invoked the function with option.WithGRPCConn,
+ // we would close a connection that's still in use.
+ // TODO(pongad): investigate error conditions.
+ return nil, err
+ }
+ return c, nil
+}
+
+// Connection returns the client's connection to the API service.
+func (c *IntentsClient) Connection() *grpc.ClientConn {
+ return c.conn
+}
+
+// Close closes the connection to the API service. The user should invoke this when
+// the client is no longer required.
+func (c *IntentsClient) Close() error {
+ return c.conn.Close()
+}
+
+// setGoogleClientInfo sets the name and version of the application in
+// the `x-goog-api-client` header passed on each request. Intended for
+// use by Google-written clients.
+func (c *IntentsClient) setGoogleClientInfo(keyval ...string) {
+ kv := append([]string{"gl-go", version.Go()}, keyval...)
+ kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
+ c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
+}
+
+// ListIntents returns the list of all intents in the specified agent.
+func (c *IntentsClient) ListIntents(ctx context.Context, req *dialogflowpb.ListIntentsRequest, opts ...gax.CallOption) *IntentIterator {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.ListIntents[0:len(c.CallOptions.ListIntents):len(c.CallOptions.ListIntents)], opts...)
+ it := &IntentIterator{}
+ it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Intent, string, error) {
+ var resp *dialogflowpb.ListIntentsResponse
+ req.PageToken = pageToken
+ if pageSize > math.MaxInt32 {
+ req.PageSize = math.MaxInt32
+ } else {
+ req.PageSize = int32(pageSize)
+ }
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.intentsClient.ListIntents(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, "", err
+ }
+ return resp.Intents, resp.NextPageToken, nil
+ }
+ fetch := func(pageSize int, pageToken string) (string, error) {
+ items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
+ if err != nil {
+ return "", err
+ }
+ it.items = append(it.items, items...)
+ return nextPageToken, nil
+ }
+ it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
+ return it
+}
+
+// GetIntent retrieves the specified intent.
+func (c *IntentsClient) GetIntent(ctx context.Context, req *dialogflowpb.GetIntentRequest, opts ...gax.CallOption) (*dialogflowpb.Intent, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.GetIntent[0:len(c.CallOptions.GetIntent):len(c.CallOptions.GetIntent)], opts...)
+ var resp *dialogflowpb.Intent
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.intentsClient.GetIntent(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// CreateIntent creates an intent in the specified agent.
+func (c *IntentsClient) CreateIntent(ctx context.Context, req *dialogflowpb.CreateIntentRequest, opts ...gax.CallOption) (*dialogflowpb.Intent, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.CreateIntent[0:len(c.CallOptions.CreateIntent):len(c.CallOptions.CreateIntent)], opts...)
+ var resp *dialogflowpb.Intent
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.intentsClient.CreateIntent(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// UpdateIntent updates the specified intent.
+func (c *IntentsClient) UpdateIntent(ctx context.Context, req *dialogflowpb.UpdateIntentRequest, opts ...gax.CallOption) (*dialogflowpb.Intent, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.UpdateIntent[0:len(c.CallOptions.UpdateIntent):len(c.CallOptions.UpdateIntent)], opts...)
+ var resp *dialogflowpb.Intent
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.intentsClient.UpdateIntent(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// DeleteIntent deletes the specified intent.
+func (c *IntentsClient) DeleteIntent(ctx context.Context, req *dialogflowpb.DeleteIntentRequest, opts ...gax.CallOption) error {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.DeleteIntent[0:len(c.CallOptions.DeleteIntent):len(c.CallOptions.DeleteIntent)], opts...)
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ _, err = c.intentsClient.DeleteIntent(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ return err
+}
+
+// BatchUpdateIntents updates/Creates multiple intents in the specified agent.
+//
+// Operation
+func (c *IntentsClient) BatchUpdateIntents(ctx context.Context, req *dialogflowpb.BatchUpdateIntentsRequest, opts ...gax.CallOption) (*BatchUpdateIntentsOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.BatchUpdateIntents[0:len(c.CallOptions.BatchUpdateIntents):len(c.CallOptions.BatchUpdateIntents)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.intentsClient.BatchUpdateIntents(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &BatchUpdateIntentsOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// BatchDeleteIntents deletes intents in the specified agent.
+//
+// Operation
+func (c *IntentsClient) BatchDeleteIntents(ctx context.Context, req *dialogflowpb.BatchDeleteIntentsRequest, opts ...gax.CallOption) (*BatchDeleteIntentsOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.BatchDeleteIntents[0:len(c.CallOptions.BatchDeleteIntents):len(c.CallOptions.BatchDeleteIntents)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.intentsClient.BatchDeleteIntents(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &BatchDeleteIntentsOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// IntentIterator manages a stream of *dialogflowpb.Intent.
+type IntentIterator struct {
+ items []*dialogflowpb.Intent
+ pageInfo *iterator.PageInfo
+ nextFunc func() error
+
+ // InternalFetch is for use by the Google Cloud Libraries only.
+ // It is not part of the stable interface of this package.
+ //
+ // InternalFetch returns results from a single call to the underlying RPC.
+ // The number of results is no greater than pageSize.
+ // If there are no more results, nextPageToken is empty and err is nil.
+ InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.Intent, nextPageToken string, err error)
+}
+
+// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
+func (it *IntentIterator) PageInfo() *iterator.PageInfo {
+ return it.pageInfo
+}
+
+// Next returns the next result. Its second return value is iterator.Done if there are no more
+// results. Once Next returns Done, all subsequent calls will return Done.
+func (it *IntentIterator) Next() (*dialogflowpb.Intent, error) {
+ var item *dialogflowpb.Intent
+ if err := it.nextFunc(); err != nil {
+ return item, err
+ }
+ item = it.items[0]
+ it.items = it.items[1:]
+ return item, nil
+}
+
+func (it *IntentIterator) bufLen() int {
+ return len(it.items)
+}
+
+func (it *IntentIterator) takeBuf() interface{} {
+ b := it.items
+ it.items = nil
+ return b
+}
+
+// BatchDeleteIntentsOperation manages a long-running operation from BatchDeleteIntents.
+type BatchDeleteIntentsOperation struct {
+ lro *longrunning.Operation
+}
+
+// BatchDeleteIntentsOperation returns a new BatchDeleteIntentsOperation from a given name.
+// The name must be that of a previously created BatchDeleteIntentsOperation, possibly from a different process.
+func (c *IntentsClient) BatchDeleteIntentsOperation(name string) *BatchDeleteIntentsOperation {
+ return &BatchDeleteIntentsOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning any error encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *BatchDeleteIntentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.WaitWithInterval(ctx, nil, 5000*time.Millisecond, opts...)
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully, op.Done will return true.
+func (op *BatchDeleteIntentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.Poll(ctx, nil, opts...)
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *BatchDeleteIntentsOperation) Metadata() (*structpbpb.Struct, error) {
+ var meta structpbpb.Struct
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *BatchDeleteIntentsOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *BatchDeleteIntentsOperation) Name() string {
+ return op.lro.Name()
+}
+
+// BatchUpdateIntentsOperation manages a long-running operation from BatchUpdateIntents.
+type BatchUpdateIntentsOperation struct {
+ lro *longrunning.Operation
+}
+
+// BatchUpdateIntentsOperation returns a new BatchUpdateIntentsOperation from a given name.
+// The name must be that of a previously created BatchUpdateIntentsOperation, possibly from a different process.
+func (c *IntentsClient) BatchUpdateIntentsOperation(name string) *BatchUpdateIntentsOperation {
+ return &BatchUpdateIntentsOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *BatchUpdateIntentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.BatchUpdateIntentsResponse, error) {
+ var resp dialogflowpb.BatchUpdateIntentsResponse
+ if err := op.lro.WaitWithInterval(ctx, &resp, 5000*time.Millisecond, opts...); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully,
+// op.Done will return true, and the response of the operation is returned.
+// If Poll succeeds and the operation has not completed, the returned response and error are both nil.
+func (op *BatchUpdateIntentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.BatchUpdateIntentsResponse, error) {
+ var resp dialogflowpb.BatchUpdateIntentsResponse
+ if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
+ return nil, err
+ }
+ if !op.Done() {
+ return nil, nil
+ }
+ return &resp, nil
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *BatchUpdateIntentsOperation) Metadata() (*structpbpb.Struct, error) {
+ var meta structpbpb.Struct
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *BatchUpdateIntentsOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *BatchUpdateIntentsOperation) Name() string {
+ return op.lro.Name()
+}
diff --git a/vendor/cloud.google.com/go/dlp/apiv2beta1/dlp_client_example_test.go b/vendor/cloud.google.com/go/dialogflow/apiv2/intents_client_example_test.go
similarity index 53%
rename from vendor/cloud.google.com/go/dlp/apiv2beta1/dlp_client_example_test.go
rename to vendor/cloud.google.com/go/dialogflow/apiv2/intents_client_example_test.go
index d33fbd36e..ba5eae6bd 100644
--- a/vendor/cloud.google.com/go/dlp/apiv2beta1/dlp_client_example_test.go
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/intents_client_example_test.go
@@ -14,17 +14,18 @@
// AUTO-GENERATED CODE. DO NOT EDIT.
-package dlp_test
+package dialogflow_test
import (
- "cloud.google.com/go/dlp/apiv2beta1"
+ "cloud.google.com/go/dialogflow/apiv2"
"golang.org/x/net/context"
- dlppb "google.golang.org/genproto/googleapis/privacy/dlp/v2beta1"
+ "google.golang.org/api/iterator"
+ dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
)
-func ExampleNewClient() {
+func ExampleNewIntentsClient() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := dialogflow.NewIntentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
@@ -32,17 +33,41 @@ func ExampleNewClient() {
_ = c
}
-func ExampleClient_InspectContent() {
+func ExampleIntentsClient_ListIntents() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := dialogflow.NewIntentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
- req := &dlppb.InspectContentRequest{
+ req := &dialogflowpb.ListIntentsRequest{
// TODO: Fill request struct fields.
}
- resp, err := c.InspectContent(ctx, req)
+ it := c.ListIntents(ctx, req)
+ for {
+ resp, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
+
+func ExampleIntentsClient_GetIntent() {
+ ctx := context.Background()
+ c, err := dialogflow.NewIntentsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.GetIntentRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.GetIntent(ctx, req)
if err != nil {
// TODO: Handle error.
}
@@ -50,17 +75,17 @@ func ExampleClient_InspectContent() {
_ = resp
}
-func ExampleClient_RedactContent() {
+func ExampleIntentsClient_CreateIntent() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := dialogflow.NewIntentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
- req := &dlppb.RedactContentRequest{
+ req := &dialogflowpb.CreateIntentRequest{
// TODO: Fill request struct fields.
}
- resp, err := c.RedactContent(ctx, req)
+ resp, err := c.CreateIntent(ctx, req)
if err != nil {
// TODO: Handle error.
}
@@ -68,17 +93,17 @@ func ExampleClient_RedactContent() {
_ = resp
}
-func ExampleClient_DeidentifyContent() {
+func ExampleIntentsClient_UpdateIntent() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := dialogflow.NewIntentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
- req := &dlppb.DeidentifyContentRequest{
+ req := &dialogflowpb.UpdateIntentRequest{
// TODO: Fill request struct fields.
}
- resp, err := c.DeidentifyContent(ctx, req)
+ resp, err := c.UpdateIntent(ctx, req)
if err != nil {
// TODO: Handle error.
}
@@ -86,17 +111,33 @@ func ExampleClient_DeidentifyContent() {
_ = resp
}
-func ExampleClient_AnalyzeDataSourceRisk() {
+func ExampleIntentsClient_DeleteIntent() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := dialogflow.NewIntentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
- req := &dlppb.AnalyzeDataSourceRiskRequest{
+ req := &dialogflowpb.DeleteIntentRequest{
// TODO: Fill request struct fields.
}
- op, err := c.AnalyzeDataSourceRisk(ctx, req)
+ err = c.DeleteIntent(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+}
+
+func ExampleIntentsClient_BatchUpdateIntents() {
+ ctx := context.Background()
+ c, err := dialogflow.NewIntentsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.BatchUpdateIntentsRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.BatchUpdateIntents(ctx, req)
if err != nil {
// TODO: Handle error.
}
@@ -109,79 +150,21 @@ func ExampleClient_AnalyzeDataSourceRisk() {
_ = resp
}
-func ExampleClient_CreateInspectOperation() {
+func ExampleIntentsClient_BatchDeleteIntents() {
ctx := context.Background()
- c, err := dlp.NewClient(ctx)
+ c, err := dialogflow.NewIntentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
- req := &dlppb.CreateInspectOperationRequest{
+ req := &dialogflowpb.BatchDeleteIntentsRequest{
// TODO: Fill request struct fields.
}
- op, err := c.CreateInspectOperation(ctx, req)
+ op, err := c.BatchDeleteIntents(ctx, req)
if err != nil {
// TODO: Handle error.
}
- resp, err := op.Wait(ctx)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
-}
-
-func ExampleClient_ListInspectFindings() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.ListInspectFindingsRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.ListInspectFindings(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
-}
-
-func ExampleClient_ListInfoTypes() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.ListInfoTypesRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.ListInfoTypes(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
-}
-
-func ExampleClient_ListRootCategories() {
- ctx := context.Background()
- c, err := dlp.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &dlppb.ListRootCategoriesRequest{
- // TODO: Fill request struct fields.
- }
- resp, err := c.ListRootCategories(ctx, req)
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
+ err = op.Wait(ctx)
+ // TODO: Handle error.
}
diff --git a/vendor/cloud.google.com/go/dialogflow/apiv2/mock_test.go b/vendor/cloud.google.com/go/dialogflow/apiv2/mock_test.go
new file mode 100644
index 000000000..aa7fba211
--- /dev/null
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/mock_test.go
@@ -0,0 +1,3149 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package dialogflow
+
+import (
+ emptypb "github.com/golang/protobuf/ptypes/empty"
+ dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
+ longrunningpb "google.golang.org/genproto/googleapis/longrunning"
+)
+
+import (
+ "flag"
+ "fmt"
+ "io"
+ "log"
+ "net"
+ "os"
+ "strings"
+ "testing"
+
+ "github.com/golang/protobuf/proto"
+ "github.com/golang/protobuf/ptypes"
+ "golang.org/x/net/context"
+ "google.golang.org/api/option"
+ status "google.golang.org/genproto/googleapis/rpc/status"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+ gstatus "google.golang.org/grpc/status"
+)
+
+var _ = io.EOF
+var _ = ptypes.MarshalAny
+var _ status.Status
+
+type mockAgentsServer struct {
+ // Embed for forward compatibility.
+ // Tests will keep working if more methods are added
+ // in the future.
+ dialogflowpb.AgentsServer
+
+ reqs []proto.Message
+
+ // If set, all calls return this error.
+ err error
+
+ // responses to return if err == nil
+ resps []proto.Message
+}
+
+func (s *mockAgentsServer) GetAgent(ctx context.Context, req *dialogflowpb.GetAgentRequest) (*dialogflowpb.Agent, 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].(*dialogflowpb.Agent), nil
+}
+
+func (s *mockAgentsServer) SearchAgents(ctx context.Context, req *dialogflowpb.SearchAgentsRequest) (*dialogflowpb.SearchAgentsResponse, 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].(*dialogflowpb.SearchAgentsResponse), nil
+}
+
+func (s *mockAgentsServer) TrainAgent(ctx context.Context, req *dialogflowpb.TrainAgentRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+func (s *mockAgentsServer) ExportAgent(ctx context.Context, req *dialogflowpb.ExportAgentRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+func (s *mockAgentsServer) ImportAgent(ctx context.Context, req *dialogflowpb.ImportAgentRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+func (s *mockAgentsServer) RestoreAgent(ctx context.Context, req *dialogflowpb.RestoreAgentRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+type mockContextsServer struct {
+ // Embed for forward compatibility.
+ // Tests will keep working if more methods are added
+ // in the future.
+ dialogflowpb.ContextsServer
+
+ reqs []proto.Message
+
+ // If set, all calls return this error.
+ err error
+
+ // responses to return if err == nil
+ resps []proto.Message
+}
+
+func (s *mockContextsServer) ListContexts(ctx context.Context, req *dialogflowpb.ListContextsRequest) (*dialogflowpb.ListContextsResponse, 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].(*dialogflowpb.ListContextsResponse), nil
+}
+
+func (s *mockContextsServer) GetContext(ctx context.Context, req *dialogflowpb.GetContextRequest) (*dialogflowpb.Context, 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].(*dialogflowpb.Context), nil
+}
+
+func (s *mockContextsServer) CreateContext(ctx context.Context, req *dialogflowpb.CreateContextRequest) (*dialogflowpb.Context, 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].(*dialogflowpb.Context), nil
+}
+
+func (s *mockContextsServer) UpdateContext(ctx context.Context, req *dialogflowpb.UpdateContextRequest) (*dialogflowpb.Context, 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].(*dialogflowpb.Context), nil
+}
+
+func (s *mockContextsServer) DeleteContext(ctx context.Context, req *dialogflowpb.DeleteContextRequest) (*emptypb.Empty, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*emptypb.Empty), nil
+}
+
+func (s *mockContextsServer) DeleteAllContexts(ctx context.Context, req *dialogflowpb.DeleteAllContextsRequest) (*emptypb.Empty, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*emptypb.Empty), nil
+}
+
+type mockEntityTypesServer struct {
+ // Embed for forward compatibility.
+ // Tests will keep working if more methods are added
+ // in the future.
+ dialogflowpb.EntityTypesServer
+
+ reqs []proto.Message
+
+ // If set, all calls return this error.
+ err error
+
+ // responses to return if err == nil
+ resps []proto.Message
+}
+
+func (s *mockEntityTypesServer) ListEntityTypes(ctx context.Context, req *dialogflowpb.ListEntityTypesRequest) (*dialogflowpb.ListEntityTypesResponse, 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].(*dialogflowpb.ListEntityTypesResponse), nil
+}
+
+func (s *mockEntityTypesServer) GetEntityType(ctx context.Context, req *dialogflowpb.GetEntityTypeRequest) (*dialogflowpb.EntityType, 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].(*dialogflowpb.EntityType), nil
+}
+
+func (s *mockEntityTypesServer) CreateEntityType(ctx context.Context, req *dialogflowpb.CreateEntityTypeRequest) (*dialogflowpb.EntityType, 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].(*dialogflowpb.EntityType), nil
+}
+
+func (s *mockEntityTypesServer) UpdateEntityType(ctx context.Context, req *dialogflowpb.UpdateEntityTypeRequest) (*dialogflowpb.EntityType, 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].(*dialogflowpb.EntityType), nil
+}
+
+func (s *mockEntityTypesServer) DeleteEntityType(ctx context.Context, req *dialogflowpb.DeleteEntityTypeRequest) (*emptypb.Empty, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*emptypb.Empty), nil
+}
+
+func (s *mockEntityTypesServer) BatchUpdateEntityTypes(ctx context.Context, req *dialogflowpb.BatchUpdateEntityTypesRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+func (s *mockEntityTypesServer) BatchDeleteEntityTypes(ctx context.Context, req *dialogflowpb.BatchDeleteEntityTypesRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+func (s *mockEntityTypesServer) BatchCreateEntities(ctx context.Context, req *dialogflowpb.BatchCreateEntitiesRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+func (s *mockEntityTypesServer) BatchUpdateEntities(ctx context.Context, req *dialogflowpb.BatchUpdateEntitiesRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+func (s *mockEntityTypesServer) BatchDeleteEntities(ctx context.Context, req *dialogflowpb.BatchDeleteEntitiesRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+type mockIntentsServer struct {
+ // Embed for forward compatibility.
+ // Tests will keep working if more methods are added
+ // in the future.
+ dialogflowpb.IntentsServer
+
+ reqs []proto.Message
+
+ // If set, all calls return this error.
+ err error
+
+ // responses to return if err == nil
+ resps []proto.Message
+}
+
+func (s *mockIntentsServer) ListIntents(ctx context.Context, req *dialogflowpb.ListIntentsRequest) (*dialogflowpb.ListIntentsResponse, 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].(*dialogflowpb.ListIntentsResponse), nil
+}
+
+func (s *mockIntentsServer) GetIntent(ctx context.Context, req *dialogflowpb.GetIntentRequest) (*dialogflowpb.Intent, 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].(*dialogflowpb.Intent), nil
+}
+
+func (s *mockIntentsServer) CreateIntent(ctx context.Context, req *dialogflowpb.CreateIntentRequest) (*dialogflowpb.Intent, 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].(*dialogflowpb.Intent), nil
+}
+
+func (s *mockIntentsServer) UpdateIntent(ctx context.Context, req *dialogflowpb.UpdateIntentRequest) (*dialogflowpb.Intent, 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].(*dialogflowpb.Intent), nil
+}
+
+func (s *mockIntentsServer) DeleteIntent(ctx context.Context, req *dialogflowpb.DeleteIntentRequest) (*emptypb.Empty, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*emptypb.Empty), nil
+}
+
+func (s *mockIntentsServer) BatchUpdateIntents(ctx context.Context, req *dialogflowpb.BatchUpdateIntentsRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+func (s *mockIntentsServer) BatchDeleteIntents(ctx context.Context, req *dialogflowpb.BatchDeleteIntentsRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+type mockSessionEntityTypesServer struct {
+ // Embed for forward compatibility.
+ // Tests will keep working if more methods are added
+ // in the future.
+ dialogflowpb.SessionEntityTypesServer
+
+ reqs []proto.Message
+
+ // If set, all calls return this error.
+ err error
+
+ // responses to return if err == nil
+ resps []proto.Message
+}
+
+func (s *mockSessionEntityTypesServer) ListSessionEntityTypes(ctx context.Context, req *dialogflowpb.ListSessionEntityTypesRequest) (*dialogflowpb.ListSessionEntityTypesResponse, 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].(*dialogflowpb.ListSessionEntityTypesResponse), nil
+}
+
+func (s *mockSessionEntityTypesServer) GetSessionEntityType(ctx context.Context, req *dialogflowpb.GetSessionEntityTypeRequest) (*dialogflowpb.SessionEntityType, 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].(*dialogflowpb.SessionEntityType), nil
+}
+
+func (s *mockSessionEntityTypesServer) CreateSessionEntityType(ctx context.Context, req *dialogflowpb.CreateSessionEntityTypeRequest) (*dialogflowpb.SessionEntityType, 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].(*dialogflowpb.SessionEntityType), nil
+}
+
+func (s *mockSessionEntityTypesServer) UpdateSessionEntityType(ctx context.Context, req *dialogflowpb.UpdateSessionEntityTypeRequest) (*dialogflowpb.SessionEntityType, 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].(*dialogflowpb.SessionEntityType), nil
+}
+
+func (s *mockSessionEntityTypesServer) DeleteSessionEntityType(ctx context.Context, req *dialogflowpb.DeleteSessionEntityTypeRequest) (*emptypb.Empty, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*emptypb.Empty), nil
+}
+
+type mockSessionsServer struct {
+ // Embed for forward compatibility.
+ // Tests will keep working if more methods are added
+ // in the future.
+ dialogflowpb.SessionsServer
+
+ reqs []proto.Message
+
+ // If set, all calls return this error.
+ err error
+
+ // responses to return if err == nil
+ resps []proto.Message
+}
+
+func (s *mockSessionsServer) DetectIntent(ctx context.Context, req *dialogflowpb.DetectIntentRequest) (*dialogflowpb.DetectIntentResponse, 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].(*dialogflowpb.DetectIntentResponse), nil
+}
+
+func (s *mockSessionsServer) StreamingDetectIntent(stream dialogflowpb.Sessions_StreamingDetectIntentServer) error {
+ md, _ := metadata.FromIncomingContext(stream.Context())
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ for {
+ if req, err := stream.Recv(); err == io.EOF {
+ break
+ } else if err != nil {
+ return err
+ } else {
+ s.reqs = append(s.reqs, req)
+ }
+ }
+ if s.err != nil {
+ return s.err
+ }
+ for _, v := range s.resps {
+ if err := stream.Send(v.(*dialogflowpb.StreamingDetectIntentResponse)); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// clientOpt is the option tests should use to connect to the test server.
+// It is initialized by TestMain.
+var clientOpt option.ClientOption
+
+var (
+ mockAgents mockAgentsServer
+ mockContexts mockContextsServer
+ mockEntityTypes mockEntityTypesServer
+ mockIntents mockIntentsServer
+ mockSessionEntityTypes mockSessionEntityTypesServer
+ mockSessions mockSessionsServer
+)
+
+func TestMain(m *testing.M) {
+ flag.Parse()
+
+ serv := grpc.NewServer()
+ dialogflowpb.RegisterAgentsServer(serv, &mockAgents)
+ dialogflowpb.RegisterContextsServer(serv, &mockContexts)
+ dialogflowpb.RegisterEntityTypesServer(serv, &mockEntityTypes)
+ dialogflowpb.RegisterIntentsServer(serv, &mockIntents)
+ dialogflowpb.RegisterSessionEntityTypesServer(serv, &mockSessionEntityTypes)
+ dialogflowpb.RegisterSessionsServer(serv, &mockSessions)
+
+ lis, err := net.Listen("tcp", "localhost:0")
+ if err != nil {
+ log.Fatal(err)
+ }
+ go serv.Serve(lis)
+
+ conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure())
+ if err != nil {
+ log.Fatal(err)
+ }
+ clientOpt = option.WithGRPCConn(conn)
+
+ os.Exit(m.Run())
+}
+
+func TestAgentsGetAgent(t *testing.T) {
+ var parent2 string = "parent21175163357"
+ var displayName string = "displayName1615086568"
+ var defaultLanguageCode string = "defaultLanguageCode856575222"
+ var timeZone string = "timeZone36848094"
+ var description string = "description-1724546052"
+ var avatarUri string = "avatarUri-402824826"
+ var enableLogging bool = false
+ var classificationThreshold float32 = 1.11581064E8
+ var expectedResponse = &dialogflowpb.Agent{
+ Parent: parent2,
+ DisplayName: displayName,
+ DefaultLanguageCode: defaultLanguageCode,
+ TimeZone: timeZone,
+ Description: description,
+ AvatarUri: avatarUri,
+ EnableLogging: enableLogging,
+ ClassificationThreshold: classificationThreshold,
+ }
+
+ mockAgents.err = nil
+ mockAgents.reqs = nil
+
+ mockAgents.resps = append(mockAgents.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
+ var request = &dialogflowpb.GetAgentRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewAgentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetAgent(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockAgents.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 TestAgentsGetAgentError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockAgents.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
+ var request = &dialogflowpb.GetAgentRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewAgentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetAgent(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 TestAgentsSearchAgents(t *testing.T) {
+ var nextPageToken string = ""
+ var agentsElement *dialogflowpb.Agent = &dialogflowpb.Agent{}
+ var agents = []*dialogflowpb.Agent{agentsElement}
+ var expectedResponse = &dialogflowpb.SearchAgentsResponse{
+ NextPageToken: nextPageToken,
+ Agents: agents,
+ }
+
+ mockAgents.err = nil
+ mockAgents.reqs = nil
+
+ mockAgents.resps = append(mockAgents.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
+ var request = &dialogflowpb.SearchAgentsRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewAgentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.SearchAgents(context.Background(), request).Next()
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockAgents.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+ want := (interface{})(expectedResponse.Agents[0])
+ got := (interface{})(resp)
+ var ok bool
+
+ switch want := (want).(type) {
+ case proto.Message:
+ ok = proto.Equal(want, got.(proto.Message))
+ default:
+ ok = want == got
+ }
+ if !ok {
+ t.Errorf("wrong response %q, want %q)", got, want)
+ }
+}
+
+func TestAgentsSearchAgentsError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockAgents.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
+ var request = &dialogflowpb.SearchAgentsRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewAgentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.SearchAgents(context.Background(), request).Next()
+
+ 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 TestAgentsTrainAgent(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockAgents.err = nil
+ mockAgents.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
+ var request = &dialogflowpb.TrainAgentRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewAgentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.TrainAgent(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockAgents.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestAgentsTrainAgentError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockAgents.err = nil
+ mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
+ var request = &dialogflowpb.TrainAgentRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewAgentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.TrainAgent(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestAgentsExportAgent(t *testing.T) {
+ var agentUri string = "agentUri-1700713166"
+ var expectedResponse = &dialogflowpb.ExportAgentResponse{
+ Agent: &dialogflowpb.ExportAgentResponse_AgentUri{
+ AgentUri: agentUri,
+ },
+ }
+
+ mockAgents.err = nil
+ mockAgents.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
+ var request = &dialogflowpb.ExportAgentRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewAgentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.ExportAgent(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ resp, err := respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockAgents.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 TestAgentsExportAgentError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockAgents.err = nil
+ mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
+ var request = &dialogflowpb.ExportAgentRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewAgentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.ExportAgent(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ resp, err := respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+ _ = resp
+}
+func TestAgentsImportAgent(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockAgents.err = nil
+ mockAgents.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
+ var request = &dialogflowpb.ImportAgentRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewAgentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.ImportAgent(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockAgents.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestAgentsImportAgentError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockAgents.err = nil
+ mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
+ var request = &dialogflowpb.ImportAgentRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewAgentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.ImportAgent(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestAgentsRestoreAgent(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockAgents.err = nil
+ mockAgents.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
+ var request = &dialogflowpb.RestoreAgentRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewAgentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.RestoreAgent(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockAgents.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestAgentsRestoreAgentError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockAgents.err = nil
+ mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
+ var request = &dialogflowpb.RestoreAgentRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewAgentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.RestoreAgent(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestContextsListContexts(t *testing.T) {
+ var nextPageToken string = ""
+ var contextsElement *dialogflowpb.Context = &dialogflowpb.Context{}
+ var contexts = []*dialogflowpb.Context{contextsElement}
+ var expectedResponse = &dialogflowpb.ListContextsResponse{
+ NextPageToken: nextPageToken,
+ Contexts: contexts,
+ }
+
+ mockContexts.err = nil
+ mockContexts.reqs = nil
+
+ mockContexts.resps = append(mockContexts.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]")
+ var request = &dialogflowpb.ListContextsRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewContextsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListContexts(context.Background(), request).Next()
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockContexts.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+ want := (interface{})(expectedResponse.Contexts[0])
+ got := (interface{})(resp)
+ var ok bool
+
+ switch want := (want).(type) {
+ case proto.Message:
+ ok = proto.Equal(want, got.(proto.Message))
+ default:
+ ok = want == got
+ }
+ if !ok {
+ t.Errorf("wrong response %q, want %q)", got, want)
+ }
+}
+
+func TestContextsListContextsError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockContexts.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]")
+ var request = &dialogflowpb.ListContextsRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewContextsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListContexts(context.Background(), request).Next()
+
+ 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 TestContextsGetContext(t *testing.T) {
+ var name2 string = "name2-1052831874"
+ var lifespanCount int32 = 1178775510
+ var expectedResponse = &dialogflowpb.Context{
+ Name: name2,
+ LifespanCount: lifespanCount,
+ }
+
+ mockContexts.err = nil
+ mockContexts.reqs = nil
+
+ mockContexts.resps = append(mockContexts.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/contexts/%s", "[PROJECT]", "[SESSION]", "[CONTEXT]")
+ var request = &dialogflowpb.GetContextRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewContextsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetContext(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockContexts.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 TestContextsGetContextError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockContexts.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/contexts/%s", "[PROJECT]", "[SESSION]", "[CONTEXT]")
+ var request = &dialogflowpb.GetContextRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewContextsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetContext(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 TestContextsCreateContext(t *testing.T) {
+ var name string = "name3373707"
+ var lifespanCount int32 = 1178775510
+ var expectedResponse = &dialogflowpb.Context{
+ Name: name,
+ LifespanCount: lifespanCount,
+ }
+
+ mockContexts.err = nil
+ mockContexts.reqs = nil
+
+ mockContexts.resps = append(mockContexts.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]")
+ var context_ *dialogflowpb.Context = &dialogflowpb.Context{}
+ var request = &dialogflowpb.CreateContextRequest{
+ Parent: formattedParent,
+ Context: context_,
+ }
+
+ c, err := NewContextsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CreateContext(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockContexts.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 TestContextsCreateContextError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockContexts.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]")
+ var context_ *dialogflowpb.Context = &dialogflowpb.Context{}
+ var request = &dialogflowpb.CreateContextRequest{
+ Parent: formattedParent,
+ Context: context_,
+ }
+
+ c, err := NewContextsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CreateContext(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 TestContextsUpdateContext(t *testing.T) {
+ var name string = "name3373707"
+ var lifespanCount int32 = 1178775510
+ var expectedResponse = &dialogflowpb.Context{
+ Name: name,
+ LifespanCount: lifespanCount,
+ }
+
+ mockContexts.err = nil
+ mockContexts.reqs = nil
+
+ mockContexts.resps = append(mockContexts.resps[:0], expectedResponse)
+
+ var context_ *dialogflowpb.Context = &dialogflowpb.Context{}
+ var request = &dialogflowpb.UpdateContextRequest{
+ Context: context_,
+ }
+
+ c, err := NewContextsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.UpdateContext(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockContexts.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 TestContextsUpdateContextError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockContexts.err = gstatus.Error(errCode, "test error")
+
+ var context_ *dialogflowpb.Context = &dialogflowpb.Context{}
+ var request = &dialogflowpb.UpdateContextRequest{
+ Context: context_,
+ }
+
+ c, err := NewContextsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.UpdateContext(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 TestContextsDeleteContext(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockContexts.err = nil
+ mockContexts.reqs = nil
+
+ mockContexts.resps = append(mockContexts.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/contexts/%s", "[PROJECT]", "[SESSION]", "[CONTEXT]")
+ var request = &dialogflowpb.DeleteContextRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewContextsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteContext(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockContexts.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestContextsDeleteContextError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockContexts.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/contexts/%s", "[PROJECT]", "[SESSION]", "[CONTEXT]")
+ var request = &dialogflowpb.DeleteContextRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewContextsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteContext(context.Background(), request)
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestContextsDeleteAllContexts(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockContexts.err = nil
+ mockContexts.reqs = nil
+
+ mockContexts.resps = append(mockContexts.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]")
+ var request = &dialogflowpb.DeleteAllContextsRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewContextsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteAllContexts(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockContexts.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestContextsDeleteAllContextsError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockContexts.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]")
+ var request = &dialogflowpb.DeleteAllContextsRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewContextsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteAllContexts(context.Background(), request)
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestEntityTypesListEntityTypes(t *testing.T) {
+ var nextPageToken string = ""
+ var entityTypesElement *dialogflowpb.EntityType = &dialogflowpb.EntityType{}
+ var entityTypes = []*dialogflowpb.EntityType{entityTypesElement}
+ var expectedResponse = &dialogflowpb.ListEntityTypesResponse{
+ NextPageToken: nextPageToken,
+ EntityTypes: entityTypes,
+ }
+
+ mockEntityTypes.err = nil
+ mockEntityTypes.reqs = nil
+
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var request = &dialogflowpb.ListEntityTypesRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListEntityTypes(context.Background(), request).Next()
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+ want := (interface{})(expectedResponse.EntityTypes[0])
+ got := (interface{})(resp)
+ var ok bool
+
+ switch want := (want).(type) {
+ case proto.Message:
+ ok = proto.Equal(want, got.(proto.Message))
+ default:
+ ok = want == got
+ }
+ if !ok {
+ t.Errorf("wrong response %q, want %q)", got, want)
+ }
+}
+
+func TestEntityTypesListEntityTypesError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockEntityTypes.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var request = &dialogflowpb.ListEntityTypesRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListEntityTypes(context.Background(), request).Next()
+
+ 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 TestEntityTypesGetEntityType(t *testing.T) {
+ var name2 string = "name2-1052831874"
+ var displayName string = "displayName1615086568"
+ var expectedResponse = &dialogflowpb.EntityType{
+ Name: name2,
+ DisplayName: displayName,
+ }
+
+ mockEntityTypes.err = nil
+ mockEntityTypes.reqs = nil
+
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]")
+ var request = &dialogflowpb.GetEntityTypeRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetEntityType(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockEntityTypes.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 TestEntityTypesGetEntityTypeError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockEntityTypes.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]")
+ var request = &dialogflowpb.GetEntityTypeRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetEntityType(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 TestEntityTypesCreateEntityType(t *testing.T) {
+ var name string = "name3373707"
+ var displayName string = "displayName1615086568"
+ var expectedResponse = &dialogflowpb.EntityType{
+ Name: name,
+ DisplayName: displayName,
+ }
+
+ mockEntityTypes.err = nil
+ mockEntityTypes.reqs = nil
+
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var entityType *dialogflowpb.EntityType = &dialogflowpb.EntityType{}
+ var request = &dialogflowpb.CreateEntityTypeRequest{
+ Parent: formattedParent,
+ EntityType: entityType,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CreateEntityType(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockEntityTypes.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 TestEntityTypesCreateEntityTypeError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockEntityTypes.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var entityType *dialogflowpb.EntityType = &dialogflowpb.EntityType{}
+ var request = &dialogflowpb.CreateEntityTypeRequest{
+ Parent: formattedParent,
+ EntityType: entityType,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CreateEntityType(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 TestEntityTypesUpdateEntityType(t *testing.T) {
+ var name string = "name3373707"
+ var displayName string = "displayName1615086568"
+ var expectedResponse = &dialogflowpb.EntityType{
+ Name: name,
+ DisplayName: displayName,
+ }
+
+ mockEntityTypes.err = nil
+ mockEntityTypes.reqs = nil
+
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], expectedResponse)
+
+ var entityType *dialogflowpb.EntityType = &dialogflowpb.EntityType{}
+ var request = &dialogflowpb.UpdateEntityTypeRequest{
+ EntityType: entityType,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.UpdateEntityType(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockEntityTypes.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 TestEntityTypesUpdateEntityTypeError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockEntityTypes.err = gstatus.Error(errCode, "test error")
+
+ var entityType *dialogflowpb.EntityType = &dialogflowpb.EntityType{}
+ var request = &dialogflowpb.UpdateEntityTypeRequest{
+ EntityType: entityType,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.UpdateEntityType(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 TestEntityTypesDeleteEntityType(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockEntityTypes.err = nil
+ mockEntityTypes.reqs = nil
+
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]")
+ var request = &dialogflowpb.DeleteEntityTypeRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteEntityType(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestEntityTypesDeleteEntityTypeError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockEntityTypes.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]")
+ var request = &dialogflowpb.DeleteEntityTypeRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteEntityType(context.Background(), request)
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestEntityTypesBatchUpdateEntityTypes(t *testing.T) {
+ var expectedResponse *dialogflowpb.BatchUpdateEntityTypesResponse = &dialogflowpb.BatchUpdateEntityTypesResponse{}
+
+ mockEntityTypes.err = nil
+ mockEntityTypes.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var request = &dialogflowpb.BatchUpdateEntityTypesRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchUpdateEntityTypes(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ resp, err := respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockEntityTypes.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 TestEntityTypesBatchUpdateEntityTypesError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockEntityTypes.err = nil
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var request = &dialogflowpb.BatchUpdateEntityTypesRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchUpdateEntityTypes(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ resp, err := respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+ _ = resp
+}
+func TestEntityTypesBatchDeleteEntityTypes(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockEntityTypes.err = nil
+ mockEntityTypes.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var entityTypeNames []string = nil
+ var request = &dialogflowpb.BatchDeleteEntityTypesRequest{
+ Parent: formattedParent,
+ EntityTypeNames: entityTypeNames,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchDeleteEntityTypes(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestEntityTypesBatchDeleteEntityTypesError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockEntityTypes.err = nil
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var entityTypeNames []string = nil
+ var request = &dialogflowpb.BatchDeleteEntityTypesRequest{
+ Parent: formattedParent,
+ EntityTypeNames: entityTypeNames,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchDeleteEntityTypes(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestEntityTypesBatchCreateEntities(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockEntityTypes.err = nil
+ mockEntityTypes.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]")
+ var entities []*dialogflowpb.EntityType_Entity = nil
+ var request = &dialogflowpb.BatchCreateEntitiesRequest{
+ Parent: formattedParent,
+ Entities: entities,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchCreateEntities(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestEntityTypesBatchCreateEntitiesError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockEntityTypes.err = nil
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]")
+ var entities []*dialogflowpb.EntityType_Entity = nil
+ var request = &dialogflowpb.BatchCreateEntitiesRequest{
+ Parent: formattedParent,
+ Entities: entities,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchCreateEntities(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestEntityTypesBatchUpdateEntities(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockEntityTypes.err = nil
+ mockEntityTypes.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]")
+ var entities []*dialogflowpb.EntityType_Entity = nil
+ var request = &dialogflowpb.BatchUpdateEntitiesRequest{
+ Parent: formattedParent,
+ Entities: entities,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchUpdateEntities(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestEntityTypesBatchUpdateEntitiesError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockEntityTypes.err = nil
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]")
+ var entities []*dialogflowpb.EntityType_Entity = nil
+ var request = &dialogflowpb.BatchUpdateEntitiesRequest{
+ Parent: formattedParent,
+ Entities: entities,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchUpdateEntities(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestEntityTypesBatchDeleteEntities(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockEntityTypes.err = nil
+ mockEntityTypes.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]")
+ var entityValues []string = nil
+ var request = &dialogflowpb.BatchDeleteEntitiesRequest{
+ Parent: formattedParent,
+ EntityValues: entityValues,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchDeleteEntities(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestEntityTypesBatchDeleteEntitiesError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockEntityTypes.err = nil
+ mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]")
+ var entityValues []string = nil
+ var request = &dialogflowpb.BatchDeleteEntitiesRequest{
+ Parent: formattedParent,
+ EntityValues: entityValues,
+ }
+
+ c, err := NewEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchDeleteEntities(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestIntentsListIntents(t *testing.T) {
+ var nextPageToken string = ""
+ var intentsElement *dialogflowpb.Intent = &dialogflowpb.Intent{}
+ var intents = []*dialogflowpb.Intent{intentsElement}
+ var expectedResponse = &dialogflowpb.ListIntentsResponse{
+ NextPageToken: nextPageToken,
+ Intents: intents,
+ }
+
+ mockIntents.err = nil
+ mockIntents.reqs = nil
+
+ mockIntents.resps = append(mockIntents.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var request = &dialogflowpb.ListIntentsRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListIntents(context.Background(), request).Next()
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockIntents.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+ want := (interface{})(expectedResponse.Intents[0])
+ got := (interface{})(resp)
+ var ok bool
+
+ switch want := (want).(type) {
+ case proto.Message:
+ ok = proto.Equal(want, got.(proto.Message))
+ default:
+ ok = want == got
+ }
+ if !ok {
+ t.Errorf("wrong response %q, want %q)", got, want)
+ }
+}
+
+func TestIntentsListIntentsError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockIntents.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var request = &dialogflowpb.ListIntentsRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListIntents(context.Background(), request).Next()
+
+ 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 TestIntentsGetIntent(t *testing.T) {
+ var name2 string = "name2-1052831874"
+ var displayName string = "displayName1615086568"
+ var priority int32 = 1165461084
+ var isFallback bool = false
+ var mlDisabled bool = true
+ var action string = "action-1422950858"
+ var resetContexts bool = true
+ var rootFollowupIntentName string = "rootFollowupIntentName402253784"
+ var parentFollowupIntentName string = "parentFollowupIntentName-1131901680"
+ var expectedResponse = &dialogflowpb.Intent{
+ Name: name2,
+ DisplayName: displayName,
+ Priority: priority,
+ IsFallback: isFallback,
+ MlDisabled: mlDisabled,
+ Action: action,
+ ResetContexts: resetContexts,
+ RootFollowupIntentName: rootFollowupIntentName,
+ ParentFollowupIntentName: parentFollowupIntentName,
+ }
+
+ mockIntents.err = nil
+ mockIntents.reqs = nil
+
+ mockIntents.resps = append(mockIntents.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/intents/%s", "[PROJECT]", "[INTENT]")
+ var request = &dialogflowpb.GetIntentRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetIntent(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockIntents.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 TestIntentsGetIntentError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockIntents.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/intents/%s", "[PROJECT]", "[INTENT]")
+ var request = &dialogflowpb.GetIntentRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetIntent(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 TestIntentsCreateIntent(t *testing.T) {
+ var name string = "name3373707"
+ var displayName string = "displayName1615086568"
+ var priority int32 = 1165461084
+ var isFallback bool = false
+ var mlDisabled bool = true
+ var action string = "action-1422950858"
+ var resetContexts bool = true
+ var rootFollowupIntentName string = "rootFollowupIntentName402253784"
+ var parentFollowupIntentName string = "parentFollowupIntentName-1131901680"
+ var expectedResponse = &dialogflowpb.Intent{
+ Name: name,
+ DisplayName: displayName,
+ Priority: priority,
+ IsFallback: isFallback,
+ MlDisabled: mlDisabled,
+ Action: action,
+ ResetContexts: resetContexts,
+ RootFollowupIntentName: rootFollowupIntentName,
+ ParentFollowupIntentName: parentFollowupIntentName,
+ }
+
+ mockIntents.err = nil
+ mockIntents.reqs = nil
+
+ mockIntents.resps = append(mockIntents.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var intent *dialogflowpb.Intent = &dialogflowpb.Intent{}
+ var request = &dialogflowpb.CreateIntentRequest{
+ Parent: formattedParent,
+ Intent: intent,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CreateIntent(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockIntents.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 TestIntentsCreateIntentError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockIntents.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var intent *dialogflowpb.Intent = &dialogflowpb.Intent{}
+ var request = &dialogflowpb.CreateIntentRequest{
+ Parent: formattedParent,
+ Intent: intent,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CreateIntent(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 TestIntentsUpdateIntent(t *testing.T) {
+ var name string = "name3373707"
+ var displayName string = "displayName1615086568"
+ var priority int32 = 1165461084
+ var isFallback bool = false
+ var mlDisabled bool = true
+ var action string = "action-1422950858"
+ var resetContexts bool = true
+ var rootFollowupIntentName string = "rootFollowupIntentName402253784"
+ var parentFollowupIntentName string = "parentFollowupIntentName-1131901680"
+ var expectedResponse = &dialogflowpb.Intent{
+ Name: name,
+ DisplayName: displayName,
+ Priority: priority,
+ IsFallback: isFallback,
+ MlDisabled: mlDisabled,
+ Action: action,
+ ResetContexts: resetContexts,
+ RootFollowupIntentName: rootFollowupIntentName,
+ ParentFollowupIntentName: parentFollowupIntentName,
+ }
+
+ mockIntents.err = nil
+ mockIntents.reqs = nil
+
+ mockIntents.resps = append(mockIntents.resps[:0], expectedResponse)
+
+ var intent *dialogflowpb.Intent = &dialogflowpb.Intent{}
+ var languageCode string = "languageCode-412800396"
+ var request = &dialogflowpb.UpdateIntentRequest{
+ Intent: intent,
+ LanguageCode: languageCode,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.UpdateIntent(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockIntents.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 TestIntentsUpdateIntentError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockIntents.err = gstatus.Error(errCode, "test error")
+
+ var intent *dialogflowpb.Intent = &dialogflowpb.Intent{}
+ var languageCode string = "languageCode-412800396"
+ var request = &dialogflowpb.UpdateIntentRequest{
+ Intent: intent,
+ LanguageCode: languageCode,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.UpdateIntent(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 TestIntentsDeleteIntent(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockIntents.err = nil
+ mockIntents.reqs = nil
+
+ mockIntents.resps = append(mockIntents.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/intents/%s", "[PROJECT]", "[INTENT]")
+ var request = &dialogflowpb.DeleteIntentRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteIntent(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockIntents.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestIntentsDeleteIntentError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockIntents.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/intents/%s", "[PROJECT]", "[INTENT]")
+ var request = &dialogflowpb.DeleteIntentRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteIntent(context.Background(), request)
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestIntentsBatchUpdateIntents(t *testing.T) {
+ var expectedResponse *dialogflowpb.BatchUpdateIntentsResponse = &dialogflowpb.BatchUpdateIntentsResponse{}
+
+ mockIntents.err = nil
+ mockIntents.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockIntents.resps = append(mockIntents.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var languageCode string = "languageCode-412800396"
+ var request = &dialogflowpb.BatchUpdateIntentsRequest{
+ Parent: formattedParent,
+ LanguageCode: languageCode,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchUpdateIntents(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ resp, err := respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockIntents.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 TestIntentsBatchUpdateIntentsError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockIntents.err = nil
+ mockIntents.resps = append(mockIntents.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var languageCode string = "languageCode-412800396"
+ var request = &dialogflowpb.BatchUpdateIntentsRequest{
+ Parent: formattedParent,
+ LanguageCode: languageCode,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchUpdateIntents(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ resp, err := respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+ _ = resp
+}
+func TestIntentsBatchDeleteIntents(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockIntents.err = nil
+ mockIntents.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockIntents.resps = append(mockIntents.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var intents []*dialogflowpb.Intent = nil
+ var request = &dialogflowpb.BatchDeleteIntentsRequest{
+ Parent: formattedParent,
+ Intents: intents,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchDeleteIntents(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockIntents.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestIntentsBatchDeleteIntentsError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockIntents.err = nil
+ mockIntents.resps = append(mockIntents.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]")
+ var intents []*dialogflowpb.Intent = nil
+ var request = &dialogflowpb.BatchDeleteIntentsRequest{
+ Parent: formattedParent,
+ Intents: intents,
+ }
+
+ c, err := NewIntentsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.BatchDeleteIntents(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestSessionEntityTypesListSessionEntityTypes(t *testing.T) {
+ var nextPageToken string = ""
+ var sessionEntityTypesElement *dialogflowpb.SessionEntityType = &dialogflowpb.SessionEntityType{}
+ var sessionEntityTypes = []*dialogflowpb.SessionEntityType{sessionEntityTypesElement}
+ var expectedResponse = &dialogflowpb.ListSessionEntityTypesResponse{
+ NextPageToken: nextPageToken,
+ SessionEntityTypes: sessionEntityTypes,
+ }
+
+ mockSessionEntityTypes.err = nil
+ mockSessionEntityTypes.reqs = nil
+
+ mockSessionEntityTypes.resps = append(mockSessionEntityTypes.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]")
+ var request = &dialogflowpb.ListSessionEntityTypesRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewSessionEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListSessionEntityTypes(context.Background(), request).Next()
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockSessionEntityTypes.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+ want := (interface{})(expectedResponse.SessionEntityTypes[0])
+ got := (interface{})(resp)
+ var ok bool
+
+ switch want := (want).(type) {
+ case proto.Message:
+ ok = proto.Equal(want, got.(proto.Message))
+ default:
+ ok = want == got
+ }
+ if !ok {
+ t.Errorf("wrong response %q, want %q)", got, want)
+ }
+}
+
+func TestSessionEntityTypesListSessionEntityTypesError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockSessionEntityTypes.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]")
+ var request = &dialogflowpb.ListSessionEntityTypesRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewSessionEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListSessionEntityTypes(context.Background(), request).Next()
+
+ 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 TestSessionEntityTypesGetSessionEntityType(t *testing.T) {
+ var name2 string = "name2-1052831874"
+ var expectedResponse = &dialogflowpb.SessionEntityType{
+ Name: name2,
+ }
+
+ mockSessionEntityTypes.err = nil
+ mockSessionEntityTypes.reqs = nil
+
+ mockSessionEntityTypes.resps = append(mockSessionEntityTypes.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/entityTypes/%s", "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]")
+ var request = &dialogflowpb.GetSessionEntityTypeRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewSessionEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetSessionEntityType(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockSessionEntityTypes.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 TestSessionEntityTypesGetSessionEntityTypeError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockSessionEntityTypes.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/entityTypes/%s", "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]")
+ var request = &dialogflowpb.GetSessionEntityTypeRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewSessionEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetSessionEntityType(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 TestSessionEntityTypesCreateSessionEntityType(t *testing.T) {
+ var name string = "name3373707"
+ var expectedResponse = &dialogflowpb.SessionEntityType{
+ Name: name,
+ }
+
+ mockSessionEntityTypes.err = nil
+ mockSessionEntityTypes.reqs = nil
+
+ mockSessionEntityTypes.resps = append(mockSessionEntityTypes.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]")
+ var sessionEntityType *dialogflowpb.SessionEntityType = &dialogflowpb.SessionEntityType{}
+ var request = &dialogflowpb.CreateSessionEntityTypeRequest{
+ Parent: formattedParent,
+ SessionEntityType: sessionEntityType,
+ }
+
+ c, err := NewSessionEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CreateSessionEntityType(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockSessionEntityTypes.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 TestSessionEntityTypesCreateSessionEntityTypeError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockSessionEntityTypes.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]")
+ var sessionEntityType *dialogflowpb.SessionEntityType = &dialogflowpb.SessionEntityType{}
+ var request = &dialogflowpb.CreateSessionEntityTypeRequest{
+ Parent: formattedParent,
+ SessionEntityType: sessionEntityType,
+ }
+
+ c, err := NewSessionEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.CreateSessionEntityType(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 TestSessionEntityTypesUpdateSessionEntityType(t *testing.T) {
+ var name string = "name3373707"
+ var expectedResponse = &dialogflowpb.SessionEntityType{
+ Name: name,
+ }
+
+ mockSessionEntityTypes.err = nil
+ mockSessionEntityTypes.reqs = nil
+
+ mockSessionEntityTypes.resps = append(mockSessionEntityTypes.resps[:0], expectedResponse)
+
+ var sessionEntityType *dialogflowpb.SessionEntityType = &dialogflowpb.SessionEntityType{}
+ var request = &dialogflowpb.UpdateSessionEntityTypeRequest{
+ SessionEntityType: sessionEntityType,
+ }
+
+ c, err := NewSessionEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.UpdateSessionEntityType(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockSessionEntityTypes.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 TestSessionEntityTypesUpdateSessionEntityTypeError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockSessionEntityTypes.err = gstatus.Error(errCode, "test error")
+
+ var sessionEntityType *dialogflowpb.SessionEntityType = &dialogflowpb.SessionEntityType{}
+ var request = &dialogflowpb.UpdateSessionEntityTypeRequest{
+ SessionEntityType: sessionEntityType,
+ }
+
+ c, err := NewSessionEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.UpdateSessionEntityType(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 TestSessionEntityTypesDeleteSessionEntityType(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockSessionEntityTypes.err = nil
+ mockSessionEntityTypes.reqs = nil
+
+ mockSessionEntityTypes.resps = append(mockSessionEntityTypes.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/entityTypes/%s", "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]")
+ var request = &dialogflowpb.DeleteSessionEntityTypeRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewSessionEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteSessionEntityType(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockSessionEntityTypes.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestSessionEntityTypesDeleteSessionEntityTypeError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockSessionEntityTypes.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/entityTypes/%s", "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]")
+ var request = &dialogflowpb.DeleteSessionEntityTypeRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewSessionEntityTypesClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = c.DeleteSessionEntityType(context.Background(), request)
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
+func TestSessionsDetectIntent(t *testing.T) {
+ var responseId string = "responseId1847552473"
+ var expectedResponse = &dialogflowpb.DetectIntentResponse{
+ ResponseId: responseId,
+ }
+
+ mockSessions.err = nil
+ mockSessions.reqs = nil
+
+ mockSessions.resps = append(mockSessions.resps[:0], expectedResponse)
+
+ var formattedSession string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]")
+ var queryInput *dialogflowpb.QueryInput = &dialogflowpb.QueryInput{}
+ var request = &dialogflowpb.DetectIntentRequest{
+ Session: formattedSession,
+ QueryInput: queryInput,
+ }
+
+ c, err := NewSessionsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.DetectIntent(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockSessions.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 TestSessionsDetectIntentError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockSessions.err = gstatus.Error(errCode, "test error")
+
+ var formattedSession string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]")
+ var queryInput *dialogflowpb.QueryInput = &dialogflowpb.QueryInput{}
+ var request = &dialogflowpb.DetectIntentRequest{
+ Session: formattedSession,
+ QueryInput: queryInput,
+ }
+
+ c, err := NewSessionsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.DetectIntent(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 TestSessionsStreamingDetectIntent(t *testing.T) {
+ var responseId string = "responseId1847552473"
+ var expectedResponse = &dialogflowpb.StreamingDetectIntentResponse{
+ ResponseId: responseId,
+ }
+
+ mockSessions.err = nil
+ mockSessions.reqs = nil
+
+ mockSessions.resps = append(mockSessions.resps[:0], expectedResponse)
+
+ var session string = "session1984987798"
+ var queryInput *dialogflowpb.QueryInput = &dialogflowpb.QueryInput{}
+ var request = &dialogflowpb.StreamingDetectIntentRequest{
+ Session: session,
+ QueryInput: queryInput,
+ }
+
+ c, err := NewSessionsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ stream, err := c.StreamingDetectIntent(context.Background())
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err := stream.Send(request); err != nil {
+ t.Fatal(err)
+ }
+ if err := stream.CloseSend(); err != nil {
+ t.Fatal(err)
+ }
+ resp, err := stream.Recv()
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockSessions.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 TestSessionsStreamingDetectIntentError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockSessions.err = gstatus.Error(errCode, "test error")
+
+ var session string = "session1984987798"
+ var queryInput *dialogflowpb.QueryInput = &dialogflowpb.QueryInput{}
+ var request = &dialogflowpb.StreamingDetectIntentRequest{
+ Session: session,
+ QueryInput: queryInput,
+ }
+
+ c, err := NewSessionsClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ stream, err := c.StreamingDetectIntent(context.Background())
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err := stream.Send(request); err != nil {
+ t.Fatal(err)
+ }
+ if err := stream.CloseSend(); err != nil {
+ t.Fatal(err)
+ }
+ resp, err := stream.Recv()
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+ _ = resp
+}
diff --git a/vendor/cloud.google.com/go/dialogflow/apiv2/session_entity_types_client.go b/vendor/cloud.google.com/go/dialogflow/apiv2/session_entity_types_client.go
new file mode 100644
index 000000000..0f28c0449
--- /dev/null
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/session_entity_types_client.go
@@ -0,0 +1,274 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package dialogflow
+
+import (
+ "math"
+ "time"
+
+ "cloud.google.com/go/internal/version"
+ gax "github.com/googleapis/gax-go"
+ "golang.org/x/net/context"
+ "google.golang.org/api/iterator"
+ "google.golang.org/api/option"
+ "google.golang.org/api/transport"
+ dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+)
+
+// SessionEntityTypesCallOptions contains the retry settings for each method of SessionEntityTypesClient.
+type SessionEntityTypesCallOptions struct {
+ ListSessionEntityTypes []gax.CallOption
+ GetSessionEntityType []gax.CallOption
+ CreateSessionEntityType []gax.CallOption
+ UpdateSessionEntityType []gax.CallOption
+ DeleteSessionEntityType []gax.CallOption
+}
+
+func defaultSessionEntityTypesClientOptions() []option.ClientOption {
+ return []option.ClientOption{
+ option.WithEndpoint("dialogflow.googleapis.com:443"),
+ option.WithScopes(DefaultAuthScopes()...),
+ }
+}
+
+func defaultSessionEntityTypesCallOptions() *SessionEntityTypesCallOptions {
+ retry := map[[2]string][]gax.CallOption{
+ {"default", "idempotent"}: {
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.3,
+ })
+ }),
+ },
+ }
+ return &SessionEntityTypesCallOptions{
+ ListSessionEntityTypes: retry[[2]string{"default", "idempotent"}],
+ GetSessionEntityType: retry[[2]string{"default", "idempotent"}],
+ CreateSessionEntityType: retry[[2]string{"default", "non_idempotent"}],
+ UpdateSessionEntityType: retry[[2]string{"default", "non_idempotent"}],
+ DeleteSessionEntityType: retry[[2]string{"default", "idempotent"}],
+ }
+}
+
+// SessionEntityTypesClient is a client for interacting with Dialogflow API.
+type SessionEntityTypesClient struct {
+ // The connection to the service.
+ conn *grpc.ClientConn
+
+ // The gRPC API client.
+ sessionEntityTypesClient dialogflowpb.SessionEntityTypesClient
+
+ // The call options for this service.
+ CallOptions *SessionEntityTypesCallOptions
+
+ // The x-goog-* metadata to be sent with each request.
+ xGoogMetadata metadata.MD
+}
+
+// NewSessionEntityTypesClient creates a new session entity types client.
+//
+// Entities are extracted from user input and represent parameters that are
+// meaningful to your application. For example, a date range, a proper name
+// such as a geographic location or landmark, and so on. Entities represent
+// actionable data for your application.
+//
+// Session entity types are referred to as **User** entity types and are
+// entities that are built for an individual user such as
+// favorites, preferences, playlists, and so on. You can redefine a session
+// entity type at the session level.
+//
+// For more information about entity types, see the
+// [Dialogflow documentation](https://dialogflow.com/docs/entities).
+func NewSessionEntityTypesClient(ctx context.Context, opts ...option.ClientOption) (*SessionEntityTypesClient, error) {
+ conn, err := transport.DialGRPC(ctx, append(defaultSessionEntityTypesClientOptions(), opts...)...)
+ if err != nil {
+ return nil, err
+ }
+ c := &SessionEntityTypesClient{
+ conn: conn,
+ CallOptions: defaultSessionEntityTypesCallOptions(),
+
+ sessionEntityTypesClient: dialogflowpb.NewSessionEntityTypesClient(conn),
+ }
+ c.setGoogleClientInfo()
+ return c, nil
+}
+
+// Connection returns the client's connection to the API service.
+func (c *SessionEntityTypesClient) Connection() *grpc.ClientConn {
+ return c.conn
+}
+
+// Close closes the connection to the API service. The user should invoke this when
+// the client is no longer required.
+func (c *SessionEntityTypesClient) Close() error {
+ return c.conn.Close()
+}
+
+// setGoogleClientInfo sets the name and version of the application in
+// the `x-goog-api-client` header passed on each request. Intended for
+// use by Google-written clients.
+func (c *SessionEntityTypesClient) setGoogleClientInfo(keyval ...string) {
+ kv := append([]string{"gl-go", version.Go()}, keyval...)
+ kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
+ c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
+}
+
+// ListSessionEntityTypes returns the list of all session entity types in the specified session.
+func (c *SessionEntityTypesClient) ListSessionEntityTypes(ctx context.Context, req *dialogflowpb.ListSessionEntityTypesRequest, opts ...gax.CallOption) *SessionEntityTypeIterator {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.ListSessionEntityTypes[0:len(c.CallOptions.ListSessionEntityTypes):len(c.CallOptions.ListSessionEntityTypes)], opts...)
+ it := &SessionEntityTypeIterator{}
+ it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.SessionEntityType, string, error) {
+ var resp *dialogflowpb.ListSessionEntityTypesResponse
+ req.PageToken = pageToken
+ if pageSize > math.MaxInt32 {
+ req.PageSize = math.MaxInt32
+ } else {
+ req.PageSize = int32(pageSize)
+ }
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.sessionEntityTypesClient.ListSessionEntityTypes(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, "", err
+ }
+ return resp.SessionEntityTypes, resp.NextPageToken, nil
+ }
+ fetch := func(pageSize int, pageToken string) (string, error) {
+ items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
+ if err != nil {
+ return "", err
+ }
+ it.items = append(it.items, items...)
+ return nextPageToken, nil
+ }
+ it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
+ return it
+}
+
+// GetSessionEntityType retrieves the specified session entity type.
+func (c *SessionEntityTypesClient) GetSessionEntityType(ctx context.Context, req *dialogflowpb.GetSessionEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.GetSessionEntityType[0:len(c.CallOptions.GetSessionEntityType):len(c.CallOptions.GetSessionEntityType)], opts...)
+ var resp *dialogflowpb.SessionEntityType
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.sessionEntityTypesClient.GetSessionEntityType(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// CreateSessionEntityType creates a session entity type.
+func (c *SessionEntityTypesClient) CreateSessionEntityType(ctx context.Context, req *dialogflowpb.CreateSessionEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.CreateSessionEntityType[0:len(c.CallOptions.CreateSessionEntityType):len(c.CallOptions.CreateSessionEntityType)], opts...)
+ var resp *dialogflowpb.SessionEntityType
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.sessionEntityTypesClient.CreateSessionEntityType(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// UpdateSessionEntityType updates the specified session entity type.
+func (c *SessionEntityTypesClient) UpdateSessionEntityType(ctx context.Context, req *dialogflowpb.UpdateSessionEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.UpdateSessionEntityType[0:len(c.CallOptions.UpdateSessionEntityType):len(c.CallOptions.UpdateSessionEntityType)], opts...)
+ var resp *dialogflowpb.SessionEntityType
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.sessionEntityTypesClient.UpdateSessionEntityType(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// DeleteSessionEntityType deletes the specified session entity type.
+func (c *SessionEntityTypesClient) DeleteSessionEntityType(ctx context.Context, req *dialogflowpb.DeleteSessionEntityTypeRequest, opts ...gax.CallOption) error {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.DeleteSessionEntityType[0:len(c.CallOptions.DeleteSessionEntityType):len(c.CallOptions.DeleteSessionEntityType)], opts...)
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ _, err = c.sessionEntityTypesClient.DeleteSessionEntityType(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ return err
+}
+
+// SessionEntityTypeIterator manages a stream of *dialogflowpb.SessionEntityType.
+type SessionEntityTypeIterator struct {
+ items []*dialogflowpb.SessionEntityType
+ pageInfo *iterator.PageInfo
+ nextFunc func() error
+
+ // InternalFetch is for use by the Google Cloud Libraries only.
+ // It is not part of the stable interface of this package.
+ //
+ // InternalFetch returns results from a single call to the underlying RPC.
+ // The number of results is no greater than pageSize.
+ // If there are no more results, nextPageToken is empty and err is nil.
+ InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.SessionEntityType, nextPageToken string, err error)
+}
+
+// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
+func (it *SessionEntityTypeIterator) PageInfo() *iterator.PageInfo {
+ return it.pageInfo
+}
+
+// Next returns the next result. Its second return value is iterator.Done if there are no more
+// results. Once Next returns Done, all subsequent calls will return Done.
+func (it *SessionEntityTypeIterator) Next() (*dialogflowpb.SessionEntityType, error) {
+ var item *dialogflowpb.SessionEntityType
+ if err := it.nextFunc(); err != nil {
+ return item, err
+ }
+ item = it.items[0]
+ it.items = it.items[1:]
+ return item, nil
+}
+
+func (it *SessionEntityTypeIterator) bufLen() int {
+ return len(it.items)
+}
+
+func (it *SessionEntityTypeIterator) takeBuf() interface{} {
+ b := it.items
+ it.items = nil
+ return b
+}
diff --git a/vendor/cloud.google.com/go/dialogflow/apiv2/session_entity_types_client_example_test.go b/vendor/cloud.google.com/go/dialogflow/apiv2/session_entity_types_client_example_test.go
new file mode 100644
index 000000000..ec06524fa
--- /dev/null
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/session_entity_types_client_example_test.go
@@ -0,0 +1,128 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package dialogflow_test
+
+import (
+ "cloud.google.com/go/dialogflow/apiv2"
+ "golang.org/x/net/context"
+ "google.golang.org/api/iterator"
+ dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
+)
+
+func ExampleNewSessionEntityTypesClient() {
+ ctx := context.Background()
+ c, err := dialogflow.NewSessionEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use client.
+ _ = c
+}
+
+func ExampleSessionEntityTypesClient_ListSessionEntityTypes() {
+ ctx := context.Background()
+ c, err := dialogflow.NewSessionEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.ListSessionEntityTypesRequest{
+ // TODO: Fill request struct fields.
+ }
+ it := c.ListSessionEntityTypes(ctx, req)
+ for {
+ resp, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
+
+func ExampleSessionEntityTypesClient_GetSessionEntityType() {
+ ctx := context.Background()
+ c, err := dialogflow.NewSessionEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.GetSessionEntityTypeRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.GetSessionEntityType(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleSessionEntityTypesClient_CreateSessionEntityType() {
+ ctx := context.Background()
+ c, err := dialogflow.NewSessionEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.CreateSessionEntityTypeRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.CreateSessionEntityType(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleSessionEntityTypesClient_UpdateSessionEntityType() {
+ ctx := context.Background()
+ c, err := dialogflow.NewSessionEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.UpdateSessionEntityTypeRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.UpdateSessionEntityType(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleSessionEntityTypesClient_DeleteSessionEntityType() {
+ ctx := context.Background()
+ c, err := dialogflow.NewSessionEntityTypesClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.DeleteSessionEntityTypeRequest{
+ // TODO: Fill request struct fields.
+ }
+ err = c.DeleteSessionEntityType(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+}
diff --git a/vendor/cloud.google.com/go/dialogflow/apiv2/sessions_client.go b/vendor/cloud.google.com/go/dialogflow/apiv2/sessions_client.go
new file mode 100644
index 000000000..225d269df
--- /dev/null
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/sessions_client.go
@@ -0,0 +1,142 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package dialogflow
+
+import (
+ "cloud.google.com/go/internal/version"
+ gax "github.com/googleapis/gax-go"
+ "golang.org/x/net/context"
+ "google.golang.org/api/option"
+ "google.golang.org/api/transport"
+ dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/metadata"
+)
+
+// SessionsCallOptions contains the retry settings for each method of SessionsClient.
+type SessionsCallOptions struct {
+ DetectIntent []gax.CallOption
+ StreamingDetectIntent []gax.CallOption
+}
+
+func defaultSessionsClientOptions() []option.ClientOption {
+ return []option.ClientOption{
+ option.WithEndpoint("dialogflow.googleapis.com:443"),
+ option.WithScopes(DefaultAuthScopes()...),
+ }
+}
+
+func defaultSessionsCallOptions() *SessionsCallOptions {
+ retry := map[[2]string][]gax.CallOption{}
+ return &SessionsCallOptions{
+ DetectIntent: retry[[2]string{"default", "non_idempotent"}],
+ StreamingDetectIntent: retry[[2]string{"default", "non_idempotent"}],
+ }
+}
+
+// SessionsClient is a client for interacting with Dialogflow API.
+type SessionsClient struct {
+ // The connection to the service.
+ conn *grpc.ClientConn
+
+ // The gRPC API client.
+ sessionsClient dialogflowpb.SessionsClient
+
+ // The call options for this service.
+ CallOptions *SessionsCallOptions
+
+ // The x-goog-* metadata to be sent with each request.
+ xGoogMetadata metadata.MD
+}
+
+// NewSessionsClient creates a new sessions client.
+//
+// A session represents an interaction with a user. You retrieve user input
+// and pass it to the [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
+// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method to determine
+// user intent and respond.
+func NewSessionsClient(ctx context.Context, opts ...option.ClientOption) (*SessionsClient, error) {
+ conn, err := transport.DialGRPC(ctx, append(defaultSessionsClientOptions(), opts...)...)
+ if err != nil {
+ return nil, err
+ }
+ c := &SessionsClient{
+ conn: conn,
+ CallOptions: defaultSessionsCallOptions(),
+
+ sessionsClient: dialogflowpb.NewSessionsClient(conn),
+ }
+ c.setGoogleClientInfo()
+ return c, nil
+}
+
+// Connection returns the client's connection to the API service.
+func (c *SessionsClient) Connection() *grpc.ClientConn {
+ return c.conn
+}
+
+// Close closes the connection to the API service. The user should invoke this when
+// the client is no longer required.
+func (c *SessionsClient) Close() error {
+ return c.conn.Close()
+}
+
+// setGoogleClientInfo sets the name and version of the application in
+// the `x-goog-api-client` header passed on each request. Intended for
+// use by Google-written clients.
+func (c *SessionsClient) setGoogleClientInfo(keyval ...string) {
+ kv := append([]string{"gl-go", version.Go()}, keyval...)
+ kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
+ c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
+}
+
+// DetectIntent processes a natural language query and returns structured, actionable data
+// as a result. This method is not idempotent, because it may cause contexts
+// and session entity types to be updated, which in turn might affect
+// results of future queries.
+func (c *SessionsClient) DetectIntent(ctx context.Context, req *dialogflowpb.DetectIntentRequest, opts ...gax.CallOption) (*dialogflowpb.DetectIntentResponse, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.DetectIntent[0:len(c.CallOptions.DetectIntent):len(c.CallOptions.DetectIntent)], opts...)
+ var resp *dialogflowpb.DetectIntentResponse
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.sessionsClient.DetectIntent(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// StreamingDetectIntent processes a natural language query in audio format in a streaming fashion
+// and returns structured, actionable data as a result. This method is only
+// available via the gRPC API (not REST).
+func (c *SessionsClient) StreamingDetectIntent(ctx context.Context, opts ...gax.CallOption) (dialogflowpb.Sessions_StreamingDetectIntentClient, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.StreamingDetectIntent[0:len(c.CallOptions.StreamingDetectIntent):len(c.CallOptions.StreamingDetectIntent)], opts...)
+ var resp dialogflowpb.Sessions_StreamingDetectIntentClient
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.sessionsClient.StreamingDetectIntent(ctx, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
diff --git a/vendor/cloud.google.com/go/dialogflow/apiv2/sessions_client_example_test.go b/vendor/cloud.google.com/go/dialogflow/apiv2/sessions_client_example_test.go
new file mode 100644
index 000000000..3f57474d9
--- /dev/null
+++ b/vendor/cloud.google.com/go/dialogflow/apiv2/sessions_client_example_test.go
@@ -0,0 +1,87 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package dialogflow_test
+
+import (
+ "io"
+
+ "cloud.google.com/go/dialogflow/apiv2"
+ "golang.org/x/net/context"
+ dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
+)
+
+func ExampleNewSessionsClient() {
+ ctx := context.Background()
+ c, err := dialogflow.NewSessionsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use client.
+ _ = c
+}
+
+func ExampleSessionsClient_DetectIntent() {
+ ctx := context.Background()
+ c, err := dialogflow.NewSessionsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &dialogflowpb.DetectIntentRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.DetectIntent(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleSessionsClient_StreamingDetectIntent() {
+ ctx := context.Background()
+ c, err := dialogflow.NewSessionsClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ stream, err := c.StreamingDetectIntent(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ go func() {
+ reqs := []*dialogflowpb.StreamingDetectIntentRequest{
+ // TODO: Create requests.
+ }
+ for _, req := range reqs {
+ if err := stream.Send(req); err != nil {
+ // TODO: Handle error.
+ }
+ }
+ stream.CloseSend()
+ }()
+ for {
+ resp, err := stream.Recv()
+ if err == io.EOF {
+ break
+ }
+ if err != nil {
+ // TODO: handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
diff --git a/vendor/cloud.google.com/go/dlp/apiv2/dlp_client.go b/vendor/cloud.google.com/go/dlp/apiv2/dlp_client.go
index 316765099..10899b01b 100644
--- a/vendor/cloud.google.com/go/dlp/apiv2/dlp_client.go
+++ b/vendor/cloud.google.com/go/dlp/apiv2/dlp_client.go
@@ -259,7 +259,7 @@ func (c *Client) ListInfoTypes(ctx context.Context, req *dlppb.ListInfoTypesRequ
return resp, nil
}
-// CreateInspectTemplate creates an inspect template for re-using frequently used configuration
+// CreateInspectTemplate creates an InspectTemplate for re-using frequently used configuration
// for inspecting content, images, and storage.
func (c *Client) CreateInspectTemplate(ctx context.Context, req *dlppb.CreateInspectTemplateRequest, opts ...gax.CallOption) (*dlppb.InspectTemplate, error) {
ctx = insertMetadata(ctx, c.xGoogMetadata)
@@ -276,7 +276,7 @@ func (c *Client) CreateInspectTemplate(ctx context.Context, req *dlppb.CreateIns
return resp, nil
}
-// UpdateInspectTemplate updates the inspect template.
+// UpdateInspectTemplate updates the InspectTemplate.
func (c *Client) UpdateInspectTemplate(ctx context.Context, req *dlppb.UpdateInspectTemplateRequest, opts ...gax.CallOption) (*dlppb.InspectTemplate, error) {
ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.UpdateInspectTemplate[0:len(c.CallOptions.UpdateInspectTemplate):len(c.CallOptions.UpdateInspectTemplate)], opts...)
@@ -292,7 +292,7 @@ func (c *Client) UpdateInspectTemplate(ctx context.Context, req *dlppb.UpdateIns
return resp, nil
}
-// GetInspectTemplate gets an inspect template.
+// GetInspectTemplate gets an InspectTemplate.
func (c *Client) GetInspectTemplate(ctx context.Context, req *dlppb.GetInspectTemplateRequest, opts ...gax.CallOption) (*dlppb.InspectTemplate, error) {
ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.GetInspectTemplate[0:len(c.CallOptions.GetInspectTemplate):len(c.CallOptions.GetInspectTemplate)], opts...)
@@ -308,7 +308,7 @@ func (c *Client) GetInspectTemplate(ctx context.Context, req *dlppb.GetInspectTe
return resp, nil
}
-// ListInspectTemplates lists inspect templates.
+// ListInspectTemplates lists InspectTemplates.
func (c *Client) ListInspectTemplates(ctx context.Context, req *dlppb.ListInspectTemplatesRequest, opts ...gax.CallOption) *InspectTemplateIterator {
ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.ListInspectTemplates[0:len(c.CallOptions.ListInspectTemplates):len(c.CallOptions.ListInspectTemplates)], opts...)
@@ -343,7 +343,7 @@ func (c *Client) ListInspectTemplates(ctx context.Context, req *dlppb.ListInspec
return it
}
-// DeleteInspectTemplate deletes an inspect template.
+// DeleteInspectTemplate deletes an InspectTemplate.
func (c *Client) DeleteInspectTemplate(ctx context.Context, req *dlppb.DeleteInspectTemplateRequest, opts ...gax.CallOption) error {
ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.DeleteInspectTemplate[0:len(c.CallOptions.DeleteInspectTemplate):len(c.CallOptions.DeleteInspectTemplate)], opts...)
@@ -355,8 +355,8 @@ func (c *Client) DeleteInspectTemplate(ctx context.Context, req *dlppb.DeleteIns
return err
}
-// CreateDeidentifyTemplate creates a de-identify template for re-using frequently used configuration
-// for Deidentifying content, images, and storage.
+// CreateDeidentifyTemplate creates a DeidentifyTemplate for re-using frequently used configuration
+// for de-identifying content, images, and storage.
func (c *Client) CreateDeidentifyTemplate(ctx context.Context, req *dlppb.CreateDeidentifyTemplateRequest, opts ...gax.CallOption) (*dlppb.DeidentifyTemplate, error) {
ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.CreateDeidentifyTemplate[0:len(c.CallOptions.CreateDeidentifyTemplate):len(c.CallOptions.CreateDeidentifyTemplate)], opts...)
@@ -372,7 +372,7 @@ func (c *Client) CreateDeidentifyTemplate(ctx context.Context, req *dlppb.Create
return resp, nil
}
-// UpdateDeidentifyTemplate updates the de-identify template.
+// UpdateDeidentifyTemplate updates the DeidentifyTemplate.
func (c *Client) UpdateDeidentifyTemplate(ctx context.Context, req *dlppb.UpdateDeidentifyTemplateRequest, opts ...gax.CallOption) (*dlppb.DeidentifyTemplate, error) {
ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.UpdateDeidentifyTemplate[0:len(c.CallOptions.UpdateDeidentifyTemplate):len(c.CallOptions.UpdateDeidentifyTemplate)], opts...)
@@ -388,7 +388,7 @@ func (c *Client) UpdateDeidentifyTemplate(ctx context.Context, req *dlppb.Update
return resp, nil
}
-// GetDeidentifyTemplate gets a de-identify template.
+// GetDeidentifyTemplate gets a DeidentifyTemplate.
func (c *Client) GetDeidentifyTemplate(ctx context.Context, req *dlppb.GetDeidentifyTemplateRequest, opts ...gax.CallOption) (*dlppb.DeidentifyTemplate, error) {
ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.GetDeidentifyTemplate[0:len(c.CallOptions.GetDeidentifyTemplate):len(c.CallOptions.GetDeidentifyTemplate)], opts...)
@@ -404,7 +404,7 @@ func (c *Client) GetDeidentifyTemplate(ctx context.Context, req *dlppb.GetDeiden
return resp, nil
}
-// ListDeidentifyTemplates lists de-identify templates.
+// ListDeidentifyTemplates lists DeidentifyTemplates.
func (c *Client) ListDeidentifyTemplates(ctx context.Context, req *dlppb.ListDeidentifyTemplatesRequest, opts ...gax.CallOption) *DeidentifyTemplateIterator {
ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.ListDeidentifyTemplates[0:len(c.CallOptions.ListDeidentifyTemplates):len(c.CallOptions.ListDeidentifyTemplates)], opts...)
@@ -439,7 +439,7 @@ func (c *Client) ListDeidentifyTemplates(ctx context.Context, req *dlppb.ListDei
return it
}
-// DeleteDeidentifyTemplate deletes a de-identify template.
+// DeleteDeidentifyTemplate deletes a DeidentifyTemplate.
func (c *Client) DeleteDeidentifyTemplate(ctx context.Context, req *dlppb.DeleteDeidentifyTemplateRequest, opts ...gax.CallOption) error {
ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.DeleteDeidentifyTemplate[0:len(c.CallOptions.DeleteDeidentifyTemplate):len(c.CallOptions.DeleteDeidentifyTemplate)], opts...)
@@ -451,8 +451,8 @@ func (c *Client) DeleteDeidentifyTemplate(ctx context.Context, req *dlppb.Delete
return err
}
-// CreateDlpJob creates a new job to inspect storage or calculate risk metrics How-to
-// guide (at /dlp/docs/compute-risk-analysis).
+// CreateDlpJob creates a new job to inspect storage or calculate risk metrics.
+// How-to guide (at /dlp/docs/compute-risk-analysis).
func (c *Client) CreateDlpJob(ctx context.Context, req *dlppb.CreateDlpJobRequest, opts ...gax.CallOption) (*dlppb.DlpJob, error) {
ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.CreateDlpJob[0:len(c.CallOptions.CreateDlpJob):len(c.CallOptions.CreateDlpJob)], opts...)
diff --git a/vendor/cloud.google.com/go/dlp/apiv2/doc.go b/vendor/cloud.google.com/go/dlp/apiv2/doc.go
index 943a05e7e..4018e4949 100644
--- a/vendor/cloud.google.com/go/dlp/apiv2/doc.go
+++ b/vendor/cloud.google.com/go/dlp/apiv2/doc.go
@@ -19,8 +19,9 @@
//
// NOTE: This package is in alpha. It is not stable, and is likely to change.
//
-// Provides methods for detection of privacy-sensitive fragments in text,
-// images, and Google Cloud Platform storage repositories.
+// Provides methods for detection, risk analysis, and de-identification of
+// privacy-sensitive fragments in text, images, and Google Cloud Platform
+// storage repositories.
package dlp // import "cloud.google.com/go/dlp/apiv2"
import (
diff --git a/vendor/cloud.google.com/go/dlp/apiv2beta1/dlp_client.go b/vendor/cloud.google.com/go/dlp/apiv2beta1/dlp_client.go
deleted file mode 100644
index f61f21457..000000000
--- a/vendor/cloud.google.com/go/dlp/apiv2beta1/dlp_client.go
+++ /dev/null
@@ -1,429 +0,0 @@
-// Copyright 2018 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// https://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// AUTO-GENERATED CODE. DO NOT EDIT.
-
-package dlp
-
-import (
- "time"
-
- "cloud.google.com/go/internal/version"
- "cloud.google.com/go/longrunning"
- lroauto "cloud.google.com/go/longrunning/autogen"
- gax "github.com/googleapis/gax-go"
- "golang.org/x/net/context"
- "google.golang.org/api/option"
- "google.golang.org/api/transport"
- longrunningpb "google.golang.org/genproto/googleapis/longrunning"
- dlppb "google.golang.org/genproto/googleapis/privacy/dlp/v2beta1"
- "google.golang.org/grpc"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/metadata"
-)
-
-// CallOptions contains the retry settings for each method of Client.
-type CallOptions struct {
- InspectContent []gax.CallOption
- RedactContent []gax.CallOption
- DeidentifyContent []gax.CallOption
- AnalyzeDataSourceRisk []gax.CallOption
- CreateInspectOperation []gax.CallOption
- ListInspectFindings []gax.CallOption
- ListInfoTypes []gax.CallOption
- ListRootCategories []gax.CallOption
-}
-
-func defaultClientOptions() []option.ClientOption {
- return []option.ClientOption{
- option.WithEndpoint("dlp.googleapis.com:443"),
- option.WithScopes(DefaultAuthScopes()...),
- }
-}
-
-func defaultCallOptions() *CallOptions {
- retry := map[[2]string][]gax.CallOption{
- {"default", "idempotent"}: {
- gax.WithRetry(func() gax.Retryer {
- return gax.OnCodes([]codes.Code{
- codes.DeadlineExceeded,
- codes.Unavailable,
- }, gax.Backoff{
- Initial: 100 * time.Millisecond,
- Max: 60000 * time.Millisecond,
- Multiplier: 1.3,
- })
- }),
- },
- }
- return &CallOptions{
- InspectContent: retry[[2]string{"default", "non_idempotent"}],
- RedactContent: retry[[2]string{"default", "non_idempotent"}],
- DeidentifyContent: retry[[2]string{"default", "idempotent"}],
- AnalyzeDataSourceRisk: retry[[2]string{"default", "idempotent"}],
- CreateInspectOperation: retry[[2]string{"default", "non_idempotent"}],
- ListInspectFindings: retry[[2]string{"default", "idempotent"}],
- ListInfoTypes: retry[[2]string{"default", "idempotent"}],
- ListRootCategories: retry[[2]string{"default", "idempotent"}],
- }
-}
-
-// Client is a client for interacting with DLP API.
-type Client struct {
- // The connection to the service.
- conn *grpc.ClientConn
-
- // The gRPC API client.
- client dlppb.DlpServiceClient
-
- // LROClient is used internally to handle longrunning operations.
- // It is exposed so that its CallOptions can be modified if required.
- // Users should not Close this client.
- LROClient *lroauto.OperationsClient
-
- // The call options for this service.
- CallOptions *CallOptions
-
- // The x-goog-* metadata to be sent with each request.
- xGoogMetadata metadata.MD
-}
-
-// NewClient creates a new dlp service client.
-//
-// The DLP API is a service that allows clients
-// to detect the presence of Personally Identifiable Information (PII) and other
-// privacy-sensitive data in user-supplied, unstructured data streams, like text
-// blocks or images.
-// The service also includes methods for sensitive data redaction and
-// scheduling of data scans on Google Cloud Platform based data sets.
-func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) {
- conn, err := transport.DialGRPC(ctx, append(defaultClientOptions(), opts...)...)
- if err != nil {
- return nil, err
- }
- c := &Client{
- conn: conn,
- CallOptions: defaultCallOptions(),
-
- client: dlppb.NewDlpServiceClient(conn),
- }
- c.setGoogleClientInfo()
-
- c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn))
- if err != nil {
- // This error "should not happen", since we are just reusing old connection
- // and never actually need to dial.
- // If this does happen, we could leak conn. However, we cannot close conn:
- // If the user invoked the function with option.WithGRPCConn,
- // we would close a connection that's still in use.
- // TODO(pongad): investigate error conditions.
- return nil, err
- }
- return c, nil
-}
-
-// Connection returns the client's connection to the API service.
-func (c *Client) Connection() *grpc.ClientConn {
- return c.conn
-}
-
-// Close closes the connection to the API service. The user should invoke this when
-// the client is no longer required.
-func (c *Client) Close() error {
- return c.conn.Close()
-}
-
-// setGoogleClientInfo sets the name and version of the application in
-// the `x-goog-api-client` header passed on each request. Intended for
-// use by Google-written clients.
-func (c *Client) setGoogleClientInfo(keyval ...string) {
- kv := append([]string{"gl-go", version.Go()}, keyval...)
- kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
- c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
-}
-
-// InspectContent finds potentially sensitive info in a list of strings.
-// This method has limits on input size, processing time, and output size.
-func (c *Client) InspectContent(ctx context.Context, req *dlppb.InspectContentRequest, opts ...gax.CallOption) (*dlppb.InspectContentResponse, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.InspectContent[0:len(c.CallOptions.InspectContent):len(c.CallOptions.InspectContent)], opts...)
- var resp *dlppb.InspectContentResponse
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.InspectContent(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// RedactContent redacts potentially sensitive info from a list of strings.
-// This method has limits on input size, processing time, and output size.
-func (c *Client) RedactContent(ctx context.Context, req *dlppb.RedactContentRequest, opts ...gax.CallOption) (*dlppb.RedactContentResponse, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.RedactContent[0:len(c.CallOptions.RedactContent):len(c.CallOptions.RedactContent)], opts...)
- var resp *dlppb.RedactContentResponse
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.RedactContent(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// DeidentifyContent de-identifies potentially sensitive info from a list of strings.
-// This method has limits on input size and output size.
-func (c *Client) DeidentifyContent(ctx context.Context, req *dlppb.DeidentifyContentRequest, opts ...gax.CallOption) (*dlppb.DeidentifyContentResponse, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.DeidentifyContent[0:len(c.CallOptions.DeidentifyContent):len(c.CallOptions.DeidentifyContent)], opts...)
- var resp *dlppb.DeidentifyContentResponse
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.DeidentifyContent(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// AnalyzeDataSourceRisk schedules a job to compute risk analysis metrics over content in a Google
-// Cloud Platform repository.
-func (c *Client) AnalyzeDataSourceRisk(ctx context.Context, req *dlppb.AnalyzeDataSourceRiskRequest, opts ...gax.CallOption) (*AnalyzeDataSourceRiskOperation, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.AnalyzeDataSourceRisk[0:len(c.CallOptions.AnalyzeDataSourceRisk):len(c.CallOptions.AnalyzeDataSourceRisk)], opts...)
- var resp *longrunningpb.Operation
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.AnalyzeDataSourceRisk(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return &AnalyzeDataSourceRiskOperation{
- lro: longrunning.InternalNewOperation(c.LROClient, resp),
- }, nil
-}
-
-// CreateInspectOperation schedules a job scanning content in a Google Cloud Platform data
-// repository.
-func (c *Client) CreateInspectOperation(ctx context.Context, req *dlppb.CreateInspectOperationRequest, opts ...gax.CallOption) (*CreateInspectOperationHandle, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.CreateInspectOperation[0:len(c.CallOptions.CreateInspectOperation):len(c.CallOptions.CreateInspectOperation)], opts...)
- var resp *longrunningpb.Operation
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.CreateInspectOperation(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return &CreateInspectOperationHandle{
- lro: longrunning.InternalNewOperation(c.LROClient, resp),
- }, nil
-}
-
-// ListInspectFindings returns list of results for given inspect operation result set id.
-func (c *Client) ListInspectFindings(ctx context.Context, req *dlppb.ListInspectFindingsRequest, opts ...gax.CallOption) (*dlppb.ListInspectFindingsResponse, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.ListInspectFindings[0:len(c.CallOptions.ListInspectFindings):len(c.CallOptions.ListInspectFindings)], opts...)
- var resp *dlppb.ListInspectFindingsResponse
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.ListInspectFindings(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// ListInfoTypes returns sensitive information types for given category.
-func (c *Client) ListInfoTypes(ctx context.Context, req *dlppb.ListInfoTypesRequest, opts ...gax.CallOption) (*dlppb.ListInfoTypesResponse, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.ListInfoTypes[0:len(c.CallOptions.ListInfoTypes):len(c.CallOptions.ListInfoTypes)], opts...)
- var resp *dlppb.ListInfoTypesResponse
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.ListInfoTypes(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// ListRootCategories returns the list of root categories of sensitive information.
-func (c *Client) ListRootCategories(ctx context.Context, req *dlppb.ListRootCategoriesRequest, opts ...gax.CallOption) (*dlppb.ListRootCategoriesResponse, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.ListRootCategories[0:len(c.CallOptions.ListRootCategories):len(c.CallOptions.ListRootCategories)], opts...)
- var resp *dlppb.ListRootCategoriesResponse
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.ListRootCategories(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// AnalyzeDataSourceRiskOperation manages a long-running operation from AnalyzeDataSourceRisk.
-type AnalyzeDataSourceRiskOperation struct {
- lro *longrunning.Operation
-}
-
-// AnalyzeDataSourceRiskOperation returns a new AnalyzeDataSourceRiskOperation from a given name.
-// The name must be that of a previously created AnalyzeDataSourceRiskOperation, possibly from a different process.
-func (c *Client) AnalyzeDataSourceRiskOperation(name string) *AnalyzeDataSourceRiskOperation {
- return &AnalyzeDataSourceRiskOperation{
- lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
- }
-}
-
-// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
-//
-// See documentation of Poll for error-handling information.
-func (op *AnalyzeDataSourceRiskOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dlppb.RiskAnalysisOperationResult, error) {
- var resp dlppb.RiskAnalysisOperationResult
- if err := op.lro.WaitWithInterval(ctx, &resp, 45000*time.Millisecond, opts...); err != nil {
- return nil, err
- }
- return &resp, nil
-}
-
-// Poll fetches the latest state of the long-running operation.
-//
-// Poll also fetches the latest metadata, which can be retrieved by Metadata.
-//
-// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
-// the operation has completed with failure, the error is returned and op.Done will return true.
-// If Poll succeeds and the operation has completed successfully,
-// op.Done will return true, and the response of the operation is returned.
-// If Poll succeeds and the operation has not completed, the returned response and error are both nil.
-func (op *AnalyzeDataSourceRiskOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dlppb.RiskAnalysisOperationResult, error) {
- var resp dlppb.RiskAnalysisOperationResult
- if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
- return nil, err
- }
- if !op.Done() {
- return nil, nil
- }
- return &resp, nil
-}
-
-// Metadata returns metadata associated with the long-running operation.
-// Metadata itself does not contact the server, but Poll does.
-// To get the latest metadata, call this method after a successful call to Poll.
-// If the metadata is not available, the returned metadata and error are both nil.
-func (op *AnalyzeDataSourceRiskOperation) Metadata() (*dlppb.RiskAnalysisOperationMetadata, error) {
- var meta dlppb.RiskAnalysisOperationMetadata
- if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
- return nil, nil
- } else if err != nil {
- return nil, err
- }
- return &meta, nil
-}
-
-// Done reports whether the long-running operation has completed.
-func (op *AnalyzeDataSourceRiskOperation) Done() bool {
- return op.lro.Done()
-}
-
-// Name returns the name of the long-running operation.
-// The name is assigned by the server and is unique within the service from which the operation is created.
-func (op *AnalyzeDataSourceRiskOperation) Name() string {
- return op.lro.Name()
-}
-
-// CreateInspectOperationHandle manages a long-running operation from CreateInspectOperation.
-type CreateInspectOperationHandle struct {
- lro *longrunning.Operation
-}
-
-// CreateInspectOperationHandle returns a new CreateInspectOperationHandle from a given name.
-// The name must be that of a previously created CreateInspectOperationHandle, possibly from a different process.
-func (c *Client) CreateInspectOperationHandle(name string) *CreateInspectOperationHandle {
- return &CreateInspectOperationHandle{
- lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
- }
-}
-
-// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
-//
-// See documentation of Poll for error-handling information.
-func (op *CreateInspectOperationHandle) Wait(ctx context.Context, opts ...gax.CallOption) (*dlppb.InspectOperationResult, error) {
- var resp dlppb.InspectOperationResult
- if err := op.lro.WaitWithInterval(ctx, &resp, 45000*time.Millisecond, opts...); err != nil {
- return nil, err
- }
- return &resp, nil
-}
-
-// Poll fetches the latest state of the long-running operation.
-//
-// Poll also fetches the latest metadata, which can be retrieved by Metadata.
-//
-// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
-// the operation has completed with failure, the error is returned and op.Done will return true.
-// If Poll succeeds and the operation has completed successfully,
-// op.Done will return true, and the response of the operation is returned.
-// If Poll succeeds and the operation has not completed, the returned response and error are both nil.
-func (op *CreateInspectOperationHandle) Poll(ctx context.Context, opts ...gax.CallOption) (*dlppb.InspectOperationResult, error) {
- var resp dlppb.InspectOperationResult
- if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
- return nil, err
- }
- if !op.Done() {
- return nil, nil
- }
- return &resp, nil
-}
-
-// Metadata returns metadata associated with the long-running operation.
-// Metadata itself does not contact the server, but Poll does.
-// To get the latest metadata, call this method after a successful call to Poll.
-// If the metadata is not available, the returned metadata and error are both nil.
-func (op *CreateInspectOperationHandle) Metadata() (*dlppb.InspectOperationMetadata, error) {
- var meta dlppb.InspectOperationMetadata
- if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
- return nil, nil
- } else if err != nil {
- return nil, err
- }
- return &meta, nil
-}
-
-// Done reports whether the long-running operation has completed.
-func (op *CreateInspectOperationHandle) Done() bool {
- return op.lro.Done()
-}
-
-// Name returns the name of the long-running operation.
-// The name is assigned by the server and is unique within the service from which the operation is created.
-func (op *CreateInspectOperationHandle) Name() string {
- return op.lro.Name()
-}
diff --git a/vendor/cloud.google.com/go/dlp/apiv2beta1/mock_test.go b/vendor/cloud.google.com/go/dlp/apiv2beta1/mock_test.go
deleted file mode 100644
index 1adb03b4b..000000000
--- a/vendor/cloud.google.com/go/dlp/apiv2beta1/mock_test.go
+++ /dev/null
@@ -1,844 +0,0 @@
-// Copyright 2018 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// https://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// AUTO-GENERATED CODE. DO NOT EDIT.
-
-package dlp
-
-import (
- longrunningpb "google.golang.org/genproto/googleapis/longrunning"
- dlppb "google.golang.org/genproto/googleapis/privacy/dlp/v2beta1"
-)
-
-import (
- "flag"
- "fmt"
- "io"
- "log"
- "net"
- "os"
- "strings"
- "testing"
-
- "github.com/golang/protobuf/proto"
- "github.com/golang/protobuf/ptypes"
- "golang.org/x/net/context"
- "google.golang.org/api/option"
- status "google.golang.org/genproto/googleapis/rpc/status"
- "google.golang.org/grpc"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/metadata"
- gstatus "google.golang.org/grpc/status"
-)
-
-var _ = io.EOF
-var _ = ptypes.MarshalAny
-var _ status.Status
-
-type mockDlpServer struct {
- // Embed for forward compatibility.
- // Tests will keep working if more methods are added
- // in the future.
- dlppb.DlpServiceServer
-
- reqs []proto.Message
-
- // If set, all calls return this error.
- err error
-
- // responses to return if err == nil
- resps []proto.Message
-}
-
-func (s *mockDlpServer) InspectContent(ctx context.Context, req *dlppb.InspectContentRequest) (*dlppb.InspectContentResponse, 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].(*dlppb.InspectContentResponse), nil
-}
-
-func (s *mockDlpServer) RedactContent(ctx context.Context, req *dlppb.RedactContentRequest) (*dlppb.RedactContentResponse, 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].(*dlppb.RedactContentResponse), nil
-}
-
-func (s *mockDlpServer) DeidentifyContent(ctx context.Context, req *dlppb.DeidentifyContentRequest) (*dlppb.DeidentifyContentResponse, 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].(*dlppb.DeidentifyContentResponse), nil
-}
-
-func (s *mockDlpServer) CreateInspectOperation(ctx context.Context, req *dlppb.CreateInspectOperationRequest) (*longrunningpb.Operation, error) {
- md, _ := metadata.FromIncomingContext(ctx)
- if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
- return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
- }
- s.reqs = append(s.reqs, req)
- if s.err != nil {
- return nil, s.err
- }
- return s.resps[0].(*longrunningpb.Operation), nil
-}
-
-func (s *mockDlpServer) AnalyzeDataSourceRisk(ctx context.Context, req *dlppb.AnalyzeDataSourceRiskRequest) (*longrunningpb.Operation, error) {
- md, _ := metadata.FromIncomingContext(ctx)
- if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
- return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
- }
- s.reqs = append(s.reqs, req)
- if s.err != nil {
- return nil, s.err
- }
- return s.resps[0].(*longrunningpb.Operation), nil
-}
-
-func (s *mockDlpServer) ListInspectFindings(ctx context.Context, req *dlppb.ListInspectFindingsRequest) (*dlppb.ListInspectFindingsResponse, 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].(*dlppb.ListInspectFindingsResponse), nil
-}
-
-func (s *mockDlpServer) ListInfoTypes(ctx context.Context, req *dlppb.ListInfoTypesRequest) (*dlppb.ListInfoTypesResponse, 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].(*dlppb.ListInfoTypesResponse), nil
-}
-
-func (s *mockDlpServer) ListRootCategories(ctx context.Context, req *dlppb.ListRootCategoriesRequest) (*dlppb.ListRootCategoriesResponse, 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].(*dlppb.ListRootCategoriesResponse), nil
-}
-
-// clientOpt is the option tests should use to connect to the test server.
-// It is initialized by TestMain.
-var clientOpt option.ClientOption
-
-var (
- mockDlp mockDlpServer
-)
-
-func TestMain(m *testing.M) {
- flag.Parse()
-
- serv := grpc.NewServer()
- dlppb.RegisterDlpServiceServer(serv, &mockDlp)
-
- lis, err := net.Listen("tcp", "localhost:0")
- if err != nil {
- log.Fatal(err)
- }
- go serv.Serve(lis)
-
- conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure())
- if err != nil {
- log.Fatal(err)
- }
- clientOpt = option.WithGRPCConn(conn)
-
- os.Exit(m.Run())
-}
-
-func TestDlpServiceInspectContent(t *testing.T) {
- var expectedResponse *dlppb.InspectContentResponse = &dlppb.InspectContentResponse{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var name string = "EMAIL_ADDRESS"
- var infoTypesElement = &dlppb.InfoType{
- Name: name,
- }
- var infoTypes = []*dlppb.InfoType{infoTypesElement}
- var inspectConfig = &dlppb.InspectConfig{
- InfoTypes: infoTypes,
- }
- var type_ string = "text/plain"
- var value string = "My email is example@example.com."
- var itemsElement = &dlppb.ContentItem{
- Type: type_,
- DataItem: &dlppb.ContentItem_Value{
- Value: value,
- },
- }
- var items = []*dlppb.ContentItem{itemsElement}
- var request = &dlppb.InspectContentRequest{
- InspectConfig: inspectConfig,
- Items: items,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.InspectContent(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceInspectContentError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var name string = "EMAIL_ADDRESS"
- var infoTypesElement = &dlppb.InfoType{
- Name: name,
- }
- var infoTypes = []*dlppb.InfoType{infoTypesElement}
- var inspectConfig = &dlppb.InspectConfig{
- InfoTypes: infoTypes,
- }
- var type_ string = "text/plain"
- var value string = "My email is example@example.com."
- var itemsElement = &dlppb.ContentItem{
- Type: type_,
- DataItem: &dlppb.ContentItem_Value{
- Value: value,
- },
- }
- var items = []*dlppb.ContentItem{itemsElement}
- var request = &dlppb.InspectContentRequest{
- InspectConfig: inspectConfig,
- Items: items,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.InspectContent(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 TestDlpServiceRedactContent(t *testing.T) {
- var expectedResponse *dlppb.RedactContentResponse = &dlppb.RedactContentResponse{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var name string = "EMAIL_ADDRESS"
- var infoTypesElement = &dlppb.InfoType{
- Name: name,
- }
- var infoTypes = []*dlppb.InfoType{infoTypesElement}
- var inspectConfig = &dlppb.InspectConfig{
- InfoTypes: infoTypes,
- }
- var type_ string = "text/plain"
- var value string = "My email is example@example.com."
- var itemsElement = &dlppb.ContentItem{
- Type: type_,
- DataItem: &dlppb.ContentItem_Value{
- Value: value,
- },
- }
- var items = []*dlppb.ContentItem{itemsElement}
- var name2 string = "EMAIL_ADDRESS"
- var infoType = &dlppb.InfoType{
- Name: name2,
- }
- var replaceWith string = "REDACTED"
- var replaceConfigsElement = &dlppb.RedactContentRequest_ReplaceConfig{
- InfoType: infoType,
- ReplaceWith: replaceWith,
- }
- var replaceConfigs = []*dlppb.RedactContentRequest_ReplaceConfig{replaceConfigsElement}
- var request = &dlppb.RedactContentRequest{
- InspectConfig: inspectConfig,
- Items: items,
- ReplaceConfigs: replaceConfigs,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.RedactContent(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceRedactContentError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var name string = "EMAIL_ADDRESS"
- var infoTypesElement = &dlppb.InfoType{
- Name: name,
- }
- var infoTypes = []*dlppb.InfoType{infoTypesElement}
- var inspectConfig = &dlppb.InspectConfig{
- InfoTypes: infoTypes,
- }
- var type_ string = "text/plain"
- var value string = "My email is example@example.com."
- var itemsElement = &dlppb.ContentItem{
- Type: type_,
- DataItem: &dlppb.ContentItem_Value{
- Value: value,
- },
- }
- var items = []*dlppb.ContentItem{itemsElement}
- var name2 string = "EMAIL_ADDRESS"
- var infoType = &dlppb.InfoType{
- Name: name2,
- }
- var replaceWith string = "REDACTED"
- var replaceConfigsElement = &dlppb.RedactContentRequest_ReplaceConfig{
- InfoType: infoType,
- ReplaceWith: replaceWith,
- }
- var replaceConfigs = []*dlppb.RedactContentRequest_ReplaceConfig{replaceConfigsElement}
- var request = &dlppb.RedactContentRequest{
- InspectConfig: inspectConfig,
- Items: items,
- ReplaceConfigs: replaceConfigs,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.RedactContent(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 TestDlpServiceDeidentifyContent(t *testing.T) {
- var expectedResponse *dlppb.DeidentifyContentResponse = &dlppb.DeidentifyContentResponse{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var deidentifyConfig *dlppb.DeidentifyConfig = &dlppb.DeidentifyConfig{}
- var inspectConfig *dlppb.InspectConfig = &dlppb.InspectConfig{}
- var items []*dlppb.ContentItem = nil
- var request = &dlppb.DeidentifyContentRequest{
- DeidentifyConfig: deidentifyConfig,
- InspectConfig: inspectConfig,
- Items: items,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.DeidentifyContent(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceDeidentifyContentError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var deidentifyConfig *dlppb.DeidentifyConfig = &dlppb.DeidentifyConfig{}
- var inspectConfig *dlppb.InspectConfig = &dlppb.InspectConfig{}
- var items []*dlppb.ContentItem = nil
- var request = &dlppb.DeidentifyContentRequest{
- DeidentifyConfig: deidentifyConfig,
- InspectConfig: inspectConfig,
- Items: items,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.DeidentifyContent(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 TestDlpServiceAnalyzeDataSourceRisk(t *testing.T) {
- var expectedResponse *dlppb.RiskAnalysisOperationResult = &dlppb.RiskAnalysisOperationResult{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- any, err := ptypes.MarshalAny(expectedResponse)
- if err != nil {
- t.Fatal(err)
- }
- mockDlp.resps = append(mockDlp.resps[:0], &longrunningpb.Operation{
- Name: "longrunning-test",
- Done: true,
- Result: &longrunningpb.Operation_Response{Response: any},
- })
-
- var privacyMetric *dlppb.PrivacyMetric = &dlppb.PrivacyMetric{}
- var sourceTable *dlppb.BigQueryTable = &dlppb.BigQueryTable{}
- var request = &dlppb.AnalyzeDataSourceRiskRequest{
- PrivacyMetric: privacyMetric,
- SourceTable: sourceTable,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- respLRO, err := c.AnalyzeDataSourceRisk(context.Background(), request)
- if err != nil {
- t.Fatal(err)
- }
- resp, err := respLRO.Wait(context.Background())
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceAnalyzeDataSourceRiskError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = nil
- mockDlp.resps = append(mockDlp.resps[:0], &longrunningpb.Operation{
- Name: "longrunning-test",
- Done: true,
- Result: &longrunningpb.Operation_Error{
- Error: &status.Status{
- Code: int32(errCode),
- Message: "test error",
- },
- },
- })
-
- var privacyMetric *dlppb.PrivacyMetric = &dlppb.PrivacyMetric{}
- var sourceTable *dlppb.BigQueryTable = &dlppb.BigQueryTable{}
- var request = &dlppb.AnalyzeDataSourceRiskRequest{
- PrivacyMetric: privacyMetric,
- SourceTable: sourceTable,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- respLRO, err := c.AnalyzeDataSourceRisk(context.Background(), request)
- if err != nil {
- t.Fatal(err)
- }
- resp, err := respLRO.Wait(context.Background())
-
- if st, ok := gstatus.FromError(err); !ok {
- t.Errorf("got error %v, expected grpc error", err)
- } else if c := st.Code(); c != errCode {
- t.Errorf("got error code %q, want %q", c, errCode)
- }
- _ = resp
-}
-func TestDlpServiceCreateInspectOperation(t *testing.T) {
- var name2 string = "name2-1052831874"
- var expectedResponse = &dlppb.InspectOperationResult{
- Name: name2,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- any, err := ptypes.MarshalAny(expectedResponse)
- if err != nil {
- t.Fatal(err)
- }
- mockDlp.resps = append(mockDlp.resps[:0], &longrunningpb.Operation{
- Name: "longrunning-test",
- Done: true,
- Result: &longrunningpb.Operation_Response{Response: any},
- })
-
- var name string = "EMAIL_ADDRESS"
- var infoTypesElement = &dlppb.InfoType{
- Name: name,
- }
- var infoTypes = []*dlppb.InfoType{infoTypesElement}
- var inspectConfig = &dlppb.InspectConfig{
- InfoTypes: infoTypes,
- }
- var url string = "gs://example_bucket/example_file.png"
- var fileSet = &dlppb.CloudStorageOptions_FileSet{
- Url: url,
- }
- var cloudStorageOptions = &dlppb.CloudStorageOptions{
- FileSet: fileSet,
- }
- var storageConfig = &dlppb.StorageConfig{
- Type: &dlppb.StorageConfig_CloudStorageOptions{
- CloudStorageOptions: cloudStorageOptions,
- },
- }
- var outputConfig *dlppb.OutputStorageConfig = &dlppb.OutputStorageConfig{}
- var request = &dlppb.CreateInspectOperationRequest{
- InspectConfig: inspectConfig,
- StorageConfig: storageConfig,
- OutputConfig: outputConfig,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- respLRO, err := c.CreateInspectOperation(context.Background(), request)
- if err != nil {
- t.Fatal(err)
- }
- resp, err := respLRO.Wait(context.Background())
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceCreateInspectOperationError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = nil
- mockDlp.resps = append(mockDlp.resps[:0], &longrunningpb.Operation{
- Name: "longrunning-test",
- Done: true,
- Result: &longrunningpb.Operation_Error{
- Error: &status.Status{
- Code: int32(errCode),
- Message: "test error",
- },
- },
- })
-
- var name string = "EMAIL_ADDRESS"
- var infoTypesElement = &dlppb.InfoType{
- Name: name,
- }
- var infoTypes = []*dlppb.InfoType{infoTypesElement}
- var inspectConfig = &dlppb.InspectConfig{
- InfoTypes: infoTypes,
- }
- var url string = "gs://example_bucket/example_file.png"
- var fileSet = &dlppb.CloudStorageOptions_FileSet{
- Url: url,
- }
- var cloudStorageOptions = &dlppb.CloudStorageOptions{
- FileSet: fileSet,
- }
- var storageConfig = &dlppb.StorageConfig{
- Type: &dlppb.StorageConfig_CloudStorageOptions{
- CloudStorageOptions: cloudStorageOptions,
- },
- }
- var outputConfig *dlppb.OutputStorageConfig = &dlppb.OutputStorageConfig{}
- var request = &dlppb.CreateInspectOperationRequest{
- InspectConfig: inspectConfig,
- StorageConfig: storageConfig,
- OutputConfig: outputConfig,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- respLRO, err := c.CreateInspectOperation(context.Background(), request)
- if err != nil {
- t.Fatal(err)
- }
- resp, err := respLRO.Wait(context.Background())
-
- if st, ok := gstatus.FromError(err); !ok {
- t.Errorf("got error %v, expected grpc error", err)
- } else if c := st.Code(); c != errCode {
- t.Errorf("got error code %q, want %q", c, errCode)
- }
- _ = resp
-}
-func TestDlpServiceListInspectFindings(t *testing.T) {
- var nextPageToken string = "nextPageToken-1530815211"
- var expectedResponse = &dlppb.ListInspectFindingsResponse{
- NextPageToken: nextPageToken,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedName string = fmt.Sprintf("inspect/results/%s", "[RESULT]")
- var request = &dlppb.ListInspectFindingsRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListInspectFindings(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceListInspectFindingsError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedName string = fmt.Sprintf("inspect/results/%s", "[RESULT]")
- var request = &dlppb.ListInspectFindingsRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListInspectFindings(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 TestDlpServiceListInfoTypes(t *testing.T) {
- var expectedResponse *dlppb.ListInfoTypesResponse = &dlppb.ListInfoTypesResponse{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var category string = "PII"
- var languageCode string = "en"
- var request = &dlppb.ListInfoTypesRequest{
- Category: category,
- LanguageCode: languageCode,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListInfoTypes(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceListInfoTypesError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var category string = "PII"
- var languageCode string = "en"
- var request = &dlppb.ListInfoTypesRequest{
- Category: category,
- LanguageCode: languageCode,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListInfoTypes(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 TestDlpServiceListRootCategories(t *testing.T) {
- var expectedResponse *dlppb.ListRootCategoriesResponse = &dlppb.ListRootCategoriesResponse{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var languageCode string = "en"
- var request = &dlppb.ListRootCategoriesRequest{
- LanguageCode: languageCode,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListRootCategories(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceListRootCategoriesError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var languageCode string = "en"
- var request = &dlppb.ListRootCategoriesRequest{
- LanguageCode: languageCode,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListRootCategories(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
-}
diff --git a/vendor/cloud.google.com/go/dlp/apiv2beta1/path_funcs.go b/vendor/cloud.google.com/go/dlp/apiv2beta1/path_funcs.go
deleted file mode 100644
index 2450034a8..000000000
--- a/vendor/cloud.google.com/go/dlp/apiv2beta1/path_funcs.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2018 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// https://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 dlp
-
-// ResultPath returns the path for the result resource.
-//
-// Deprecated: Use
-// fmt.Sprintf("inspect/results/%s", result)
-// instead.
-func ResultPath(result string) string {
- return "" +
- "inspect/results/" +
- result +
- ""
-}
diff --git a/vendor/cloud.google.com/go/examples_test.go b/vendor/cloud.google.com/go/examples_test.go
new file mode 100644
index 000000000..8d1dea36d
--- /dev/null
+++ b/vendor/cloud.google.com/go/examples_test.go
@@ -0,0 +1,60 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT 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 cloud_test
+
+import (
+ "time"
+
+ "cloud.google.com/go/bigquery"
+ "golang.org/x/net/context"
+)
+
+// To set a timeout for an RPC, use context.WithTimeout.
+func Example_timeout() {
+ ctx := context.Background()
+ // Do not set a timeout on the context passed to NewClient: dialing happens
+ // asynchronously, and the context is used to refresh credentials in the
+ // background.
+ client, err := bigquery.NewClient(ctx, "project-id")
+ if err != nil {
+ // TODO: handle error.
+ }
+ // Time out if it takes more than 10 seconds to create a dataset.
+ tctx, cancel := context.WithTimeout(ctx, 10*time.Second)
+ defer cancel() // Always call cancel.
+
+ if err := client.Dataset("new-dataset").Create(tctx, nil); err != nil {
+ // TODO: handle error.
+ }
+}
+
+// To arrange for an RPC to be canceled, use context.WithCancel.
+func Example_cancellation() {
+ ctx := context.Background()
+ // Do not cancel the context passed to NewClient: dialing happens asynchronously,
+ // and the context is used to refresh credentials in the background.
+ client, err := bigquery.NewClient(ctx, "project-id")
+ if err != nil {
+ // TODO: handle error.
+ }
+ cctx, cancel := context.WithCancel(ctx)
+ defer cancel() // Always call cancel.
+
+ // TODO: Make the cancel function available to whatever might want to cancel the
+ // call--perhaps a GUI button.
+ if err := client.Dataset("new-dataset").Create(cctx, nil); err != nil {
+ // TODO: handle error.
+ }
+}
diff --git a/vendor/cloud.google.com/go/firestore/cross_language_test.go b/vendor/cloud.google.com/go/firestore/conformance_test.go
similarity index 81%
rename from vendor/cloud.google.com/go/firestore/cross_language_test.go
rename to vendor/cloud.google.com/go/firestore/conformance_test.go
index 476345b34..be5b8cc95 100644
--- a/vendor/cloud.google.com/go/firestore/cross_language_test.go
+++ b/vendor/cloud.google.com/go/firestore/conformance_test.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// A runner for the cross-language tests.
+// A runner for the conformance tests.
package firestore
@@ -26,21 +26,29 @@ import (
"path/filepath"
"strings"
"testing"
+ "time"
pb "cloud.google.com/go/firestore/genproto"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
ts "github.com/golang/protobuf/ptypes/timestamp"
+ "github.com/google/go-cmp/cmp"
"golang.org/x/net/context"
+ "google.golang.org/api/iterator"
fspb "google.golang.org/genproto/googleapis/firestore/v1beta1"
)
-func TestCrossLanguageTests(t *testing.T) {
+const conformanceTestWatchTargetID = 1
+
+func TestConformanceTests(t *testing.T) {
const dir = "testdata"
fis, err := ioutil.ReadDir(dir)
if err != nil {
t.Fatal(err)
}
+ wtid := watchTargetID
+ watchTargetID = conformanceTestWatchTargetID
+ defer func() { watchTargetID = wtid }()
n := 0
for _, fi := range fis {
if strings.HasSuffix(fi.Name(), ".textproto") {
@@ -48,7 +56,7 @@ func TestCrossLanguageTests(t *testing.T) {
n++
}
}
- t.Logf("ran %d cross-language tests", n)
+ t.Logf("ran %d conformance tests", n)
}
func runTestFromFile(t *testing.T, filename string) {
@@ -168,11 +176,78 @@ func runTest(t *testing.T, msg string, test *pb.Test) {
}
}
+ case *pb.Test_Listen:
+ ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
+ defer cancel()
+ iter := c.Collection("C").OrderBy("a", Asc).Snapshots(ctx)
+ var rs []interface{}
+ for _, r := range tt.Listen.Responses {
+ rs = append(rs, r)
+ }
+ srv.addRPC(&fspb.ListenRequest{
+ Database: "projects/projectID/databases/(default)",
+ TargetChange: &fspb.ListenRequest_AddTarget{iter.ws.target},
+ }, rs)
+ got, err := nSnapshots(iter, len(tt.Listen.Snapshots))
+ if err != nil {
+ t.Errorf("%s: %v", msg, err)
+ } else if diff := cmp.Diff(got, tt.Listen.Snapshots); diff != "" {
+ t.Errorf("%s:\n%s", msg, diff)
+ }
+ if tt.Listen.IsError {
+ _, err := iter.Next()
+ if err == nil {
+ t.Errorf("%s: got nil, want error", msg)
+ }
+ }
+
default:
t.Fatalf("unknown test type %T", tt)
}
}
+func nSnapshots(iter *QuerySnapshotIterator, n int) ([]*pb.Snapshot, error) {
+ var snaps []*pb.Snapshot
+ for i := 0; i < n; i++ {
+ diter, err := iter.Next()
+ if err != nil {
+ return snaps, err
+ }
+ s := &pb.Snapshot{ReadTime: mustTimestampProto(iter.ReadTime)}
+ for {
+ doc, err := diter.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ return snaps, err
+ }
+ s.Docs = append(s.Docs, doc.proto)
+ }
+ for _, c := range iter.Changes {
+ var k pb.DocChange_Kind
+ switch c.Kind {
+ case DocumentAdded:
+ k = pb.DocChange_ADDED
+ case DocumentRemoved:
+ k = pb.DocChange_REMOVED
+ case DocumentModified:
+ k = pb.DocChange_MODIFIED
+ default:
+ panic("bad kind")
+ }
+ s.Changes = append(s.Changes, &pb.DocChange{
+ Kind: k,
+ Doc: c.Doc.proto,
+ OldIndex: int32(c.OldIndex),
+ NewIndex: int32(c.NewIndex),
+ })
+ }
+ snaps = append(snaps, s)
+ }
+ return snaps, nil
+}
+
func docRefFromPath(p string, c *Client) *DocumentRef {
return &DocumentRef{
Path: p,
diff --git a/vendor/cloud.google.com/go/firestore/doc.go b/vendor/cloud.google.com/go/firestore/doc.go
index b862f2e67..058fe3744 100644
--- a/vendor/cloud.google.com/go/firestore/doc.go
+++ b/vendor/cloud.google.com/go/firestore/doc.go
@@ -21,6 +21,9 @@ database.
See https://cloud.google.com/firestore/docs for an introduction
to Cloud Firestore and additional help on using the Firestore API.
+See https://godoc.org/cloud.google.com/go for authentication, timeouts,
+connection pooling and similar aspects of this package.
+
Note: you can't use both Cloud Firestore and Cloud Datastore in the same
project.
@@ -209,10 +212,5 @@ read and write methods of the Transaction passed to it.
if err != nil {
// TODO: Handle error.
}
-
-Authentication
-
-See examples of authorization and authentication at
-https://godoc.org/cloud.google.com/go#pkg-examples.
*/
package firestore
diff --git a/vendor/cloud.google.com/go/firestore/docref.go b/vendor/cloud.google.com/go/firestore/docref.go
index 488c92f3e..a95cd25d9 100644
--- a/vendor/cloud.google.com/go/firestore/docref.go
+++ b/vendor/cloud.google.com/go/firestore/docref.go
@@ -96,9 +96,11 @@ func (d *DocumentRef) Get(ctx context.Context) (*DocumentSnapshot, error) {
// is the underlying type of a Integer.
// - float32 and float64 convert to Double.
// - []byte converts to Bytes.
-// - time.Time converts to Timestamp.
-// - latlng.LatLng converts to GeoPoint. latlng is the package
-// "google.golang.org/genproto/googleapis/type/latlng".
+// - time.Time and *ts.Timestamp convert to Timestamp. ts is the package
+// "github.com/golang/protobuf/ptypes/timestamp".
+// - *latlng.LatLng converts to GeoPoint. latlng is the package
+// "google.golang.org/genproto/googleapis/type/latlng". You should always use
+// a pointer to a LatLng.
// - Slices convert to Array.
// - Maps and structs convert to Map.
// - nils of any type convert to Null.
@@ -182,6 +184,10 @@ func (d *DocumentRef) newSetWrites(data interface{}, opts []SetOption) ([]*pb.Wr
if v.Kind() != reflect.Map {
return nil, errors.New("firestore: MergeAll can only be specified with map data")
}
+ if v.Len() == 0 {
+ // Special case: MergeAll with an empty map.
+ return d.newUpdateWithTransform(&pb.Document{Name: d.Path}, []FieldPath{}, nil, nil, true), nil
+ }
fpvsFromData(v, nil, &fpvs)
} else {
// Set with merge paths. Collect only the values at the given paths.
@@ -218,6 +224,10 @@ func fpvsFromData(v reflect.Value, prefix FieldPath, fpvs *[]fpv) {
// removePathsIf creates a new slice of FieldPaths that contains
// exactly those elements of fps for which pred returns false.
func removePathsIf(fps []FieldPath, pred func(FieldPath) bool) []FieldPath {
+ // Return fps if it's empty to preserve the distinction betweeen nil and zero-length.
+ if len(fps) == 0 {
+ return fps
+ }
var result []FieldPath
for _, fp := range fps {
if !pred(fp) {
@@ -344,7 +354,7 @@ func (d *DocumentRef) newUpdateWithTransform(doc *pb.Document, updatePaths []Fie
if updateOnEmpty || len(doc.Fields) > 0 ||
len(updatePaths) > 0 || (pc != nil && len(serverTimestampPaths) == 0) {
var mask *pb.DocumentMask
- if len(updatePaths) > 0 {
+ if updatePaths != nil {
sfps := toServiceFieldPaths(updatePaths)
sort.Strings(sfps) // TODO(jba): make tests pass without this
mask = &pb.DocumentMask{FieldPaths: sfps}
diff --git a/vendor/cloud.google.com/go/firestore/docref_test.go b/vendor/cloud.google.com/go/firestore/docref_test.go
index 92d31fdf5..62ae034f0 100644
--- a/vendor/cloud.google.com/go/firestore/docref_test.go
+++ b/vendor/cloud.google.com/go/firestore/docref_test.go
@@ -89,7 +89,7 @@ func TestDocGet(t *testing.T) {
}
func TestDocSet(t *testing.T) {
- // Most tests for Set are in the cross-language tests.
+ // Most tests for Set are in the conformance tests.
ctx := context.Background()
c, srv := newMock(t)
@@ -134,7 +134,7 @@ func TestDocSet(t *testing.T) {
func TestDocCreate(t *testing.T) {
// Verify creation with structs. In particular, make sure zero values
// are handled well.
- // Other tests for Create are handled by the cross-language tests.
+ // Other tests for Create are handled by the conformance tests.
ctx := context.Background()
c, srv := newMock(t)
@@ -199,7 +199,7 @@ var (
testFields = map[string]*pb.Value{"a": intval(1)}
)
-// Update is tested by the cross-language tests.
+// Update is tested by the conformance tests.
func TestFPVsFromData(t *testing.T) {
type S struct{ X int }
diff --git a/vendor/cloud.google.com/go/firestore/document.go b/vendor/cloud.google.com/go/firestore/document.go
index 348327b09..c0b4bf38c 100644
--- a/vendor/cloud.google.com/go/firestore/document.go
+++ b/vendor/cloud.google.com/go/firestore/document.go
@@ -110,7 +110,7 @@ func (d *DocumentSnapshot) DataTo(p interface{}) error {
if !d.Exists() {
return status.Errorf(codes.NotFound, "document %s does not exist", d.Ref.Path)
}
- return setFromProtoValue(p, &pb.Value{&pb.Value_MapValue{&pb.MapValue{d.proto.Fields}}}, d.c)
+ return setFromProtoValue(p, &pb.Value{ValueType: &pb.Value_MapValue{&pb.MapValue{Fields: d.proto.Fields}}}, d.c)
}
// DataAt returns the data value denoted by path.
diff --git a/vendor/cloud.google.com/go/firestore/fieldpath.go b/vendor/cloud.google.com/go/firestore/fieldpath.go
index 5e24f49ef..f34c0b1d8 100644
--- a/vendor/cloud.google.com/go/firestore/fieldpath.go
+++ b/vendor/cloud.google.com/go/firestore/fieldpath.go
@@ -161,7 +161,7 @@ func setAtPath(m map[string]*pb.Value, fp FieldPath, val *pb.Value) {
} else {
v, ok := m[fp[0]]
if !ok {
- v = &pb.Value{&pb.Value_MapValue{&pb.MapValue{map[string]*pb.Value{}}}}
+ v = &pb.Value{ValueType: &pb.Value_MapValue{&pb.MapValue{Fields: map[string]*pb.Value{}}}}
m[fp[0]] = v
}
// The type assertion below cannot fail, because setAtPath is only called
diff --git a/vendor/cloud.google.com/go/firestore/from_value_test.go b/vendor/cloud.google.com/go/firestore/from_value_test.go
index 1327fb476..d952bdd45 100644
--- a/vendor/cloud.google.com/go/firestore/from_value_test.go
+++ b/vendor/cloud.google.com/go/firestore/from_value_test.go
@@ -33,7 +33,7 @@ import (
var (
tm = time.Date(2016, 12, 25, 0, 0, 0, 123456789, time.UTC)
ll = &latlng.LatLng{Latitude: 20, Longitude: 30}
- ptm = &ts.Timestamp{12345, 67890}
+ ptm = &ts.Timestamp{Seconds: 12345, Nanos: 67890}
)
func TestCreateFromProtoValue(t *testing.T) {
@@ -52,7 +52,7 @@ func TestCreateFromProtoValue(t *testing.T) {
want: []byte{1, 2},
},
{
- in: &pb.Value{&pb.Value_GeoPointValue{ll}},
+ in: &pb.Value{ValueType: &pb.Value_GeoPointValue{ll}},
want: ll,
},
{
@@ -200,7 +200,7 @@ func TestSetFromProtoValueNoJSON(t *testing.T) {
}{
{&bs, bytesval(bytes), bytes},
{&tmi, tsval(tm), tm},
- {&tmp, &pb.Value{&pb.Value_TimestampValue{ptm}}, ptm},
+ {&tmp, &pb.Value{ValueType: &pb.Value_TimestampValue{ptm}}, ptm},
{&lli, geoval(ll), ll},
} {
if err := setFromProtoValue(test.in, test.val, &Client{}); err != nil {
@@ -247,7 +247,7 @@ func TestSetFromProtoValueErrors(t *testing.T) {
{new(int16), floatval(math.MaxFloat32)}, // doesn't fit
{new(uint16), floatval(math.MaxFloat32)}, // doesn't fit
{new(float32),
- &pb.Value{&pb.Value_IntegerValue{math.MaxInt64}}}, // overflow
+ &pb.Value{ValueType: &pb.Value_IntegerValue{math.MaxInt64}}}, // overflow
} {
err := setFromProtoValue(test.in, test.val, c)
if err == nil {
diff --git a/vendor/cloud.google.com/go/firestore/genproto/test.pb.go b/vendor/cloud.google.com/go/firestore/genproto/test.pb.go
index fe6973d81..39ca3bb66 100644
--- a/vendor/cloud.google.com/go/firestore/genproto/test.pb.go
+++ b/vendor/cloud.google.com/go/firestore/genproto/test.pb.go
@@ -26,15 +26,20 @@ It has these top-level messages:
Cursor
DocSnapshot
FieldPath
+ ListenTest
+ Snapshot
+ DocChange
*/
package tests
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
-import google_firestore_v1beta14 "google.golang.org/genproto/googleapis/firestore/v1beta1"
import google_firestore_v1beta1 "google.golang.org/genproto/googleapis/firestore/v1beta1"
+import google_firestore_v1beta11 "google.golang.org/genproto/googleapis/firestore/v1beta1"
+import google_firestore_v1beta14 "google.golang.org/genproto/googleapis/firestore/v1beta1"
import google_firestore_v1beta12 "google.golang.org/genproto/googleapis/firestore/v1beta1"
+import google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -47,6 +52,33 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+type DocChange_Kind int32
+
+const (
+ DocChange_KIND_UNSPECIFIED DocChange_Kind = 0
+ DocChange_ADDED DocChange_Kind = 1
+ DocChange_REMOVED DocChange_Kind = 2
+ DocChange_MODIFIED DocChange_Kind = 3
+)
+
+var DocChange_Kind_name = map[int32]string{
+ 0: "KIND_UNSPECIFIED",
+ 1: "ADDED",
+ 2: "REMOVED",
+ 3: "MODIFIED",
+}
+var DocChange_Kind_value = map[string]int32{
+ "KIND_UNSPECIFIED": 0,
+ "ADDED": 1,
+ "REMOVED": 2,
+ "MODIFIED": 3,
+}
+
+func (x DocChange_Kind) String() string {
+ return proto.EnumName(DocChange_Kind_name, int32(x))
+}
+func (DocChange_Kind) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{19, 0} }
+
// A collection of tests.
type TestSuite struct {
Tests []*Test `protobuf:"bytes,1,rep,name=tests" json:"tests,omitempty"`
@@ -75,6 +107,7 @@ type Test struct {
// *Test_UpdatePaths
// *Test_Delete
// *Test_Query
+ // *Test_Listen
Test isTest_Test `protobuf_oneof:"test"`
}
@@ -108,6 +141,9 @@ type Test_Delete struct {
type Test_Query struct {
Query *QueryTest `protobuf:"bytes,8,opt,name=query,oneof"`
}
+type Test_Listen struct {
+ Listen *ListenTest `protobuf:"bytes,9,opt,name=listen,oneof"`
+}
func (*Test_Get) isTest_Test() {}
func (*Test_Create) isTest_Test() {}
@@ -116,6 +152,7 @@ func (*Test_Update) isTest_Test() {}
func (*Test_UpdatePaths) isTest_Test() {}
func (*Test_Delete) isTest_Test() {}
func (*Test_Query) isTest_Test() {}
+func (*Test_Listen) isTest_Test() {}
func (m *Test) GetTest() isTest_Test {
if m != nil {
@@ -180,6 +217,13 @@ func (m *Test) GetQuery() *QueryTest {
return nil
}
+func (m *Test) GetListen() *ListenTest {
+ if x, ok := m.GetTest().(*Test_Listen); ok {
+ return x.Listen
+ }
+ return nil
+}
+
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Test) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Test_OneofMarshaler, _Test_OneofUnmarshaler, _Test_OneofSizer, []interface{}{
@@ -190,6 +234,7 @@ func (*Test) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, f
(*Test_UpdatePaths)(nil),
(*Test_Delete)(nil),
(*Test_Query)(nil),
+ (*Test_Listen)(nil),
}
}
@@ -232,6 +277,11 @@ func _Test_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
if err := b.EncodeMessage(x.Query); err != nil {
return err
}
+ case *Test_Listen:
+ b.EncodeVarint(9<<3 | proto.WireBytes)
+ if err := b.EncodeMessage(x.Listen); err != nil {
+ return err
+ }
case nil:
default:
return fmt.Errorf("Test.Test has unexpected type %T", x)
@@ -298,6 +348,14 @@ func _Test_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (
err := b.DecodeMessage(msg)
m.Test = &Test_Query{msg}
return true, err
+ case 9: // test.listen
+ if wire != proto.WireBytes {
+ return true, proto.ErrInternalBadWireType
+ }
+ msg := new(ListenTest)
+ err := b.DecodeMessage(msg)
+ m.Test = &Test_Listen{msg}
+ return true, err
default:
return false, nil
}
@@ -342,6 +400,11 @@ func _Test_OneofSizer(msg proto.Message) (n int) {
n += proto.SizeVarint(8<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
+ case *Test_Listen:
+ s := proto.Size(x.Listen)
+ n += proto.SizeVarint(9<<3 | proto.WireBytes)
+ n += proto.SizeVarint(uint64(s))
+ n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
@@ -1153,6 +1216,121 @@ func (m *FieldPath) GetField() []string {
return nil
}
+// A test of the Listen streaming RPC (a.k.a. FireStore watch).
+// If the sequence of responses is provided to the implementation,
+// it should produce the sequence of snapshots.
+// If is_error is true, an error should occur after the snapshots.
+//
+// The tests assume that the query is
+// Collection("projects/projectID/databases/(default)/documents/C").OrderBy("a", Ascending)
+//
+// The watch target ID used in these tests is 1. Test interpreters
+// should either change their client's ID for testing,
+// or change the ID in the tests before running them.
+type ListenTest struct {
+ Responses []*google_firestore_v1beta14.ListenResponse `protobuf:"bytes,1,rep,name=responses" json:"responses,omitempty"`
+ Snapshots []*Snapshot `protobuf:"bytes,2,rep,name=snapshots" json:"snapshots,omitempty"`
+ IsError bool `protobuf:"varint,3,opt,name=is_error,json=isError" json:"is_error,omitempty"`
+}
+
+func (m *ListenTest) Reset() { *m = ListenTest{} }
+func (m *ListenTest) String() string { return proto.CompactTextString(m) }
+func (*ListenTest) ProtoMessage() {}
+func (*ListenTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
+
+func (m *ListenTest) GetResponses() []*google_firestore_v1beta14.ListenResponse {
+ if m != nil {
+ return m.Responses
+ }
+ return nil
+}
+
+func (m *ListenTest) GetSnapshots() []*Snapshot {
+ if m != nil {
+ return m.Snapshots
+ }
+ return nil
+}
+
+func (m *ListenTest) GetIsError() bool {
+ if m != nil {
+ return m.IsError
+ }
+ return false
+}
+
+type Snapshot struct {
+ Docs []*google_firestore_v1beta11.Document `protobuf:"bytes,1,rep,name=docs" json:"docs,omitempty"`
+ Changes []*DocChange `protobuf:"bytes,2,rep,name=changes" json:"changes,omitempty"`
+ ReadTime *google_protobuf1.Timestamp `protobuf:"bytes,3,opt,name=read_time,json=readTime" json:"read_time,omitempty"`
+}
+
+func (m *Snapshot) Reset() { *m = Snapshot{} }
+func (m *Snapshot) String() string { return proto.CompactTextString(m) }
+func (*Snapshot) ProtoMessage() {}
+func (*Snapshot) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
+
+func (m *Snapshot) GetDocs() []*google_firestore_v1beta11.Document {
+ if m != nil {
+ return m.Docs
+ }
+ return nil
+}
+
+func (m *Snapshot) GetChanges() []*DocChange {
+ if m != nil {
+ return m.Changes
+ }
+ return nil
+}
+
+func (m *Snapshot) GetReadTime() *google_protobuf1.Timestamp {
+ if m != nil {
+ return m.ReadTime
+ }
+ return nil
+}
+
+type DocChange struct {
+ Kind DocChange_Kind `protobuf:"varint,1,opt,name=kind,enum=tests.DocChange_Kind" json:"kind,omitempty"`
+ Doc *google_firestore_v1beta11.Document `protobuf:"bytes,2,opt,name=doc" json:"doc,omitempty"`
+ OldIndex int32 `protobuf:"varint,3,opt,name=old_index,json=oldIndex" json:"old_index,omitempty"`
+ NewIndex int32 `protobuf:"varint,4,opt,name=new_index,json=newIndex" json:"new_index,omitempty"`
+}
+
+func (m *DocChange) Reset() { *m = DocChange{} }
+func (m *DocChange) String() string { return proto.CompactTextString(m) }
+func (*DocChange) ProtoMessage() {}
+func (*DocChange) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
+
+func (m *DocChange) GetKind() DocChange_Kind {
+ if m != nil {
+ return m.Kind
+ }
+ return DocChange_KIND_UNSPECIFIED
+}
+
+func (m *DocChange) GetDoc() *google_firestore_v1beta11.Document {
+ if m != nil {
+ return m.Doc
+ }
+ return nil
+}
+
+func (m *DocChange) GetOldIndex() int32 {
+ if m != nil {
+ return m.OldIndex
+ }
+ return 0
+}
+
+func (m *DocChange) GetNewIndex() int32 {
+ if m != nil {
+ return m.NewIndex
+ }
+ return 0
+}
+
func init() {
proto.RegisterType((*TestSuite)(nil), "tests.TestSuite")
proto.RegisterType((*Test)(nil), "tests.Test")
@@ -1171,73 +1349,95 @@ func init() {
proto.RegisterType((*Cursor)(nil), "tests.Cursor")
proto.RegisterType((*DocSnapshot)(nil), "tests.DocSnapshot")
proto.RegisterType((*FieldPath)(nil), "tests.FieldPath")
+ proto.RegisterType((*ListenTest)(nil), "tests.ListenTest")
+ proto.RegisterType((*Snapshot)(nil), "tests.Snapshot")
+ proto.RegisterType((*DocChange)(nil), "tests.DocChange")
+ proto.RegisterEnum("tests.DocChange_Kind", DocChange_Kind_name, DocChange_Kind_value)
}
func init() { proto.RegisterFile("test.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
- // 994 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xc4, 0x56, 0x5f, 0x6f, 0xdc, 0x44,
- 0x10, 0xaf, 0x7d, 0x67, 0x9f, 0x3d, 0x0e, 0xa5, 0xac, 0x50, 0x65, 0x0a, 0x88, 0xab, 0x15, 0x92,
- 0x83, 0xa2, 0x2b, 0x09, 0xe2, 0x09, 0x09, 0x94, 0x4b, 0x48, 0x2a, 0xa4, 0xaa, 0xc1, 0x57, 0xe0,
- 0x05, 0xe9, 0x70, 0xec, 0x71, 0x62, 0xe4, 0xf3, 0x5e, 0x77, 0xd7, 0x45, 0xfd, 0x48, 0x20, 0xf1,
- 0xc0, 0x37, 0xe1, 0x91, 0x4f, 0xc0, 0x37, 0x80, 0x67, 0xb4, 0x7f, 0x7c, 0xb6, 0xd3, 0x5c, 0xc9,
- 0x43, 0x29, 0x6f, 0xbb, 0x33, 0xbf, 0x99, 0x9d, 0xf9, 0xcd, 0xec, 0xec, 0x02, 0x08, 0xe4, 0x62,
- 0xba, 0x62, 0x54, 0x50, 0xe2, 0xc8, 0x35, 0xbf, 0x33, 0x39, 0xa7, 0xf4, 0xbc, 0xc4, 0xfb, 0x79,
- 0xc1, 0x90, 0x0b, 0xca, 0xf0, 0xfe, 0xd3, 0xbd, 0x33, 0x14, 0xc9, 0x5e, 0x2b, 0xd1, 0x06, 0x77,
- 0xde, 0xdf, 0x88, 0x4c, 0xe9, 0x72, 0x49, 0x2b, 0x03, 0xdb, 0xde, 0x08, 0x7b, 0x52, 0x23, 0x7b,
- 0xa6, 0x51, 0xd1, 0x14, 0xfc, 0xc7, 0xc8, 0xc5, 0xbc, 0x2e, 0x04, 0x92, 0xbb, 0xa0, 0x83, 0x09,
- 0xad, 0xf1, 0x60, 0x12, 0xec, 0x07, 0x53, 0xb5, 0x9b, 0x4a, 0x40, 0xac, 0x35, 0xd1, 0x9f, 0x36,
- 0x0c, 0xe5, 0x9e, 0x8c, 0x21, 0xc8, 0x90, 0xa7, 0xac, 0x58, 0x89, 0x82, 0x56, 0xa1, 0x35, 0xb6,
- 0x26, 0x7e, 0xdc, 0x15, 0x91, 0x08, 0x06, 0xe7, 0x28, 0x42, 0x7b, 0x6c, 0x4d, 0x82, 0xfd, 0x9b,
- 0xc6, 0xd7, 0x09, 0x0a, 0x69, 0xfe, 0xe0, 0x46, 0x2c, 0x95, 0xe4, 0x1e, 0xb8, 0x29, 0xc3, 0x44,
- 0x60, 0x38, 0x50, 0xb0, 0x37, 0x0c, 0xec, 0x50, 0x09, 0x0d, 0xd2, 0x40, 0xa4, 0x43, 0x8e, 0x22,
- 0x1c, 0xf6, 0x1c, 0xce, 0x5b, 0x87, 0x5c, 0x3b, 0xac, 0x57, 0x99, 0x74, 0xe8, 0xf4, 0x1c, 0x7e,
- 0xa3, 0x84, 0x8d, 0x43, 0x0d, 0x21, 0x9f, 0xc1, 0x96, 0x5e, 0x2d, 0x56, 0x89, 0xb8, 0xe0, 0xa1,
- 0xab, 0x4c, 0x6e, 0xf7, 0x4c, 0x4e, 0xa5, 0xc6, 0xd8, 0x05, 0x75, 0x2b, 0x92, 0x27, 0x65, 0x58,
- 0xa2, 0xc0, 0x70, 0xd4, 0x3b, 0xe9, 0x48, 0x09, 0x9b, 0x93, 0x34, 0x84, 0x4c, 0xc0, 0x51, 0xac,
- 0x87, 0x9e, 0xc2, 0xde, 0x32, 0xd8, 0xaf, 0xa5, 0xcc, 0x40, 0x35, 0x60, 0xe6, 0xc2, 0x50, 0xea,
- 0x22, 0x0e, 0x23, 0xc3, 0x15, 0x19, 0xc3, 0x56, 0x46, 0xd3, 0x05, 0xc3, 0x5c, 0xc5, 0x69, 0xb8,
- 0x86, 0x8c, 0xa6, 0x31, 0xe6, 0x32, 0x18, 0x72, 0x0c, 0x23, 0x86, 0x4f, 0x6a, 0xe4, 0x0d, 0xdd,
- 0x1f, 0x4d, 0x75, 0xf5, 0xa7, 0x6d, 0xf3, 0x98, 0xea, 0xcb, 0x0a, 0x1c, 0xd1, 0xb4, 0x5e, 0x62,
- 0x25, 0x62, 0x6d, 0x13, 0x37, 0xc6, 0xd1, 0xcf, 0x16, 0x40, 0x4b, 0xfd, 0x35, 0x0e, 0x7e, 0x1b,
- 0xfc, 0x1f, 0x39, 0xad, 0x16, 0x59, 0x22, 0x12, 0x75, 0xb4, 0x1f, 0x7b, 0x52, 0x70, 0x94, 0x88,
- 0x84, 0x1c, 0xb4, 0x51, 0xe9, 0xea, 0xee, 0x6e, 0x8e, 0xea, 0x90, 0x2e, 0x97, 0xc5, 0x73, 0x01,
- 0x91, 0xb7, 0xc0, 0x2b, 0xf8, 0x02, 0x19, 0xa3, 0x4c, 0xd5, 0xdd, 0x8b, 0x47, 0x05, 0xff, 0x52,
- 0x6e, 0xa3, 0xdf, 0x2d, 0x18, 0xcd, 0xaf, 0xcd, 0xd0, 0x04, 0x5c, 0xaa, 0x3b, 0xd5, 0xee, 0x55,
- 0x60, 0x8e, 0xe2, 0x91, 0x92, 0xc7, 0x46, 0xdf, 0x4f, 0x69, 0xb0, 0x39, 0xa5, 0xe1, 0x4b, 0x48,
- 0xc9, 0xe9, 0xa7, 0xf4, 0x97, 0x05, 0xd0, 0x36, 0xea, 0x35, 0xb2, 0xfa, 0x0a, 0xb6, 0x56, 0x0c,
- 0x53, 0x5a, 0x65, 0x45, 0x27, 0xb7, 0x9d, 0xcd, 0x31, 0x9d, 0x76, 0xd0, 0x71, 0xcf, 0xf6, 0xff,
- 0xcc, 0xfb, 0x37, 0x1b, 0x5e, 0xbf, 0x74, 0xdb, 0x5e, 0x71, 0xf2, 0x7b, 0x10, 0xe4, 0x05, 0x96,
- 0x99, 0x19, 0x04, 0x03, 0x35, 0xff, 0x9a, 0x1e, 0x39, 0x96, 0x1a, 0x79, 0x64, 0x0c, 0x79, 0xb3,
- 0xe4, 0xe4, 0x3d, 0x08, 0x14, 0x5f, 0x4f, 0x93, 0xb2, 0x46, 0x1e, 0x0e, 0xc7, 0x03, 0x19, 0x9f,
- 0x14, 0x7d, 0xab, 0x24, 0x5d, 0xce, 0x9c, 0x97, 0xc0, 0x99, 0xdb, 0xe7, 0xec, 0x0f, 0x0b, 0xa0,
- 0x1d, 0x35, 0xaf, 0x98, 0xae, 0xff, 0xf6, 0x66, 0x9f, 0x80, 0xbf, 0xbe, 0x96, 0xe4, 0x16, 0x0c,
- 0x92, 0xb2, 0x54, 0xf9, 0x78, 0xb1, 0x5c, 0xca, 0xab, 0xac, 0xca, 0xc0, 0x43, 0x7b, 0x43, 0x99,
- 0x8c, 0x3e, 0xfa, 0xd5, 0x02, 0x7f, 0x3d, 0x62, 0x65, 0x83, 0xa7, 0xb4, 0x2c, 0xbb, 0xfc, 0x78,
- 0x52, 0xa0, 0xd8, 0xd9, 0x85, 0x51, 0x5a, 0x26, 0x35, 0xc7, 0xc6, 0xeb, 0x6b, 0xcd, 0x4b, 0xa4,
- 0xa4, 0x71, 0xa3, 0x25, 0x5f, 0x34, 0x93, 0x5c, 0x27, 0xfe, 0xc1, 0xe6, 0xc4, 0xe7, 0x82, 0xd5,
- 0xa9, 0xa8, 0x19, 0x66, 0x2a, 0x06, 0x33, 0xe0, 0x5f, 0x94, 0xf8, 0xdf, 0x36, 0xb8, 0xfa, 0x3c,
- 0xb2, 0x0b, 0x2e, 0xc7, 0x12, 0x53, 0xa1, 0x22, 0x6d, 0xc3, 0x99, 0x2b, 0xa1, 0x7c, 0x59, 0xb4,
- 0x9a, 0x6c, 0x83, 0xf3, 0xd3, 0x05, 0x32, 0x34, 0xf5, 0xdc, 0x32, 0xb8, 0xef, 0xa4, 0x4c, 0xbe,
- 0x2a, 0x4a, 0x49, 0xee, 0x81, 0x47, 0x59, 0x86, 0x6c, 0x71, 0xd6, 0x04, 0xde, 0xbc, 0x9f, 0x8f,
- 0xa4, 0x78, 0xf6, 0xec, 0xc1, 0x8d, 0x78, 0x44, 0xf5, 0x92, 0x84, 0xe0, 0xd2, 0x3c, 0x6f, 0x9e,
- 0x5a, 0x47, 0x1e, 0xa6, 0xf7, 0xe4, 0x36, 0x38, 0x65, 0xb1, 0x2c, 0x74, 0x43, 0x4b, 0x85, 0xde,
- 0x92, 0x0f, 0xc1, 0xe3, 0x22, 0x61, 0x62, 0x91, 0x08, 0xf3, 0x88, 0xae, 0xe9, 0xab, 0x19, 0xa7,
- 0x4c, 0x7a, 0x57, 0x80, 0x03, 0x41, 0x3e, 0x86, 0xc0, 0x60, 0x73, 0x81, 0xcc, 0x3c, 0x9e, 0xcf,
- 0xc1, 0x41, 0xc3, 0x25, 0x84, 0xec, 0x80, 0x8b, 0x55, 0x26, 0x7d, 0x7b, 0x57, 0x83, 0x1d, 0xac,
- 0xb2, 0x03, 0x41, 0xa6, 0x00, 0x12, 0x77, 0x86, 0x39, 0x65, 0x18, 0xfa, 0x57, 0x63, 0x7d, 0xac,
- 0xb2, 0x99, 0x42, 0xcc, 0x3c, 0x70, 0x75, 0x55, 0xa3, 0x7d, 0x70, 0x35, 0xb1, 0x9d, 0xe6, 0xb2,
- 0xfe, 0xa5, 0xb9, 0xbe, 0x07, 0x47, 0x91, 0x4c, 0xb6, 0x61, 0xb8, 0x6e, 0xa9, 0xab, 0x0c, 0x94,
- 0x96, 0xdc, 0x04, 0x9b, 0xae, 0xcc, 0x13, 0x69, 0xd3, 0x15, 0x79, 0x17, 0xa0, 0x1d, 0x1f, 0x66,
- 0xde, 0xfa, 0xeb, 0xe9, 0x11, 0x3d, 0x84, 0x91, 0xa9, 0xcc, 0x35, 0xfd, 0xbf, 0x03, 0x7e, 0x56,
- 0x30, 0x4c, 0xd7, 0x77, 0xdb, 0x8f, 0x5b, 0x41, 0xf4, 0x03, 0xb8, 0x9a, 0x01, 0xf2, 0xa9, 0x1e,
- 0x14, 0xbc, 0x4a, 0x56, 0xfc, 0x82, 0x36, 0xed, 0x45, 0x9a, 0xcf, 0x0b, 0x4d, 0xe7, 0x46, 0x13,
- 0x07, 0x59, 0xbb, 0xb9, 0x3c, 0xed, 0xec, 0xcb, 0xd3, 0x2e, 0xfa, 0x1c, 0x82, 0x8e, 0x31, 0x21,
- 0x9d, 0xa0, 0x7d, 0x13, 0xe2, 0x8b, 0x3e, 0x0b, 0xd1, 0x5d, 0xf0, 0xd7, 0x29, 0x91, 0x37, 0xc1,
- 0x51, 0x2c, 0xab, 0x22, 0xf8, 0xb1, 0xde, 0xcc, 0x1e, 0xc2, 0x4e, 0x4a, 0x97, 0xcd, 0x85, 0x4b,
- 0x4b, 0x5a, 0x67, 0x9d, 0x6b, 0x97, 0xd2, 0x2a, 0xa7, 0x6c, 0x99, 0x54, 0x29, 0xfe, 0x62, 0x47,
- 0x27, 0x1a, 0x74, 0xa8, 0x40, 0xc7, 0x6b, 0xd0, 0x63, 0x95, 0xe5, 0xa9, 0xfc, 0xfa, 0x9e, 0xb9,
- 0xea, 0x07, 0xfc, 0xc9, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8d, 0x96, 0x46, 0xb3, 0x8d, 0x0b,
- 0x00, 0x00,
+ // 1292 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xc4, 0x57, 0x4d, 0x73, 0xdb, 0xc4,
+ 0x1b, 0xaf, 0x6c, 0x4b, 0x96, 0x1e, 0xe7, 0xdf, 0xe6, 0xbf, 0x53, 0x3a, 0x26, 0xc0, 0x34, 0xd5,
+ 0x94, 0xc6, 0x6d, 0xc1, 0xa1, 0xe1, 0xed, 0xc0, 0x0c, 0x4c, 0x12, 0x3b, 0x6d, 0x28, 0x6d, 0x82,
+ 0xdc, 0x96, 0x4b, 0x66, 0x8c, 0xa2, 0x5d, 0x27, 0x02, 0x59, 0xeb, 0xee, 0xae, 0xfa, 0xf2, 0x39,
+ 0xb8, 0x73, 0x65, 0x60, 0x86, 0x03, 0x5f, 0x83, 0x13, 0x47, 0x3e, 0x03, 0x77, 0x38, 0x33, 0xfb,
+ 0x26, 0x59, 0x69, 0x5d, 0x72, 0x28, 0xe5, 0xb6, 0xfb, 0x3c, 0xbf, 0xe7, 0xfd, 0x65, 0x25, 0x00,
+ 0x41, 0xb8, 0xe8, 0xcf, 0x18, 0x15, 0x14, 0xb9, 0xf2, 0xcc, 0x57, 0xde, 0x3e, 0xa2, 0xf4, 0x28,
+ 0x23, 0xeb, 0x93, 0x94, 0x11, 0x2e, 0x28, 0x23, 0xeb, 0x8f, 0x6e, 0x1c, 0x12, 0x11, 0xdf, 0x58,
+ 0x4f, 0xe8, 0x74, 0x4a, 0x73, 0x8d, 0x5e, 0x59, 0x5b, 0x08, 0xc3, 0x34, 0x29, 0xa6, 0x24, 0x37,
+ 0x6a, 0x57, 0x7a, 0x0b, 0x81, 0x25, 0xc5, 0x20, 0x2f, 0x2f, 0x44, 0x3e, 0x2c, 0x08, 0x7b, 0x6a,
+ 0x50, 0x17, 0x0d, 0x4a, 0xdd, 0x0e, 0x8b, 0xc9, 0xba, 0x48, 0xa7, 0x84, 0x8b, 0x78, 0x3a, 0xd3,
+ 0x80, 0xb0, 0x0f, 0xc1, 0x3d, 0xc2, 0xc5, 0xa8, 0x48, 0x05, 0x41, 0x97, 0x40, 0x87, 0xd5, 0x75,
+ 0x56, 0x9b, 0xbd, 0xce, 0x46, 0xa7, 0xaf, 0x6e, 0x7d, 0x09, 0x88, 0x34, 0x27, 0xfc, 0xae, 0x09,
+ 0x2d, 0x79, 0x47, 0xab, 0xd0, 0xc1, 0x84, 0x27, 0x2c, 0x9d, 0x89, 0x94, 0xe6, 0x5d, 0x67, 0xd5,
+ 0xe9, 0x05, 0xd1, 0x3c, 0x09, 0x85, 0xd0, 0x3c, 0x22, 0xa2, 0xdb, 0x58, 0x75, 0x7a, 0x9d, 0x8d,
+ 0xb3, 0x46, 0xd7, 0x4d, 0x22, 0xa4, 0xf8, 0xad, 0x33, 0x91, 0x64, 0xa2, 0xeb, 0xe0, 0x25, 0x8c,
+ 0xc4, 0x82, 0x74, 0x9b, 0x0a, 0xf6, 0x7f, 0x03, 0xdb, 0x56, 0x44, 0x83, 0x34, 0x10, 0xa9, 0x90,
+ 0x13, 0xd1, 0x6d, 0xd5, 0x14, 0x8e, 0x2a, 0x85, 0x5c, 0x2b, 0x2c, 0x66, 0x58, 0x2a, 0x74, 0x6b,
+ 0x0a, 0xef, 0x2b, 0xa2, 0x55, 0xa8, 0x21, 0xe8, 0x13, 0x58, 0xd2, 0xa7, 0xf1, 0x2c, 0x16, 0xc7,
+ 0xbc, 0xeb, 0x29, 0x91, 0x0b, 0x35, 0x91, 0x7d, 0xc9, 0x31, 0x72, 0x9d, 0xa2, 0x22, 0x49, 0x4b,
+ 0x98, 0x64, 0x44, 0x90, 0x6e, 0xbb, 0x66, 0x69, 0xa0, 0x88, 0xd6, 0x92, 0x86, 0xa0, 0x1e, 0xb8,
+ 0xaa, 0x2c, 0x5d, 0x5f, 0x61, 0x97, 0x0d, 0xf6, 0x4b, 0x49, 0x33, 0x50, 0x0d, 0x90, 0x6a, 0xb3,
+ 0x94, 0x0b, 0x92, 0x77, 0x83, 0x9a, 0xda, 0x2f, 0x14, 0xd1, 0xaa, 0xd5, 0x90, 0x2d, 0x0f, 0x5a,
+ 0x92, 0x1b, 0x72, 0x68, 0x9b, 0xc4, 0xa2, 0x55, 0x58, 0xc2, 0x34, 0x19, 0x33, 0x32, 0x51, 0x41,
+ 0x99, 0xc2, 0x00, 0xa6, 0x49, 0x44, 0x26, 0xd2, 0x73, 0xb4, 0x03, 0x6d, 0x46, 0x1e, 0x16, 0x84,
+ 0xdb, 0xda, 0xbc, 0xd3, 0xd7, 0x5d, 0xd2, 0xaf, 0x7a, 0xcc, 0xf4, 0x92, 0x2c, 0xd7, 0xc0, 0x74,
+ 0x68, 0xa4, 0x65, 0x22, 0x2b, 0x1c, 0xfe, 0xe8, 0x00, 0x54, 0x75, 0x3a, 0x85, 0xe1, 0x37, 0x20,
+ 0xf8, 0x86, 0xd3, 0x7c, 0x8c, 0x63, 0x11, 0x2b, 0xd3, 0x41, 0xe4, 0x4b, 0xc2, 0x20, 0x16, 0x31,
+ 0xda, 0xac, 0xbc, 0xd2, 0xad, 0xb0, 0xb6, 0xd8, 0xab, 0x6d, 0x3a, 0x9d, 0xa6, 0xcf, 0x38, 0x84,
+ 0x5e, 0x07, 0x3f, 0xe5, 0x63, 0xc2, 0x18, 0x65, 0xaa, 0x49, 0xfc, 0xa8, 0x9d, 0xf2, 0xa1, 0xbc,
+ 0x86, 0xbf, 0x39, 0xd0, 0x1e, 0x9d, 0x3a, 0x43, 0x3d, 0xf0, 0xa8, 0x6e, 0xeb, 0x46, 0xad, 0x5c,
+ 0x23, 0x22, 0xf6, 0x14, 0x3d, 0x32, 0xfc, 0x7a, 0x48, 0xcd, 0xc5, 0x21, 0xb5, 0x5e, 0x42, 0x48,
+ 0x6e, 0x3d, 0xa4, 0x3f, 0x1d, 0x80, 0xaa, 0xab, 0x4f, 0x11, 0xd5, 0xe7, 0xb0, 0x34, 0x63, 0x24,
+ 0xa1, 0x39, 0x4e, 0xe7, 0x62, 0xbb, 0xb2, 0xd8, 0xa7, 0xfd, 0x39, 0x74, 0x54, 0x93, 0xfd, 0x2f,
+ 0xe3, 0xfe, 0xa5, 0x01, 0xe7, 0x4e, 0x8c, 0xe6, 0x2b, 0x0e, 0xfe, 0x06, 0x74, 0x26, 0x29, 0xc9,
+ 0xb0, 0xd9, 0x1a, 0x4d, 0xb5, 0x2c, 0x6d, 0x8f, 0xec, 0x48, 0x8e, 0x34, 0x19, 0xc1, 0xc4, 0x1e,
+ 0x39, 0xba, 0x08, 0x1d, 0x95, 0xaf, 0x47, 0x71, 0x56, 0x10, 0xde, 0x6d, 0xad, 0x36, 0xa5, 0x7f,
+ 0x92, 0xf4, 0x40, 0x51, 0xe6, 0x73, 0xe6, 0xbe, 0x84, 0x9c, 0x79, 0xf5, 0x9c, 0xfd, 0xee, 0x00,
+ 0x54, 0x7b, 0xe9, 0x15, 0xa7, 0xeb, 0xdf, 0x9d, 0xec, 0x9b, 0x10, 0x94, 0x63, 0x89, 0x96, 0xa1,
+ 0x19, 0x67, 0x99, 0x8a, 0xc7, 0x8f, 0xe4, 0x51, 0x8e, 0xb2, 0x2a, 0x03, 0xef, 0x36, 0x16, 0x94,
+ 0xc9, 0xf0, 0xc3, 0x9f, 0x1d, 0x08, 0xca, 0x7d, 0x2c, 0x1b, 0x3c, 0xa1, 0x59, 0x36, 0x9f, 0x1f,
+ 0x5f, 0x12, 0x54, 0x76, 0xd6, 0xa0, 0x9d, 0x64, 0x71, 0xc1, 0x89, 0xd5, 0xfa, 0x3f, 0xfb, 0x6c,
+ 0x29, 0x6a, 0x64, 0xb9, 0xe8, 0x33, 0xbb, 0xf6, 0x75, 0xe0, 0x57, 0x17, 0x07, 0x3e, 0x12, 0xac,
+ 0x48, 0x44, 0xc1, 0x08, 0x56, 0x3e, 0xd8, 0xd7, 0xe0, 0x05, 0x81, 0xff, 0xd5, 0x00, 0x4f, 0xdb,
+ 0x43, 0x6b, 0xe0, 0x71, 0x92, 0x91, 0x44, 0x28, 0x4f, 0x2b, 0x77, 0x46, 0x8a, 0x28, 0xdf, 0x0b,
+ 0xcd, 0x46, 0x97, 0xc1, 0x7d, 0x7c, 0x4c, 0x18, 0x31, 0xf5, 0x5c, 0x32, 0xb8, 0xaf, 0x24, 0x4d,
+ 0x3e, 0x41, 0x8a, 0x89, 0xae, 0x83, 0x4f, 0x19, 0x26, 0x6c, 0x7c, 0x68, 0x1d, 0xb7, 0x8f, 0xed,
+ 0x9e, 0x24, 0x6f, 0x3d, 0xbd, 0x75, 0x26, 0x6a, 0x53, 0x7d, 0x44, 0x5d, 0xf0, 0xe8, 0x64, 0x62,
+ 0xdf, 0x65, 0x57, 0x1a, 0xd3, 0x77, 0x74, 0x01, 0xdc, 0x2c, 0x9d, 0xa6, 0xba, 0xa1, 0x25, 0x43,
+ 0x5f, 0xd1, 0x35, 0xf0, 0xb9, 0x88, 0x99, 0x18, 0xc7, 0xc2, 0xbc, 0xb8, 0x65, 0xfa, 0x0a, 0xc6,
+ 0x29, 0x93, 0xda, 0x15, 0x60, 0x53, 0xa0, 0xf7, 0xa0, 0x63, 0xb0, 0x13, 0x41, 0x98, 0x79, 0x69,
+ 0x9f, 0x81, 0x83, 0x86, 0x4b, 0x08, 0xba, 0x02, 0x1e, 0xc9, 0xb1, 0xd4, 0xed, 0x3f, 0x1f, 0xec,
+ 0x92, 0x1c, 0x6f, 0x0a, 0xd4, 0x07, 0x90, 0xb8, 0x43, 0x32, 0xa1, 0x8c, 0x98, 0xb7, 0xf6, 0x19,
+ 0x6c, 0x40, 0x72, 0xbc, 0xa5, 0x10, 0x5b, 0x3e, 0x78, 0xba, 0xaa, 0xe1, 0x06, 0x78, 0x3a, 0xb1,
+ 0x73, 0xcd, 0xe5, 0xfc, 0x43, 0x73, 0x1d, 0x80, 0xab, 0x92, 0x8c, 0x2e, 0x43, 0xab, 0x6c, 0xa9,
+ 0xe7, 0x09, 0x28, 0x2e, 0x3a, 0x0b, 0x0d, 0x3a, 0x33, 0x4f, 0x64, 0x83, 0xce, 0xd0, 0x5b, 0x00,
+ 0xd5, 0xfa, 0x30, 0xfb, 0x36, 0x28, 0xb7, 0x47, 0x78, 0x07, 0xda, 0xa6, 0x32, 0xa7, 0xd4, 0xff,
+ 0x26, 0x04, 0x38, 0x65, 0x24, 0x29, 0x67, 0x3b, 0x88, 0x2a, 0x42, 0xf8, 0x35, 0x78, 0x3a, 0x03,
+ 0xe8, 0x43, 0xbd, 0x28, 0x78, 0x1e, 0xcf, 0xf8, 0x31, 0xb5, 0xed, 0x85, 0xec, 0x97, 0x0e, 0x4d,
+ 0x46, 0x86, 0x13, 0x75, 0x70, 0x75, 0x39, 0xb9, 0xed, 0x1a, 0x27, 0xb7, 0x5d, 0xf8, 0x29, 0x74,
+ 0xe6, 0x84, 0x11, 0x9a, 0x73, 0x3a, 0x30, 0x2e, 0xbe, 0xe8, 0x63, 0x21, 0xbc, 0x04, 0x41, 0x19,
+ 0x12, 0x3a, 0x0f, 0xae, 0xca, 0xb2, 0x2a, 0x42, 0x10, 0xe9, 0x4b, 0xf8, 0xbd, 0x03, 0x50, 0x7d,
+ 0x33, 0xa1, 0x1d, 0x08, 0x18, 0xe1, 0x33, 0x9a, 0xcb, 0xa1, 0xd5, 0xd5, 0xea, 0x2d, 0x9e, 0x46,
+ 0x2d, 0x18, 0x19, 0x81, 0xa8, 0x12, 0x45, 0xef, 0x42, 0x60, 0xb3, 0x61, 0x87, 0xff, 0x9c, 0x9d,
+ 0x36, 0x9b, 0x8b, 0x0a, 0x51, 0x9b, 0xdf, 0x66, 0x7d, 0x7e, 0x7f, 0x70, 0xc0, 0x2f, 0x33, 0xf0,
+ 0x11, 0xb4, 0x30, 0x4d, 0xac, 0x67, 0xe1, 0x62, 0xcf, 0xca, 0xaf, 0x31, 0x85, 0x47, 0xd7, 0xa0,
+ 0x9d, 0x1c, 0xc7, 0xf9, 0x11, 0x39, 0xb9, 0xdf, 0x06, 0x34, 0xd9, 0x56, 0x8c, 0xc8, 0x02, 0xd0,
+ 0xc7, 0x32, 0x05, 0x31, 0x1e, 0xcb, 0x5f, 0x00, 0x33, 0xd7, 0x2b, 0xd6, 0x90, 0xfd, 0x3f, 0xe8,
+ 0xdf, 0xb3, 0xff, 0x07, 0x91, 0x2f, 0xc1, 0xf2, 0x1a, 0xfe, 0xe1, 0x40, 0x50, 0xea, 0x43, 0x57,
+ 0xa1, 0xf5, 0x6d, 0x9a, 0x63, 0x55, 0xac, 0xb3, 0x1b, 0xaf, 0x9d, 0xb4, 0xd7, 0xbf, 0x9d, 0xe6,
+ 0x38, 0x52, 0x10, 0xf4, 0x01, 0x34, 0x31, 0x4d, 0xcc, 0xb2, 0x39, 0x4d, 0x50, 0x12, 0x2e, 0x2b,
+ 0x4f, 0x33, 0x3c, 0x4e, 0x73, 0x4c, 0x9e, 0x28, 0x3f, 0xdd, 0xc8, 0xa7, 0x19, 0xde, 0x95, 0x77,
+ 0xc9, 0xcc, 0xc9, 0x63, 0xc3, 0x6c, 0x69, 0x66, 0x4e, 0x1e, 0x2b, 0x66, 0xb8, 0x05, 0x2d, 0x69,
+ 0x1d, 0x9d, 0x87, 0xe5, 0xdb, 0xbb, 0x77, 0x07, 0xe3, 0xfb, 0x77, 0x47, 0xfb, 0xc3, 0xed, 0xdd,
+ 0x9d, 0xdd, 0xe1, 0x60, 0xf9, 0x0c, 0x0a, 0xc0, 0xdd, 0x1c, 0x0c, 0x86, 0x83, 0x65, 0x07, 0x75,
+ 0xa0, 0x1d, 0x0d, 0xef, 0xec, 0x3d, 0x18, 0x0e, 0x96, 0x1b, 0x68, 0x09, 0xfc, 0x3b, 0x7b, 0x03,
+ 0x8d, 0x6a, 0x6e, 0x3d, 0x81, 0x2b, 0x09, 0x9d, 0x5a, 0x5f, 0x93, 0x8c, 0x16, 0x78, 0xce, 0xe3,
+ 0x84, 0xe6, 0x13, 0xca, 0xa6, 0x71, 0x9e, 0x90, 0x9f, 0x1a, 0xe1, 0x4d, 0x0d, 0xda, 0x56, 0xa0,
+ 0x9d, 0x12, 0x74, 0x4f, 0x65, 0x64, 0x5f, 0xa6, 0xf4, 0xd7, 0x46, 0x4f, 0x83, 0x0e, 0x14, 0xe8,
+ 0xa0, 0x04, 0x1d, 0x28, 0xd0, 0xc1, 0x76, 0xa5, 0xef, 0xd0, 0x53, 0x45, 0x78, 0xff, 0xef, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xc2, 0x7a, 0x63, 0xd5, 0x67, 0x0e, 0x00, 0x00,
}
diff --git a/vendor/cloud.google.com/go/firestore/integration_test.go b/vendor/cloud.google.com/go/firestore/integration_test.go
index a575fcf7d..588b1b61d 100644
--- a/vendor/cloud.google.com/go/firestore/integration_test.go
+++ b/vendor/cloud.google.com/go/firestore/integration_test.go
@@ -29,6 +29,7 @@ import (
"cloud.google.com/go/internal/pretty"
"cloud.google.com/go/internal/testutil"
+ "cloud.google.com/go/internal/uid"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
@@ -55,7 +56,7 @@ const (
var (
iClient *Client
iColl *CollectionRef
- collectionIDs = testutil.NewUIDSpace("go-integration-test")
+ collectionIDs = uid.NewSpace("go-integration-test", nil)
)
func initIntegrationTest() {
@@ -389,6 +390,18 @@ func TestIntegration_Set(t *testing.T) {
if !wr3.UpdateTime.Before(wr4.UpdateTime) {
t.Errorf("update time did not increase: old=%s, new=%s", wr3.UpdateTime, wr4.UpdateTime)
}
+
+ // Writing an empty doc with MergeAll should create the doc.
+ doc2 := coll.NewDoc()
+ want = map[string]interface{}{}
+ _, err = doc2.Set(ctx, want, MergeAll)
+ if err != nil {
+ t.Fatal(err)
+ }
+ ds = h.mustGet(doc2)
+ if got := ds.Data(); !testEqual(got, want) {
+ t.Errorf("got %v, want %v", got, want)
+ }
}
func TestIntegration_Delete(t *testing.T) {
diff --git a/vendor/cloud.google.com/go/firestore/options_test.go b/vendor/cloud.google.com/go/firestore/options_test.go
index 211557bcd..8bb551e7d 100644
--- a/vendor/cloud.google.com/go/firestore/options_test.go
+++ b/vendor/cloud.google.com/go/firestore/options_test.go
@@ -36,11 +36,11 @@ func TestProcessPreconditionsForVerify(t *testing.T) {
},
{
in: []Precondition{Exists},
- want: &pb.Precondition{&pb.Precondition_Exists{true}},
+ want: &pb.Precondition{ConditionType: &pb.Precondition_Exists{true}},
},
{
in: []Precondition{LastUpdateTime(aTime)},
- want: &pb.Precondition{&pb.Precondition_UpdateTime{aTimestamp}},
+ want: &pb.Precondition{ConditionType: &pb.Precondition_UpdateTime{aTimestamp}},
},
{
in: []Precondition{Exists, LastUpdateTime(aTime)},
@@ -79,11 +79,11 @@ func TestProcessPreconditionsForDelete(t *testing.T) {
},
{
in: []Precondition{Exists},
- want: &pb.Precondition{&pb.Precondition_Exists{true}},
+ want: &pb.Precondition{ConditionType: &pb.Precondition_Exists{true}},
},
{
in: []Precondition{LastUpdateTime(aTime)},
- want: &pb.Precondition{&pb.Precondition_UpdateTime{aTimestamp}},
+ want: &pb.Precondition{ConditionType: &pb.Precondition_UpdateTime{aTimestamp}},
},
{
in: []Precondition{Exists, LastUpdateTime(aTime)},
@@ -114,11 +114,11 @@ func TestProcessPreconditionsForUpdate(t *testing.T) {
}{
{
in: nil,
- want: &pb.Precondition{&pb.Precondition_Exists{true}},
+ want: &pb.Precondition{ConditionType: &pb.Precondition_Exists{true}},
},
{
in: []Precondition{},
- want: &pb.Precondition{&pb.Precondition_Exists{true}},
+ want: &pb.Precondition{ConditionType: &pb.Precondition_Exists{true}},
},
{
@@ -127,7 +127,7 @@ func TestProcessPreconditionsForUpdate(t *testing.T) {
},
{
in: []Precondition{LastUpdateTime(aTime)},
- want: &pb.Precondition{&pb.Precondition_UpdateTime{aTimestamp}},
+ want: &pb.Precondition{ConditionType: &pb.Precondition_UpdateTime{aTimestamp}},
},
{
in: []Precondition{Exists, LastUpdateTime(aTime)},
diff --git a/vendor/cloud.google.com/go/firestore/query.go b/vendor/cloud.google.com/go/firestore/query.go
index 5ef6f4aff..682bfa31b 100644
--- a/vendor/cloud.google.com/go/firestore/query.go
+++ b/vendor/cloud.google.com/go/firestore/query.go
@@ -160,7 +160,7 @@ func (q Query) Offset(n int) Query {
// Limit returns a new Query that specifies the maximum number of results to return.
// It must not be negative.
func (q Query) Limit(n int) Query {
- q.limit = &wrappers.Int32Value{trunc32(n)}
+ q.limit = &wrappers.Int32Value{Value: trunc32(n)}
return q
}
@@ -363,7 +363,7 @@ func (q *Query) fieldValuesToCursorValues(fieldValues []interface{}) ([]*pb.Valu
if !ok {
return nil, fmt.Errorf("firestore: expected doc ID for DocumentID field, got %T", fval)
}
- vals[i] = &pb.Value{&pb.Value_ReferenceValue{q.collectionPath() + "/" + docID}}
+ vals[i] = &pb.Value{ValueType: &pb.Value_ReferenceValue{q.collectionPath() + "/" + docID}}
} else {
var sawTransform bool
vals[i], sawTransform, err = toProtoValue(reflect.ValueOf(fval))
@@ -387,7 +387,7 @@ func (q *Query) docSnapshotToCursorValues(ds *DocumentSnapshot, orders []order)
if dp != qp {
return nil, fmt.Errorf("firestore: document snapshot for %s passed to query on %s", dp, qp)
}
- vals[i] = &pb.Value{&pb.Value_ReferenceValue{ds.Ref.Path}}
+ vals[i] = &pb.Value{ValueType: &pb.Value_ReferenceValue{ds.Ref.Path}}
} else {
val, err := valueAtPath(ord.fieldPath, ds.proto.Fields)
if err != nil {
@@ -534,7 +534,7 @@ func (r order) toProto() (*pb.StructuredQuery_Order, error) {
}
func fref(fp FieldPath) *pb.StructuredQuery_FieldReference {
- return &pb.StructuredQuery_FieldReference{fp.toServiceFieldPath()}
+ return &pb.StructuredQuery_FieldReference{FieldPath: fp.toServiceFieldPath()}
}
func trunc32(i int) int32 {
diff --git a/vendor/cloud.google.com/go/firestore/query_test.go b/vendor/cloud.google.com/go/firestore/query_test.go
index 7f373ed69..4e852089e 100644
--- a/vendor/cloud.google.com/go/firestore/query_test.go
+++ b/vendor/cloud.google.com/go/firestore/query_test.go
@@ -153,7 +153,7 @@ func TestQueryToProto(t *testing.T) {
in: q.Where("a", ">", 5).Where("b", "<", "foo"),
want: &pb.StructuredQuery{
Where: &pb.StructuredQuery_Filter{
- &pb.StructuredQuery_Filter_CompositeFilter{
+ FilterType: &pb.StructuredQuery_Filter_CompositeFilter{
&pb.StructuredQuery_CompositeFilter{
Op: pb.StructuredQuery_CompositeFilter_AND,
Filters: []*pb.StructuredQuery_Filter{
@@ -174,9 +174,9 @@ func TestQueryToProto(t *testing.T) {
in: q.OrderBy("b", Asc).OrderBy("a", Desc).OrderByPath([]string{"~"}, Asc),
want: &pb.StructuredQuery{
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("b"), pb.StructuredQuery_ASCENDING},
- {fref1("a"), pb.StructuredQuery_DESCENDING},
- {fref1("~"), pb.StructuredQuery_ASCENDING},
+ {Field: fref1("b"), Direction: pb.StructuredQuery_ASCENDING},
+ {Field: fref1("a"), Direction: pb.StructuredQuery_DESCENDING},
+ {Field: fref1("~"), Direction: pb.StructuredQuery_ASCENDING},
},
},
},
@@ -185,7 +185,7 @@ func TestQueryToProto(t *testing.T) {
in: q.Offset(2).Limit(3),
want: &pb.StructuredQuery{
Offset: 2,
- Limit: &wrappers.Int32Value{3},
+ Limit: &wrappers.Int32Value{Value: 3},
},
},
{
@@ -193,7 +193,7 @@ func TestQueryToProto(t *testing.T) {
in: q.Offset(2).Limit(3).Limit(4).Offset(5), // last wins
want: &pb.StructuredQuery{
Offset: 5,
- Limit: &wrappers.Int32Value{4},
+ Limit: &wrappers.Int32Value{Value: 4},
},
},
{
@@ -201,7 +201,7 @@ func TestQueryToProto(t *testing.T) {
in: q.OrderBy("a", Asc).StartAt(7).EndBefore(9),
want: &pb.StructuredQuery{
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("a"), pb.StructuredQuery_ASCENDING},
+ {Field: fref1("a"), Direction: pb.StructuredQuery_ASCENDING},
},
StartAt: &pb.Cursor{
Values: []*pb.Value{intval(7)},
@@ -218,7 +218,7 @@ func TestQueryToProto(t *testing.T) {
in: q.OrderBy("a", Asc).StartAt(7).EndAt(9),
want: &pb.StructuredQuery{
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("a"), pb.StructuredQuery_ASCENDING},
+ {Field: fref1("a"), Direction: pb.StructuredQuery_ASCENDING},
},
StartAt: &pb.Cursor{
Values: []*pb.Value{intval(7)},
@@ -235,7 +235,7 @@ func TestQueryToProto(t *testing.T) {
in: q.OrderBy("a", Asc).StartAfter(7).EndAt(9),
want: &pb.StructuredQuery{
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("a"), pb.StructuredQuery_ASCENDING},
+ {Field: fref1("a"), Direction: pb.StructuredQuery_ASCENDING},
},
StartAt: &pb.Cursor{
Values: []*pb.Value{intval(7)},
@@ -252,7 +252,7 @@ func TestQueryToProto(t *testing.T) {
in: q.OrderBy(DocumentID, Asc).StartAfter("foo").EndBefore("bar"),
want: &pb.StructuredQuery{
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("__name__"), pb.StructuredQuery_ASCENDING},
+ {Field: fref1("__name__"), Direction: pb.StructuredQuery_ASCENDING},
},
StartAt: &pb.Cursor{
Values: []*pb.Value{refval(coll.parentPath + "/documents/C/foo")},
@@ -269,8 +269,8 @@ func TestQueryToProto(t *testing.T) {
in: q.OrderBy("a", Asc).OrderBy("b", Desc).StartAfter(7, 8).EndAt(9, 10),
want: &pb.StructuredQuery{
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("a"), pb.StructuredQuery_ASCENDING},
- {fref1("b"), pb.StructuredQuery_DESCENDING},
+ {Field: fref1("a"), Direction: pb.StructuredQuery_ASCENDING},
+ {Field: fref1("b"), Direction: pb.StructuredQuery_DESCENDING},
},
StartAt: &pb.Cursor{
Values: []*pb.Value{intval(7), intval(8)},
@@ -290,7 +290,7 @@ func TestQueryToProto(t *testing.T) {
EndAt(3).EndBefore(4),
want: &pb.StructuredQuery{
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("a"), pb.StructuredQuery_ASCENDING},
+ {Field: fref1("a"), Direction: pb.StructuredQuery_ASCENDING},
},
StartAt: &pb.Cursor{
Values: []*pb.Value{intval(2)},
@@ -309,7 +309,7 @@ func TestQueryToProto(t *testing.T) {
in: q.StartAt(docsnap),
want: &pb.StructuredQuery{
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("__name__"), pb.StructuredQuery_ASCENDING},
+ {Field: fref1("__name__"), Direction: pb.StructuredQuery_ASCENDING},
},
StartAt: &pb.Cursor{
Values: []*pb.Value{refval(coll.parentPath + "/documents/C/D")},
@@ -322,8 +322,8 @@ func TestQueryToProto(t *testing.T) {
in: q.OrderBy("a", Asc).StartAt(docsnap),
want: &pb.StructuredQuery{
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("a"), pb.StructuredQuery_ASCENDING},
- {fref1("__name__"), pb.StructuredQuery_ASCENDING},
+ {Field: fref1("a"), Direction: pb.StructuredQuery_ASCENDING},
+ {Field: fref1("__name__"), Direction: pb.StructuredQuery_ASCENDING},
},
StartAt: &pb.Cursor{
Values: []*pb.Value{intval(7), refval(coll.parentPath + "/documents/C/D")},
@@ -337,8 +337,8 @@ func TestQueryToProto(t *testing.T) {
in: q.OrderBy("a", Desc).StartAt(docsnap),
want: &pb.StructuredQuery{
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("a"), pb.StructuredQuery_DESCENDING},
- {fref1("__name__"), pb.StructuredQuery_DESCENDING},
+ {Field: fref1("a"), Direction: pb.StructuredQuery_DESCENDING},
+ {Field: fref1("__name__"), Direction: pb.StructuredQuery_DESCENDING},
},
StartAt: &pb.Cursor{
Values: []*pb.Value{intval(7), refval(coll.parentPath + "/documents/C/D")},
@@ -351,9 +351,9 @@ func TestQueryToProto(t *testing.T) {
in: q.OrderBy("a", Desc).OrderBy("b", Asc).StartAt(docsnap),
want: &pb.StructuredQuery{
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("a"), pb.StructuredQuery_DESCENDING},
- {fref1("b"), pb.StructuredQuery_ASCENDING},
- {fref1("__name__"), pb.StructuredQuery_ASCENDING},
+ {Field: fref1("a"), Direction: pb.StructuredQuery_DESCENDING},
+ {Field: fref1("b"), Direction: pb.StructuredQuery_ASCENDING},
+ {Field: fref1("__name__"), Direction: pb.StructuredQuery_ASCENDING},
},
StartAt: &pb.Cursor{
Values: []*pb.Value{intval(7), intval(8), refval(coll.parentPath + "/documents/C/D")},
@@ -367,7 +367,7 @@ func TestQueryToProto(t *testing.T) {
want: &pb.StructuredQuery{
Where: filtr([]string{"a"}, "==", 3),
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("__name__"), pb.StructuredQuery_ASCENDING},
+ {Field: fref1("__name__"), Direction: pb.StructuredQuery_ASCENDING},
},
StartAt: &pb.Cursor{
Values: []*pb.Value{refval(coll.parentPath + "/documents/C/D")},
@@ -381,8 +381,8 @@ func TestQueryToProto(t *testing.T) {
want: &pb.StructuredQuery{
Where: filtr([]string{"a"}, "<", 3),
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("a"), pb.StructuredQuery_ASCENDING},
- {fref1("__name__"), pb.StructuredQuery_ASCENDING},
+ {Field: fref1("a"), Direction: pb.StructuredQuery_ASCENDING},
+ {Field: fref1("__name__"), Direction: pb.StructuredQuery_ASCENDING},
},
StartAt: &pb.Cursor{
Values: []*pb.Value{intval(7), refval(coll.parentPath + "/documents/C/D")},
@@ -395,7 +395,7 @@ func TestQueryToProto(t *testing.T) {
in: q.Where("b", "==", 1).Where("a", "<", 3).StartAt(docsnap),
want: &pb.StructuredQuery{
Where: &pb.StructuredQuery_Filter{
- &pb.StructuredQuery_Filter_CompositeFilter{
+ FilterType: &pb.StructuredQuery_Filter_CompositeFilter{
&pb.StructuredQuery_CompositeFilter{
Op: pb.StructuredQuery_CompositeFilter_AND,
Filters: []*pb.StructuredQuery_Filter{
@@ -406,8 +406,8 @@ func TestQueryToProto(t *testing.T) {
},
},
OrderBy: []*pb.StructuredQuery_Order{
- {fref1("a"), pb.StructuredQuery_ASCENDING},
- {fref1("__name__"), pb.StructuredQuery_ASCENDING},
+ {Field: fref1("a"), Direction: pb.StructuredQuery_ASCENDING},
+ {Field: fref1("__name__"), Direction: pb.StructuredQuery_ASCENDING},
},
StartAt: &pb.Cursor{
Values: []*pb.Value{intval(7), refval(coll.parentPath + "/documents/C/D")},
diff --git a/vendor/cloud.google.com/go/firestore/testdata/VERSION b/vendor/cloud.google.com/go/firestore/testdata/VERSION
index e25a9ae9b..672cd4519 100644
--- a/vendor/cloud.google.com/go/firestore/testdata/VERSION
+++ b/vendor/cloud.google.com/go/firestore/testdata/VERSION
@@ -1 +1 @@
-SHA1(/usr/local/google/home/jba/go/src/github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/testdata/test-suite.binproto)= 1502b0250a2ecd854b80509e3e456e46ade89ea7
+SHA1(/usr/local/google/home/jba/go/src/github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/testdata/test-suite.binproto)= 6c622d8affaf1ea2ebeb063f9898f5d942343cb7
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-add-mod-del-add.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-add-mod-del-add.textproto
new file mode 100644
index 000000000..1aa8dcbc3
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-add-mod-del-add.textproto
@@ -0,0 +1,246 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# Various changes to a single document.
+
+description: "listen: add a doc, modify it, delete it, then add it again"
+listen: <
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 1
+ >
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 2
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 2
+ >
+ >
+ >
+ responses: <
+ document_delete: <
+ document: "projects/projectID/databases/(default)/documents/C/d1"
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 3
+ >
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 3
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 4
+ >
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ >
+ read_time: <
+ seconds: 1
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 2
+ >
+ >
+ changes: <
+ kind: MODIFIED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 2
+ >
+ >
+ >
+ read_time: <
+ seconds: 2
+ >
+ >
+ snapshots: <
+ changes: <
+ kind: REMOVED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 2
+ >
+ >
+ new_index: -1
+ >
+ read_time: <
+ seconds: 3
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 3
+ >
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 3
+ >
+ >
+ old_index: -1
+ >
+ read_time: <
+ seconds: 4
+ >
+ >
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-add-one.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-add-one.textproto
new file mode 100644
index 000000000..2ad1d8e97
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-add-one.textproto
@@ -0,0 +1,79 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# Snapshot with a single document.
+
+description: "listen: add a doc"
+listen: <
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 2
+ >
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ >
+ read_time: <
+ seconds: 2
+ >
+ >
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-add-three.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-add-three.textproto
new file mode 100644
index 000000000..ac846f762
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-add-three.textproto
@@ -0,0 +1,190 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# A snapshot with three documents. The documents are sorted first by the "a"
+# field, then by their path. The changes are ordered the same way.
+
+description: "listen: add three documents"
+listen: <
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d3"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 2
+ >
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d3"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d3"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ new_index: 1
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ new_index: 2
+ >
+ read_time: <
+ seconds: 2
+ >
+ >
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-doc-remove.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-doc-remove.textproto
new file mode 100644
index 000000000..975200f97
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-doc-remove.textproto
@@ -0,0 +1,115 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# The DocumentRemove response behaves exactly like DocumentDelete.
+
+description: "listen: DocumentRemove behaves like DocumentDelete"
+listen: <
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 1
+ >
+ >
+ >
+ responses: <
+ document_remove: <
+ document: "projects/projectID/databases/(default)/documents/C/d1"
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 2
+ >
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ >
+ read_time: <
+ seconds: 1
+ >
+ >
+ snapshots: <
+ changes: <
+ kind: REMOVED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ new_index: -1
+ >
+ read_time: <
+ seconds: 2
+ >
+ >
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-empty.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-empty.textproto
new file mode 100644
index 000000000..4d04b7909
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-empty.textproto
@@ -0,0 +1,25 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# There are no changes, so the snapshot should be empty.
+
+description: "listen: no changes; empty snapshot"
+listen: <
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 1
+ >
+ >
+ >
+ snapshots: <
+ read_time: <
+ seconds: 1
+ >
+ >
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-filter-nop.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-filter-nop.textproto
new file mode 100644
index 000000000..48fd72d3a
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-filter-nop.textproto
@@ -0,0 +1,247 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# A Filter response whose count matches the size of the current state (docs in
+# last snapshot + docs added - docs deleted) is a no-op.
+
+description: "listen: Filter response with same size is a no-op"
+listen: <
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 1
+ >
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d3"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ document_delete: <
+ document: "projects/projectID/databases/(default)/documents/C/d1"
+ >
+ >
+ responses: <
+ filter: <
+ count: 2
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 2
+ >
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ new_index: 1
+ >
+ read_time: <
+ seconds: 1
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d3"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ changes: <
+ kind: REMOVED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: 1
+ new_index: -1
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d3"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ new_index: 1
+ >
+ read_time: <
+ seconds: 2
+ >
+ >
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-multi-docs.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-multi-docs.textproto
new file mode 100644
index 000000000..8778acc3d
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-multi-docs.textproto
@@ -0,0 +1,524 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# Changes should be ordered with deletes first, then additions, then mods, each in
+# query order. Old indices refer to the immediately previous state, not the
+# previous snapshot
+
+description: "listen: multiple documents, added, deleted and updated"
+listen: <
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d3"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d4"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 2
+ >
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d5"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 4
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ document_delete: <
+ document: "projects/projectID/databases/(default)/documents/C/d3"
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: -1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 3
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d6"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ document_delete: <
+ document: "projects/projectID/databases/(default)/documents/C/d2"
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d4"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: -2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 3
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 4
+ >
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d3"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d4"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d3"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ new_index: 1
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d4"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ new_index: 2
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ new_index: 3
+ >
+ read_time: <
+ seconds: 2
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d4"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: -2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 3
+ >
+ >
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: -1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 3
+ >
+ >
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d6"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d5"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 4
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ changes: <
+ kind: REMOVED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ new_index: -1
+ >
+ changes: <
+ kind: REMOVED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d3"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ new_index: -1
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d6"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ new_index: 2
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d5"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 4
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ new_index: 3
+ >
+ changes: <
+ kind: MODIFIED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d4"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: -2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 3
+ >
+ >
+ >
+ changes: <
+ kind: MODIFIED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: -1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 3
+ >
+ >
+ old_index: 1
+ new_index: 1
+ >
+ read_time: <
+ seconds: 4
+ >
+ >
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-nocurrent.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-nocurrent.textproto
new file mode 100644
index 000000000..24239b645
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-nocurrent.textproto
@@ -0,0 +1,141 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# If the watch state is not marked CURRENT, no snapshot is issued.
+
+description: "listen: no snapshot if we don't see CURRENT"
+listen: <
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 1
+ >
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 2
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 2
+ >
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 2
+ >
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 2
+ >
+ >
+ old_index: -1
+ new_index: 1
+ >
+ read_time: <
+ seconds: 2
+ >
+ >
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-nomod.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-nomod.textproto
new file mode 100644
index 000000000..2a99edc35
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-nomod.textproto
@@ -0,0 +1,143 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# Document updates are recognized by a change in the update time, not the data.
+# This shouldn't actually happen. It is just a test of the update logic.
+
+description: "listen: add a doc, then change it but without changing its update time"
+listen: <
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 1
+ >
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 2
+ >
+ >
+ >
+ responses: <
+ document_delete: <
+ document: "projects/projectID/databases/(default)/documents/C/d1"
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 3
+ >
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ >
+ read_time: <
+ seconds: 1
+ >
+ >
+ snapshots: <
+ changes: <
+ kind: REMOVED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ new_index: -1
+ >
+ read_time: <
+ seconds: 3
+ >
+ >
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-removed-target-ids.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-removed-target-ids.textproto
new file mode 100644
index 000000000..1e8ead2d8
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-removed-target-ids.textproto
@@ -0,0 +1,131 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# A DocumentChange with the watch target ID in the removed_target_ids field is the
+# same as deleting a document.
+
+description: "listen: DocumentChange with removed_target_id is like a delete."
+listen: <
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 1
+ >
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ removed_target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 2
+ >
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ >
+ read_time: <
+ seconds: 1
+ >
+ >
+ snapshots: <
+ changes: <
+ kind: REMOVED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ new_index: -1
+ >
+ read_time: <
+ seconds: 2
+ >
+ >
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-reset.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-reset.textproto
new file mode 100644
index 000000000..0c6cf8a55
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-reset.textproto
@@ -0,0 +1,258 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# A RESET message turns off the CURRENT state, and marks all documents as deleted.
+# If a document appeared on the stream but was never part of a snapshot ("d3" in
+# this test), a reset will make it disappear completely.
+
+description: "listen: RESET turns off CURRENT"
+listen: <
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 2
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 1
+ >
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d3"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 2
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: RESET
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 2
+ >
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 3
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 3
+ >
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 2
+ >
+ >
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 1
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 2
+ >
+ >
+ old_index: -1
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ new_index: 1
+ >
+ read_time: <
+ seconds: 1
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 3
+ >
+ >
+ changes: <
+ kind: REMOVED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 2
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: 1
+ new_index: -1
+ >
+ changes: <
+ kind: MODIFIED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d2"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 3
+ >
+ >
+ >
+ read_time: <
+ seconds: 3
+ >
+ >
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-target-add-nop.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-target-add-nop.textproto
new file mode 100644
index 000000000..3fa7cce56
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-target-add-nop.textproto
@@ -0,0 +1,88 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# A TargetChange_ADD response must have the same watch target ID.
+
+description: "listen: TargetChange_ADD is a no-op if it has the same target ID"
+listen: <
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: ADD
+ target_ids: 1
+ read_time: <
+ seconds: 2
+ >
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 1
+ >
+ >
+ >
+ snapshots: <
+ docs: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ changes: <
+ kind: ADDED
+ doc: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ old_index: -1
+ >
+ read_time: <
+ seconds: 1
+ >
+ >
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-target-add-wrong-id.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-target-add-wrong-id.textproto
new file mode 100644
index 000000000..87544637b
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-target-add-wrong-id.textproto
@@ -0,0 +1,50 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# A TargetChange_ADD response must have the same watch target ID.
+
+description: "listen: TargetChange_ADD is an error if it has a different target ID"
+listen: <
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: ADD
+ target_ids: 2
+ read_time: <
+ seconds: 2
+ >
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 1
+ >
+ >
+ >
+ is_error: true
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/listen-target-remove.textproto b/vendor/cloud.google.com/go/firestore/testdata/listen-target-remove.textproto
new file mode 100644
index 000000000..f34b0890c
--- /dev/null
+++ b/vendor/cloud.google.com/go/firestore/testdata/listen-target-remove.textproto
@@ -0,0 +1,46 @@
+# DO NOT MODIFY. This file was generated by
+# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
+
+# A TargetChange_REMOVE response should never be sent.
+
+description: "listen: TargetChange_REMOVE should not appear"
+listen: <
+ responses: <
+ document_change: <
+ document: <
+ name: "projects/projectID/databases/(default)/documents/C/d1"
+ fields: <
+ key: "a"
+ value: <
+ integer_value: 3
+ >
+ >
+ create_time: <
+ seconds: 1
+ >
+ update_time: <
+ seconds: 1
+ >
+ >
+ target_ids: 1
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: CURRENT
+ >
+ >
+ responses: <
+ target_change: <
+ target_change_type: REMOVE
+ >
+ >
+ responses: <
+ target_change: <
+ read_time: <
+ seconds: 1
+ >
+ >
+ >
+ is_error: true
+>
diff --git a/vendor/cloud.google.com/go/firestore/testdata/set-mergeall-empty.textproto b/vendor/cloud.google.com/go/firestore/testdata/set-mergeall-empty.textproto
index 1c6615bfb..16df8a22b 100644
--- a/vendor/cloud.google.com/go/firestore/testdata/set-mergeall-empty.textproto
+++ b/vendor/cloud.google.com/go/firestore/testdata/set-mergeall-empty.textproto
@@ -1,15 +1,23 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
-# It makes no sense to specify MergeAll and provide no data, so we disallow it on
-# the client.
+# This is a valid call that can be used to ensure a document exists.
-description: "set: MergeAll cannot be specified with empty data."
+description: "set: MergeAll can be specified with empty data."
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
all: true
>
json_data: "{}"
- is_error: true
+ request: <
+ database: "projects/projectID/databases/(default)"
+ writes: <
+ update: <
+ name: "projects/projectID/databases/(default)/documents/C/d"
+ >
+ update_mask: <
+ >
+ >
+ >
>
diff --git a/vendor/cloud.google.com/go/firestore/to_value.go b/vendor/cloud.google.com/go/firestore/to_value.go
index 1c97ecf8e..4d2df7506 100644
--- a/vendor/cloud.google.com/go/firestore/to_value.go
+++ b/vendor/cloud.google.com/go/firestore/to_value.go
@@ -27,7 +27,7 @@ import (
"google.golang.org/genproto/googleapis/type/latlng"
)
-var nullValue = &pb.Value{&pb.Value_NullValue{}}
+var nullValue = &pb.Value{ValueType: &pb.Value_NullValue{}}
var (
typeOfByteSlice = reflect.TypeOf([]byte{})
@@ -59,31 +59,31 @@ func toProtoValue(v reflect.Value) (pbv *pb.Value, sawServerTimestamp bool, err
}
switch x := vi.(type) {
case []byte:
- return &pb.Value{&pb.Value_BytesValue{x}}, false, nil
+ return &pb.Value{ValueType: &pb.Value_BytesValue{x}}, false, nil
case time.Time:
ts, err := ptypes.TimestampProto(x)
if err != nil {
return nil, false, err
}
- return &pb.Value{&pb.Value_TimestampValue{ts}}, false, nil
+ return &pb.Value{ValueType: &pb.Value_TimestampValue{ts}}, false, nil
case *ts.Timestamp:
if x == nil {
// gRPC doesn't like nil oneofs. Use NullValue.
return nullValue, false, nil
}
- return &pb.Value{&pb.Value_TimestampValue{x}}, false, nil
+ return &pb.Value{ValueType: &pb.Value_TimestampValue{x}}, false, nil
case *latlng.LatLng:
if x == nil {
// gRPC doesn't like nil oneofs. Use NullValue.
return nullValue, false, nil
}
- return &pb.Value{&pb.Value_GeoPointValue{x}}, false, nil
+ return &pb.Value{ValueType: &pb.Value_GeoPointValue{x}}, false, nil
case *DocumentRef:
if x == nil {
// gRPC doesn't like nil oneofs. Use NullValue.
return nullValue, false, nil
}
- return &pb.Value{&pb.Value_ReferenceValue{x.Path}}, false, nil
+ return &pb.Value{ValueType: &pb.Value_ReferenceValue{x.Path}}, false, nil
// Do not add bool, string, int, etc. to this switch; leave them in the
// reflect-based switch below. Moving them here would drop support for
// types whose underlying types are those primitives.
@@ -92,15 +92,15 @@ func toProtoValue(v reflect.Value) (pbv *pb.Value, sawServerTimestamp bool, err
}
switch v.Kind() {
case reflect.Bool:
- return &pb.Value{&pb.Value_BooleanValue{v.Bool()}}, false, nil
+ return &pb.Value{ValueType: &pb.Value_BooleanValue{v.Bool()}}, false, nil
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return &pb.Value{&pb.Value_IntegerValue{v.Int()}}, false, nil
+ return &pb.Value{ValueType: &pb.Value_IntegerValue{v.Int()}}, false, nil
case reflect.Uint8, reflect.Uint16, reflect.Uint32:
- return &pb.Value{&pb.Value_IntegerValue{int64(v.Uint())}}, false, nil
+ return &pb.Value{ValueType: &pb.Value_IntegerValue{int64(v.Uint())}}, false, nil
case reflect.Float32, reflect.Float64:
- return &pb.Value{&pb.Value_DoubleValue{v.Float()}}, false, nil
+ return &pb.Value{ValueType: &pb.Value_DoubleValue{v.Float()}}, false, nil
case reflect.String:
- return &pb.Value{&pb.Value_StringValue{v.String()}}, false, nil
+ return &pb.Value{ValueType: &pb.Value_StringValue{v.String()}}, false, nil
case reflect.Slice:
return sliceToProtoValue(v)
case reflect.Map:
@@ -139,7 +139,7 @@ func sliceToProtoValue(v reflect.Value) (*pb.Value, bool, error) {
}
vals[i] = val
}
- return &pb.Value{&pb.Value_ArrayValue{&pb.ArrayValue{vals}}}, false, nil
+ return &pb.Value{ValueType: &pb.Value_ArrayValue{&pb.ArrayValue{Values: vals}}}, false, nil
}
func mapToProtoValue(v reflect.Value) (*pb.Value, bool, error) {
@@ -175,7 +175,7 @@ func mapToProtoValue(v reflect.Value) (*pb.Value, bool, error) {
// The entire map consisted of ServerTimestamp values.
pv = nil
} else {
- pv = &pb.Value{&pb.Value_MapValue{&pb.MapValue{m}}}
+ pv = &pb.Value{ValueType: &pb.Value_MapValue{&pb.MapValue{Fields: m}}}
}
return pv, sawServerTimestamp, nil
}
@@ -215,7 +215,7 @@ func structToProtoValue(v reflect.Value) (*pb.Value, bool, error) {
// The entire struct consisted of ServerTimestamp or omitempty values.
pv = nil
} else {
- pv = &pb.Value{&pb.Value_MapValue{&pb.MapValue{m}}}
+ pv = &pb.Value{ValueType: &pb.Value_MapValue{&pb.MapValue{Fields: m}}}
}
return pv, sawServerTimestamp, nil
}
diff --git a/vendor/cloud.google.com/go/firestore/to_value_test.go b/vendor/cloud.google.com/go/firestore/to_value_test.go
index eac26a364..3cec5a84c 100644
--- a/vendor/cloud.google.com/go/firestore/to_value_test.go
+++ b/vendor/cloud.google.com/go/firestore/to_value_test.go
@@ -64,10 +64,10 @@ var (
"I": intval(1),
"U": intval(2),
"F": floatval(3),
- "S": &pb.Value{&pb.Value_StringValue{"four"}},
+ "S": &pb.Value{ValueType: &pb.Value_StringValue{"four"}},
"Y": bytesval([]byte{5}),
"T": tsval(tm),
- "Ts": &pb.Value{&pb.Value_TimestampValue{ptm}},
+ "Ts": &pb.Value{ValueType: &pb.Value_TimestampValue{ptm}},
"G": geoval(ll),
"L": arrayval(intval(6)),
"M": mapval(map[string]*pb.Value{"a": intval(7)}),
@@ -95,7 +95,7 @@ func TestToProtoValue(t *testing.T) {
{"str", strval("str")},
{[]byte{1, 2}, bytesval([]byte{1, 2})},
{tm, tsval(tm)},
- {ptm, &pb.Value{&pb.Value_TimestampValue{ptm}}},
+ {ptm, &pb.Value{ValueType: &pb.Value_TimestampValue{ptm}}},
{ll, geoval(ll)},
{[]int{1, 2}, arrayval(intval(1), intval(2))},
{&[]int{1, 2}, arrayval(intval(1), intval(2))},
@@ -254,7 +254,7 @@ func TestToProtoValueEmbedded(t *testing.T) {
want := mapval(map[string]*pb.Value{
"Time": tsval(tm),
"LatLng": geoval(ll),
- "Timestamp": &pb.Value{&pb.Value_TimestampValue{ptm}},
+ "Timestamp": &pb.Value{ValueType: &pb.Value_TimestampValue{ptm}},
})
if !testEqual(got, want) {
t.Errorf("got %+v, want %+v", got, want)
diff --git a/vendor/cloud.google.com/go/firestore/transaction_test.go b/vendor/cloud.google.com/go/firestore/transaction_test.go
index 014bc7d9d..f5a72dce7 100644
--- a/vendor/cloud.google.com/go/firestore/transaction_test.go
+++ b/vendor/cloud.google.com/go/firestore/transaction_test.go
@@ -92,8 +92,7 @@ func TestRunTransaction(t *testing.T) {
if err != nil {
return err
}
- tx.Update(docref, []Update{{Path: "count", Value: count.(int64) + 1}})
- return nil
+ return tx.Update(docref, []Update{{Path: "count", Value: count.(int64) + 1}})
})
if err != nil {
t.Fatal(err)
@@ -137,7 +136,7 @@ func TestRunTransaction(t *testing.T) {
Database: db,
Options: &pb.TransactionOptions{
Mode: &pb.TransactionOptions_ReadWrite_{
- &pb.TransactionOptions_ReadWrite{tid},
+ &pb.TransactionOptions_ReadWrite{RetryTransaction: tid},
},
},
},
@@ -226,7 +225,9 @@ func TestTransactionErrors(t *testing.T) {
srv.addRPC(beginReq, beginRes)
srv.addRPC(rollbackReq, &empty.Empty{})
err = c.RunTransaction(ctx, func(_ context.Context, tx *Transaction) error {
- tx.Delete(c.Doc("C/a"))
+ if err := tx.Delete(c.Doc("C/a")); err != nil {
+ return err
+ }
if _, err := tx.Get(c.Doc("C/a")); err != nil {
return err
}
@@ -241,7 +242,9 @@ func TestTransactionErrors(t *testing.T) {
srv.addRPC(beginReq, beginRes)
srv.addRPC(rollbackReq, &empty.Empty{})
err = c.RunTransaction(ctx, func(_ context.Context, tx *Transaction) error {
- tx.Delete(c.Doc("C/a"))
+ if err := tx.Delete(c.Doc("C/a")); err != nil {
+ return err
+ }
it := tx.Documents(c.Collection("C").Select("x"))
defer it.Stop()
if _, err := it.Next(); err != iterator.Done {
@@ -258,8 +261,12 @@ func TestTransactionErrors(t *testing.T) {
srv.addRPC(beginReq, beginRes)
srv.addRPC(rollbackReq, &empty.Empty{})
err = c.RunTransaction(ctx, func(_ context.Context, tx *Transaction) error {
- tx.Delete(c.Doc("C/a"))
- tx.Get(c.Doc("C/a"))
+ if err := tx.Delete(c.Doc("C/a")); err != nil {
+ return err
+ }
+ if _, err := tx.Get(c.Doc("C/a")); err != nil {
+ return err
+ }
return nil
})
if err != errReadAfterWrite {
@@ -294,7 +301,7 @@ func TestTransactionErrors(t *testing.T) {
Database: db,
Options: &pb.TransactionOptions{
Mode: &pb.TransactionOptions_ReadWrite_{
- &pb.TransactionOptions_ReadWrite{tid},
+ &pb.TransactionOptions_ReadWrite{RetryTransaction: tid},
},
},
},
diff --git a/vendor/cloud.google.com/go/firestore/util_test.go b/vendor/cloud.google.com/go/firestore/util_test.go
index 0478d1b4f..119e4b721 100644
--- a/vendor/cloud.google.com/go/firestore/util_test.go
+++ b/vendor/cloud.google.com/go/firestore/util_test.go
@@ -103,23 +103,23 @@ func intval(i int) *pb.Value {
}
func int64val(i int64) *pb.Value {
- return &pb.Value{&pb.Value_IntegerValue{i}}
+ return &pb.Value{ValueType: &pb.Value_IntegerValue{i}}
}
func boolval(b bool) *pb.Value {
- return &pb.Value{&pb.Value_BooleanValue{b}}
+ return &pb.Value{ValueType: &pb.Value_BooleanValue{b}}
}
func floatval(f float64) *pb.Value {
- return &pb.Value{&pb.Value_DoubleValue{f}}
+ return &pb.Value{ValueType: &pb.Value_DoubleValue{f}}
}
func strval(s string) *pb.Value {
- return &pb.Value{&pb.Value_StringValue{s}}
+ return &pb.Value{ValueType: &pb.Value_StringValue{s}}
}
func bytesval(b []byte) *pb.Value {
- return &pb.Value{&pb.Value_BytesValue{b}}
+ return &pb.Value{ValueType: &pb.Value_BytesValue{b}}
}
func tsval(t time.Time) *pb.Value {
@@ -127,24 +127,24 @@ func tsval(t time.Time) *pb.Value {
if err != nil {
panic(fmt.Sprintf("bad time %s in test: %v", t, err))
}
- return &pb.Value{&pb.Value_TimestampValue{ts}}
+ return &pb.Value{ValueType: &pb.Value_TimestampValue{ts}}
}
func geoval(ll *latlng.LatLng) *pb.Value {
- return &pb.Value{&pb.Value_GeoPointValue{ll}}
+ return &pb.Value{ValueType: &pb.Value_GeoPointValue{ll}}
}
func arrayval(s ...*pb.Value) *pb.Value {
if s == nil {
s = []*pb.Value{}
}
- return &pb.Value{&pb.Value_ArrayValue{&pb.ArrayValue{s}}}
+ return &pb.Value{ValueType: &pb.Value_ArrayValue{&pb.ArrayValue{Values: s}}}
}
func mapval(m map[string]*pb.Value) *pb.Value {
- return &pb.Value{&pb.Value_MapValue{&pb.MapValue{m}}}
+ return &pb.Value{ValueType: &pb.Value_MapValue{&pb.MapValue{Fields: m}}}
}
func refval(path string) *pb.Value {
- return &pb.Value{&pb.Value_ReferenceValue{path}}
+ return &pb.Value{ValueType: &pb.Value_ReferenceValue{path}}
}
diff --git a/vendor/cloud.google.com/go/firestore/watch.go b/vendor/cloud.google.com/go/firestore/watch.go
index 8eb301b11..e7526e015 100644
--- a/vendor/cloud.google.com/go/firestore/watch.go
+++ b/vendor/cloud.google.com/go/firestore/watch.go
@@ -62,7 +62,8 @@ type DocumentChange struct {
// https://github.com/googleapis/nodejs-firestore/blob/master/src/watch.js.
// The sole target ID for all streams from this client.
-const watchTargetID int32 = 'g' + 'o'
+// Variable for testing.
+var watchTargetID int32 = 'g' + 'o'
var defaultBackoff = gax.Backoff{
// Values from https://github.com/googleapis/nodejs-firestore/blob/master/src/backoff.js.
@@ -98,7 +99,7 @@ func newWatchStreamForDocument(ctx context.Context, dr *DocumentRef) *watchStrea
compare := func(_, _ *DocumentSnapshot) (int, error) { return 0, nil }
return newWatchStream(ctx, dr.Parent.c, compare, &pb.Target{
TargetType: &pb.Target_Documents{
- Documents: &pb.Target_DocumentsTarget{[]string{dr.Path}},
+ Documents: &pb.Target_DocumentsTarget{Documents: []string{dr.Path}},
},
TargetId: watchTargetID,
})
diff --git a/vendor/cloud.google.com/go/firestore/watch_test.go b/vendor/cloud.google.com/go/firestore/watch_test.go
index 844887b29..f669250a6 100644
--- a/vendor/cloud.google.com/go/firestore/watch_test.go
+++ b/vendor/cloud.google.com/go/firestore/watch_test.go
@@ -173,108 +173,6 @@ func mapDocs(m map[string]*DocumentSnapshot, less func(a, b *DocumentSnapshot) b
return ds
}
-func TestWatchStream(t *testing.T) {
- // Preliminary, very basic tests. Will expand and turn into cross-language tests
- // later.
- ctx := context.Background()
- c, srv := newMock(t)
- ctx, cancel := context.WithTimeout(ctx, 10*time.Second)
- defer cancel()
-
- baseTime := time.Now()
- readTime := baseTime.Add(5 * time.Second)
- readTimestamp := mustTimestampProto(readTime)
- doc := func(path string, value int, tm time.Time) *DocumentSnapshot {
- ref := c.Doc(path)
- ts := mustTimestampProto(tm)
- return &DocumentSnapshot{
- Ref: ref,
- proto: &pb.Document{
- Name: ref.Path,
- Fields: map[string]*pb.Value{"foo": intval(value)},
- CreateTime: ts,
- UpdateTime: ts,
- },
- CreateTime: tm,
- UpdateTime: tm,
- ReadTime: readTime,
- }
- }
- change := func(ds *DocumentSnapshot) *pb.ListenResponse {
- return &pb.ListenResponse{ResponseType: &pb.ListenResponse_DocumentChange{&pb.DocumentChange{
- Document: ds.proto,
- TargetIds: []int32{watchTargetID},
- }}}
- }
-
- del := func(ds *DocumentSnapshot) *pb.ListenResponse {
- return &pb.ListenResponse{ResponseType: &pb.ListenResponse_DocumentDelete{&pb.DocumentDelete{
- Document: ds.Ref.Path,
- }}}
- }
-
- q := Query{c: c, collectionID: "x"}
- current := &pb.ListenResponse{ResponseType: &pb.ListenResponse_TargetChange{&pb.TargetChange{
- TargetChangeType: pb.TargetChange_CURRENT,
- }}}
- noChange := &pb.ListenResponse{ResponseType: &pb.ListenResponse_TargetChange{&pb.TargetChange{
- TargetChangeType: pb.TargetChange_NO_CHANGE,
- ReadTime: readTimestamp,
- }}}
- doc1 := doc("C/d1", 1, baseTime)
- doc1a := doc("C/d1", 2, baseTime.Add(time.Second))
- doc2 := doc("C/d2", 3, baseTime)
- for _, test := range []struct {
- desc string
- responses []interface{}
- want []*DocumentSnapshot
- }{
- {
- "no changes: empty btree",
- []interface{}{current, noChange},
- nil,
- },
- {
- "add a doc",
- []interface{}{change(doc1), current, noChange},
- []*DocumentSnapshot{doc1},
- },
- {
- "add a doc, then remove it",
- []interface{}{change(doc1), del(doc1), current, noChange},
- []*DocumentSnapshot(nil),
- },
- {
- "add a doc, then add another one",
- []interface{}{change(doc1), change(doc2), current, noChange},
- []*DocumentSnapshot{doc1, doc2},
- },
- {
- "add a doc, then change it",
- []interface{}{change(doc1), change(doc1a), current, noChange},
- []*DocumentSnapshot{doc1a},
- },
- } {
- ws, err := newWatchStreamForQuery(ctx, q)
- if err != nil {
- t.Fatal(err)
- }
- request := &pb.ListenRequest{
- Database: "projects/projectID/databases/(default)",
- TargetChange: &pb.ListenRequest_AddTarget{ws.target},
- }
- srv.addRPC(request, test.responses)
- tree, _, _, err := ws.nextSnapshot()
- if err != nil {
- t.Fatalf("%s: %v", test.desc, err)
- }
- got := treeDocs(tree)
- if diff := testDiff(got, test.want); diff != "" {
- t.Errorf("%s: %s", test.desc, diff)
- }
- }
-}
-
func TestWatchCancel(t *testing.T) {
// Canceling the context of a watch should result in a codes.Canceled error from the next
// call to the iterator's Next method.
diff --git a/vendor/cloud.google.com/go/firestore/writebatch_test.go b/vendor/cloud.google.com/go/firestore/writebatch_test.go
index db38d03ba..824590250 100644
--- a/vendor/cloud.google.com/go/firestore/writebatch_test.go
+++ b/vendor/cloud.google.com/go/firestore/writebatch_test.go
@@ -62,7 +62,7 @@ func TestWriteBatch(t *testing.T) {
Fields: map[string]*pb.Value{"*": intval(3)},
},
},
- UpdateMask: &pb.DocumentMask{[]string{"`*`"}},
+ UpdateMask: &pb.DocumentMask{FieldPaths: []string{"`*`"}},
CurrentDocument: &pb.Precondition{
ConditionType: &pb.Precondition_Exists{true},
},
diff --git a/vendor/cloud.google.com/go/httpreplay/cmd/httpr/httpr.go b/vendor/cloud.google.com/go/httpreplay/cmd/httpr/httpr.go
new file mode 100644
index 000000000..7859365c9
--- /dev/null
+++ b/vendor/cloud.google.com/go/httpreplay/cmd/httpr/httpr.go
@@ -0,0 +1,128 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// httpr is a proxy that can record or replay HTTP requests.
+// Start httpr with either the -record or -replay flags, providing a filename.
+// Terminate the process with an interrupt (kill -2) to write the log file when recording.
+// To get the CA certificate of the proxy, issue a GET to http://localhost:CP/authority.cer, where
+// CP is the control port.
+
+// +build go1.8
+
+package main
+
+import (
+ "encoding/base64"
+ "flag"
+ "fmt"
+ "io/ioutil"
+ "log"
+ "net"
+ "net/http"
+ "os"
+ "os/signal"
+
+ "cloud.google.com/go/httpreplay/internal/proxy"
+ "github.com/google/martian/martianhttp"
+)
+
+var (
+ port = flag.Int("port", 8080, "port of the proxy")
+ controlPort = flag.Int("control-port", 8181, "port for controlling the proxy")
+ record = flag.String("record", "", "record traffic and save to filename")
+ replay = flag.String("replay", "", "read filename and replay traffic")
+ debugHeaders = flag.Bool("debug-headers", false, "log header mismatches")
+)
+
+func main() {
+ flag.Parse()
+ if *record == "" && *replay == "" {
+ log.Fatal("provide either -record or -replay")
+ }
+ if *record != "" && *replay != "" {
+ log.Fatal("provide only one of -record and -replay")
+ }
+ log.Printf("httpr: starting proxy on port %d and control on port %d", *port, *controlPort)
+
+ var pr *proxy.Proxy
+ var err error
+ if *record != "" {
+ pr, err = proxy.ForRecording(*record, *port)
+ } else {
+ pr, err = proxy.ForReplaying(*replay, *port)
+ }
+ if err != nil {
+ log.Fatal(err)
+ }
+ proxy.DebugHeaders = *debugHeaders
+
+ // Expose handlers on the control port.
+ mux := http.NewServeMux()
+ mux.Handle("/authority.cer", martianhttp.NewAuthorityHandler(pr.CACert))
+ mux.HandleFunc("/initial", handleInitial(pr))
+ lControl, err := net.Listen("tcp", fmt.Sprintf(":%d", *controlPort))
+ if err != nil {
+ log.Fatal(err)
+ }
+ go http.Serve(lControl, mux)
+
+ sigc := make(chan os.Signal, 1)
+ signal.Notify(sigc, os.Interrupt)
+
+ <-sigc
+
+ log.Println("httpr: shutting down")
+ if err := pr.Close(); err != nil {
+ log.Fatal(err)
+ }
+}
+
+func handleInitial(pr *proxy.Proxy) http.HandlerFunc {
+ return func(w http.ResponseWriter, req *http.Request) {
+ switch req.Method {
+ case "GET":
+ if pr.Initial != nil {
+ switch x := pr.Initial.(type) {
+ case []byte:
+ w.Write(x)
+ case string:
+ // If it's base64, then it's most likely from the JSON in the saved file
+ // (json.Marshal encodes []byte as a base64 string). Decode it.
+ if bytes, err := base64.StdEncoding.DecodeString(x); err == nil {
+ w.Write(bytes)
+ } else {
+ // If it's not base64, write the string out directly.
+ w.Write([]byte(x))
+ }
+ default:
+ // We don't know what it is, so just print it.
+ fmt.Fprint(w, x)
+ }
+ }
+
+ case "POST":
+ bytes, err := ioutil.ReadAll(req.Body)
+ req.Body.Close()
+ if err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+ fmt.Fprintf(w, "reading body: %v", err)
+ }
+ pr.Initial = bytes
+
+ default:
+ w.WriteHeader(http.StatusBadRequest)
+ fmt.Fprint(w, "use GET to retrieve initial or POST to set it")
+ }
+ }
+}
diff --git a/vendor/cloud.google.com/go/httpreplay/cmd/httpr/integration_test.go b/vendor/cloud.google.com/go/httpreplay/cmd/httpr/integration_test.go
new file mode 100644
index 000000000..12626187c
--- /dev/null
+++ b/vendor/cloud.google.com/go/httpreplay/cmd/httpr/integration_test.go
@@ -0,0 +1,230 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.8
+
+package main_test
+
+import (
+ "crypto/tls"
+ "crypto/x509"
+ "errors"
+ "fmt"
+ "io/ioutil"
+ "net"
+ "net/http"
+ "net/url"
+ "os"
+ "os/exec"
+ "strings"
+ "testing"
+ "time"
+
+ "cloud.google.com/go/internal/testutil"
+ "cloud.google.com/go/storage"
+ "golang.org/x/net/context"
+ "golang.org/x/oauth2"
+ "google.golang.org/api/option"
+)
+
+const initial = "initial state"
+
+func TestIntegration_HTTPR(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Integration tests skipped in short mode")
+ }
+ if testutil.ProjID() == "" {
+ t.Fatal("set GCLOUD_TESTS_GOLANG_PROJECT_ID and GCLOUD_TESTS_GOLANG_KEY")
+ }
+ // Get a unique temporary filename.
+ f, err := ioutil.TempFile("", "httpreplay")
+ if err != nil {
+ t.Fatal(err)
+ }
+ replayFilename := f.Name()
+ if err := f.Close(); err != nil {
+ t.Fatal(err)
+ }
+ defer os.Remove(replayFilename)
+
+ if err := exec.Command("go", "build").Run(); err != nil {
+ t.Fatalf("running 'go build': %v", err)
+ }
+ defer os.Remove("./httpr")
+ want := runRecord(t, replayFilename)
+ got := runReplay(t, replayFilename)
+ if got != want {
+ t.Fatalf("got %q, want %q", got, want)
+ }
+}
+
+func runRecord(t *testing.T, filename string) string {
+ cmd, tr, cport, err := start("-record", filename)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer stop(t, cmd)
+
+ ctx := context.Background()
+ hc := &http.Client{
+ Transport: &oauth2.Transport{
+ Base: tr,
+ Source: testutil.TokenSource(ctx, storage.ScopeFullControl),
+ },
+ }
+ res, err := http.Post(
+ fmt.Sprintf("http://localhost:%s/initial", cport),
+ "text/plain",
+ strings.NewReader(initial))
+ if err != nil {
+ t.Fatal(err)
+ }
+ if res.StatusCode != 200 {
+ t.Fatalf("from POST: %s", res.Status)
+ }
+ info, err := getBucketInfo(ctx, hc)
+ if err != nil {
+ t.Fatal(err)
+ }
+ return info
+}
+
+func runReplay(t *testing.T, filename string) string {
+ cmd, tr, cport, err := start("-replay", filename)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer stop(t, cmd)
+
+ hc := &http.Client{Transport: tr}
+ res, err := http.Get(fmt.Sprintf("http://localhost:%s/initial", cport))
+ if err != nil {
+ t.Fatal(err)
+ }
+ if res.StatusCode != 200 {
+ t.Fatalf("from GET: %s", res.Status)
+ }
+ bytes, err := ioutil.ReadAll(res.Body)
+ res.Body.Close()
+ if err != nil {
+ t.Fatal(err)
+ }
+ if got, want := string(bytes), initial; got != want {
+ t.Errorf("initial: got %q, want %q", got, want)
+ }
+ info, err := getBucketInfo(context.Background(), hc)
+ if err != nil {
+ t.Fatal(err)
+ }
+ return info
+}
+
+// Start the proxy binary and wait for it to come up.
+// Return a transport that talks to the proxy, as well as the control port.
+// modeFlag must be either "-record" or "-replay".
+func start(modeFlag, filename string) (*exec.Cmd, *http.Transport, string, error) {
+ pport, err := pickPort()
+ if err != nil {
+ return nil, nil, "", err
+ }
+ cport, err := pickPort()
+ if err != nil {
+ return nil, nil, "", err
+ }
+ cmd := exec.Command("./httpr", "-port", pport, "-control-port", cport, modeFlag, filename, "-debug-headers")
+ if err := cmd.Start(); err != nil {
+ return nil, nil, "", err
+ }
+ // Wait for the server to come up.
+ serverUp := false
+ for i := 0; i < 10; i++ {
+ if conn, err := net.Dial("tcp", "localhost:"+cport); err == nil {
+ conn.Close()
+ serverUp = true
+ break
+ }
+ time.Sleep(time.Second)
+ }
+ if !serverUp {
+ return nil, nil, "", errors.New("server never came up")
+ }
+ tr, err := proxyTransport(pport, cport)
+ if err != nil {
+ return nil, nil, "", err
+ }
+ return cmd, tr, cport, nil
+}
+
+func stop(t *testing.T, cmd *exec.Cmd) {
+ if err := cmd.Process.Signal(os.Interrupt); err != nil {
+ t.Fatal(err)
+ }
+}
+
+// pickPort picks an unused port.
+func pickPort() (string, error) {
+ l, err := net.Listen("tcp", ":0")
+ if err != nil {
+ return "", err
+ }
+ addr := l.Addr().String()
+ _, port, err := net.SplitHostPort(addr)
+ if err != nil {
+ return "", err
+ }
+ l.Close()
+ return port, nil
+}
+
+func proxyTransport(pport, cport string) (*http.Transport, error) {
+ caCert, err := getBody(fmt.Sprintf("http://localhost:%s/authority.cer", cport))
+ if err != nil {
+ return nil, err
+ }
+ caCertPool := x509.NewCertPool()
+ if !caCertPool.AppendCertsFromPEM([]byte(caCert)) {
+ return nil, errors.New("bad CA Cert")
+ }
+ return &http.Transport{
+ Proxy: http.ProxyURL(&url.URL{Host: "localhost:" + pport}),
+ TLSClientConfig: &tls.Config{RootCAs: caCertPool},
+ }, nil
+}
+
+func getBucketInfo(ctx context.Context, hc *http.Client) (string, error) {
+ client, err := storage.NewClient(ctx, option.WithHTTPClient(hc))
+ if err != nil {
+ return "", err
+ }
+ defer client.Close()
+ b := client.Bucket(testutil.ProjID())
+ attrs, err := b.Attrs(ctx)
+ if err != nil {
+ return "", err
+ }
+ return fmt.Sprintf("name:%s reqpays:%v location:%s sclass:%s",
+ attrs.Name, attrs.RequesterPays, attrs.Location, attrs.StorageClass), nil
+}
+
+func getBody(url string) ([]byte, error) {
+ res, err := http.Get(url)
+ if err != nil {
+ return nil, err
+ }
+ if res.StatusCode != 200 {
+ return nil, fmt.Errorf("response: %s", res.Status)
+ }
+ defer res.Body.Close()
+ return ioutil.ReadAll(res.Body)
+}
diff --git a/vendor/cloud.google.com/go/httpreplay/httpreplay.go b/vendor/cloud.google.com/go/httpreplay/httpreplay.go
new file mode 100644
index 000000000..7330f7c81
--- /dev/null
+++ b/vendor/cloud.google.com/go/httpreplay/httpreplay.go
@@ -0,0 +1,148 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.8
+
+// Package httpreplay provides an API for recording and replaying traffic
+// from HTTP-based Google API clients.
+//
+// To record:
+// 1. Call NewRecorder to get a Recorder.
+// 2. Use its Client method to obtain an HTTP client to use when making API calls.
+// 3. Close the Recorder when you're done. That will save the
+// log of interactions to the file you provided to NewRecorder.
+//
+// To replay:
+// 1. Call NewReplayer with the same filename you used to record to get a Replayer.
+// 2. Call its Client method and use the client to make the same API calls.
+// You will get back the recorded responses.
+// 3. Close the Replayer when you're done.
+//
+// This package is EXPERIMENTAL and is subject to change or removal without notice.
+// It requires Go version 1.8 or higher.
+package httpreplay
+
+// TODO(jba): add examples.
+
+import (
+ "fmt"
+ "net/http"
+
+ "cloud.google.com/go/httpreplay/internal/proxy"
+ "golang.org/x/net/context"
+ "golang.org/x/oauth2"
+ "google.golang.org/api/option"
+ htransport "google.golang.org/api/transport/http"
+)
+
+// A Recorder records HTTP interactions.
+type Recorder struct {
+ filename string
+ proxy *proxy.Proxy
+}
+
+// NewRecorder creates a recorder that writes to filename. The file will
+// also store initial state that can be retrieved to configure replay. The "initial"
+// argument must work with json.Marshal.
+//
+// You must call Close on the Recorder to ensure that all data is written.
+func NewRecorder(filename string, initial interface{}) (*Recorder, error) {
+ p, err := proxy.ForRecording(filename, 0)
+ if err != nil {
+ return nil, err
+ }
+ p.Initial = initial
+ return &Recorder{proxy: p}, nil
+}
+
+// Client returns an http.Client to be used for recording. Provide authentication options
+// like option.WithTokenSource as you normally would, or omit them to use Application Default
+// Credentials.
+func (r *Recorder) Client(ctx context.Context, opts ...option.ClientOption) (*http.Client, error) {
+ hc, _, err := htransport.NewClient(ctx, opts...)
+ if err != nil {
+ return nil, err
+ }
+ // The http.Client returned by htransport.NewClient contains an
+ // http.RoundTripper. We want to somehow plug in a Transport that calls the proxy
+ // (returned by r.proxy.Transport).
+ //
+ // htransport.NewClient constructs its RoundTripper via the decorator pattern, by
+ // nesting several implementations of RoundTripper inside each other, ending with
+ // http.DefaultTransport. For example, one of the decorators is oauth2.Transport,
+ // which inserts an Authorization header and then calls the next RoundTripper in
+ // the sequence (stored in a field called Base).
+ //
+ // The problem is that we need to insert the proxy Transport at the end of this
+ // sequence, where http.DefaultTransport currently lives. But we can't traverse
+ // that sequence of RoundTrippers in general, because we don't know their types.
+ //
+ // For now, we only handle the special (but common) case where the first
+ // RoundTripper in the sequence is an oauth2.Transport. We can replace its Base
+ // field with the proxy transport. This causes us to lose the other RoundTrippers
+ // in the sequence, but those aren't essential for testing.
+ //
+ // A better solution would be to add option.WithBaseTransport, which would allow
+ // us to replace the http.DefaultTransport at the end of the sequence with the
+ // transport of our choice.
+ otrans, ok := hc.Transport.(*oauth2.Transport)
+ if !ok {
+ return nil, fmt.Errorf("can't handle Transport of type %T", hc.Transport)
+ }
+ otrans.Base = r.proxy.Transport()
+ return hc, nil
+}
+
+// Close closes the Recorder and saves the log file.
+func (r *Recorder) Close() error {
+ return r.proxy.Close()
+}
+
+// A Replayer replays previously recorded HTTP interactions.
+type Replayer struct {
+ proxy *proxy.Proxy
+}
+
+// NewReplayer creates a replayer that reads from filename.
+func NewReplayer(filename string) (*Replayer, error) {
+ p, err := proxy.ForReplaying(filename, 0)
+ if err != nil {
+ return nil, err
+ }
+ return &Replayer{proxy: p}, nil
+}
+
+// Client returns an HTTP client for replaying. The client does not need to be
+// configured with credentials for authenticating to a server, since it never
+// contacts a real backend.
+func (r *Replayer) Client(ctx context.Context) (*http.Client, error) {
+ return &http.Client{Transport: r.proxy.Transport()}, nil
+}
+
+// Initial returns the initial state saved by the Recorder.
+func (r *Replayer) Initial() interface{} {
+ return r.proxy.Initial
+}
+
+// Close closes the replayer.
+func (r *Replayer) Close() error {
+ return r.proxy.Close()
+}
+
+// DebugHeaders helps to determine whether a header should be ignored.
+// When true, if requests have the same method, URL and body but differ
+// in a header, the first mismatched header is logged.
+func DebugHeaders() {
+ proxy.DebugHeaders = true
+}
diff --git a/vendor/cloud.google.com/go/httpreplay/httpreplay_test.go b/vendor/cloud.google.com/go/httpreplay/httpreplay_test.go
new file mode 100644
index 000000000..2902ad035
--- /dev/null
+++ b/vendor/cloud.google.com/go/httpreplay/httpreplay_test.go
@@ -0,0 +1,123 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.8
+
+package httpreplay_test
+
+import (
+ "bytes"
+ "io/ioutil"
+ "net/http"
+ "os"
+ "testing"
+
+ "cloud.google.com/go/httpreplay"
+ "cloud.google.com/go/internal/testutil"
+ "cloud.google.com/go/storage"
+ "golang.org/x/net/context"
+ "google.golang.org/api/option"
+)
+
+func TestIntegration_RecordAndReplay(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Integration tests skipped in short mode")
+ }
+ f, err := ioutil.TempFile("", "httpreplay")
+ if err != nil {
+ t.Fatal(err)
+ }
+ replayFilename := f.Name()
+ if err := f.Close(); err != nil {
+ t.Fatal(err)
+ }
+ defer os.Remove(replayFilename)
+ projectID := testutil.ProjID()
+ if projectID == "" {
+ t.Skip("Need project ID. See CONTRIBUTING.md for details.")
+ }
+ ctx := context.Background()
+
+ // Record.
+ rec, err := httpreplay.NewRecorder(replayFilename, nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ hc, err := rec.Client(ctx, option.WithTokenSource(
+ testutil.TokenSource(ctx, storage.ScopeFullControl)))
+ if err != nil {
+ t.Fatal(err)
+ }
+ wanta, wantc := run(t, hc)
+ if err := rec.Close(); err != nil {
+ t.Fatalf("rec.Close: %v", err)
+ }
+
+ // Replay.
+ rep, err := httpreplay.NewReplayer(replayFilename)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer rep.Close()
+ hc, err = rep.Client(ctx)
+ if err != nil {
+ t.Fatal(err)
+ }
+ gota, gotc := run(t, hc)
+
+ if diff := testutil.Diff(gota, wanta); diff != "" {
+ t.Error(diff)
+ }
+ if !bytes.Equal(gotc, wantc) {
+ t.Errorf("got %q, want %q", gotc, wantc)
+ }
+ if got, want := rep.Initial(), "initial state"; got != want {
+ t.Errorf("initial: got %v, want %q", got, want)
+ }
+}
+
+// TODO(jba): test errors
+
+func run(t *testing.T, hc *http.Client) (*storage.BucketAttrs, []byte) {
+ ctx := context.Background()
+ client, err := storage.NewClient(ctx, option.WithHTTPClient(hc))
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer client.Close()
+ b := client.Bucket(testutil.ProjID())
+ attrs, err := b.Attrs(ctx)
+ if err != nil {
+ t.Fatal(err)
+ }
+ obj := b.Object("replay-test")
+ w := obj.NewWriter(ctx)
+ if _, err := w.Write([]byte("hello")); err != nil {
+ t.Fatal(err)
+ }
+ if err := w.Close(); err != nil {
+ t.Fatal(err)
+ }
+
+ r, err := obj.NewReader(ctx)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer r.Close()
+ contents, err := ioutil.ReadAll(r)
+ if err != nil {
+ t.Fatal(err)
+ }
+ return attrs, contents
+}
diff --git a/vendor/cloud.google.com/go/httpreplay/internal/proxy/record.go b/vendor/cloud.google.com/go/httpreplay/internal/proxy/record.go
new file mode 100644
index 000000000..ce74f07ab
--- /dev/null
+++ b/vendor/cloud.google.com/go/httpreplay/internal/proxy/record.go
@@ -0,0 +1,215 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.8
+
+// The proxy package provides a record/replay HTTP proxy. It is designed to support
+// both an in-memory API (cloud.google.com/go/httpreplay) and a standalone server
+// (cloud.google.com/go/httpreplay/cmd/httpr).
+package proxy
+
+// See github.com/google/martian/cmd/proxy/main.go for the origin of much of this.
+
+import (
+ "crypto/tls"
+ "crypto/x509"
+ "encoding/json"
+ "fmt"
+ "io/ioutil"
+ "net"
+ "net/http"
+ "net/url"
+ "strings"
+ "time"
+
+ "github.com/google/martian"
+ "github.com/google/martian/fifo"
+ "github.com/google/martian/har"
+ "github.com/google/martian/httpspec"
+ "github.com/google/martian/martianlog"
+ "github.com/google/martian/mitm"
+)
+
+// A Proxy is an HTTP proxy that supports recording or replaying requests.
+type Proxy struct {
+ // The certificate that the proxy uses to participate in TLS.
+ CACert *x509.Certificate
+
+ // The URL of the proxy.
+ URL *url.URL
+
+ // Initial state of the client. Must be serializable with json.Marshal.
+ Initial interface{}
+
+ mproxy *martian.Proxy
+ filename string // for log
+ logger *har.Logger // for recording only
+}
+
+// ForRecording returns a Proxy configured to record.
+func ForRecording(filename string, port int) (*Proxy, error) {
+ p, err := newProxy(filename)
+ if err != nil {
+ return nil, err
+ }
+ // Configure the transport for the proxy's outgoing traffic.
+ p.mproxy.SetRoundTripper(&http.Transport{
+ Dial: (&net.Dialer{
+ Timeout: 30 * time.Second,
+ KeepAlive: 30 * time.Second,
+ }).Dial,
+ TLSHandshakeTimeout: 10 * time.Second,
+ ExpectContinueTimeout: time.Second,
+ })
+
+ // Construct a group that performs the standard proxy stack of request/response
+ // modifications.
+ stack, _ := httpspec.NewStack("httpr") // second arg is an internal group that we don't need
+ p.mproxy.SetRequestModifier(stack)
+ p.mproxy.SetResponseModifier(stack)
+
+ // Make a group for logging requests and responses.
+ logGroup := fifo.NewGroup()
+ skipAuth := skipLoggingByHost("accounts.google.com")
+ logGroup.AddRequestModifier(skipAuth)
+ logGroup.AddResponseModifier(skipAuth)
+ p.logger = har.NewLogger()
+ logGroup.AddRequestModifier(martian.RequestModifierFunc(
+ func(req *http.Request) error { return withRedactedHeaders(req, p.logger) }))
+ logGroup.AddResponseModifier(p.logger)
+
+ stack.AddRequestModifier(logGroup)
+ stack.AddResponseModifier(logGroup)
+
+ // Ordinary debug logging.
+ logger := martianlog.NewLogger()
+ logger.SetDecode(true)
+ stack.AddRequestModifier(logger)
+ stack.AddResponseModifier(logger)
+
+ if err := p.start(port); err != nil {
+ return nil, err
+ }
+ return p, nil
+}
+
+func newProxy(filename string) (*Proxy, error) {
+ mproxy := martian.NewProxy()
+ // Set up a man-in-the-middle configuration with a CA certificate so the proxy can
+ // participate in TLS.
+ x509c, priv, err := mitm.NewAuthority("cloud.google.com/go/httpreplay", "HTTPReplay Authority", time.Hour)
+ if err != nil {
+ return nil, err
+ }
+ mc, err := mitm.NewConfig(x509c, priv)
+ if err != nil {
+ return nil, err
+ }
+ mc.SetValidity(time.Hour)
+ mc.SetOrganization("cloud.google.com/go/httpreplay")
+ mc.SkipTLSVerify(false)
+ if err != nil {
+ return nil, err
+ }
+ mproxy.SetMITM(mc)
+ return &Proxy{
+ mproxy: mproxy,
+ CACert: x509c,
+ filename: filename,
+ }, nil
+}
+
+func (p *Proxy) start(port int) error {
+ l, err := net.Listen("tcp", fmt.Sprintf(":%d", port))
+ if err != nil {
+ return err
+ }
+ p.URL = &url.URL{Scheme: "http", Host: l.Addr().String()}
+ go p.mproxy.Serve(l)
+ return nil
+}
+
+// Transport returns an http.Transport for clients who want to talk to the proxy.
+func (p *Proxy) Transport() *http.Transport {
+ caCertPool := x509.NewCertPool()
+ caCertPool.AddCert(p.CACert)
+ return &http.Transport{
+ TLSClientConfig: &tls.Config{RootCAs: caCertPool},
+ Proxy: func(*http.Request) (*url.URL, error) { return p.URL, nil },
+ }
+}
+
+// Close closes the proxy. If the proxy is recording, it also writes the log.
+func (p *Proxy) Close() error {
+ p.mproxy.Close()
+ if p.logger != nil {
+ return p.writeLog()
+ }
+ return nil
+}
+
+type httprFile struct {
+ Initial interface{}
+ HAR *har.HAR
+}
+
+func (p *Proxy) writeLog() error {
+ f := httprFile{
+ Initial: p.Initial,
+ HAR: p.logger.ExportAndReset(),
+ }
+ bytes, err := json.Marshal(f)
+ if err != nil {
+ return err
+ }
+ return ioutil.WriteFile(p.filename, bytes, 0600) // only accessible by owner
+}
+
+// Headers that may contain sensitive data (auth tokens, keys).
+var sensitiveHeaders = []string{
+ "Authorization",
+ "X-Goog-Encryption-Key", // used by Cloud Storage for customer-supplied encryption
+ "X-Goog-Copy-Source-Encryption-Key", // ditto
+}
+
+// withRedactedHeaders removes sensitive header contents before calling mod.
+func withRedactedHeaders(req *http.Request, mod martian.RequestModifier) error {
+ // We have to change the headers, then log, then restore them.
+ replaced := map[string]string{}
+ for _, h := range sensitiveHeaders {
+ if v := req.Header.Get(h); v != "" {
+ replaced[h] = v
+ req.Header.Set(h, "REDACTED")
+ }
+ }
+ err := mod.ModifyRequest(req)
+ for h, v := range replaced {
+ req.Header.Set(h, v)
+ }
+ return err
+}
+
+// skipLoggingByHost disables logging for traffic to a particular host.
+type skipLoggingByHost string
+
+func (s skipLoggingByHost) ModifyRequest(req *http.Request) error {
+ if strings.HasPrefix(req.Host, string(s)) {
+ martian.NewContext(req).SkipLogging()
+ }
+ return nil
+}
+
+func (s skipLoggingByHost) ModifyResponse(res *http.Response) error {
+ return s.ModifyRequest(res.Request)
+}
diff --git a/vendor/cloud.google.com/go/httpreplay/internal/proxy/record_test.go b/vendor/cloud.google.com/go/httpreplay/internal/proxy/record_test.go
new file mode 100644
index 000000000..a3868e751
--- /dev/null
+++ b/vendor/cloud.google.com/go/httpreplay/internal/proxy/record_test.go
@@ -0,0 +1,65 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.8
+
+package proxy
+
+import (
+ "net/http"
+ "testing"
+
+ "cloud.google.com/go/internal/testutil"
+ "github.com/google/martian"
+)
+
+func TestWithRedactedHeaders(t *testing.T) {
+ clone := func(h http.Header) http.Header {
+ h2 := http.Header{}
+ for k, v := range h {
+ h2[k] = v
+ }
+ return h2
+ }
+
+ orig := http.Header{
+ "Content-Type": {"text/plain"},
+ "Authorization": {"oauth2-token"},
+ "X-Goog-Encryption-Key": {"a-secret-key"},
+ "X-Goog-Copy-Source-Encryption-Key": {"another-secret-key"},
+ }
+ req := &http.Request{Header: clone(orig)}
+ var got http.Header
+ mod := martian.RequestModifierFunc(func(req *http.Request) error {
+ got = clone(req.Header)
+ return nil
+ })
+ if err := withRedactedHeaders(req, mod); err != nil {
+ t.Fatal(err)
+ }
+ // Logged headers should be redacted.
+ want := http.Header{
+ "Content-Type": {"text/plain"},
+ "Authorization": {"REDACTED"},
+ "X-Goog-Encryption-Key": {"REDACTED"},
+ "X-Goog-Copy-Source-Encryption-Key": {"REDACTED"},
+ }
+ if !testutil.Equal(got, want) {
+ t.Errorf("got %+v\nwant %+v", got, want)
+ }
+ // The request's headers should be the same.
+ if got, want := req.Header, orig; !testutil.Equal(got, want) {
+ t.Errorf("got %+v\nwant %+v", got, want)
+ }
+}
diff --git a/vendor/cloud.google.com/go/httpreplay/internal/proxy/replay.go b/vendor/cloud.google.com/go/httpreplay/internal/proxy/replay.go
new file mode 100644
index 000000000..4483bebc6
--- /dev/null
+++ b/vendor/cloud.google.com/go/httpreplay/internal/proxy/replay.go
@@ -0,0 +1,336 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.8
+
+package proxy
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "log"
+ "mime"
+ "mime/multipart"
+ "net/http"
+ "reflect"
+ "strings"
+
+ "github.com/google/martian/har"
+ "github.com/google/martian/martianlog"
+)
+
+// ForReplaying returns a Proxy configured to replay.
+func ForReplaying(filename string, port int) (*Proxy, error) {
+ p, err := newProxy(filename)
+ if err != nil {
+ return nil, err
+ }
+ calls, initial, err := readLog(filename)
+ if err != nil {
+ return nil, err
+ }
+ p.mproxy.SetRoundTripper(replayRoundTripper{calls: calls})
+ p.Initial = initial
+
+ // Debug logging.
+ // TODO(jba): factor out from here and ForRecording.
+ logger := martianlog.NewLogger()
+ logger.SetDecode(true)
+ p.mproxy.SetRequestModifier(logger)
+ p.mproxy.SetResponseModifier(logger)
+
+ if err := p.start(port); err != nil {
+ return nil, err
+ }
+ return p, nil
+}
+
+// A call is an HTTP request and its matching response.
+type call struct {
+ req *har.Request
+ reqBody *requestBody // parsed request body
+ res *har.Response
+}
+
+func readLog(filename string) ([]*call, interface{}, error) {
+ bytes, err := ioutil.ReadFile(filename)
+ if err != nil {
+ return nil, nil, err
+ }
+ var f httprFile
+ if err := json.Unmarshal(bytes, &f); err != nil {
+ return nil, nil, err
+ }
+ ignoreIDs := map[string]bool{} // IDs of requests to ignore
+ callsByID := map[string]*call{}
+ var calls []*call
+ for _, e := range f.HAR.Log.Entries {
+ if ignoreIDs[e.ID] {
+ continue
+ }
+ c, ok := callsByID[e.ID]
+ switch {
+ case !ok:
+ if e.Request == nil {
+ return nil, nil, fmt.Errorf("first entry for ID %s does not have a request", e.ID)
+ }
+ if e.Request.Method == "CONNECT" {
+ // Ignore CONNECT methods.
+ ignoreIDs[e.ID] = true
+ } else {
+ reqBody, err := newRequestBodyFromHAR(e.Request)
+ if err != nil {
+ return nil, nil, err
+ }
+ c := &call{e.Request, reqBody, e.Response}
+ calls = append(calls, c)
+ callsByID[e.ID] = c
+ }
+ case e.Request != nil:
+ if e.Response != nil {
+ return nil, nil, errors.New("HAR entry has both request and response")
+ }
+ c.req = e.Request
+ case e.Response != nil:
+ c.res = e.Response
+ default:
+ return nil, nil, errors.New("HAR entry has neither request nor response")
+ }
+ }
+ for _, c := range calls {
+ if c.req == nil || c.res == nil {
+ return nil, nil, fmt.Errorf("missing request or response: %+v", c)
+ }
+ }
+ return calls, f.Initial, nil
+}
+
+type replayRoundTripper struct {
+ calls []*call
+}
+
+func (r replayRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ reqBody, err := newRequestBodyFromHTTP(req)
+ if err != nil {
+ return nil, err
+ }
+ for i, call := range r.calls {
+ if call == nil {
+ continue
+ }
+ if requestsMatch(req, reqBody, call.req, call.reqBody) {
+ r.calls[i] = nil // nil out this call so we don't reuse it
+ res := harResponseToHTTPResponse(call.res)
+ res.Request = req
+ return res, nil
+ }
+ }
+ return nil, fmt.Errorf("no matching request for %+v", req)
+}
+
+// Headers that shouldn't be compared, becuase they may differ on different executions
+// of the same code, or may not be present during record or replay.
+var ignoreHeaders = map[string]bool{}
+
+func init() {
+ // Sensitive headers are redacted in the log, so they won't be equal to incoming values.
+ for _, h := range sensitiveHeaders {
+ ignoreHeaders[h] = true
+ }
+ for _, h := range []string{
+ "Content-Type", // handled by requestBody
+ "Date",
+ "Host",
+ "Transfer-Encoding",
+ "Via",
+ "X-Forwarded-For",
+ "X-Forwarded-Host",
+ "X-Forwarded-Proto",
+ "X-Forwarded-Url",
+ } {
+ ignoreHeaders[h] = true
+ }
+}
+
+// Report whether the incoming request in matches the candidate request cand.
+func requestsMatch(in *http.Request, inBody *requestBody, cand *har.Request, candBody *requestBody) bool {
+ // TODO(jba): compare headers?
+ if in.Method != cand.Method {
+ return false
+ }
+ if in.URL.String() != cand.URL {
+ return false
+ }
+ if !inBody.equal(candBody) {
+ return false
+ }
+ // Check headers last. See DebugHeaders.
+ return headersMatch(in.Header, harHeadersToHTTP(cand.Headers), ignoreHeaders)
+}
+
+func harHeadersToHTTP(hhs []har.Header) http.Header {
+ // Unfortunately, the har package joins multiple header values with ", ",
+ // which isn't reversible if any of the values contains a comma.
+ // We hope for the best.
+ res := http.Header{}
+ for _, hh := range hhs {
+ res[hh.Name] = strings.Split(hh.Value, ", ")
+ }
+ return res
+}
+
+// Convert a HAR response to a Go http.Response.
+// HAR (Http ARchive) is a standard for storing HTTP interactions.
+// See http://www.softwareishard.com/blog/har-12-spec.
+func harResponseToHTTPResponse(hr *har.Response) *http.Response {
+ return &http.Response{
+ StatusCode: hr.Status,
+ Status: hr.StatusText,
+ Proto: hr.HTTPVersion,
+ // TODO(jba): headers?
+ Body: ioutil.NopCloser(bytes.NewReader(hr.Content.Text)),
+ ContentLength: int64(len(hr.Content.Text)),
+ }
+}
+
+// A requestBody represents the body of a request. If the content type is multipart, the
+// body is split into parts.
+//
+// The replaying proxy needs to understand multipart bodies because the boundaries are
+// generated randomly, so we can't just compare the entire bodies for equality.
+type requestBody struct {
+ mediaType string // the media type part of the Content-Type header
+ parts [][]byte // the parts of the body, or just a single []byte if not multipart
+}
+
+func newRequestBodyFromHTTP(req *http.Request) (*requestBody, error) {
+ defer req.Body.Close()
+ return newRequestBody(req.Header.Get("Content-Type"), req.Body)
+}
+
+func newRequestBodyFromHAR(req *har.Request) (*requestBody, error) {
+ if req.PostData == nil {
+ return nil, nil
+ }
+ var cth string
+ for _, h := range req.Headers {
+ if h.Name == "Content-Type" {
+ cth = h.Value
+ break
+ }
+ }
+ return newRequestBody(cth, strings.NewReader(req.PostData.Text))
+}
+
+// newRequestBody parses the Content-Type header, reads the body, and splits it into
+// parts if necessary.
+func newRequestBody(contentType string, body io.Reader) (*requestBody, error) {
+ if contentType == "" {
+ // No content-type header. There should not be a body.
+ if _, err := body.Read(make([]byte, 1)); err != io.EOF {
+ return nil, errors.New("no Content-Type, but body")
+ }
+ return nil, nil
+ }
+ mediaType, params, err := mime.ParseMediaType(contentType)
+ if err != nil {
+ return nil, err
+ }
+ rb := &requestBody{mediaType: mediaType}
+ if strings.HasPrefix(mediaType, "multipart/") {
+ mr := multipart.NewReader(body, params["boundary"])
+ for {
+ p, err := mr.NextPart()
+ if err == io.EOF {
+ break
+ }
+ if err != nil {
+ return nil, err
+ }
+ part, err := ioutil.ReadAll(p)
+ if err != nil {
+ return nil, err
+ }
+ // TODO(jba): care about part headers?
+ rb.parts = append(rb.parts, part)
+ }
+ } else {
+ bytes, err := ioutil.ReadAll(body)
+ if err != nil {
+ return nil, err
+ }
+ rb.parts = [][]byte{bytes}
+ }
+ return rb, nil
+}
+
+func (r1 *requestBody) equal(r2 *requestBody) bool {
+ if r1 == nil || r2 == nil {
+ return r1 == r2
+ }
+ if r1.mediaType != r2.mediaType {
+ return false
+ }
+ if len(r1.parts) != len(r2.parts) {
+ return false
+ }
+ for i, p1 := range r1.parts {
+ if !bytes.Equal(p1, r2.parts[i]) {
+ return false
+ }
+ }
+ return true
+}
+
+// DebugHeaders helps to determine whether a header should be ignored.
+// When true, if requests have the same method, URL and body but differ
+// in a header, the first mismatched header is logged.
+var DebugHeaders = false
+
+func headersMatch(in, cand http.Header, ignores map[string]bool) bool {
+ for k1, v1 := range in {
+ if ignores[k1] {
+ continue
+ }
+ v2 := cand[k1]
+ if v2 == nil {
+ if DebugHeaders {
+ log.Printf("header %s: present in incoming request but not candidate", k1)
+ }
+ return false
+ }
+ if !reflect.DeepEqual(v1, v2) {
+ if DebugHeaders {
+ log.Printf("header %s: incoming %v, candidate %v", k1, v1, v2)
+ }
+ return false
+ }
+ }
+ for k2 := range cand {
+ if ignores[k2] {
+ continue
+ }
+ if in[k2] == nil {
+ if DebugHeaders {
+ log.Printf("header %s: not in incoming request but present in candidate", k2)
+ }
+ return false
+ }
+ }
+ return true
+}
diff --git a/vendor/cloud.google.com/go/httpreplay/internal/proxy/replay_test.go b/vendor/cloud.google.com/go/httpreplay/internal/proxy/replay_test.go
new file mode 100644
index 000000000..929a51612
--- /dev/null
+++ b/vendor/cloud.google.com/go/httpreplay/internal/proxy/replay_test.go
@@ -0,0 +1,114 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.8
+
+package proxy
+
+import (
+ "io/ioutil"
+ "net/http"
+ "strings"
+ "testing"
+
+ "cloud.google.com/go/internal/testutil"
+ "github.com/google/go-cmp/cmp"
+)
+
+func TestRequestBody(t *testing.T) {
+ req1 := &http.Request{
+ Header: http.Header{"Content-Type": {"multipart/mixed; boundary=foo"}},
+ Body: ioutil.NopCloser(strings.NewReader(
+ "--foo\r\nFoo: one\r\n\r\nA section\r\n" +
+ "--foo\r\nFoo: two\r\n\r\nAnd another\r\n" +
+ "--foo--\r\n")),
+ }
+ rb1, err := newRequestBodyFromHTTP(req1)
+ if err != nil {
+ t.Fatal(err)
+ }
+ want := &requestBody{
+ mediaType: "multipart/mixed",
+ parts: [][]byte{
+ []byte("A section"),
+ []byte("And another"),
+ },
+ }
+ if diff := testutil.Diff(rb1, want, cmp.AllowUnexported(requestBody{})); diff != "" {
+ t.Error(diff)
+ }
+
+ // Same contents, different boundary.
+ req2 := &http.Request{
+ Header: http.Header{"Content-Type": {"multipart/mixed; boundary=bar"}},
+ Body: ioutil.NopCloser(strings.NewReader(
+ "--bar\r\nFoo: one\r\n\r\nA section\r\n" +
+ "--bar\r\nFoo: two\r\n\r\nAnd another\r\n" +
+ "--bar--\r\n")),
+ }
+ rb2, err := newRequestBodyFromHTTP(req2)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if diff := testutil.Diff(rb1, want, cmp.AllowUnexported(requestBody{})); diff != "" {
+ t.Error(diff)
+ }
+
+ if !rb1.equal(rb2) {
+ t.Error("equal returned false, want true")
+ }
+}
+
+func TestHeadersMatch(t *testing.T) {
+ for _, test := range []struct {
+ h1, h2 http.Header
+ want bool
+ }{
+ {
+ http.Header{"A": {"x"}, "B": {"y", "z"}},
+ http.Header{"A": {"x"}, "B": {"y", "z"}},
+ true,
+ },
+ {
+ http.Header{"A": {"x"}, "B": {"y", "z"}},
+ http.Header{"A": {"x"}, "B": {"w"}},
+ false,
+ },
+ {
+ http.Header{"A": {"x"}, "B": {"y", "z"}, "I": {"foo"}},
+ http.Header{"A": {"x"}, "B": {"y", "z"}, "I": {"bar"}},
+ true,
+ },
+ {
+ http.Header{"A": {"x"}, "B": {"y", "z"}},
+ http.Header{"A": {"x"}, "B": {"y", "z"}, "I": {"bar"}},
+ true,
+ },
+ {
+ http.Header{"A": {"x"}, "B": {"y", "z"}, "I": {"foo"}},
+ http.Header{"A": {"x"}, "I": {"bar"}},
+ false,
+ },
+ {
+ http.Header{"A": {"x"}, "I": {"foo"}},
+ http.Header{"A": {"x"}, "B": {"y", "z"}, "I": {"bar"}},
+ false,
+ },
+ } {
+ got := headersMatch(test.h1, test.h2, map[string]bool{"I": true})
+ if got != test.want {
+ t.Errorf("%v, %v: got %t, want %t", test.h1, test.h2, got, test.want)
+ }
+ }
+}
diff --git a/vendor/cloud.google.com/go/iam/admin/apiv1/doc.go b/vendor/cloud.google.com/go/iam/admin/apiv1/doc.go
index e366fedf6..10cfdf3df 100644
--- a/vendor/cloud.google.com/go/iam/admin/apiv1/doc.go
+++ b/vendor/cloud.google.com/go/iam/admin/apiv1/doc.go
@@ -1,10 +1,10 @@
-// Copyright 2017, Google Inc. All rights reserved.
+// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,9 +14,11 @@
// AUTO-GENERATED CODE. DO NOT EDIT.
-// Package admin is an experimental, auto-generated package for the
+// Package admin is an auto-generated package for the
// Google Identity and Access Management (IAM) API.
//
+// NOTE: This package is in alpha. It is not stable, and is likely to change.
+//
// Manages identity and access control for Google Cloud Platform resources,
// including the creation of service accounts, which you can use to
// authenticate to Google and make API calls.
@@ -27,11 +29,15 @@ import (
"google.golang.org/grpc/metadata"
)
-func insertXGoog(ctx context.Context, val []string) context.Context {
- md, _ := metadata.FromOutgoingContext(ctx)
- md = md.Copy()
- md["x-goog-api-client"] = val
- return metadata.NewOutgoingContext(ctx, md)
+func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
+ out, _ := metadata.FromOutgoingContext(ctx)
+ out = out.Copy()
+ for _, md := range mds {
+ for k, v := range md {
+ out[k] = append(out[k], v...)
+ }
+ }
+ return metadata.NewOutgoingContext(ctx, out)
}
// DefaultAuthScopes reports the default set of authentication scopes to use with this package.
diff --git a/vendor/cloud.google.com/go/iam/admin/apiv1/iam_client.go b/vendor/cloud.google.com/go/iam/admin/apiv1/iam_client.go
index 32ca067eb..9b6449545 100644
--- a/vendor/cloud.google.com/go/iam/admin/apiv1/iam_client.go
+++ b/vendor/cloud.google.com/go/iam/admin/apiv1/iam_client.go
@@ -1,10 +1,10 @@
-// Copyright 2017, Google Inc. All rights reserved.
+// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -30,6 +30,7 @@ import (
iampb "google.golang.org/genproto/googleapis/iam/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
)
// IamCallOptions contains the retry settings for each method of IamClient.
@@ -48,6 +49,7 @@ type IamCallOptions struct {
SetIamPolicy []gax.CallOption
TestIamPermissions []gax.CallOption
QueryGrantableRoles []gax.CallOption
+ SignJwt []gax.CallOption
}
func defaultIamClientOptions() []option.ClientOption {
@@ -87,6 +89,7 @@ func defaultIamCallOptions() *IamCallOptions {
SetIamPolicy: retry[[2]string{"default", "non_idempotent"}],
TestIamPermissions: retry[[2]string{"default", "non_idempotent"}],
QueryGrantableRoles: retry[[2]string{"default", "non_idempotent"}],
+ SignJwt: retry[[2]string{"default", "non_idempotent"}],
}
}
@@ -101,8 +104,8 @@ type IamClient struct {
// The call options for this service.
CallOptions *IamCallOptions
- // The metadata to be sent with each request.
- xGoogHeader []string
+ // The x-goog-* metadata to be sent with each request.
+ xGoogMetadata metadata.MD
}
// NewIamClient creates a new iam client.
@@ -119,7 +122,7 @@ type IamClient struct {
// unique_id.
//
// All other methods can identify accounts using the format
-// projects/{project}/serviceAccounts/{account}.
+// projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}.
// Using - as a wildcard for the project will infer the project from
// the account. The account value can be the email address or the
// unique_id of the service account.
@@ -155,42 +158,12 @@ func (c *IamClient) Close() error {
func (c *IamClient) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", version.Go()}, keyval...)
kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
- c.xGoogHeader = []string{gax.XGoogHeader(kv...)}
-}
-
-// IamProjectPath returns the path for the project resource.
-func IamProjectPath(project string) string {
- return "" +
- "projects/" +
- project +
- ""
-}
-
-// IamServiceAccountPath returns the path for the service account resource.
-func IamServiceAccountPath(project, serviceAccount string) string {
- return "" +
- "projects/" +
- project +
- "/serviceAccounts/" +
- serviceAccount +
- ""
-}
-
-// IamKeyPath returns the path for the key resource.
-func IamKeyPath(project, serviceAccount, key string) string {
- return "" +
- "projects/" +
- project +
- "/serviceAccounts/" +
- serviceAccount +
- "/keys/" +
- key +
- ""
+ c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
}
// ListServiceAccounts lists [ServiceAccounts][google.iam.admin.v1.ServiceAccount] for a project.
func (c *IamClient) ListServiceAccounts(ctx context.Context, req *adminpb.ListServiceAccountsRequest, opts ...gax.CallOption) *ServiceAccountIterator {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.ListServiceAccounts[0:len(c.CallOptions.ListServiceAccounts):len(c.CallOptions.ListServiceAccounts)], opts...)
it := &ServiceAccountIterator{}
it.InternalFetch = func(pageSize int, pageToken string) ([]*adminpb.ServiceAccount, string, error) {
@@ -225,7 +198,7 @@ func (c *IamClient) ListServiceAccounts(ctx context.Context, req *adminpb.ListSe
// GetServiceAccount gets a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
func (c *IamClient) GetServiceAccount(ctx context.Context, req *adminpb.GetServiceAccountRequest, opts ...gax.CallOption) (*adminpb.ServiceAccount, error) {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.GetServiceAccount[0:len(c.CallOptions.GetServiceAccount):len(c.CallOptions.GetServiceAccount)], opts...)
var resp *adminpb.ServiceAccount
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
@@ -242,7 +215,7 @@ func (c *IamClient) GetServiceAccount(ctx context.Context, req *adminpb.GetServi
// CreateServiceAccount creates a [ServiceAccount][google.iam.admin.v1.ServiceAccount]
// and returns it.
func (c *IamClient) CreateServiceAccount(ctx context.Context, req *adminpb.CreateServiceAccountRequest, opts ...gax.CallOption) (*adminpb.ServiceAccount, error) {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.CreateServiceAccount[0:len(c.CallOptions.CreateServiceAccount):len(c.CallOptions.CreateServiceAccount)], opts...)
var resp *adminpb.ServiceAccount
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
@@ -262,7 +235,7 @@ func (c *IamClient) CreateServiceAccount(ctx context.Context, req *adminpb.Creat
// display_name .
// The etag is mandatory.
func (c *IamClient) UpdateServiceAccount(ctx context.Context, req *adminpb.ServiceAccount, opts ...gax.CallOption) (*adminpb.ServiceAccount, error) {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.UpdateServiceAccount[0:len(c.CallOptions.UpdateServiceAccount):len(c.CallOptions.UpdateServiceAccount)], opts...)
var resp *adminpb.ServiceAccount
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
@@ -278,7 +251,7 @@ func (c *IamClient) UpdateServiceAccount(ctx context.Context, req *adminpb.Servi
// DeleteServiceAccount deletes a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
func (c *IamClient) DeleteServiceAccount(ctx context.Context, req *adminpb.DeleteServiceAccountRequest, opts ...gax.CallOption) error {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.DeleteServiceAccount[0:len(c.CallOptions.DeleteServiceAccount):len(c.CallOptions.DeleteServiceAccount)], opts...)
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
var err error
@@ -290,7 +263,7 @@ func (c *IamClient) DeleteServiceAccount(ctx context.Context, req *adminpb.Delet
// ListServiceAccountKeys lists [ServiceAccountKeys][google.iam.admin.v1.ServiceAccountKey].
func (c *IamClient) ListServiceAccountKeys(ctx context.Context, req *adminpb.ListServiceAccountKeysRequest, opts ...gax.CallOption) (*adminpb.ListServiceAccountKeysResponse, error) {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.ListServiceAccountKeys[0:len(c.CallOptions.ListServiceAccountKeys):len(c.CallOptions.ListServiceAccountKeys)], opts...)
var resp *adminpb.ListServiceAccountKeysResponse
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
@@ -307,7 +280,7 @@ func (c *IamClient) ListServiceAccountKeys(ctx context.Context, req *adminpb.Lis
// GetServiceAccountKey gets the [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]
// by key id.
func (c *IamClient) GetServiceAccountKey(ctx context.Context, req *adminpb.GetServiceAccountKeyRequest, opts ...gax.CallOption) (*adminpb.ServiceAccountKey, error) {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.GetServiceAccountKey[0:len(c.CallOptions.GetServiceAccountKey):len(c.CallOptions.GetServiceAccountKey)], opts...)
var resp *adminpb.ServiceAccountKey
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
@@ -324,7 +297,7 @@ func (c *IamClient) GetServiceAccountKey(ctx context.Context, req *adminpb.GetSe
// CreateServiceAccountKey creates a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]
// and returns it.
func (c *IamClient) CreateServiceAccountKey(ctx context.Context, req *adminpb.CreateServiceAccountKeyRequest, opts ...gax.CallOption) (*adminpb.ServiceAccountKey, error) {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.CreateServiceAccountKey[0:len(c.CallOptions.CreateServiceAccountKey):len(c.CallOptions.CreateServiceAccountKey)], opts...)
var resp *adminpb.ServiceAccountKey
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
@@ -340,7 +313,7 @@ func (c *IamClient) CreateServiceAccountKey(ctx context.Context, req *adminpb.Cr
// DeleteServiceAccountKey deletes a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey].
func (c *IamClient) DeleteServiceAccountKey(ctx context.Context, req *adminpb.DeleteServiceAccountKeyRequest, opts ...gax.CallOption) error {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.DeleteServiceAccountKey[0:len(c.CallOptions.DeleteServiceAccountKey):len(c.CallOptions.DeleteServiceAccountKey)], opts...)
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
var err error
@@ -352,7 +325,7 @@ func (c *IamClient) DeleteServiceAccountKey(ctx context.Context, req *adminpb.De
// SignBlob signs a blob using a service account's system-managed private key.
func (c *IamClient) SignBlob(ctx context.Context, req *adminpb.SignBlobRequest, opts ...gax.CallOption) (*adminpb.SignBlobResponse, error) {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.SignBlob[0:len(c.CallOptions.SignBlob):len(c.CallOptions.SignBlob)], opts...)
var resp *adminpb.SignBlobResponse
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
@@ -369,7 +342,7 @@ func (c *IamClient) SignBlob(ctx context.Context, req *adminpb.SignBlobRequest,
// getIamPolicy returns the IAM access control policy for a
// [ServiceAccount][google.iam.admin.v1.ServiceAccount].
func (c *IamClient) getIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.GetIamPolicy[0:len(c.CallOptions.GetIamPolicy):len(c.CallOptions.GetIamPolicy)], opts...)
var resp *iampb.Policy
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
@@ -386,7 +359,7 @@ func (c *IamClient) getIamPolicy(ctx context.Context, req *iampb.GetIamPolicyReq
// setIamPolicy sets the IAM access control policy for a
// [ServiceAccount][google.iam.admin.v1.ServiceAccount].
func (c *IamClient) setIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.SetIamPolicy[0:len(c.CallOptions.SetIamPolicy):len(c.CallOptions.SetIamPolicy)], opts...)
var resp *iampb.Policy
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
@@ -403,7 +376,7 @@ func (c *IamClient) setIamPolicy(ctx context.Context, req *iampb.SetIamPolicyReq
// TestIamPermissions tests the specified permissions against the IAM access control policy
// for a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
func (c *IamClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.TestIamPermissions[0:len(c.CallOptions.TestIamPermissions):len(c.CallOptions.TestIamPermissions)], opts...)
var resp *iampb.TestIamPermissionsResponse
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
@@ -421,7 +394,7 @@ func (c *IamClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPe
// A role is grantable if it can be used as the role in a binding for a policy
// for that resource.
func (c *IamClient) QueryGrantableRoles(ctx context.Context, req *adminpb.QueryGrantableRolesRequest, opts ...gax.CallOption) (*adminpb.QueryGrantableRolesResponse, error) {
- ctx = insertXGoog(ctx, c.xGoogHeader)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.QueryGrantableRoles[0:len(c.CallOptions.QueryGrantableRoles):len(c.CallOptions.QueryGrantableRoles)], opts...)
var resp *adminpb.QueryGrantableRolesResponse
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
@@ -435,6 +408,26 @@ func (c *IamClient) QueryGrantableRoles(ctx context.Context, req *adminpb.QueryG
return resp, nil
}
+// SignJwt signs a JWT using a service account's system-managed private key.
+//
+// If no expiry time (exp) is provided in the SignJwtRequest, IAM sets an
+// an expiry time of one hour by default. If you request an expiry time of
+// more than one hour, the request will fail.
+func (c *IamClient) SignJwt(ctx context.Context, req *adminpb.SignJwtRequest, opts ...gax.CallOption) (*adminpb.SignJwtResponse, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.SignJwt[0:len(c.CallOptions.SignJwt):len(c.CallOptions.SignJwt)], opts...)
+ var resp *adminpb.SignJwtResponse
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.iamClient.SignJwt(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
// ServiceAccountIterator manages a stream of *adminpb.ServiceAccount.
type ServiceAccountIterator struct {
items []*adminpb.ServiceAccount
diff --git a/vendor/cloud.google.com/go/iam/admin/apiv1/iam_client_example_test.go b/vendor/cloud.google.com/go/iam/admin/apiv1/iam_client_example_test.go
index 901fcb951..c9ead18b4 100644
--- a/vendor/cloud.google.com/go/iam/admin/apiv1/iam_client_example_test.go
+++ b/vendor/cloud.google.com/go/iam/admin/apiv1/iam_client_example_test.go
@@ -1,10 +1,10 @@
-// Copyright 2017, Google Inc. All rights reserved.
+// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -42,7 +42,7 @@ func ExampleIamClient_ListServiceAccounts() {
}
req := &adminpb.ListServiceAccountsRequest{
- // TODO: Fill request struct fields.
+ // TODO: Fill request struct fields.
}
it := c.ListServiceAccounts(ctx, req)
for {
@@ -66,7 +66,7 @@ func ExampleIamClient_GetServiceAccount() {
}
req := &adminpb.GetServiceAccountRequest{
- // TODO: Fill request struct fields.
+ // TODO: Fill request struct fields.
}
resp, err := c.GetServiceAccount(ctx, req)
if err != nil {
@@ -84,7 +84,7 @@ func ExampleIamClient_CreateServiceAccount() {
}
req := &adminpb.CreateServiceAccountRequest{
- // TODO: Fill request struct fields.
+ // TODO: Fill request struct fields.
}
resp, err := c.CreateServiceAccount(ctx, req)
if err != nil {
@@ -102,7 +102,7 @@ func ExampleIamClient_UpdateServiceAccount() {
}
req := &adminpb.ServiceAccount{
- // TODO: Fill request struct fields.
+ // TODO: Fill request struct fields.
}
resp, err := c.UpdateServiceAccount(ctx, req)
if err != nil {
@@ -120,7 +120,7 @@ func ExampleIamClient_DeleteServiceAccount() {
}
req := &adminpb.DeleteServiceAccountRequest{
- // TODO: Fill request struct fields.
+ // TODO: Fill request struct fields.
}
err = c.DeleteServiceAccount(ctx, req)
if err != nil {
@@ -136,7 +136,7 @@ func ExampleIamClient_ListServiceAccountKeys() {
}
req := &adminpb.ListServiceAccountKeysRequest{
- // TODO: Fill request struct fields.
+ // TODO: Fill request struct fields.
}
resp, err := c.ListServiceAccountKeys(ctx, req)
if err != nil {
@@ -154,7 +154,7 @@ func ExampleIamClient_GetServiceAccountKey() {
}
req := &adminpb.GetServiceAccountKeyRequest{
- // TODO: Fill request struct fields.
+ // TODO: Fill request struct fields.
}
resp, err := c.GetServiceAccountKey(ctx, req)
if err != nil {
@@ -172,7 +172,7 @@ func ExampleIamClient_CreateServiceAccountKey() {
}
req := &adminpb.CreateServiceAccountKeyRequest{
- // TODO: Fill request struct fields.
+ // TODO: Fill request struct fields.
}
resp, err := c.CreateServiceAccountKey(ctx, req)
if err != nil {
@@ -190,7 +190,7 @@ func ExampleIamClient_DeleteServiceAccountKey() {
}
req := &adminpb.DeleteServiceAccountKeyRequest{
- // TODO: Fill request struct fields.
+ // TODO: Fill request struct fields.
}
err = c.DeleteServiceAccountKey(ctx, req)
if err != nil {
@@ -206,7 +206,7 @@ func ExampleIamClient_SignBlob() {
}
req := &adminpb.SignBlobRequest{
- // TODO: Fill request struct fields.
+ // TODO: Fill request struct fields.
}
resp, err := c.SignBlob(ctx, req)
if err != nil {
@@ -224,7 +224,7 @@ func ExampleIamClient_TestIamPermissions() {
}
req := &iampb.TestIamPermissionsRequest{
- // TODO: Fill request struct fields.
+ // TODO: Fill request struct fields.
}
resp, err := c.TestIamPermissions(ctx, req)
if err != nil {
@@ -242,7 +242,7 @@ func ExampleIamClient_QueryGrantableRoles() {
}
req := &adminpb.QueryGrantableRolesRequest{
- // TODO: Fill request struct fields.
+ // TODO: Fill request struct fields.
}
resp, err := c.QueryGrantableRoles(ctx, req)
if err != nil {
@@ -251,3 +251,21 @@ func ExampleIamClient_QueryGrantableRoles() {
// TODO: Use resp.
_ = resp
}
+
+func ExampleIamClient_SignJwt() {
+ ctx := context.Background()
+ c, err := admin.NewIamClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &adminpb.SignJwtRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.SignJwt(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
diff --git a/vendor/cloud.google.com/go/iam/admin/apiv1/mock_test.go b/vendor/cloud.google.com/go/iam/admin/apiv1/mock_test.go
index 43ff01b57..d4f5ef7ed 100644
--- a/vendor/cloud.google.com/go/iam/admin/apiv1/mock_test.go
+++ b/vendor/cloud.google.com/go/iam/admin/apiv1/mock_test.go
@@ -1,10 +1,10 @@
-// Copyright 2017, Google Inc. All rights reserved.
+// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -182,6 +182,18 @@ func (s *mockIamServer) SignBlob(ctx context.Context, req *adminpb.SignBlobReque
return s.resps[0].(*adminpb.SignBlobResponse), nil
}
+func (s *mockIamServer) SignJwt(ctx context.Context, req *adminpb.SignJwtRequest) (*adminpb.SignJwtResponse, 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].(*adminpb.SignJwtResponse), nil
+}
+
func (s *mockIamServer) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest) (*iampb.Policy, error) {
md, _ := metadata.FromIncomingContext(ctx)
if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
@@ -273,7 +285,7 @@ func TestIamListServiceAccounts(t *testing.T) {
mockIam.resps = append(mockIam.resps[:0], expectedResponse)
- var formattedName string = IamProjectPath("[PROJECT]")
+ var formattedName string = fmt.Sprintf("projects/%s", "[PROJECT]")
var request = &adminpb.ListServiceAccountsRequest{
Name: formattedName,
}
@@ -312,7 +324,7 @@ func TestIamListServiceAccountsError(t *testing.T) {
errCode := codes.PermissionDenied
mockIam.err = gstatus.Error(errCode, "test error")
- var formattedName string = IamProjectPath("[PROJECT]")
+ var formattedName string = fmt.Sprintf("projects/%s", "[PROJECT]")
var request = &adminpb.ListServiceAccountsRequest{
Name: formattedName,
}
@@ -354,7 +366,7 @@ func TestIamGetServiceAccount(t *testing.T) {
mockIam.resps = append(mockIam.resps[:0], expectedResponse)
- var formattedName string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var request = &adminpb.GetServiceAccountRequest{
Name: formattedName,
}
@@ -383,7 +395,7 @@ func TestIamGetServiceAccountError(t *testing.T) {
errCode := codes.PermissionDenied
mockIam.err = gstatus.Error(errCode, "test error")
- var formattedName string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var request = &adminpb.GetServiceAccountRequest{
Name: formattedName,
}
@@ -425,7 +437,7 @@ func TestIamCreateServiceAccount(t *testing.T) {
mockIam.resps = append(mockIam.resps[:0], expectedResponse)
- var formattedName string = IamProjectPath("[PROJECT]")
+ var formattedName string = fmt.Sprintf("projects/%s", "[PROJECT]")
var accountId string = "accountId-803333011"
var request = &adminpb.CreateServiceAccountRequest{
Name: formattedName,
@@ -456,7 +468,7 @@ func TestIamCreateServiceAccountError(t *testing.T) {
errCode := codes.PermissionDenied
mockIam.err = gstatus.Error(errCode, "test error")
- var formattedName string = IamProjectPath("[PROJECT]")
+ var formattedName string = fmt.Sprintf("projects/%s", "[PROJECT]")
var accountId string = "accountId-803333011"
var request = &adminpb.CreateServiceAccountRequest{
Name: formattedName,
@@ -556,7 +568,7 @@ func TestIamDeleteServiceAccount(t *testing.T) {
mockIam.resps = append(mockIam.resps[:0], expectedResponse)
- var formattedName string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var request = &adminpb.DeleteServiceAccountRequest{
Name: formattedName,
}
@@ -582,7 +594,7 @@ func TestIamDeleteServiceAccountError(t *testing.T) {
errCode := codes.PermissionDenied
mockIam.err = gstatus.Error(errCode, "test error")
- var formattedName string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var request = &adminpb.DeleteServiceAccountRequest{
Name: formattedName,
}
@@ -608,7 +620,7 @@ func TestIamListServiceAccountKeys(t *testing.T) {
mockIam.resps = append(mockIam.resps[:0], expectedResponse)
- var formattedName string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var request = &adminpb.ListServiceAccountKeysRequest{
Name: formattedName,
}
@@ -637,7 +649,7 @@ func TestIamListServiceAccountKeysError(t *testing.T) {
errCode := codes.PermissionDenied
mockIam.err = gstatus.Error(errCode, "test error")
- var formattedName string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var request = &adminpb.ListServiceAccountKeysRequest{
Name: formattedName,
}
@@ -671,7 +683,7 @@ func TestIamGetServiceAccountKey(t *testing.T) {
mockIam.resps = append(mockIam.resps[:0], expectedResponse)
- var formattedName string = IamKeyPath("[PROJECT]", "[SERVICE_ACCOUNT]", "[KEY]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s/keys/%s", "[PROJECT]", "[SERVICE_ACCOUNT]", "[KEY]")
var request = &adminpb.GetServiceAccountKeyRequest{
Name: formattedName,
}
@@ -700,7 +712,7 @@ func TestIamGetServiceAccountKeyError(t *testing.T) {
errCode := codes.PermissionDenied
mockIam.err = gstatus.Error(errCode, "test error")
- var formattedName string = IamKeyPath("[PROJECT]", "[SERVICE_ACCOUNT]", "[KEY]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s/keys/%s", "[PROJECT]", "[SERVICE_ACCOUNT]", "[KEY]")
var request = &adminpb.GetServiceAccountKeyRequest{
Name: formattedName,
}
@@ -734,7 +746,7 @@ func TestIamCreateServiceAccountKey(t *testing.T) {
mockIam.resps = append(mockIam.resps[:0], expectedResponse)
- var formattedName string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var request = &adminpb.CreateServiceAccountKeyRequest{
Name: formattedName,
}
@@ -763,7 +775,7 @@ func TestIamCreateServiceAccountKeyError(t *testing.T) {
errCode := codes.PermissionDenied
mockIam.err = gstatus.Error(errCode, "test error")
- var formattedName string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var request = &adminpb.CreateServiceAccountKeyRequest{
Name: formattedName,
}
@@ -790,7 +802,7 @@ func TestIamDeleteServiceAccountKey(t *testing.T) {
mockIam.resps = append(mockIam.resps[:0], expectedResponse)
- var formattedName string = IamKeyPath("[PROJECT]", "[SERVICE_ACCOUNT]", "[KEY]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s/keys/%s", "[PROJECT]", "[SERVICE_ACCOUNT]", "[KEY]")
var request = &adminpb.DeleteServiceAccountKeyRequest{
Name: formattedName,
}
@@ -816,7 +828,7 @@ func TestIamDeleteServiceAccountKeyError(t *testing.T) {
errCode := codes.PermissionDenied
mockIam.err = gstatus.Error(errCode, "test error")
- var formattedName string = IamKeyPath("[PROJECT]", "[SERVICE_ACCOUNT]", "[KEY]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s/keys/%s", "[PROJECT]", "[SERVICE_ACCOUNT]", "[KEY]")
var request = &adminpb.DeleteServiceAccountKeyRequest{
Name: formattedName,
}
@@ -847,7 +859,7 @@ func TestIamSignBlob(t *testing.T) {
mockIam.resps = append(mockIam.resps[:0], expectedResponse)
- var formattedName string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var bytesToSign []byte = []byte("45")
var request = &adminpb.SignBlobRequest{
Name: formattedName,
@@ -878,7 +890,7 @@ func TestIamSignBlobError(t *testing.T) {
errCode := codes.PermissionDenied
mockIam.err = gstatus.Error(errCode, "test error")
- var formattedName string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedName string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var bytesToSign []byte = []byte("45")
var request = &adminpb.SignBlobRequest{
Name: formattedName,
@@ -912,7 +924,7 @@ func TestIamGetIamPolicy(t *testing.T) {
mockIam.resps = append(mockIam.resps[:0], expectedResponse)
- var formattedResource string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedResource string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var request = &iampb.GetIamPolicyRequest{
Resource: formattedResource,
}
@@ -941,7 +953,7 @@ func TestIamGetIamPolicyError(t *testing.T) {
errCode := codes.PermissionDenied
mockIam.err = gstatus.Error(errCode, "test error")
- var formattedResource string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedResource string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var request = &iampb.GetIamPolicyRequest{
Resource: formattedResource,
}
@@ -973,7 +985,7 @@ func TestIamSetIamPolicy(t *testing.T) {
mockIam.resps = append(mockIam.resps[:0], expectedResponse)
- var formattedResource string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedResource string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var policy *iampb.Policy = &iampb.Policy{}
var request = &iampb.SetIamPolicyRequest{
Resource: formattedResource,
@@ -1004,7 +1016,7 @@ func TestIamSetIamPolicyError(t *testing.T) {
errCode := codes.PermissionDenied
mockIam.err = gstatus.Error(errCode, "test error")
- var formattedResource string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedResource string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var policy *iampb.Policy = &iampb.Policy{}
var request = &iampb.SetIamPolicyRequest{
Resource: formattedResource,
@@ -1033,7 +1045,7 @@ func TestIamTestIamPermissions(t *testing.T) {
mockIam.resps = append(mockIam.resps[:0], expectedResponse)
- var formattedResource string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedResource string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var permissions []string = nil
var request = &iampb.TestIamPermissionsRequest{
Resource: formattedResource,
@@ -1064,7 +1076,7 @@ func TestIamTestIamPermissionsError(t *testing.T) {
errCode := codes.PermissionDenied
mockIam.err = gstatus.Error(errCode, "test error")
- var formattedResource string = IamServiceAccountPath("[PROJECT]", "[SERVICE_ACCOUNT]")
+ var formattedResource string = fmt.Sprintf("projects/%s/serviceAccounts/%s", "[PROJECT]", "[SERVICE_ACCOUNT]")
var permissions []string = nil
var request = &iampb.TestIamPermissionsRequest{
Resource: formattedResource,
@@ -1086,7 +1098,10 @@ func TestIamTestIamPermissionsError(t *testing.T) {
_ = resp
}
func TestIamQueryGrantableRoles(t *testing.T) {
- var expectedResponse *adminpb.QueryGrantableRolesResponse = &adminpb.QueryGrantableRolesResponse{}
+ var nextPageToken string = "nextPageToken-1530815211"
+ var expectedResponse = &adminpb.QueryGrantableRolesResponse{
+ NextPageToken: nextPageToken,
+ }
mockIam.err = nil
mockIam.reqs = nil
@@ -1141,3 +1156,68 @@ func TestIamQueryGrantableRolesError(t *testing.T) {
}
_ = resp
}
+func TestIamSignJwt(t *testing.T) {
+ var keyId string = "keyId-1134673157"
+ var signedJwt string = "signedJwt-979546844"
+ var expectedResponse = &adminpb.SignJwtResponse{
+ KeyId: keyId,
+ SignedJwt: signedJwt,
+ }
+
+ mockIam.err = nil
+ mockIam.reqs = nil
+
+ mockIam.resps = append(mockIam.resps[:0], expectedResponse)
+
+ var name string = "name3373707"
+ var payload string = "payload-786701938"
+ var request = &adminpb.SignJwtRequest{
+ Name: name,
+ Payload: payload,
+ }
+
+ c, err := NewIamClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.SignJwt(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockIam.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 TestIamSignJwtError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockIam.err = gstatus.Error(errCode, "test error")
+
+ var name string = "name3373707"
+ var payload string = "payload-786701938"
+ var request = &adminpb.SignJwtRequest{
+ Name: name,
+ Payload: payload,
+ }
+
+ c, err := NewIamClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.SignJwt(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
+}
diff --git a/vendor/cloud.google.com/go/iam/admin/apiv1/path_funcs.go b/vendor/cloud.google.com/go/iam/admin/apiv1/path_funcs.go
new file mode 100644
index 000000000..ed2d58f28
--- /dev/null
+++ b/vendor/cloud.google.com/go/iam/admin/apiv1/path_funcs.go
@@ -0,0 +1,45 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT 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 admin
+
+// IamProjectPath returns the path for the project resource.
+func IamProjectPath(project string) string {
+ return "" +
+ "projects/" +
+ project +
+ ""
+}
+
+// IamServiceAccountPath returns the path for the service account resource.
+func IamServiceAccountPath(project, serviceAccount string) string {
+ return "" +
+ "projects/" +
+ project +
+ "/serviceAccounts/" +
+ serviceAccount +
+ ""
+}
+
+// IamKeyPath returns the path for the key resource.
+func IamKeyPath(project, serviceAccount, key string) string {
+ return "" +
+ "projects/" +
+ project +
+ "/serviceAccounts/" +
+ serviceAccount +
+ "/keys/" +
+ key +
+ ""
+}
diff --git a/vendor/cloud.google.com/go/internal/protostruct/protostruct_test.go b/vendor/cloud.google.com/go/internal/protostruct/protostruct_test.go
index 224cf2045..369c0ce3a 100644
--- a/vendor/cloud.google.com/go/internal/protostruct/protostruct_test.go
+++ b/vendor/cloud.google.com/go/internal/protostruct/protostruct_test.go
@@ -26,19 +26,19 @@ func TestDecodeToMap(t *testing.T) {
if got := DecodeToMap(nil); !testutil.Equal(got, map[string]interface{}(nil)) {
t.Errorf("DecodeToMap(nil) = %v, want nil", got)
}
- nullv := &pb.Value{&pb.Value_NullValue{}}
- stringv := &pb.Value{&pb.Value_StringValue{"x"}}
- boolv := &pb.Value{&pb.Value_BoolValue{true}}
- numberv := &pb.Value{&pb.Value_NumberValue{2.7}}
+ nullv := &pb.Value{Kind: &pb.Value_NullValue{}}
+ stringv := &pb.Value{Kind: &pb.Value_StringValue{"x"}}
+ boolv := &pb.Value{Kind: &pb.Value_BoolValue{true}}
+ numberv := &pb.Value{Kind: &pb.Value_NumberValue{2.7}}
in := &pb.Struct{Fields: map[string]*pb.Value{
"n": nullv,
"s": stringv,
"b": boolv,
"f": numberv,
- "l": &pb.Value{&pb.Value_ListValue{&pb.ListValue{
- []*pb.Value{nullv, stringv, boolv, numberv},
+ "l": &pb.Value{Kind: &pb.Value_ListValue{&pb.ListValue{
+ Values: []*pb.Value{nullv, stringv, boolv, numberv},
}}},
- "S": &pb.Value{&pb.Value_StructValue{&pb.Struct{Fields: map[string]*pb.Value{
+ "S": &pb.Value{Kind: &pb.Value_StructValue{&pb.Struct{Fields: map[string]*pb.Value{
"n1": nullv,
"b1": boolv,
}}}},
diff --git a/vendor/cloud.google.com/go/internal/testutil/go18.go b/vendor/cloud.google.com/go/internal/testutil/go18.go
index e7933dcbe..ec2d553bf 100644
--- a/vendor/cloud.google.com/go/internal/testutil/go18.go
+++ b/vendor/cloud.google.com/go/internal/testutil/go18.go
@@ -35,7 +35,7 @@ func NewTestExporter() *TestExporter {
view.RegisterExporter(te)
view.SetReportingPeriod(time.Millisecond)
- if err := view.Register(ocgrpc.ClientRequestCountView); err != nil {
+ if err := view.Register(ocgrpc.DefaultClientViews...); err != nil {
log.Fatal(err)
}
diff --git a/vendor/cloud.google.com/go/internal/testutil/unique.go b/vendor/cloud.google.com/go/internal/uid/uid.go
similarity index 64%
rename from vendor/cloud.google.com/go/internal/testutil/unique.go
rename to vendor/cloud.google.com/go/internal/uid/uid.go
index ff0de4aba..5c513ba4e 100644
--- a/vendor/cloud.google.com/go/internal/testutil/unique.go
+++ b/vendor/cloud.google.com/go/internal/uid/uid.go
@@ -12,11 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// This file supports generating unique IDs so that multiple test executions
-// don't interfere with each other, and cleaning up old entities that may
-// remain if tests exit early.
-
-package testutil
+// Package uid supports generating unique IDs. Its chief purpose is to prevent
+// multiple test executions from interfering with each other, and to facilitate
+// cleanup of old entities that may remain if tests exit early.
+package uid
import (
"fmt"
@@ -26,48 +25,58 @@ import (
"time"
)
-var startTime = time.Now().UTC()
-
-// A UIDSpace manages a set of unique IDs distinguished by a prefix.
-type UIDSpace struct {
- Prefix string
- Sep rune
+// A Space manages a set of unique IDs distinguished by a prefix.
+type Space struct {
+ Prefix string // Prefix of UIDs. Read-only.
+ Sep rune // Separates UID parts. Read-only.
+ Time time.Time // Timestamp for UIDs. Read-only.
re *regexp.Regexp
mu sync.Mutex
count int
}
-func NewUIDSpace(prefix string) *UIDSpace {
- return NewUIDSpaceSep(prefix, '-')
+// Options are optional values for a Space.
+type Options struct {
+ Sep rune // Separates parts of the UID. Defaults to '-'.
+ Time time.Time // Timestamp for all UIDs made with this space. Defaults to current time.
}
-func NewUIDSpaceSep(prefix string, sep rune) *UIDSpace {
+func NewSpace(prefix string, opts *Options) *Space {
+ sep := '-'
+ tm := time.Now().UTC()
+ if opts != nil {
+ if opts.Sep != 0 {
+ sep = opts.Sep
+ }
+ if !opts.Time.IsZero() {
+ tm = opts.Time
+ }
+ }
re := fmt.Sprintf(`^%s%[2]c(\d{4})(\d{2})(\d{2})%[2]c(\d+)%[2]c\d+$`,
regexp.QuoteMeta(prefix), sep)
- return &UIDSpace{
+ return &Space{
Prefix: prefix,
Sep: sep,
+ Time: tm,
re: regexp.MustCompile(re),
}
}
-// New generates a new unique ID . The ID consists of the UIDSpace's prefix, a
+// New generates a new unique ID. The ID consists of the Space's prefix, a
// timestamp, and a counter value. All unique IDs generated in the same test
// execution will have the same timestamp.
//
// Aside from the characters in the prefix, IDs contain only letters, numbers
// and sep.
-func (s *UIDSpace) New() string { return s.newID(startTime) }
-
-func (s *UIDSpace) newID(t time.Time) string {
+func (s *Space) New() string {
s.mu.Lock()
c := s.count
s.count++
s.mu.Unlock()
// Write the time as a date followed by nanoseconds from midnight of that date.
// That makes it easier to see the approximate time of the ID when it is displayed.
- y, m, d := t.Date()
- ns := t.Sub(time.Date(y, m, d, 0, 0, 0, 0, time.UTC))
+ y, m, d := s.Time.Date()
+ ns := s.Time.Sub(time.Date(y, m, d, 0, 0, 0, 0, time.UTC))
// Zero-pad the counter for lexical sort order for IDs with the same timestamp.
return fmt.Sprintf("%s%c%04d%02d%02d%c%d%c%04d",
s.Prefix, s.Sep, y, m, d, s.Sep, ns, s.Sep, c)
@@ -75,7 +84,7 @@ func (s *UIDSpace) newID(t time.Time) string {
// Timestamp extracts the timestamp of uid, which must have been generated by
// s. The second return value is true on success, false if there was a problem.
-func (s *UIDSpace) Timestamp(uid string) (time.Time, bool) {
+func (s *Space) Timestamp(uid string) (time.Time, bool) {
subs := s.re.FindStringSubmatch(uid)
if subs == nil {
return time.Time{}, false
@@ -92,7 +101,7 @@ func (s *UIDSpace) Timestamp(uid string) (time.Time, bool) {
// Older reports whether uid was created by m and has a timestamp older than
// the current time by at least d.
-func (s *UIDSpace) Older(uid string, d time.Duration) bool {
+func (s *Space) Older(uid string, d time.Duration) bool {
ts, ok := s.Timestamp(uid)
if !ok {
return false
diff --git a/vendor/cloud.google.com/go/internal/testutil/unique_test.go b/vendor/cloud.google.com/go/internal/uid/uid_test.go
similarity index 85%
rename from vendor/cloud.google.com/go/internal/testutil/unique_test.go
rename to vendor/cloud.google.com/go/internal/uid/uid_test.go
index 5a39833ff..fb7762fd0 100644
--- a/vendor/cloud.google.com/go/internal/testutil/unique_test.go
+++ b/vendor/cloud.google.com/go/internal/uid/uid_test.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package testutil
+package uid
import (
"testing"
@@ -20,16 +20,16 @@ import (
)
func TestNew(t *testing.T) {
- s := NewUIDSpace("prefix")
tm := time.Date(2017, 1, 6, 0, 0, 0, 21, time.UTC)
- got := s.newID(tm)
+ s := NewSpace("prefix", &Options{Time: tm})
+ got := s.New()
want := "prefix-20170106-21-0000"
if got != want {
t.Errorf("got %q, want %q", got, want)
}
- s2 := NewUIDSpaceSep("prefix2", '_')
- got = s2.newID(tm)
+ s2 := NewSpace("prefix2", &Options{Sep: '_', Time: tm})
+ got = s2.New()
want = "prefix2_20170106_21_0000"
if got != want {
t.Errorf("got %q, want %q", got, want)
@@ -37,7 +37,8 @@ func TestNew(t *testing.T) {
}
func TestTimestamp(t *testing.T) {
- s := NewUIDSpace("unique-ID")
+ s := NewSpace("unique-ID", nil)
+ startTime := s.Time
uid := s.New()
got, ok := s.Timestamp(uid)
if !ok {
@@ -60,9 +61,9 @@ func TestTimestamp(t *testing.T) {
}
func TestOlder(t *testing.T) {
- s := NewUIDSpace("uid")
+ s := NewSpace("uid", nil)
// A non-matching ID returns false.
- id2 := NewUIDSpace("different-prefix").New()
+ id2 := NewSpace("different-prefix", nil).New()
if got, want := s.Older(id2, time.Second), false; got != want {
t.Errorf("got %t, want %t", got, want)
}
diff --git a/vendor/cloud.google.com/go/license_test.go b/vendor/cloud.google.com/go/license_test.go
index f93e9e005..bfb8d25a6 100644
--- a/vendor/cloud.google.com/go/license_test.go
+++ b/vendor/cloud.google.com/go/license_test.go
@@ -53,7 +53,7 @@ func TestLicense(t *testing.T) {
if err != nil {
return nil
}
- src = src[:140] // Ensure all of the sentinel values are at the top of the file.
+ src = src[:300] // Ensure all of the sentinel values are at the top of the file.
// Find license
for _, sentinel := range sentinels {
diff --git a/vendor/cloud.google.com/go/logging/logadmin/metrics_test.go b/vendor/cloud.google.com/go/logging/logadmin/metrics_test.go
index 3a7035841..45fca8d1e 100644
--- a/vendor/cloud.google.com/go/logging/logadmin/metrics_test.go
+++ b/vendor/cloud.google.com/go/logging/logadmin/metrics_test.go
@@ -20,11 +20,12 @@ import (
"time"
"cloud.google.com/go/internal/testutil"
+ "cloud.google.com/go/internal/uid"
"golang.org/x/net/context"
"google.golang.org/api/iterator"
)
-var metricIDs = testutil.NewUIDSpace("GO-CLIENT-TEST-METRIC")
+var metricIDs = uid.NewSpace("GO-CLIENT-TEST-METRIC", nil)
// Initializes the tests before they run.
func initMetrics(ctx context.Context) {
diff --git a/vendor/cloud.google.com/go/logging/logadmin/sinks_test.go b/vendor/cloud.google.com/go/logging/logadmin/sinks_test.go
index 20f4b7c46..3d88f6a3d 100644
--- a/vendor/cloud.google.com/go/logging/logadmin/sinks_test.go
+++ b/vendor/cloud.google.com/go/logging/logadmin/sinks_test.go
@@ -24,13 +24,14 @@ import (
"time"
"cloud.google.com/go/internal/testutil"
+ "cloud.google.com/go/internal/uid"
"cloud.google.com/go/storage"
"golang.org/x/net/context"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
)
-var sinkIDs = testutil.NewUIDSpace("GO-CLIENT-TEST-SINK")
+var sinkIDs = uid.NewSpace("GO-CLIENT-TEST-SINK", nil)
const testFilter = ""
@@ -40,7 +41,7 @@ var testSinkDestination string
// Returns a cleanup function to be called after the tests finish.
func initSinks(ctx context.Context) func() {
// Create a unique GCS bucket so concurrent tests don't interfere with each other.
- bucketIDs := testutil.NewUIDSpace(testProjectID + "-log-sink")
+ bucketIDs := uid.NewSpace(testProjectID+"-log-sink", nil)
testBucket := bucketIDs.New()
testSinkDestination = "storage.googleapis.com/" + testBucket
var storageClient *storage.Client
diff --git a/vendor/cloud.google.com/go/logging/logging_test.go b/vendor/cloud.google.com/go/logging/logging_test.go
index 66964a28b..e17566d80 100644
--- a/vendor/cloud.google.com/go/logging/logging_test.go
+++ b/vendor/cloud.google.com/go/logging/logging_test.go
@@ -31,6 +31,7 @@ import (
cinternal "cloud.google.com/go/internal"
"cloud.google.com/go/internal/testutil"
+ "cloud.google.com/go/internal/uid"
"cloud.google.com/go/logging"
ltesting "cloud.google.com/go/logging/internal/testing"
"cloud.google.com/go/logging/logadmin"
@@ -46,7 +47,7 @@ import (
const testLogIDPrefix = "GO-LOGGING-CLIENT/TEST-LOG"
-var uids = testutil.NewUIDSpace(testLogIDPrefix)
+var uids = uid.NewSpace(testLogIDPrefix, nil)
var (
client *logging.Client
diff --git a/vendor/cloud.google.com/go/privacy/dlp/apiv2beta2/dlp_client.go b/vendor/cloud.google.com/go/privacy/dlp/apiv2beta2/dlp_client.go
deleted file mode 100644
index 4c3282d68..000000000
--- a/vendor/cloud.google.com/go/privacy/dlp/apiv2beta2/dlp_client.go
+++ /dev/null
@@ -1,681 +0,0 @@
-// Copyright 2018 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// https://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// AUTO-GENERATED CODE. DO NOT EDIT.
-
-package dlp
-
-import (
- "math"
- "time"
-
- "cloud.google.com/go/internal/version"
- gax "github.com/googleapis/gax-go"
- "golang.org/x/net/context"
- "google.golang.org/api/iterator"
- "google.golang.org/api/option"
- "google.golang.org/api/transport"
- dlppb "google.golang.org/genproto/googleapis/privacy/dlp/v2beta2"
- "google.golang.org/grpc"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/metadata"
-)
-
-// CallOptions contains the retry settings for each method of Client.
-type CallOptions struct {
- InspectContent []gax.CallOption
- RedactImage []gax.CallOption
- DeidentifyContent []gax.CallOption
- ReidentifyContent []gax.CallOption
- InspectDataSource []gax.CallOption
- AnalyzeDataSourceRisk []gax.CallOption
- ListInfoTypes []gax.CallOption
- CreateInspectTemplate []gax.CallOption
- UpdateInspectTemplate []gax.CallOption
- GetInspectTemplate []gax.CallOption
- ListInspectTemplates []gax.CallOption
- DeleteInspectTemplate []gax.CallOption
- CreateDeidentifyTemplate []gax.CallOption
- UpdateDeidentifyTemplate []gax.CallOption
- GetDeidentifyTemplate []gax.CallOption
- ListDeidentifyTemplates []gax.CallOption
- DeleteDeidentifyTemplate []gax.CallOption
- ListDlpJobs []gax.CallOption
- GetDlpJob []gax.CallOption
- DeleteDlpJob []gax.CallOption
- CancelDlpJob []gax.CallOption
-}
-
-func defaultClientOptions() []option.ClientOption {
- return []option.ClientOption{
- option.WithEndpoint("dlp.googleapis.com:443"),
- option.WithScopes(DefaultAuthScopes()...),
- }
-}
-
-func defaultCallOptions() *CallOptions {
- retry := map[[2]string][]gax.CallOption{
- {"default", "idempotent"}: {
- gax.WithRetry(func() gax.Retryer {
- return gax.OnCodes([]codes.Code{
- codes.DeadlineExceeded,
- codes.Unavailable,
- }, gax.Backoff{
- Initial: 100 * time.Millisecond,
- Max: 60000 * time.Millisecond,
- Multiplier: 1.3,
- })
- }),
- },
- }
- return &CallOptions{
- InspectContent: retry[[2]string{"default", "idempotent"}],
- RedactImage: retry[[2]string{"default", "idempotent"}],
- DeidentifyContent: retry[[2]string{"default", "idempotent"}],
- ReidentifyContent: retry[[2]string{"default", "idempotent"}],
- InspectDataSource: retry[[2]string{"default", "non_idempotent"}],
- AnalyzeDataSourceRisk: retry[[2]string{"default", "non_idempotent"}],
- ListInfoTypes: retry[[2]string{"default", "idempotent"}],
- CreateInspectTemplate: retry[[2]string{"default", "non_idempotent"}],
- UpdateInspectTemplate: retry[[2]string{"default", "non_idempotent"}],
- GetInspectTemplate: retry[[2]string{"default", "idempotent"}],
- ListInspectTemplates: retry[[2]string{"default", "idempotent"}],
- DeleteInspectTemplate: retry[[2]string{"default", "idempotent"}],
- CreateDeidentifyTemplate: retry[[2]string{"default", "non_idempotent"}],
- UpdateDeidentifyTemplate: retry[[2]string{"default", "non_idempotent"}],
- GetDeidentifyTemplate: retry[[2]string{"default", "idempotent"}],
- ListDeidentifyTemplates: retry[[2]string{"default", "idempotent"}],
- DeleteDeidentifyTemplate: retry[[2]string{"default", "idempotent"}],
- ListDlpJobs: retry[[2]string{"default", "idempotent"}],
- GetDlpJob: retry[[2]string{"default", "idempotent"}],
- DeleteDlpJob: retry[[2]string{"default", "idempotent"}],
- CancelDlpJob: retry[[2]string{"default", "non_idempotent"}],
- }
-}
-
-// Client is a client for interacting with DLP API.
-type Client struct {
- // The connection to the service.
- conn *grpc.ClientConn
-
- // The gRPC API client.
- client dlppb.DlpServiceClient
-
- // The call options for this service.
- CallOptions *CallOptions
-
- // The x-goog-* metadata to be sent with each request.
- xGoogMetadata metadata.MD
-}
-
-// NewClient creates a new dlp service client.
-//
-// The DLP API is a service that allows clients
-// to detect the presence of Personally Identifiable Information (PII) and other
-// privacy-sensitive data in user-supplied, unstructured data streams, like text
-// blocks or images.
-// The service also includes methods for sensitive data redaction and
-// scheduling of data scans on Google Cloud Platform based data sets.
-func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) {
- conn, err := transport.DialGRPC(ctx, append(defaultClientOptions(), opts...)...)
- if err != nil {
- return nil, err
- }
- c := &Client{
- conn: conn,
- CallOptions: defaultCallOptions(),
-
- client: dlppb.NewDlpServiceClient(conn),
- }
- c.setGoogleClientInfo()
- return c, nil
-}
-
-// Connection returns the client's connection to the API service.
-func (c *Client) Connection() *grpc.ClientConn {
- return c.conn
-}
-
-// Close closes the connection to the API service. The user should invoke this when
-// the client is no longer required.
-func (c *Client) Close() error {
- return c.conn.Close()
-}
-
-// setGoogleClientInfo sets the name and version of the application in
-// the `x-goog-api-client` header passed on each request. Intended for
-// use by Google-written clients.
-func (c *Client) setGoogleClientInfo(keyval ...string) {
- kv := append([]string{"gl-go", version.Go()}, keyval...)
- kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
- c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
-}
-
-// InspectContent finds potentially sensitive info in content.
-// This method has limits on input size, processing time, and output size.
-// How-to guide for text (at /dlp/docs/inspecting-text), How-to guide for
-// images (at /dlp/docs/inspecting-images)
-func (c *Client) InspectContent(ctx context.Context, req *dlppb.InspectContentRequest, opts ...gax.CallOption) (*dlppb.InspectContentResponse, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.InspectContent[0:len(c.CallOptions.InspectContent):len(c.CallOptions.InspectContent)], opts...)
- var resp *dlppb.InspectContentResponse
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.InspectContent(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// RedactImage redacts potentially sensitive info from an image.
-// This method has limits on input size, processing time, and output size.
-// How-to guide (at /dlp/docs/redacting-sensitive-data-images)
-func (c *Client) RedactImage(ctx context.Context, req *dlppb.RedactImageRequest, opts ...gax.CallOption) (*dlppb.RedactImageResponse, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.RedactImage[0:len(c.CallOptions.RedactImage):len(c.CallOptions.RedactImage)], opts...)
- var resp *dlppb.RedactImageResponse
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.RedactImage(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// DeidentifyContent de-identifies potentially sensitive info from a ContentItem.
-// This method has limits on input size and output size.
-// How-to guide (at /dlp/docs/deidentify-sensitive-data)
-func (c *Client) DeidentifyContent(ctx context.Context, req *dlppb.DeidentifyContentRequest, opts ...gax.CallOption) (*dlppb.DeidentifyContentResponse, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.DeidentifyContent[0:len(c.CallOptions.DeidentifyContent):len(c.CallOptions.DeidentifyContent)], opts...)
- var resp *dlppb.DeidentifyContentResponse
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.DeidentifyContent(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// ReidentifyContent re-identify content that has been de-identified.
-func (c *Client) ReidentifyContent(ctx context.Context, req *dlppb.ReidentifyContentRequest, opts ...gax.CallOption) (*dlppb.ReidentifyContentResponse, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.ReidentifyContent[0:len(c.CallOptions.ReidentifyContent):len(c.CallOptions.ReidentifyContent)], opts...)
- var resp *dlppb.ReidentifyContentResponse
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.ReidentifyContent(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// InspectDataSource schedules a job scanning content in a Google Cloud Platform data
-// repository. How-to guide (at /dlp/docs/inspecting-storage)
-func (c *Client) InspectDataSource(ctx context.Context, req *dlppb.InspectDataSourceRequest, opts ...gax.CallOption) (*dlppb.DlpJob, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.InspectDataSource[0:len(c.CallOptions.InspectDataSource):len(c.CallOptions.InspectDataSource)], opts...)
- var resp *dlppb.DlpJob
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.InspectDataSource(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// AnalyzeDataSourceRisk schedules a job to compute risk analysis metrics over content in a Google
-// Cloud Platform repository. [How-to guide}(/dlp/docs/compute-risk-analysis)
-func (c *Client) AnalyzeDataSourceRisk(ctx context.Context, req *dlppb.AnalyzeDataSourceRiskRequest, opts ...gax.CallOption) (*dlppb.DlpJob, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.AnalyzeDataSourceRisk[0:len(c.CallOptions.AnalyzeDataSourceRisk):len(c.CallOptions.AnalyzeDataSourceRisk)], opts...)
- var resp *dlppb.DlpJob
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.AnalyzeDataSourceRisk(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// ListInfoTypes returns sensitive information types DLP supports.
-func (c *Client) ListInfoTypes(ctx context.Context, req *dlppb.ListInfoTypesRequest, opts ...gax.CallOption) (*dlppb.ListInfoTypesResponse, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.ListInfoTypes[0:len(c.CallOptions.ListInfoTypes):len(c.CallOptions.ListInfoTypes)], opts...)
- var resp *dlppb.ListInfoTypesResponse
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.ListInfoTypes(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// CreateInspectTemplate creates an inspect template for re-using frequently used configuration
-// for inspecting content, images, and storage.
-func (c *Client) CreateInspectTemplate(ctx context.Context, req *dlppb.CreateInspectTemplateRequest, opts ...gax.CallOption) (*dlppb.InspectTemplate, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.CreateInspectTemplate[0:len(c.CallOptions.CreateInspectTemplate):len(c.CallOptions.CreateInspectTemplate)], opts...)
- var resp *dlppb.InspectTemplate
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.CreateInspectTemplate(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// UpdateInspectTemplate updates the inspect template.
-func (c *Client) UpdateInspectTemplate(ctx context.Context, req *dlppb.UpdateInspectTemplateRequest, opts ...gax.CallOption) (*dlppb.InspectTemplate, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.UpdateInspectTemplate[0:len(c.CallOptions.UpdateInspectTemplate):len(c.CallOptions.UpdateInspectTemplate)], opts...)
- var resp *dlppb.InspectTemplate
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.UpdateInspectTemplate(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// GetInspectTemplate gets an inspect template.
-func (c *Client) GetInspectTemplate(ctx context.Context, req *dlppb.GetInspectTemplateRequest, opts ...gax.CallOption) (*dlppb.InspectTemplate, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.GetInspectTemplate[0:len(c.CallOptions.GetInspectTemplate):len(c.CallOptions.GetInspectTemplate)], opts...)
- var resp *dlppb.InspectTemplate
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.GetInspectTemplate(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// ListInspectTemplates lists inspect templates.
-func (c *Client) ListInspectTemplates(ctx context.Context, req *dlppb.ListInspectTemplatesRequest, opts ...gax.CallOption) *InspectTemplateIterator {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.ListInspectTemplates[0:len(c.CallOptions.ListInspectTemplates):len(c.CallOptions.ListInspectTemplates)], opts...)
- it := &InspectTemplateIterator{}
- it.InternalFetch = func(pageSize int, pageToken string) ([]*dlppb.InspectTemplate, string, error) {
- var resp *dlppb.ListInspectTemplatesResponse
- req.PageToken = pageToken
- if pageSize > math.MaxInt32 {
- req.PageSize = math.MaxInt32
- } else {
- req.PageSize = int32(pageSize)
- }
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.ListInspectTemplates(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, "", err
- }
- return resp.InspectTemplates, resp.NextPageToken, nil
- }
- fetch := func(pageSize int, pageToken string) (string, error) {
- items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
- if err != nil {
- return "", err
- }
- it.items = append(it.items, items...)
- return nextPageToken, nil
- }
- it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
- return it
-}
-
-// DeleteInspectTemplate deletes inspect templates.
-func (c *Client) DeleteInspectTemplate(ctx context.Context, req *dlppb.DeleteInspectTemplateRequest, opts ...gax.CallOption) error {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.DeleteInspectTemplate[0:len(c.CallOptions.DeleteInspectTemplate):len(c.CallOptions.DeleteInspectTemplate)], opts...)
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- _, err = c.client.DeleteInspectTemplate(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- return err
-}
-
-// CreateDeidentifyTemplate creates an Deidentify template for re-using frequently used configuration
-// for Deidentifying content, images, and storage.
-func (c *Client) CreateDeidentifyTemplate(ctx context.Context, req *dlppb.CreateDeidentifyTemplateRequest, opts ...gax.CallOption) (*dlppb.DeidentifyTemplate, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.CreateDeidentifyTemplate[0:len(c.CallOptions.CreateDeidentifyTemplate):len(c.CallOptions.CreateDeidentifyTemplate)], opts...)
- var resp *dlppb.DeidentifyTemplate
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.CreateDeidentifyTemplate(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// UpdateDeidentifyTemplate updates the inspect template.
-func (c *Client) UpdateDeidentifyTemplate(ctx context.Context, req *dlppb.UpdateDeidentifyTemplateRequest, opts ...gax.CallOption) (*dlppb.DeidentifyTemplate, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.UpdateDeidentifyTemplate[0:len(c.CallOptions.UpdateDeidentifyTemplate):len(c.CallOptions.UpdateDeidentifyTemplate)], opts...)
- var resp *dlppb.DeidentifyTemplate
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.UpdateDeidentifyTemplate(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// GetDeidentifyTemplate gets an inspect template.
-func (c *Client) GetDeidentifyTemplate(ctx context.Context, req *dlppb.GetDeidentifyTemplateRequest, opts ...gax.CallOption) (*dlppb.DeidentifyTemplate, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.GetDeidentifyTemplate[0:len(c.CallOptions.GetDeidentifyTemplate):len(c.CallOptions.GetDeidentifyTemplate)], opts...)
- var resp *dlppb.DeidentifyTemplate
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.GetDeidentifyTemplate(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// ListDeidentifyTemplates lists inspect templates.
-func (c *Client) ListDeidentifyTemplates(ctx context.Context, req *dlppb.ListDeidentifyTemplatesRequest, opts ...gax.CallOption) *DeidentifyTemplateIterator {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.ListDeidentifyTemplates[0:len(c.CallOptions.ListDeidentifyTemplates):len(c.CallOptions.ListDeidentifyTemplates)], opts...)
- it := &DeidentifyTemplateIterator{}
- it.InternalFetch = func(pageSize int, pageToken string) ([]*dlppb.DeidentifyTemplate, string, error) {
- var resp *dlppb.ListDeidentifyTemplatesResponse
- req.PageToken = pageToken
- if pageSize > math.MaxInt32 {
- req.PageSize = math.MaxInt32
- } else {
- req.PageSize = int32(pageSize)
- }
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.ListDeidentifyTemplates(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, "", err
- }
- return resp.DeidentifyTemplates, resp.NextPageToken, nil
- }
- fetch := func(pageSize int, pageToken string) (string, error) {
- items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
- if err != nil {
- return "", err
- }
- it.items = append(it.items, items...)
- return nextPageToken, nil
- }
- it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
- return it
-}
-
-// DeleteDeidentifyTemplate deletes inspect templates.
-func (c *Client) DeleteDeidentifyTemplate(ctx context.Context, req *dlppb.DeleteDeidentifyTemplateRequest, opts ...gax.CallOption) error {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.DeleteDeidentifyTemplate[0:len(c.CallOptions.DeleteDeidentifyTemplate):len(c.CallOptions.DeleteDeidentifyTemplate)], opts...)
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- _, err = c.client.DeleteDeidentifyTemplate(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- return err
-}
-
-// ListDlpJobs lists DlpJobs that match the specified filter in the request.
-func (c *Client) ListDlpJobs(ctx context.Context, req *dlppb.ListDlpJobsRequest, opts ...gax.CallOption) *DlpJobIterator {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.ListDlpJobs[0:len(c.CallOptions.ListDlpJobs):len(c.CallOptions.ListDlpJobs)], opts...)
- it := &DlpJobIterator{}
- it.InternalFetch = func(pageSize int, pageToken string) ([]*dlppb.DlpJob, string, error) {
- var resp *dlppb.ListDlpJobsResponse
- req.PageToken = pageToken
- if pageSize > math.MaxInt32 {
- req.PageSize = math.MaxInt32
- } else {
- req.PageSize = int32(pageSize)
- }
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.ListDlpJobs(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, "", err
- }
- return resp.Jobs, resp.NextPageToken, nil
- }
- fetch := func(pageSize int, pageToken string) (string, error) {
- items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
- if err != nil {
- return "", err
- }
- it.items = append(it.items, items...)
- return nextPageToken, nil
- }
- it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
- return it
-}
-
-// GetDlpJob gets the latest state of a long-running DlpJob.
-func (c *Client) GetDlpJob(ctx context.Context, req *dlppb.GetDlpJobRequest, opts ...gax.CallOption) (*dlppb.DlpJob, error) {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.GetDlpJob[0:len(c.CallOptions.GetDlpJob):len(c.CallOptions.GetDlpJob)], opts...)
- var resp *dlppb.DlpJob
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.client.GetDlpJob(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-// DeleteDlpJob deletes a long-running DlpJob. This method indicates that the client is
-// no longer interested in the DlpJob result. The job will be cancelled if
-// possible.
-func (c *Client) DeleteDlpJob(ctx context.Context, req *dlppb.DeleteDlpJobRequest, opts ...gax.CallOption) error {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.DeleteDlpJob[0:len(c.CallOptions.DeleteDlpJob):len(c.CallOptions.DeleteDlpJob)], opts...)
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- _, err = c.client.DeleteDlpJob(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- return err
-}
-
-// CancelDlpJob starts asynchronous cancellation on a long-running DlpJob. The server
-// makes a best effort to cancel the DlpJob, but success is not
-// guaranteed.
-func (c *Client) CancelDlpJob(ctx context.Context, req *dlppb.CancelDlpJobRequest, opts ...gax.CallOption) error {
- ctx = insertMetadata(ctx, c.xGoogMetadata)
- opts = append(c.CallOptions.CancelDlpJob[0:len(c.CallOptions.CancelDlpJob):len(c.CallOptions.CancelDlpJob)], opts...)
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- _, err = c.client.CancelDlpJob(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- return err
-}
-
-// DeidentifyTemplateIterator manages a stream of *dlppb.DeidentifyTemplate.
-type DeidentifyTemplateIterator struct {
- items []*dlppb.DeidentifyTemplate
- pageInfo *iterator.PageInfo
- nextFunc func() error
-
- // InternalFetch is for use by the Google Cloud Libraries only.
- // It is not part of the stable interface of this package.
- //
- // InternalFetch returns results from a single call to the underlying RPC.
- // The number of results is no greater than pageSize.
- // If there are no more results, nextPageToken is empty and err is nil.
- InternalFetch func(pageSize int, pageToken string) (results []*dlppb.DeidentifyTemplate, nextPageToken string, err error)
-}
-
-// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
-func (it *DeidentifyTemplateIterator) PageInfo() *iterator.PageInfo {
- return it.pageInfo
-}
-
-// Next returns the next result. Its second return value is iterator.Done if there are no more
-// results. Once Next returns Done, all subsequent calls will return Done.
-func (it *DeidentifyTemplateIterator) Next() (*dlppb.DeidentifyTemplate, error) {
- var item *dlppb.DeidentifyTemplate
- if err := it.nextFunc(); err != nil {
- return item, err
- }
- item = it.items[0]
- it.items = it.items[1:]
- return item, nil
-}
-
-func (it *DeidentifyTemplateIterator) bufLen() int {
- return len(it.items)
-}
-
-func (it *DeidentifyTemplateIterator) takeBuf() interface{} {
- b := it.items
- it.items = nil
- return b
-}
-
-// DlpJobIterator manages a stream of *dlppb.DlpJob.
-type DlpJobIterator struct {
- items []*dlppb.DlpJob
- pageInfo *iterator.PageInfo
- nextFunc func() error
-
- // InternalFetch is for use by the Google Cloud Libraries only.
- // It is not part of the stable interface of this package.
- //
- // InternalFetch returns results from a single call to the underlying RPC.
- // The number of results is no greater than pageSize.
- // If there are no more results, nextPageToken is empty and err is nil.
- InternalFetch func(pageSize int, pageToken string) (results []*dlppb.DlpJob, nextPageToken string, err error)
-}
-
-// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
-func (it *DlpJobIterator) PageInfo() *iterator.PageInfo {
- return it.pageInfo
-}
-
-// Next returns the next result. Its second return value is iterator.Done if there are no more
-// results. Once Next returns Done, all subsequent calls will return Done.
-func (it *DlpJobIterator) Next() (*dlppb.DlpJob, error) {
- var item *dlppb.DlpJob
- if err := it.nextFunc(); err != nil {
- return item, err
- }
- item = it.items[0]
- it.items = it.items[1:]
- return item, nil
-}
-
-func (it *DlpJobIterator) bufLen() int {
- return len(it.items)
-}
-
-func (it *DlpJobIterator) takeBuf() interface{} {
- b := it.items
- it.items = nil
- return b
-}
-
-// InspectTemplateIterator manages a stream of *dlppb.InspectTemplate.
-type InspectTemplateIterator struct {
- items []*dlppb.InspectTemplate
- pageInfo *iterator.PageInfo
- nextFunc func() error
-
- // InternalFetch is for use by the Google Cloud Libraries only.
- // It is not part of the stable interface of this package.
- //
- // InternalFetch returns results from a single call to the underlying RPC.
- // The number of results is no greater than pageSize.
- // If there are no more results, nextPageToken is empty and err is nil.
- InternalFetch func(pageSize int, pageToken string) (results []*dlppb.InspectTemplate, nextPageToken string, err error)
-}
-
-// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
-func (it *InspectTemplateIterator) PageInfo() *iterator.PageInfo {
- return it.pageInfo
-}
-
-// Next returns the next result. Its second return value is iterator.Done if there are no more
-// results. Once Next returns Done, all subsequent calls will return Done.
-func (it *InspectTemplateIterator) Next() (*dlppb.InspectTemplate, error) {
- var item *dlppb.InspectTemplate
- if err := it.nextFunc(); err != nil {
- return item, err
- }
- item = it.items[0]
- it.items = it.items[1:]
- return item, nil
-}
-
-func (it *InspectTemplateIterator) bufLen() int {
- return len(it.items)
-}
-
-func (it *InspectTemplateIterator) takeBuf() interface{} {
- b := it.items
- it.items = nil
- return b
-}
diff --git a/vendor/cloud.google.com/go/privacy/dlp/apiv2beta2/mock_test.go b/vendor/cloud.google.com/go/privacy/dlp/apiv2beta2/mock_test.go
deleted file mode 100644
index 64517378a..000000000
--- a/vendor/cloud.google.com/go/privacy/dlp/apiv2beta2/mock_test.go
+++ /dev/null
@@ -1,1596 +0,0 @@
-// Copyright 2018 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// https://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// AUTO-GENERATED CODE. DO NOT EDIT.
-
-package dlp
-
-import (
- emptypb "github.com/golang/protobuf/ptypes/empty"
- dlppb "google.golang.org/genproto/googleapis/privacy/dlp/v2beta2"
-)
-
-import (
- "flag"
- "fmt"
- "io"
- "log"
- "net"
- "os"
- "strings"
- "testing"
-
- "github.com/golang/protobuf/proto"
- "github.com/golang/protobuf/ptypes"
- "golang.org/x/net/context"
- "google.golang.org/api/option"
- status "google.golang.org/genproto/googleapis/rpc/status"
- "google.golang.org/grpc"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/metadata"
- gstatus "google.golang.org/grpc/status"
-)
-
-var _ = io.EOF
-var _ = ptypes.MarshalAny
-var _ status.Status
-
-type mockDlpServer struct {
- // Embed for forward compatibility.
- // Tests will keep working if more methods are added
- // in the future.
- dlppb.DlpServiceServer
-
- reqs []proto.Message
-
- // If set, all calls return this error.
- err error
-
- // responses to return if err == nil
- resps []proto.Message
-}
-
-func (s *mockDlpServer) InspectContent(ctx context.Context, req *dlppb.InspectContentRequest) (*dlppb.InspectContentResponse, 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].(*dlppb.InspectContentResponse), nil
-}
-
-func (s *mockDlpServer) RedactImage(ctx context.Context, req *dlppb.RedactImageRequest) (*dlppb.RedactImageResponse, 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].(*dlppb.RedactImageResponse), nil
-}
-
-func (s *mockDlpServer) DeidentifyContent(ctx context.Context, req *dlppb.DeidentifyContentRequest) (*dlppb.DeidentifyContentResponse, 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].(*dlppb.DeidentifyContentResponse), nil
-}
-
-func (s *mockDlpServer) ReidentifyContent(ctx context.Context, req *dlppb.ReidentifyContentRequest) (*dlppb.ReidentifyContentResponse, 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].(*dlppb.ReidentifyContentResponse), nil
-}
-
-func (s *mockDlpServer) InspectDataSource(ctx context.Context, req *dlppb.InspectDataSourceRequest) (*dlppb.DlpJob, 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].(*dlppb.DlpJob), nil
-}
-
-func (s *mockDlpServer) AnalyzeDataSourceRisk(ctx context.Context, req *dlppb.AnalyzeDataSourceRiskRequest) (*dlppb.DlpJob, 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].(*dlppb.DlpJob), nil
-}
-
-func (s *mockDlpServer) ListInfoTypes(ctx context.Context, req *dlppb.ListInfoTypesRequest) (*dlppb.ListInfoTypesResponse, 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].(*dlppb.ListInfoTypesResponse), nil
-}
-
-func (s *mockDlpServer) CreateInspectTemplate(ctx context.Context, req *dlppb.CreateInspectTemplateRequest) (*dlppb.InspectTemplate, 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].(*dlppb.InspectTemplate), nil
-}
-
-func (s *mockDlpServer) UpdateInspectTemplate(ctx context.Context, req *dlppb.UpdateInspectTemplateRequest) (*dlppb.InspectTemplate, 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].(*dlppb.InspectTemplate), nil
-}
-
-func (s *mockDlpServer) GetInspectTemplate(ctx context.Context, req *dlppb.GetInspectTemplateRequest) (*dlppb.InspectTemplate, 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].(*dlppb.InspectTemplate), nil
-}
-
-func (s *mockDlpServer) ListInspectTemplates(ctx context.Context, req *dlppb.ListInspectTemplatesRequest) (*dlppb.ListInspectTemplatesResponse, 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].(*dlppb.ListInspectTemplatesResponse), nil
-}
-
-func (s *mockDlpServer) DeleteInspectTemplate(ctx context.Context, req *dlppb.DeleteInspectTemplateRequest) (*emptypb.Empty, error) {
- md, _ := metadata.FromIncomingContext(ctx)
- if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
- return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
- }
- s.reqs = append(s.reqs, req)
- if s.err != nil {
- return nil, s.err
- }
- return s.resps[0].(*emptypb.Empty), nil
-}
-
-func (s *mockDlpServer) CreateDeidentifyTemplate(ctx context.Context, req *dlppb.CreateDeidentifyTemplateRequest) (*dlppb.DeidentifyTemplate, 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].(*dlppb.DeidentifyTemplate), nil
-}
-
-func (s *mockDlpServer) UpdateDeidentifyTemplate(ctx context.Context, req *dlppb.UpdateDeidentifyTemplateRequest) (*dlppb.DeidentifyTemplate, 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].(*dlppb.DeidentifyTemplate), nil
-}
-
-func (s *mockDlpServer) GetDeidentifyTemplate(ctx context.Context, req *dlppb.GetDeidentifyTemplateRequest) (*dlppb.DeidentifyTemplate, 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].(*dlppb.DeidentifyTemplate), nil
-}
-
-func (s *mockDlpServer) ListDeidentifyTemplates(ctx context.Context, req *dlppb.ListDeidentifyTemplatesRequest) (*dlppb.ListDeidentifyTemplatesResponse, 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].(*dlppb.ListDeidentifyTemplatesResponse), nil
-}
-
-func (s *mockDlpServer) DeleteDeidentifyTemplate(ctx context.Context, req *dlppb.DeleteDeidentifyTemplateRequest) (*emptypb.Empty, error) {
- md, _ := metadata.FromIncomingContext(ctx)
- if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
- return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
- }
- s.reqs = append(s.reqs, req)
- if s.err != nil {
- return nil, s.err
- }
- return s.resps[0].(*emptypb.Empty), nil
-}
-
-func (s *mockDlpServer) ListDlpJobs(ctx context.Context, req *dlppb.ListDlpJobsRequest) (*dlppb.ListDlpJobsResponse, 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].(*dlppb.ListDlpJobsResponse), nil
-}
-
-func (s *mockDlpServer) GetDlpJob(ctx context.Context, req *dlppb.GetDlpJobRequest) (*dlppb.DlpJob, 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].(*dlppb.DlpJob), nil
-}
-
-func (s *mockDlpServer) DeleteDlpJob(ctx context.Context, req *dlppb.DeleteDlpJobRequest) (*emptypb.Empty, error) {
- md, _ := metadata.FromIncomingContext(ctx)
- if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
- return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
- }
- s.reqs = append(s.reqs, req)
- if s.err != nil {
- return nil, s.err
- }
- return s.resps[0].(*emptypb.Empty), nil
-}
-
-func (s *mockDlpServer) CancelDlpJob(ctx context.Context, req *dlppb.CancelDlpJobRequest) (*emptypb.Empty, error) {
- md, _ := metadata.FromIncomingContext(ctx)
- if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
- return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
- }
- s.reqs = append(s.reqs, req)
- if s.err != nil {
- return nil, s.err
- }
- return s.resps[0].(*emptypb.Empty), nil
-}
-
-// clientOpt is the option tests should use to connect to the test server.
-// It is initialized by TestMain.
-var clientOpt option.ClientOption
-
-var (
- mockDlp mockDlpServer
-)
-
-func TestMain(m *testing.M) {
- flag.Parse()
-
- serv := grpc.NewServer()
- dlppb.RegisterDlpServiceServer(serv, &mockDlp)
-
- lis, err := net.Listen("tcp", "localhost:0")
- if err != nil {
- log.Fatal(err)
- }
- go serv.Serve(lis)
-
- conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure())
- if err != nil {
- log.Fatal(err)
- }
- clientOpt = option.WithGRPCConn(conn)
-
- os.Exit(m.Run())
-}
-
-func TestDlpServiceInspectContent(t *testing.T) {
- var expectedResponse *dlppb.InspectContentResponse = &dlppb.InspectContentResponse{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.InspectContentRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.InspectContent(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceInspectContentError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.InspectContentRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.InspectContent(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 TestDlpServiceRedactImage(t *testing.T) {
- var redactedImage []byte = []byte("28")
- var extractedText string = "extractedText998260012"
- var expectedResponse = &dlppb.RedactImageResponse{
- RedactedImage: redactedImage,
- ExtractedText: extractedText,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.RedactImageRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.RedactImage(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceRedactImageError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.RedactImageRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.RedactImage(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 TestDlpServiceDeidentifyContent(t *testing.T) {
- var expectedResponse *dlppb.DeidentifyContentResponse = &dlppb.DeidentifyContentResponse{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.DeidentifyContentRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.DeidentifyContent(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceDeidentifyContentError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.DeidentifyContentRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.DeidentifyContent(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 TestDlpServiceReidentifyContent(t *testing.T) {
- var expectedResponse *dlppb.ReidentifyContentResponse = &dlppb.ReidentifyContentResponse{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.ReidentifyContentRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ReidentifyContent(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceReidentifyContentError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.ReidentifyContentRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ReidentifyContent(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 TestDlpServiceInspectDataSource(t *testing.T) {
- var name string = "name3373707"
- var expectedResponse = &dlppb.DlpJob{
- Name: name,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.InspectDataSourceRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.InspectDataSource(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceInspectDataSourceError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.InspectDataSourceRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.InspectDataSource(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 TestDlpServiceAnalyzeDataSourceRisk(t *testing.T) {
- var name string = "name3373707"
- var expectedResponse = &dlppb.DlpJob{
- Name: name,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.AnalyzeDataSourceRiskRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.AnalyzeDataSourceRisk(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceAnalyzeDataSourceRiskError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.AnalyzeDataSourceRiskRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.AnalyzeDataSourceRisk(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 TestDlpServiceListInfoTypes(t *testing.T) {
- var expectedResponse *dlppb.ListInfoTypesResponse = &dlppb.ListInfoTypesResponse{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var request *dlppb.ListInfoTypesRequest = &dlppb.ListInfoTypesRequest{}
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListInfoTypes(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceListInfoTypesError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var request *dlppb.ListInfoTypesRequest = &dlppb.ListInfoTypesRequest{}
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListInfoTypes(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 TestDlpServiceCreateInspectTemplate(t *testing.T) {
- var name string = "name3373707"
- var displayName string = "displayName1615086568"
- var description string = "description-1724546052"
- var expectedResponse = &dlppb.InspectTemplate{
- Name: name,
- DisplayName: displayName,
- Description: description,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedParent string = fmt.Sprintf("organizations/%s", "[ORGANIZATION]")
- var request = &dlppb.CreateInspectTemplateRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.CreateInspectTemplate(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceCreateInspectTemplateError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedParent string = fmt.Sprintf("organizations/%s", "[ORGANIZATION]")
- var request = &dlppb.CreateInspectTemplateRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.CreateInspectTemplate(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 TestDlpServiceUpdateInspectTemplate(t *testing.T) {
- var name2 string = "name2-1052831874"
- var displayName string = "displayName1615086568"
- var description string = "description-1724546052"
- var expectedResponse = &dlppb.InspectTemplate{
- Name: name2,
- DisplayName: displayName,
- Description: description,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedName string = fmt.Sprintf("organizations/%s/inspectTemplates/%s", "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
- var request = &dlppb.UpdateInspectTemplateRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.UpdateInspectTemplate(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceUpdateInspectTemplateError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedName string = fmt.Sprintf("organizations/%s/inspectTemplates/%s", "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
- var request = &dlppb.UpdateInspectTemplateRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.UpdateInspectTemplate(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 TestDlpServiceGetInspectTemplate(t *testing.T) {
- var name string = "name3373707"
- var displayName string = "displayName1615086568"
- var description string = "description-1724546052"
- var expectedResponse = &dlppb.InspectTemplate{
- Name: name,
- DisplayName: displayName,
- Description: description,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var request *dlppb.GetInspectTemplateRequest = &dlppb.GetInspectTemplateRequest{}
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.GetInspectTemplate(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceGetInspectTemplateError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var request *dlppb.GetInspectTemplateRequest = &dlppb.GetInspectTemplateRequest{}
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.GetInspectTemplate(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 TestDlpServiceListInspectTemplates(t *testing.T) {
- var nextPageToken string = ""
- var inspectTemplatesElement *dlppb.InspectTemplate = &dlppb.InspectTemplate{}
- var inspectTemplates = []*dlppb.InspectTemplate{inspectTemplatesElement}
- var expectedResponse = &dlppb.ListInspectTemplatesResponse{
- NextPageToken: nextPageToken,
- InspectTemplates: inspectTemplates,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedParent string = fmt.Sprintf("organizations/%s", "[ORGANIZATION]")
- var request = &dlppb.ListInspectTemplatesRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListInspectTemplates(context.Background(), request).Next()
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.reqs[0]; !proto.Equal(want, got) {
- t.Errorf("wrong request %q, want %q", got, want)
- }
-
- want := (interface{})(expectedResponse.InspectTemplates[0])
- got := (interface{})(resp)
- var ok bool
-
- switch want := (want).(type) {
- case proto.Message:
- ok = proto.Equal(want, got.(proto.Message))
- default:
- ok = want == got
- }
- if !ok {
- t.Errorf("wrong response %q, want %q)", got, want)
- }
-}
-
-func TestDlpServiceListInspectTemplatesError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedParent string = fmt.Sprintf("organizations/%s", "[ORGANIZATION]")
- var request = &dlppb.ListInspectTemplatesRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListInspectTemplates(context.Background(), request).Next()
-
- 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 TestDlpServiceDeleteInspectTemplate(t *testing.T) {
- var expectedResponse *emptypb.Empty = &emptypb.Empty{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedName string = fmt.Sprintf("organizations/%s/inspectTemplates/%s", "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
- var request = &dlppb.DeleteInspectTemplateRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- err = c.DeleteInspectTemplate(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.reqs[0]; !proto.Equal(want, got) {
- t.Errorf("wrong request %q, want %q", got, want)
- }
-
-}
-
-func TestDlpServiceDeleteInspectTemplateError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedName string = fmt.Sprintf("organizations/%s/inspectTemplates/%s", "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
- var request = &dlppb.DeleteInspectTemplateRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- err = c.DeleteInspectTemplate(context.Background(), request)
-
- if st, ok := gstatus.FromError(err); !ok {
- t.Errorf("got error %v, expected grpc error", err)
- } else if c := st.Code(); c != errCode {
- t.Errorf("got error code %q, want %q", c, errCode)
- }
-}
-func TestDlpServiceCreateDeidentifyTemplate(t *testing.T) {
- var name string = "name3373707"
- var displayName string = "displayName1615086568"
- var description string = "description-1724546052"
- var expectedResponse = &dlppb.DeidentifyTemplate{
- Name: name,
- DisplayName: displayName,
- Description: description,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedParent string = fmt.Sprintf("organizations/%s", "[ORGANIZATION]")
- var request = &dlppb.CreateDeidentifyTemplateRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.CreateDeidentifyTemplate(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceCreateDeidentifyTemplateError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedParent string = fmt.Sprintf("organizations/%s", "[ORGANIZATION]")
- var request = &dlppb.CreateDeidentifyTemplateRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.CreateDeidentifyTemplate(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 TestDlpServiceUpdateDeidentifyTemplate(t *testing.T) {
- var name2 string = "name2-1052831874"
- var displayName string = "displayName1615086568"
- var description string = "description-1724546052"
- var expectedResponse = &dlppb.DeidentifyTemplate{
- Name: name2,
- DisplayName: displayName,
- Description: description,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedName string = fmt.Sprintf("organizations/%s/deidentifyTemplates/%s", "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
- var request = &dlppb.UpdateDeidentifyTemplateRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.UpdateDeidentifyTemplate(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceUpdateDeidentifyTemplateError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedName string = fmt.Sprintf("organizations/%s/deidentifyTemplates/%s", "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
- var request = &dlppb.UpdateDeidentifyTemplateRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.UpdateDeidentifyTemplate(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 TestDlpServiceGetDeidentifyTemplate(t *testing.T) {
- var name2 string = "name2-1052831874"
- var displayName string = "displayName1615086568"
- var description string = "description-1724546052"
- var expectedResponse = &dlppb.DeidentifyTemplate{
- Name: name2,
- DisplayName: displayName,
- Description: description,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedName string = fmt.Sprintf("organizations/%s/deidentifyTemplates/%s", "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
- var request = &dlppb.GetDeidentifyTemplateRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.GetDeidentifyTemplate(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceGetDeidentifyTemplateError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedName string = fmt.Sprintf("organizations/%s/deidentifyTemplates/%s", "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
- var request = &dlppb.GetDeidentifyTemplateRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.GetDeidentifyTemplate(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 TestDlpServiceListDeidentifyTemplates(t *testing.T) {
- var nextPageToken string = ""
- var deidentifyTemplatesElement *dlppb.DeidentifyTemplate = &dlppb.DeidentifyTemplate{}
- var deidentifyTemplates = []*dlppb.DeidentifyTemplate{deidentifyTemplatesElement}
- var expectedResponse = &dlppb.ListDeidentifyTemplatesResponse{
- NextPageToken: nextPageToken,
- DeidentifyTemplates: deidentifyTemplates,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedParent string = fmt.Sprintf("organizations/%s", "[ORGANIZATION]")
- var request = &dlppb.ListDeidentifyTemplatesRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListDeidentifyTemplates(context.Background(), request).Next()
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.reqs[0]; !proto.Equal(want, got) {
- t.Errorf("wrong request %q, want %q", got, want)
- }
-
- want := (interface{})(expectedResponse.DeidentifyTemplates[0])
- got := (interface{})(resp)
- var ok bool
-
- switch want := (want).(type) {
- case proto.Message:
- ok = proto.Equal(want, got.(proto.Message))
- default:
- ok = want == got
- }
- if !ok {
- t.Errorf("wrong response %q, want %q)", got, want)
- }
-}
-
-func TestDlpServiceListDeidentifyTemplatesError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedParent string = fmt.Sprintf("organizations/%s", "[ORGANIZATION]")
- var request = &dlppb.ListDeidentifyTemplatesRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListDeidentifyTemplates(context.Background(), request).Next()
-
- 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 TestDlpServiceDeleteDeidentifyTemplate(t *testing.T) {
- var expectedResponse *emptypb.Empty = &emptypb.Empty{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedName string = fmt.Sprintf("organizations/%s/deidentifyTemplates/%s", "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
- var request = &dlppb.DeleteDeidentifyTemplateRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- err = c.DeleteDeidentifyTemplate(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.reqs[0]; !proto.Equal(want, got) {
- t.Errorf("wrong request %q, want %q", got, want)
- }
-
-}
-
-func TestDlpServiceDeleteDeidentifyTemplateError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedName string = fmt.Sprintf("organizations/%s/deidentifyTemplates/%s", "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
- var request = &dlppb.DeleteDeidentifyTemplateRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- err = c.DeleteDeidentifyTemplate(context.Background(), request)
-
- if st, ok := gstatus.FromError(err); !ok {
- t.Errorf("got error %v, expected grpc error", err)
- } else if c := st.Code(); c != errCode {
- t.Errorf("got error code %q, want %q", c, errCode)
- }
-}
-func TestDlpServiceListDlpJobs(t *testing.T) {
- var nextPageToken string = ""
- var jobsElement *dlppb.DlpJob = &dlppb.DlpJob{}
- var jobs = []*dlppb.DlpJob{jobsElement}
- var expectedResponse = &dlppb.ListDlpJobsResponse{
- NextPageToken: nextPageToken,
- Jobs: jobs,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.ListDlpJobsRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListDlpJobs(context.Background(), request).Next()
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.reqs[0]; !proto.Equal(want, got) {
- t.Errorf("wrong request %q, want %q", got, want)
- }
-
- want := (interface{})(expectedResponse.Jobs[0])
- got := (interface{})(resp)
- var ok bool
-
- switch want := (want).(type) {
- case proto.Message:
- ok = proto.Equal(want, got.(proto.Message))
- default:
- ok = want == got
- }
- if !ok {
- t.Errorf("wrong response %q, want %q)", got, want)
- }
-}
-
-func TestDlpServiceListDlpJobsError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]")
- var request = &dlppb.ListDlpJobsRequest{
- Parent: formattedParent,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListDlpJobs(context.Background(), request).Next()
-
- 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 TestDlpServiceGetDlpJob(t *testing.T) {
- var name2 string = "name2-1052831874"
- var expectedResponse = &dlppb.DlpJob{
- Name: name2,
- }
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedName string = fmt.Sprintf("projects/%s/dlpJobs/%s", "[PROJECT]", "[DLP_JOB]")
- var request = &dlppb.GetDlpJobRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.GetDlpJob(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.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 TestDlpServiceGetDlpJobError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedName string = fmt.Sprintf("projects/%s/dlpJobs/%s", "[PROJECT]", "[DLP_JOB]")
- var request = &dlppb.GetDlpJobRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.GetDlpJob(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 TestDlpServiceDeleteDlpJob(t *testing.T) {
- var expectedResponse *emptypb.Empty = &emptypb.Empty{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedName string = fmt.Sprintf("projects/%s/dlpJobs/%s", "[PROJECT]", "[DLP_JOB]")
- var request = &dlppb.DeleteDlpJobRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- err = c.DeleteDlpJob(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.reqs[0]; !proto.Equal(want, got) {
- t.Errorf("wrong request %q, want %q", got, want)
- }
-
-}
-
-func TestDlpServiceDeleteDlpJobError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedName string = fmt.Sprintf("projects/%s/dlpJobs/%s", "[PROJECT]", "[DLP_JOB]")
- var request = &dlppb.DeleteDlpJobRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- err = c.DeleteDlpJob(context.Background(), request)
-
- if st, ok := gstatus.FromError(err); !ok {
- t.Errorf("got error %v, expected grpc error", err)
- } else if c := st.Code(); c != errCode {
- t.Errorf("got error code %q, want %q", c, errCode)
- }
-}
-func TestDlpServiceCancelDlpJob(t *testing.T) {
- var expectedResponse *emptypb.Empty = &emptypb.Empty{}
-
- mockDlp.err = nil
- mockDlp.reqs = nil
-
- mockDlp.resps = append(mockDlp.resps[:0], expectedResponse)
-
- var formattedName string = fmt.Sprintf("projects/%s/dlpJobs/%s", "[PROJECT]", "[DLP_JOB]")
- var request = &dlppb.CancelDlpJobRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- err = c.CancelDlpJob(context.Background(), request)
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDlp.reqs[0]; !proto.Equal(want, got) {
- t.Errorf("wrong request %q, want %q", got, want)
- }
-
-}
-
-func TestDlpServiceCancelDlpJobError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDlp.err = gstatus.Error(errCode, "test error")
-
- var formattedName string = fmt.Sprintf("projects/%s/dlpJobs/%s", "[PROJECT]", "[DLP_JOB]")
- var request = &dlppb.CancelDlpJobRequest{
- Name: formattedName,
- }
-
- c, err := NewClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- err = c.CancelDlpJob(context.Background(), request)
-
- if st, ok := gstatus.FromError(err); !ok {
- t.Errorf("got error %v, expected grpc error", err)
- } else if c := st.Code(); c != errCode {
- t.Errorf("got error code %q, want %q", c, errCode)
- }
-}
diff --git a/vendor/cloud.google.com/go/profiler/integration-test.sh b/vendor/cloud.google.com/go/profiler/integration-test.sh
index 15772d497..f5f3f330b 100644
--- a/vendor/cloud.google.com/go/profiler/integration-test.sh
+++ b/vendor/cloud.google.com/go/profiler/integration-test.sh
@@ -28,7 +28,7 @@ set -x
export GOOGLE_APPLICATION_CREDENTIALS="$(pwd)/key.json"
export GCLOUD_TESTS_GOLANG_PROJECT_ID="dulcet-port-762"
-export GCLOUD_TESTS_GOLANG_ZONE="us-west1-a"
+export GCLOUD_TESTS_GOLANG_ZONE="us-west1-b"
export GCLOUD_TESTS_GOLANG_BUCKET="dulcet-port-762-go-cloud-profiler-test"
cd $GOCLOUD_HOME/profiler
diff --git a/vendor/cloud.google.com/go/profiler/integration_test.go b/vendor/cloud.google.com/go/profiler/integration_test.go
index 870010d72..f55f74050 100644
--- a/vendor/cloud.google.com/go/profiler/integration_test.go
+++ b/vendor/cloud.google.com/go/profiler/integration_test.go
@@ -78,7 +78,7 @@ git clone https://code.googlesource.com/gocloud $GOCLOUD_HOME >/dev/null
cd $GOCLOUD_HOME/profiler/busybench
git reset --hard {{.Commit}}
-go get -v >/dev/null
+go get >/dev/null
# Run benchmark with agent
go run busybench.go --service="{{.Service}}" --mutex_profiling="{{.MutexProfiling}}"
@@ -90,7 +90,7 @@ go run busybench.go --service="{{.Service}}" --mutex_profiling="{{.MutexProfilin
const dockerfileFmt = `FROM golang
RUN git clone https://code.googlesource.com/gocloud /go/src/cloud.google.com/go \
&& cd /go/src/cloud.google.com/go/profiler/busybench && git reset --hard %s \
- && go get -v && go install -v
+ && go get && go install
CMD ["busybench", "--service", "%s"]
`
@@ -245,7 +245,7 @@ func TestAgentIntegration(t *testing.T) {
timeoutCtx, cancel := context.WithTimeout(ctx, time.Minute*25)
defer cancel()
if err := gceTr.PollForSerialOutput(timeoutCtx, &tc.InstanceConfig, benchFinishString); err != nil {
- t.Fatal(err)
+ t.Fatalf("PollForSerialOutput() got error: %v", err)
}
timeNow := time.Now()
diff --git a/vendor/cloud.google.com/go/profiler/profiler.go b/vendor/cloud.google.com/go/profiler/profiler.go
index 3317f2888..ece73ddd4 100644
--- a/vendor/cloud.google.com/go/profiler/profiler.go
+++ b/vendor/cloud.google.com/go/profiler/profiler.go
@@ -85,10 +85,11 @@ const (
xGoogAPIMetadata = "x-goog-api-client"
zoneNameLabel = "zone"
versionLabel = "version"
+ languageLabel = "language"
instanceLabel = "instance"
scope = "https://www.googleapis.com/auth/monitoring.write"
- initialBackoff = time.Second
+ initialBackoff = time.Minute
// Ensure the agent will recover within 1 hour.
maxBackoff = time.Hour
backoffMultiplier = 1.3 // Backoff envelope increases by this factor on each retry.
@@ -401,7 +402,7 @@ func withXGoogHeader(ctx context.Context, keyval ...string) context.Context {
}
func initializeAgent(c pb.ProfilerServiceClient) *agent {
- labels := map[string]string{}
+ labels := map[string]string{languageLabel: "go"}
if config.zone != "" {
labels[zoneNameLabel] = config.zone
}
diff --git a/vendor/cloud.google.com/go/profiler/profiler_test.go b/vendor/cloud.google.com/go/profiler/profiler_test.go
index 3d30c3927..05d4385d1 100644
--- a/vendor/cloud.google.com/go/profiler/profiler_test.go
+++ b/vendor/cloud.google.com/go/profiler/profiler_test.go
@@ -352,44 +352,44 @@ func TestInitializeAgent(t *testing.T) {
{
config: Config{ServiceVersion: testSvcVersion, zone: testZone},
wantProfileTypes: []pb.ProfileType{pb.ProfileType_CPU, pb.ProfileType_HEAP, pb.ProfileType_THREADS},
- wantDeploymentLabels: map[string]string{zoneNameLabel: testZone, versionLabel: testSvcVersion},
+ wantDeploymentLabels: map[string]string{zoneNameLabel: testZone, versionLabel: testSvcVersion, languageLabel: "go"},
wantProfileLabels: map[string]string{},
},
{
config: Config{zone: testZone},
wantProfileTypes: []pb.ProfileType{pb.ProfileType_CPU, pb.ProfileType_HEAP, pb.ProfileType_THREADS},
- wantDeploymentLabels: map[string]string{zoneNameLabel: testZone},
+ wantDeploymentLabels: map[string]string{zoneNameLabel: testZone, languageLabel: "go"},
wantProfileLabels: map[string]string{},
},
{
config: Config{ServiceVersion: testSvcVersion},
wantProfileTypes: []pb.ProfileType{pb.ProfileType_CPU, pb.ProfileType_HEAP, pb.ProfileType_THREADS},
- wantDeploymentLabels: map[string]string{versionLabel: testSvcVersion},
+ wantDeploymentLabels: map[string]string{versionLabel: testSvcVersion, languageLabel: "go"},
wantProfileLabels: map[string]string{},
},
{
config: Config{instance: testInstance},
wantProfileTypes: []pb.ProfileType{pb.ProfileType_CPU, pb.ProfileType_HEAP, pb.ProfileType_THREADS},
- wantDeploymentLabels: map[string]string{},
+ wantDeploymentLabels: map[string]string{languageLabel: "go"},
wantProfileLabels: map[string]string{instanceLabel: testInstance},
},
{
config: Config{instance: testInstance},
enableMutex: true,
wantProfileTypes: []pb.ProfileType{pb.ProfileType_CPU, pb.ProfileType_HEAP, pb.ProfileType_THREADS, pb.ProfileType_CONTENTION},
- wantDeploymentLabels: map[string]string{},
+ wantDeploymentLabels: map[string]string{languageLabel: "go"},
wantProfileLabels: map[string]string{instanceLabel: testInstance},
},
{
config: Config{NoHeapProfiling: true},
wantProfileTypes: []pb.ProfileType{pb.ProfileType_CPU, pb.ProfileType_THREADS},
- wantDeploymentLabels: map[string]string{},
+ wantDeploymentLabels: map[string]string{languageLabel: "go"},
wantProfileLabels: map[string]string{},
},
{
config: Config{NoHeapProfiling: true, NoGoroutineProfiling: true},
wantProfileTypes: []pb.ProfileType{pb.ProfileType_CPU},
- wantDeploymentLabels: map[string]string{},
+ wantDeploymentLabels: map[string]string{languageLabel: "go"},
wantProfileLabels: map[string]string{},
},
} {
diff --git a/vendor/cloud.google.com/go/profiler/proftest/proftest.go b/vendor/cloud.google.com/go/profiler/proftest/proftest.go
index 21ff0deb7..2641fcb37 100644
--- a/vendor/cloud.google.com/go/profiler/proftest/proftest.go
+++ b/vendor/cloud.google.com/go/profiler/proftest/proftest.go
@@ -201,6 +201,7 @@ func (tr *GCETestRunner) PollForSerialOutput(ctx context.Context, inst *Instance
for {
select {
case <-ctx.Done():
+ return ctx.Err()
case <-time.After(20 * time.Second):
resp, err := tr.ComputeService.Instances.GetSerialPortOutput(inst.ProjectID, inst.Zone, inst.Name).Port(2).Context(ctx).Do()
if err != nil {
@@ -208,7 +209,10 @@ func (tr *GCETestRunner) PollForSerialOutput(ctx context.Context, inst *Instance
log.Printf("Transient error getting serial port output from instance %s (will retry): %v", inst.Name, err)
continue
}
-
+ if resp.Contents == "" {
+ log.Printf("Ignoring empty serial port output from instance %s (will retry)", inst.Name)
+ continue
+ }
if output = resp.Contents; strings.Contains(output, finishString) {
return nil
}
diff --git a/vendor/cloud.google.com/go/pubsub/doc.go b/vendor/cloud.google.com/go/pubsub/doc.go
index 7995065b4..848b410e2 100644
--- a/vendor/cloud.google.com/go/pubsub/doc.go
+++ b/vendor/cloud.google.com/go/pubsub/doc.go
@@ -23,6 +23,10 @@ Note: This package is in beta. Some backwards-incompatible changes may occur.
More information about Google Cloud Pub/Sub is available at
https://cloud.google.com/pubsub/docs
+See https://godoc.org/cloud.google.com/go for authentication, timeouts,
+connection pooling and similar aspects of this package.
+
+
Publishing
Google Cloud Pub/Sub messages are published to topics. Topics may be created
@@ -112,11 +116,6 @@ increases the available time for client code to process messages. However, if
the client code neglects to call Message.Ack/Nack, a large MaxExtension will
increase the delay before the message is redelivered.
-Authentication
-
-See examples of authorization and authentication at
-https://godoc.org/cloud.google.com/go#pkg-examples.
-
Slow Message Processing
For use cases where message processing exceeds 30 minutes, we recommend using
diff --git a/vendor/cloud.google.com/go/pubsub/integration_test.go b/vendor/cloud.google.com/go/pubsub/integration_test.go
index 7b1a92455..05daac4a6 100644
--- a/vendor/cloud.google.com/go/pubsub/integration_test.go
+++ b/vendor/cloud.google.com/go/pubsub/integration_test.go
@@ -26,6 +26,7 @@ import (
"cloud.google.com/go/iam"
"cloud.google.com/go/internal"
"cloud.google.com/go/internal/testutil"
+ "cloud.google.com/go/internal/uid"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
"google.golang.org/grpc"
@@ -33,8 +34,8 @@ import (
)
var (
- topicIDs = testutil.NewUIDSpace("topic")
- subIDs = testutil.NewUIDSpace("sub")
+ topicIDs = uid.NewSpace("topic", nil)
+ subIDs = uid.NewSpace("sub", nil)
)
// messageData is used to hold the contents of a message so that it can be compared against the contents
diff --git a/vendor/cloud.google.com/go/pubsub/pstest/fake.go b/vendor/cloud.google.com/go/pubsub/pstest/fake.go
index d20dddcda..2c4a12ba7 100644
--- a/vendor/cloud.google.com/go/pubsub/pstest/fake.go
+++ b/vendor/cloud.google.com/go/pubsub/pstest/fake.go
@@ -525,6 +525,33 @@ func (s *subscription) stop() {
close(s.done)
}
+func (s *gServer) Acknowledge(_ context.Context, req *pb.AcknowledgeRequest) (*emptypb.Empty, error) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if req.Subscription == "" {
+ return nil, status.Errorf(codes.InvalidArgument, "missing subscription")
+ }
+ sub := s.subs[req.Subscription]
+ for _, id := range req.AckIds {
+ sub.ack(id)
+ }
+ return &emptypb.Empty{}, nil
+}
+
+func (s *gServer) ModifyAckDeadline(_ context.Context, req *pb.ModifyAckDeadlineRequest) (*emptypb.Empty, error) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if req.Subscription == "" {
+ return nil, status.Errorf(codes.InvalidArgument, "missing subscription")
+ }
+ sub := s.subs[req.Subscription]
+ dur := secsToDur(req.AckDeadlineSeconds)
+ for _, id := range req.AckIds {
+ sub.modifyAckDeadline(id, dur)
+ }
+ return &emptypb.Empty{}, nil
+}
+
func (s *gServer) StreamingPull(sps pb.Subscriber_StreamingPullServer) error {
// Receive initial message configuring the pull.
req, err := sps.Recv()
diff --git a/vendor/cloud.google.com/go/pubsub/pstest/fake_test.go b/vendor/cloud.google.com/go/pubsub/pstest/fake_test.go
index 5b4a78ec8..b208966f5 100644
--- a/vendor/cloud.google.com/go/pubsub/pstest/fake_test.go
+++ b/vendor/cloud.google.com/go/pubsub/pstest/fake_test.go
@@ -194,13 +194,13 @@ func TestStreamingPull(t *testing.T) {
{Data: []byte("d2")},
{Data: []byte("d3")},
})
- got := pullN(t, len(want), sclient, sub)
+ got := pubsubMessages(pullN(t, len(want), sclient, sub))
if diff := testutil.Diff(got, want); diff != "" {
t.Error(diff)
}
}
-func TestAck(t *testing.T) {
+func TestStreamingPullAck(t *testing.T) {
// Ack each message as it arrives. Make sure we don't see dups.
minAckDeadlineSecs = 1
pclient, sclient, _ := newFake(t)
@@ -247,6 +247,77 @@ func TestAck(t *testing.T) {
}
}
+func TestAcknowledge(t *testing.T) {
+ ctx := context.Background()
+ pclient, sclient, srv := newFake(t)
+ top := mustCreateTopic(t, pclient, &pb.Topic{Name: "projects/P/topics/T"})
+ sub := mustCreateSubscription(t, sclient, &pb.Subscription{
+ Name: "projects/P/subscriptions/S",
+ Topic: top.Name,
+ AckDeadlineSeconds: 10,
+ })
+
+ publish(t, pclient, top, []*pb.PubsubMessage{
+ {Data: []byte("d1")},
+ {Data: []byte("d2")},
+ {Data: []byte("d3")},
+ })
+ msgs := pullN(t, 3, sclient, sub)
+ var ackIDs []string
+ for _, m := range msgs {
+ ackIDs = append(ackIDs, m.AckId)
+ }
+ if _, err := sclient.Acknowledge(ctx, &pb.AcknowledgeRequest{
+ Subscription: sub.Name,
+ AckIds: ackIDs,
+ }); err != nil {
+ t.Fatal(err)
+ }
+ smsgs := srv.Messages()
+ if got, want := len(smsgs), 3; got != want {
+ t.Fatalf("got %d messages, want %d", got, want)
+ }
+ for _, sm := range smsgs {
+ if sm.Acks != 1 {
+ t.Errorf("message %s: got %d acks, want 1", sm.ID, sm.Acks)
+ }
+ }
+}
+
+func TestModAck(t *testing.T) {
+ ctx := context.Background()
+ pclient, sclient, _ := newFake(t)
+ top := mustCreateTopic(t, pclient, &pb.Topic{Name: "projects/P/topics/T"})
+ sub := mustCreateSubscription(t, sclient, &pb.Subscription{
+ Name: "projects/P/subscriptions/S",
+ Topic: top.Name,
+ AckDeadlineSeconds: 10,
+ })
+
+ publish(t, pclient, top, []*pb.PubsubMessage{
+ {Data: []byte("d1")},
+ {Data: []byte("d2")},
+ {Data: []byte("d3")},
+ })
+ msgs := pullN(t, 3, sclient, sub)
+ var ackIDs []string
+ for _, m := range msgs {
+ ackIDs = append(ackIDs, m.AckId)
+ }
+ if _, err := sclient.ModifyAckDeadline(ctx, &pb.ModifyAckDeadlineRequest{
+ Subscription: sub.Name,
+ AckIds: ackIDs,
+ AckDeadlineSeconds: 0,
+ }); err != nil {
+ t.Fatal(err)
+ }
+ // Having nacked all three messages, we should see them again.
+ msgs = pullN(t, 3, sclient, sub)
+ if got, want := len(msgs), 3; got != want {
+ t.Errorf("got %d messages, want %d", got, want)
+ }
+}
+
func TestAckDeadline(t *testing.T) {
// Messages should be resent after they expire.
pclient, sclient, _ := newFake(t)
@@ -312,8 +383,8 @@ func TestMultiSubs(t *testing.T) {
{Data: []byte("d2")},
{Data: []byte("d3")},
})
- got1 := pullN(t, len(want), sclient, sub1)
- got2 := pullN(t, len(want), sclient, sub2)
+ got1 := pubsubMessages(pullN(t, len(want), sclient, sub1))
+ got2 := pubsubMessages(pullN(t, len(want), sclient, sub2))
if diff := testutil.Diff(got1, want); diff != "" {
t.Error(diff)
}
@@ -386,16 +457,16 @@ func mustStartPull(t *testing.T, sc pb.SubscriberClient, sub *pb.Subscription) p
return spc
}
-func pullN(t *testing.T, n int, sc pb.SubscriberClient, sub *pb.Subscription) map[string]*pb.PubsubMessage {
+func pullN(t *testing.T, n int, sc pb.SubscriberClient, sub *pb.Subscription) map[string]*pb.ReceivedMessage {
spc := mustStartPull(t, sc, sub)
- got := map[string]*pb.PubsubMessage{}
+ got := map[string]*pb.ReceivedMessage{}
for i := 0; i < n; i++ {
res, err := spc.Recv()
if err != nil {
t.Fatal(err)
}
for _, m := range res.ReceivedMessages {
- got[m.Message.MessageId] = m.Message
+ got[m.Message.MessageId] = m
}
}
if err := spc.CloseSend(); err != nil {
@@ -408,6 +479,14 @@ func pullN(t *testing.T, n int, sc pb.SubscriberClient, sub *pb.Subscription) ma
return got
}
+func pubsubMessages(rms map[string]*pb.ReceivedMessage) map[string]*pb.PubsubMessage {
+ ms := map[string]*pb.PubsubMessage{}
+ for k, rm := range rms {
+ ms[k] = rm.Message
+ }
+ return ms
+}
+
func mustCreateTopic(t *testing.T, pc pb.PublisherClient, topic *pb.Topic) *pb.Topic {
top, err := pc.CreateTopic(context.Background(), topic)
if err != nil {
diff --git a/vendor/cloud.google.com/go/pubsub/pullstream.go b/vendor/cloud.google.com/go/pubsub/pullstream.go
index d9318a130..4aea1d501 100644
--- a/vendor/cloud.google.com/go/pubsub/pullstream.go
+++ b/vendor/cloud.google.com/go/pubsub/pullstream.go
@@ -17,6 +17,7 @@ package pubsub
import (
"io"
"sync"
+ "time"
vkit "cloud.google.com/go/pubsub/apiv1"
gax "github.com/googleapis/gax-go"
@@ -104,18 +105,23 @@ func (s *pullStream) call(f func(pb.Subscriber_StreamingPullClient) error) error
err error
bo gax.Backoff
)
- for {
+ for i := 0; ; i++ {
spc, err = s.get(spc)
if err != nil {
// Preserve the existing behavior of not retrying on open. Is that a bug?
// (If we do decide to retry, don't retry after we're closed.)
return err
}
+ start := time.Now()
err = f(*spc)
if err != nil {
if isRetryable(err) {
recordStat(s.ctx, StreamRetryCount, 1)
- gax.Sleep(s.ctx, bo.Pause())
+ if time.Since(start) < 30*time.Second { // don't sleep if we've been blocked for a while
+ if err := gax.Sleep(s.ctx, bo.Pause()); err != nil {
+ return err
+ }
+ }
continue
}
s.mu.Lock()
diff --git a/vendor/cloud.google.com/go/redis/apiv1beta1/cloud_redis_client.go b/vendor/cloud.google.com/go/redis/apiv1beta1/cloud_redis_client.go
new file mode 100644
index 000000000..3693048c1
--- /dev/null
+++ b/vendor/cloud.google.com/go/redis/apiv1beta1/cloud_redis_client.go
@@ -0,0 +1,516 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package redis
+
+import (
+ "math"
+ "time"
+
+ "cloud.google.com/go/internal/version"
+ "cloud.google.com/go/longrunning"
+ lroauto "cloud.google.com/go/longrunning/autogen"
+ anypb "github.com/golang/protobuf/ptypes/any"
+ gax "github.com/googleapis/gax-go"
+ "golang.org/x/net/context"
+ "google.golang.org/api/iterator"
+ "google.golang.org/api/option"
+ "google.golang.org/api/transport"
+ redispb "google.golang.org/genproto/googleapis/cloud/redis/v1beta1"
+ longrunningpb "google.golang.org/genproto/googleapis/longrunning"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/metadata"
+)
+
+// CloudRedisCallOptions contains the retry settings for each method of CloudRedisClient.
+type CloudRedisCallOptions struct {
+ ListInstances []gax.CallOption
+ GetInstance []gax.CallOption
+ CreateInstance []gax.CallOption
+ UpdateInstance []gax.CallOption
+ DeleteInstance []gax.CallOption
+}
+
+func defaultCloudRedisClientOptions() []option.ClientOption {
+ return []option.ClientOption{
+ option.WithEndpoint("redis.googleapis.com:443"),
+ option.WithScopes(DefaultAuthScopes()...),
+ }
+}
+
+func defaultCloudRedisCallOptions() *CloudRedisCallOptions {
+ retry := map[[2]string][]gax.CallOption{}
+ return &CloudRedisCallOptions{
+ ListInstances: retry[[2]string{"default", "non_idempotent"}],
+ GetInstance: retry[[2]string{"default", "non_idempotent"}],
+ CreateInstance: retry[[2]string{"default", "non_idempotent"}],
+ UpdateInstance: retry[[2]string{"default", "non_idempotent"}],
+ DeleteInstance: retry[[2]string{"default", "non_idempotent"}],
+ }
+}
+
+// CloudRedisClient is a client for interacting with Google Cloud Memorystore for Redis API.
+type CloudRedisClient struct {
+ // The connection to the service.
+ conn *grpc.ClientConn
+
+ // The gRPC API client.
+ cloudRedisClient redispb.CloudRedisClient
+
+ // LROClient is used internally to handle longrunning operations.
+ // It is exposed so that its CallOptions can be modified if required.
+ // Users should not Close this client.
+ LROClient *lroauto.OperationsClient
+
+ // The call options for this service.
+ CallOptions *CloudRedisCallOptions
+
+ // The x-goog-* metadata to be sent with each request.
+ xGoogMetadata metadata.MD
+}
+
+// NewCloudRedisClient creates a new cloud redis client.
+//
+// Configures and manages Cloud Memorystore for Redis instances
+//
+// Google Cloud Memorystore for Redis v1beta1
+//
+// The redis.googleapis.com service implements the Google Cloud Memorystore
+// for Redis API and defines the following resource model for managing Redis
+// instances:
+//
+// The service works with a collection of cloud projects, named: /projects/*
+//
+// Each project has a collection of available locations, named: /locations/*
+//
+// Each location has a collection of Redis instances, named: /instances/*
+//
+// As such, Redis instances are resources of the form:
+// /projects/{project_id}/locations/{location_id}/instances/{instance_id}
+//
+// Note that location_id must be refering to a GCP region; for example:
+//
+// projects/redpepper-1290/locations/us-central1/instances/my-redis
+func NewCloudRedisClient(ctx context.Context, opts ...option.ClientOption) (*CloudRedisClient, error) {
+ conn, err := transport.DialGRPC(ctx, append(defaultCloudRedisClientOptions(), opts...)...)
+ if err != nil {
+ return nil, err
+ }
+ c := &CloudRedisClient{
+ conn: conn,
+ CallOptions: defaultCloudRedisCallOptions(),
+
+ cloudRedisClient: redispb.NewCloudRedisClient(conn),
+ }
+ c.setGoogleClientInfo()
+
+ c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn))
+ if err != nil {
+ // This error "should not happen", since we are just reusing old connection
+ // and never actually need to dial.
+ // If this does happen, we could leak conn. However, we cannot close conn:
+ // If the user invoked the function with option.WithGRPCConn,
+ // we would close a connection that's still in use.
+ // TODO(pongad): investigate error conditions.
+ return nil, err
+ }
+ return c, nil
+}
+
+// Connection returns the client's connection to the API service.
+func (c *CloudRedisClient) Connection() *grpc.ClientConn {
+ return c.conn
+}
+
+// Close closes the connection to the API service. The user should invoke this when
+// the client is no longer required.
+func (c *CloudRedisClient) Close() error {
+ return c.conn.Close()
+}
+
+// setGoogleClientInfo sets the name and version of the application in
+// the `x-goog-api-client` header passed on each request. Intended for
+// use by Google-written clients.
+func (c *CloudRedisClient) setGoogleClientInfo(keyval ...string) {
+ kv := append([]string{"gl-go", version.Go()}, keyval...)
+ kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
+ c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
+}
+
+// ListInstances lists all Redis instances owned by a project in either the specified
+// location (region) or all locations.
+//
+// The location should have the following format:
+//
+// projects/{project_id}/locations/{location_id}
+//
+// If location_id is specified as - (wildcard), then all regions
+// available to the project are queried, and the results are aggregated.
+func (c *CloudRedisClient) ListInstances(ctx context.Context, req *redispb.ListInstancesRequest, opts ...gax.CallOption) *InstanceIterator {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.ListInstances[0:len(c.CallOptions.ListInstances):len(c.CallOptions.ListInstances)], opts...)
+ it := &InstanceIterator{}
+ it.InternalFetch = func(pageSize int, pageToken string) ([]*redispb.Instance, string, error) {
+ var resp *redispb.ListInstancesResponse
+ req.PageToken = pageToken
+ if pageSize > math.MaxInt32 {
+ req.PageSize = math.MaxInt32
+ } else {
+ req.PageSize = int32(pageSize)
+ }
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.cloudRedisClient.ListInstances(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, "", err
+ }
+ return resp.Instances, resp.NextPageToken, nil
+ }
+ fetch := func(pageSize int, pageToken string) (string, error) {
+ items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
+ if err != nil {
+ return "", err
+ }
+ it.items = append(it.items, items...)
+ return nextPageToken, nil
+ }
+ it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
+ return it
+}
+
+// GetInstance gets the details of a specific Redis instance.
+func (c *CloudRedisClient) GetInstance(ctx context.Context, req *redispb.GetInstanceRequest, opts ...gax.CallOption) (*redispb.Instance, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.GetInstance[0:len(c.CallOptions.GetInstance):len(c.CallOptions.GetInstance)], opts...)
+ var resp *redispb.Instance
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.cloudRedisClient.GetInstance(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// CreateInstance creates a Redis instance based on the specified tier and memory size.
+//
+// By default, the instance is peered to the project's
+// default network (at /compute/docs/networks-and-firewalls#networks).
+//
+// The creation is executed asynchronously and callers may check the returned
+// operation to track its progress. Once the operation is completed the Redis
+// instance will be fully functional. Completed longrunning.Operation will
+// contain the new instance object in the response field.
+//
+// The returned operation is automatically deleted after a few hours, so there
+// is no need to call DeleteOperation.
+func (c *CloudRedisClient) CreateInstance(ctx context.Context, req *redispb.CreateInstanceRequest, opts ...gax.CallOption) (*CreateInstanceOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.CreateInstance[0:len(c.CallOptions.CreateInstance):len(c.CallOptions.CreateInstance)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.cloudRedisClient.CreateInstance(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &CreateInstanceOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// UpdateInstance updates the metadata and configuration of a specific Redis instance.
+//
+// Completed longrunning.Operation will contain the new instance object
+// in the response field. The returned operation is automatically deleted
+// after a few hours, so there is no need to call DeleteOperation.
+func (c *CloudRedisClient) UpdateInstance(ctx context.Context, req *redispb.UpdateInstanceRequest, opts ...gax.CallOption) (*UpdateInstanceOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.UpdateInstance[0:len(c.CallOptions.UpdateInstance):len(c.CallOptions.UpdateInstance)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.cloudRedisClient.UpdateInstance(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &UpdateInstanceOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// DeleteInstance deletes a specific Redis instance. Instance stops serving and data is
+// deleted.
+func (c *CloudRedisClient) DeleteInstance(ctx context.Context, req *redispb.DeleteInstanceRequest, opts ...gax.CallOption) (*DeleteInstanceOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.DeleteInstance[0:len(c.CallOptions.DeleteInstance):len(c.CallOptions.DeleteInstance)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.cloudRedisClient.DeleteInstance(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &DeleteInstanceOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// InstanceIterator manages a stream of *redispb.Instance.
+type InstanceIterator struct {
+ items []*redispb.Instance
+ pageInfo *iterator.PageInfo
+ nextFunc func() error
+
+ // InternalFetch is for use by the Google Cloud Libraries only.
+ // It is not part of the stable interface of this package.
+ //
+ // InternalFetch returns results from a single call to the underlying RPC.
+ // The number of results is no greater than pageSize.
+ // If there are no more results, nextPageToken is empty and err is nil.
+ InternalFetch func(pageSize int, pageToken string) (results []*redispb.Instance, nextPageToken string, err error)
+}
+
+// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
+func (it *InstanceIterator) PageInfo() *iterator.PageInfo {
+ return it.pageInfo
+}
+
+// Next returns the next result. Its second return value is iterator.Done if there are no more
+// results. Once Next returns Done, all subsequent calls will return Done.
+func (it *InstanceIterator) Next() (*redispb.Instance, error) {
+ var item *redispb.Instance
+ if err := it.nextFunc(); err != nil {
+ return item, err
+ }
+ item = it.items[0]
+ it.items = it.items[1:]
+ return item, nil
+}
+
+func (it *InstanceIterator) bufLen() int {
+ return len(it.items)
+}
+
+func (it *InstanceIterator) takeBuf() interface{} {
+ b := it.items
+ it.items = nil
+ return b
+}
+
+// CreateInstanceOperation manages a long-running operation from CreateInstance.
+type CreateInstanceOperation struct {
+ lro *longrunning.Operation
+}
+
+// CreateInstanceOperation returns a new CreateInstanceOperation from a given name.
+// The name must be that of a previously created CreateInstanceOperation, possibly from a different process.
+func (c *CloudRedisClient) CreateInstanceOperation(name string) *CreateInstanceOperation {
+ return &CreateInstanceOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *CreateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*redispb.Instance, error) {
+ var resp redispb.Instance
+ if err := op.lro.WaitWithInterval(ctx, &resp, 360000*time.Millisecond, opts...); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully,
+// op.Done will return true, and the response of the operation is returned.
+// If Poll succeeds and the operation has not completed, the returned response and error are both nil.
+func (op *CreateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*redispb.Instance, error) {
+ var resp redispb.Instance
+ if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
+ return nil, err
+ }
+ if !op.Done() {
+ return nil, nil
+ }
+ return &resp, nil
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *CreateInstanceOperation) Metadata() (*anypb.Any, error) {
+ var meta anypb.Any
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *CreateInstanceOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *CreateInstanceOperation) Name() string {
+ return op.lro.Name()
+}
+
+// DeleteInstanceOperation manages a long-running operation from DeleteInstance.
+type DeleteInstanceOperation struct {
+ lro *longrunning.Operation
+}
+
+// DeleteInstanceOperation returns a new DeleteInstanceOperation from a given name.
+// The name must be that of a previously created DeleteInstanceOperation, possibly from a different process.
+func (c *CloudRedisClient) DeleteInstanceOperation(name string) *DeleteInstanceOperation {
+ return &DeleteInstanceOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning any error encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *DeleteInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.WaitWithInterval(ctx, nil, 360000*time.Millisecond, opts...)
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully, op.Done will return true.
+func (op *DeleteInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
+ return op.lro.Poll(ctx, nil, opts...)
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *DeleteInstanceOperation) Metadata() (*anypb.Any, error) {
+ var meta anypb.Any
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *DeleteInstanceOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *DeleteInstanceOperation) Name() string {
+ return op.lro.Name()
+}
+
+// UpdateInstanceOperation manages a long-running operation from UpdateInstance.
+type UpdateInstanceOperation struct {
+ lro *longrunning.Operation
+}
+
+// UpdateInstanceOperation returns a new UpdateInstanceOperation from a given name.
+// The name must be that of a previously created UpdateInstanceOperation, possibly from a different process.
+func (c *CloudRedisClient) UpdateInstanceOperation(name string) *UpdateInstanceOperation {
+ return &UpdateInstanceOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *UpdateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*redispb.Instance, error) {
+ var resp redispb.Instance
+ if err := op.lro.WaitWithInterval(ctx, &resp, 360000*time.Millisecond, opts...); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully,
+// op.Done will return true, and the response of the operation is returned.
+// If Poll succeeds and the operation has not completed, the returned response and error are both nil.
+func (op *UpdateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*redispb.Instance, error) {
+ var resp redispb.Instance
+ if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
+ return nil, err
+ }
+ if !op.Done() {
+ return nil, nil
+ }
+ return &resp, nil
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *UpdateInstanceOperation) Metadata() (*anypb.Any, error) {
+ var meta anypb.Any
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *UpdateInstanceOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *UpdateInstanceOperation) Name() string {
+ return op.lro.Name()
+}
diff --git a/vendor/cloud.google.com/go/redis/apiv1beta1/cloud_redis_client_example_test.go b/vendor/cloud.google.com/go/redis/apiv1beta1/cloud_redis_client_example_test.go
new file mode 100644
index 000000000..6d2eeb1bf
--- /dev/null
+++ b/vendor/cloud.google.com/go/redis/apiv1beta1/cloud_redis_client_example_test.go
@@ -0,0 +1,141 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package redis_test
+
+import (
+ "cloud.google.com/go/redis/apiv1beta1"
+ "golang.org/x/net/context"
+ "google.golang.org/api/iterator"
+ redispb "google.golang.org/genproto/googleapis/cloud/redis/v1beta1"
+)
+
+func ExampleNewCloudRedisClient() {
+ ctx := context.Background()
+ c, err := redis.NewCloudRedisClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use client.
+ _ = c
+}
+
+func ExampleCloudRedisClient_ListInstances() {
+ ctx := context.Background()
+ c, err := redis.NewCloudRedisClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &redispb.ListInstancesRequest{
+ // TODO: Fill request struct fields.
+ }
+ it := c.ListInstances(ctx, req)
+ for {
+ resp, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
+
+func ExampleCloudRedisClient_GetInstance() {
+ ctx := context.Background()
+ c, err := redis.NewCloudRedisClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &redispb.GetInstanceRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.GetInstance(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleCloudRedisClient_CreateInstance() {
+ ctx := context.Background()
+ c, err := redis.NewCloudRedisClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &redispb.CreateInstanceRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.CreateInstance(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ resp, err := op.Wait(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleCloudRedisClient_UpdateInstance() {
+ ctx := context.Background()
+ c, err := redis.NewCloudRedisClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &redispb.UpdateInstanceRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.UpdateInstance(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ resp, err := op.Wait(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleCloudRedisClient_DeleteInstance() {
+ ctx := context.Background()
+ c, err := redis.NewCloudRedisClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &redispb.DeleteInstanceRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.DeleteInstance(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ err = op.Wait(ctx)
+ // TODO: Handle error.
+}
diff --git a/vendor/cloud.google.com/go/redis/apiv1beta1/doc.go b/vendor/cloud.google.com/go/redis/apiv1beta1/doc.go
new file mode 100644
index 000000000..e392a6dd2
--- /dev/null
+++ b/vendor/cloud.google.com/go/redis/apiv1beta1/doc.go
@@ -0,0 +1,48 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+// Package redis is an auto-generated package for the
+// Google Cloud Memorystore for Redis API.
+//
+// NOTE: This package is in alpha. It is not stable, and is likely to change.
+//
+// The Google Cloud Memorystore for Redis API is used for creating and
+// managing
+// Redis instances on the Google Cloud Platform.
+package redis // import "cloud.google.com/go/redis/apiv1beta1"
+
+import (
+ "golang.org/x/net/context"
+ "google.golang.org/grpc/metadata"
+)
+
+func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
+ out, _ := metadata.FromOutgoingContext(ctx)
+ out = out.Copy()
+ for _, md := range mds {
+ for k, v := range md {
+ out[k] = append(out[k], v...)
+ }
+ }
+ return metadata.NewOutgoingContext(ctx, out)
+}
+
+// DefaultAuthScopes reports the default set of authentication scopes to use with this package.
+func DefaultAuthScopes() []string {
+ return []string{
+ "https://www.googleapis.com/auth/cloud-platform",
+ }
+}
diff --git a/vendor/cloud.google.com/go/redis/apiv1beta1/mock_test.go b/vendor/cloud.google.com/go/redis/apiv1beta1/mock_test.go
new file mode 100644
index 000000000..3acf4402c
--- /dev/null
+++ b/vendor/cloud.google.com/go/redis/apiv1beta1/mock_test.go
@@ -0,0 +1,641 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package redis
+
+import (
+ emptypb "github.com/golang/protobuf/ptypes/empty"
+ redispb "google.golang.org/genproto/googleapis/cloud/redis/v1beta1"
+ longrunningpb "google.golang.org/genproto/googleapis/longrunning"
+ field_maskpb "google.golang.org/genproto/protobuf/field_mask"
+)
+
+import (
+ "flag"
+ "fmt"
+ "io"
+ "log"
+ "net"
+ "os"
+ "strings"
+ "testing"
+
+ "github.com/golang/protobuf/proto"
+ "github.com/golang/protobuf/ptypes"
+ "golang.org/x/net/context"
+ "google.golang.org/api/option"
+ status "google.golang.org/genproto/googleapis/rpc/status"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+ gstatus "google.golang.org/grpc/status"
+)
+
+var _ = io.EOF
+var _ = ptypes.MarshalAny
+var _ status.Status
+
+type mockCloudRedisServer struct {
+ // Embed for forward compatibility.
+ // Tests will keep working if more methods are added
+ // in the future.
+ redispb.CloudRedisServer
+
+ reqs []proto.Message
+
+ // If set, all calls return this error.
+ err error
+
+ // responses to return if err == nil
+ resps []proto.Message
+}
+
+func (s *mockCloudRedisServer) ListInstances(ctx context.Context, req *redispb.ListInstancesRequest) (*redispb.ListInstancesResponse, 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].(*redispb.ListInstancesResponse), nil
+}
+
+func (s *mockCloudRedisServer) GetInstance(ctx context.Context, req *redispb.GetInstanceRequest) (*redispb.Instance, 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].(*redispb.Instance), nil
+}
+
+func (s *mockCloudRedisServer) CreateInstance(ctx context.Context, req *redispb.CreateInstanceRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+func (s *mockCloudRedisServer) UpdateInstance(ctx context.Context, req *redispb.UpdateInstanceRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+func (s *mockCloudRedisServer) DeleteInstance(ctx context.Context, req *redispb.DeleteInstanceRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+// clientOpt is the option tests should use to connect to the test server.
+// It is initialized by TestMain.
+var clientOpt option.ClientOption
+
+var (
+ mockCloudRedis mockCloudRedisServer
+)
+
+func TestMain(m *testing.M) {
+ flag.Parse()
+
+ serv := grpc.NewServer()
+ redispb.RegisterCloudRedisServer(serv, &mockCloudRedis)
+
+ lis, err := net.Listen("tcp", "localhost:0")
+ if err != nil {
+ log.Fatal(err)
+ }
+ go serv.Serve(lis)
+
+ conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure())
+ if err != nil {
+ log.Fatal(err)
+ }
+ clientOpt = option.WithGRPCConn(conn)
+
+ os.Exit(m.Run())
+}
+
+func TestCloudRedisListInstances(t *testing.T) {
+ var nextPageToken string = ""
+ var instancesElement *redispb.Instance = &redispb.Instance{}
+ var instances = []*redispb.Instance{instancesElement}
+ var expectedResponse = &redispb.ListInstancesResponse{
+ NextPageToken: nextPageToken,
+ Instances: instances,
+ }
+
+ mockCloudRedis.err = nil
+ mockCloudRedis.reqs = nil
+
+ mockCloudRedis.resps = append(mockCloudRedis.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]")
+ var request = &redispb.ListInstancesRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewCloudRedisClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListInstances(context.Background(), request).Next()
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudRedis.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+ want := (interface{})(expectedResponse.Instances[0])
+ got := (interface{})(resp)
+ var ok bool
+
+ switch want := (want).(type) {
+ case proto.Message:
+ ok = proto.Equal(want, got.(proto.Message))
+ default:
+ ok = want == got
+ }
+ if !ok {
+ t.Errorf("wrong response %q, want %q)", got, want)
+ }
+}
+
+func TestCloudRedisListInstancesError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudRedis.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]")
+ var request = &redispb.ListInstancesRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewCloudRedisClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListInstances(context.Background(), request).Next()
+
+ 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 TestCloudRedisGetInstance(t *testing.T) {
+ var name2 string = "name2-1052831874"
+ var displayName string = "displayName1615086568"
+ var locationId string = "locationId552319461"
+ var alternativeLocationId string = "alternativeLocationId-718920621"
+ var redisVersion string = "redisVersion-685310444"
+ var reservedIpRange string = "reservedIpRange-1082940580"
+ var host string = "host3208616"
+ var port int32 = 3446913
+ var currentLocationId string = "currentLocationId1312712735"
+ var statusMessage string = "statusMessage-239442758"
+ var memorySizeGb int32 = 34199707
+ var authorizedNetwork string = "authorizedNetwork-1733809270"
+ var expectedResponse = &redispb.Instance{
+ Name: name2,
+ DisplayName: displayName,
+ LocationId: locationId,
+ AlternativeLocationId: alternativeLocationId,
+ RedisVersion: redisVersion,
+ ReservedIpRange: reservedIpRange,
+ Host: host,
+ Port: port,
+ CurrentLocationId: currentLocationId,
+ StatusMessage: statusMessage,
+ MemorySizeGb: memorySizeGb,
+ AuthorizedNetwork: authorizedNetwork,
+ }
+
+ mockCloudRedis.err = nil
+ mockCloudRedis.reqs = nil
+
+ mockCloudRedis.resps = append(mockCloudRedis.resps[:0], expectedResponse)
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/instances/%s", "[PROJECT]", "[LOCATION]", "[INSTANCE]")
+ var request = &redispb.GetInstanceRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewCloudRedisClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetInstance(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudRedis.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 TestCloudRedisGetInstanceError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudRedis.err = gstatus.Error(errCode, "test error")
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/instances/%s", "[PROJECT]", "[LOCATION]", "[INSTANCE]")
+ var request = &redispb.GetInstanceRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewCloudRedisClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.GetInstance(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 TestCloudRedisCreateInstance(t *testing.T) {
+ var name string = "name3373707"
+ var displayName string = "displayName1615086568"
+ var locationId string = "locationId552319461"
+ var alternativeLocationId string = "alternativeLocationId-718920621"
+ var redisVersion string = "redisVersion-685310444"
+ var reservedIpRange string = "reservedIpRange-1082940580"
+ var host string = "host3208616"
+ var port int32 = 3446913
+ var currentLocationId string = "currentLocationId1312712735"
+ var statusMessage string = "statusMessage-239442758"
+ var memorySizeGb2 int32 = 1493816946
+ var authorizedNetwork string = "authorizedNetwork-1733809270"
+ var expectedResponse = &redispb.Instance{
+ Name: name,
+ DisplayName: displayName,
+ LocationId: locationId,
+ AlternativeLocationId: alternativeLocationId,
+ RedisVersion: redisVersion,
+ ReservedIpRange: reservedIpRange,
+ Host: host,
+ Port: port,
+ CurrentLocationId: currentLocationId,
+ StatusMessage: statusMessage,
+ MemorySizeGb: memorySizeGb2,
+ AuthorizedNetwork: authorizedNetwork,
+ }
+
+ mockCloudRedis.err = nil
+ mockCloudRedis.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockCloudRedis.resps = append(mockCloudRedis.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]")
+ var instanceId string = "test_instance"
+ var tier redispb.Instance_Tier = redispb.Instance_BASIC
+ var memorySizeGb int32 = 1
+ var instance = &redispb.Instance{
+ Tier: tier,
+ MemorySizeGb: memorySizeGb,
+ }
+ var request = &redispb.CreateInstanceRequest{
+ Parent: formattedParent,
+ InstanceId: instanceId,
+ Instance: instance,
+ }
+
+ c, err := NewCloudRedisClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.CreateInstance(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ resp, err := respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudRedis.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 TestCloudRedisCreateInstanceError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudRedis.err = nil
+ mockCloudRedis.resps = append(mockCloudRedis.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]")
+ var instanceId string = "test_instance"
+ var tier redispb.Instance_Tier = redispb.Instance_BASIC
+ var memorySizeGb int32 = 1
+ var instance = &redispb.Instance{
+ Tier: tier,
+ MemorySizeGb: memorySizeGb,
+ }
+ var request = &redispb.CreateInstanceRequest{
+ Parent: formattedParent,
+ InstanceId: instanceId,
+ Instance: instance,
+ }
+
+ c, err := NewCloudRedisClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.CreateInstance(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ resp, err := respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+ _ = resp
+}
+func TestCloudRedisUpdateInstance(t *testing.T) {
+ var name string = "name3373707"
+ var displayName2 string = "displayName21615000987"
+ var locationId string = "locationId552319461"
+ var alternativeLocationId string = "alternativeLocationId-718920621"
+ var redisVersion string = "redisVersion-685310444"
+ var reservedIpRange string = "reservedIpRange-1082940580"
+ var host string = "host3208616"
+ var port int32 = 3446913
+ var currentLocationId string = "currentLocationId1312712735"
+ var statusMessage string = "statusMessage-239442758"
+ var memorySizeGb2 int32 = 1493816946
+ var authorizedNetwork string = "authorizedNetwork-1733809270"
+ var expectedResponse = &redispb.Instance{
+ Name: name,
+ DisplayName: displayName2,
+ LocationId: locationId,
+ AlternativeLocationId: alternativeLocationId,
+ RedisVersion: redisVersion,
+ ReservedIpRange: reservedIpRange,
+ Host: host,
+ Port: port,
+ CurrentLocationId: currentLocationId,
+ StatusMessage: statusMessage,
+ MemorySizeGb: memorySizeGb2,
+ AuthorizedNetwork: authorizedNetwork,
+ }
+
+ mockCloudRedis.err = nil
+ mockCloudRedis.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockCloudRedis.resps = append(mockCloudRedis.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var pathsElement string = "display_name"
+ var pathsElement2 string = "memory_size_gb"
+ var paths = []string{pathsElement, pathsElement2}
+ var updateMask = &field_maskpb.FieldMask{
+ Paths: paths,
+ }
+ var displayName string = "UpdatedDisplayName"
+ var memorySizeGb int32 = 4
+ var instance = &redispb.Instance{
+ DisplayName: displayName,
+ MemorySizeGb: memorySizeGb,
+ }
+ var request = &redispb.UpdateInstanceRequest{
+ UpdateMask: updateMask,
+ Instance: instance,
+ }
+
+ c, err := NewCloudRedisClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.UpdateInstance(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ resp, err := respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudRedis.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 TestCloudRedisUpdateInstanceError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudRedis.err = nil
+ mockCloudRedis.resps = append(mockCloudRedis.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var pathsElement string = "display_name"
+ var pathsElement2 string = "memory_size_gb"
+ var paths = []string{pathsElement, pathsElement2}
+ var updateMask = &field_maskpb.FieldMask{
+ Paths: paths,
+ }
+ var displayName string = "UpdatedDisplayName"
+ var memorySizeGb int32 = 4
+ var instance = &redispb.Instance{
+ DisplayName: displayName,
+ MemorySizeGb: memorySizeGb,
+ }
+ var request = &redispb.UpdateInstanceRequest{
+ UpdateMask: updateMask,
+ Instance: instance,
+ }
+
+ c, err := NewCloudRedisClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.UpdateInstance(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ resp, err := respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+ _ = resp
+}
+func TestCloudRedisDeleteInstance(t *testing.T) {
+ var expectedResponse *emptypb.Empty = &emptypb.Empty{}
+
+ mockCloudRedis.err = nil
+ mockCloudRedis.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockCloudRedis.resps = append(mockCloudRedis.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/instances/%s", "[PROJECT]", "[LOCATION]", "[INSTANCE]")
+ var request = &redispb.DeleteInstanceRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewCloudRedisClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.DeleteInstance(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockCloudRedis.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+}
+
+func TestCloudRedisDeleteInstanceError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockCloudRedis.err = nil
+ mockCloudRedis.resps = append(mockCloudRedis.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var formattedName string = fmt.Sprintf("projects/%s/locations/%s/instances/%s", "[PROJECT]", "[LOCATION]", "[INSTANCE]")
+ var request = &redispb.DeleteInstanceRequest{
+ Name: formattedName,
+ }
+
+ c, err := NewCloudRedisClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.DeleteInstance(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+}
diff --git a/vendor/cloud.google.com/go/regen-gapic.sh b/vendor/cloud.google.com/go/regen-gapic.sh
index 9b345c972..eede86269 100755
--- a/vendor/cloud.google.com/go/regen-gapic.sh
+++ b/vendor/cloud.google.com/go/regen-gapic.sh
@@ -23,13 +23,18 @@
set -ex
APIS=(
+google/iam/artman_iam_admin.yaml
google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml
google/cloud/dataproc/artman_dataproc_v1.yaml
+google/cloud/dialogflow/artman_dialogflow_v2.yaml
google/cloud/language/artman_language_v1.yaml
google/cloud/language/artman_language_v1beta2.yaml
google/cloud/oslogin/artman_oslogin_v1beta.yaml
+google/cloud/redis/artman_redis_v1beta1.yaml
google/cloud/speech/artman_speech_v1.yaml
google/cloud/speech/artman_speech_v1beta1.yaml
+google/cloud/speech/artman_speech_v1p1beta1.yaml
+google/cloud/tasks/artman_cloudtasks.yaml
google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml
google/cloud/videointelligence/artman_videointelligence_v1beta2.yaml
google/cloud/vision/artman_vision_v1.yaml
@@ -43,7 +48,6 @@ google/firestore/artman_firestore.yaml
google/logging/artman_logging.yaml
google/longrunning/artman_longrunning.yaml
google/monitoring/artman_monitoring.yaml
-google/privacy/dlp/artman_dlp_v2beta1.yaml
google/privacy/dlp/artman_dlp_v2.yaml
google/pubsub/artman_pubsub.yaml
google/spanner/admin/database/artman_spanner_admin_database.yaml
@@ -57,8 +61,8 @@ for api in "${APIS[@]}"; do
cp -r artman-genfiles/gapi-*/cloud.google.com/go/* $GOPATH/src/cloud.google.com/go/
done
-go list cloud.google.com/go/... | grep apiv | xargs go test
+#go list cloud.google.com/go/... | grep apiv | xargs go test
-go test -short cloud.google.com/go/...
+#go test -short cloud.google.com/go/...
-echo "googleapis version: $(git rev-parse HEAD)"
+#echo "googleapis version: $(git rev-parse HEAD)"
diff --git a/vendor/cloud.google.com/go/run-tests.sh b/vendor/cloud.google.com/go/run-tests.sh
index f47ff50a5..a643e61c4 100755
--- a/vendor/cloud.google.com/go/run-tests.sh
+++ b/vendor/cloud.google.com/go/run-tests.sh
@@ -70,8 +70,8 @@ function depends_on_changed_package {
return 1
}
-# Collect the packages into two separate lists. (It is faster go test a list of
-# packages than to individually go test each one.)
+# Collect the packages into two separate lists. (It is faster to call "go test" on a
+# list of packages than to individually "go test" each one.)
shorts=
fulls=
diff --git a/vendor/cloud.google.com/go/spanner/client.go b/vendor/cloud.google.com/go/spanner/client.go
index eaf16faa9..ed3b1ed92 100644
--- a/vendor/cloud.google.com/go/spanner/client.go
+++ b/vendor/cloud.google.com/go/spanner/client.go
@@ -76,6 +76,8 @@ type Client struct {
// Metadata to be sent with each request.
md metadata.MD
idleSessions *sessionPool
+ // sessionLabels for the sessions created by this client.
+ sessionLabels map[string]string
}
// ClientConfig has configurations for the client.
@@ -86,6 +88,9 @@ type ClientConfig struct {
co []option.ClientOption
// SessionPoolConfig is the configuration for session pool.
SessionPoolConfig
+ // SessionLabels for the sessions created by this client.
+ // See https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.v1#session for more info.
+ SessionLabels map[string]string
}
// errDial returns error for dialing to Cloud Spanner.
@@ -126,6 +131,12 @@ func NewClientWithConfig(ctx context.Context, database string, config ClientConf
resourcePrefixHeader, database,
xGoogHeaderKey, xGoogHeaderVal),
}
+ // Make a copy of labels.
+ c.sessionLabels = make(map[string]string)
+ for k, v := range config.SessionLabels {
+ c.sessionLabels[k] = v
+ }
+ // gRPC options
allOpts := []option.ClientOption{
option.WithEndpoint(endpoint),
option.WithScopes(Scope),
@@ -141,7 +152,7 @@ func NewClientWithConfig(ctx context.Context, database string, config ClientConf
if config.NumChannels == 0 {
config.NumChannels = numChannels
}
- // Default MaxOpened sessions
+ // Default configs for session pool.
if config.MaxOpened == 0 {
config.MaxOpened = uint64(config.NumChannels * 100)
}
@@ -161,6 +172,7 @@ func NewClientWithConfig(ctx context.Context, database string, config ClientConf
// TODO: support more loadbalancing options.
return c.rrNext(), nil
}
+ config.SessionPoolConfig.sessionLabels = c.sessionLabels
sp, err := newSessionPool(database, config.SessionPoolConfig, c.md)
if err != nil {
c.Close()
@@ -252,7 +264,7 @@ func (c *Client) BatchReadOnlyTransaction(ctx context.Context, tb TimestampBound
// create session
sc := c.rrNext()
err = runRetryable(ctx, func(ctx context.Context) error {
- sid, e := sc.CreateSession(ctx, &sppb.CreateSessionRequest{Database: c.database})
+ sid, e := sc.CreateSession(ctx, &sppb.CreateSessionRequest{Database: c.database, Session: &sppb.Session{Labels: c.sessionLabels}})
if e != nil {
return e
}
@@ -430,8 +442,7 @@ func (c *Client) Apply(ctx context.Context, ms []*Mutation, opts ...ApplyOption)
}
if !ao.atLeastOnce {
return c.ReadWriteTransaction(ctx, func(ctx context.Context, t *ReadWriteTransaction) error {
- t.BufferWrite(ms)
- return nil
+ return t.BufferWrite(ms)
})
}
diff --git a/vendor/cloud.google.com/go/spanner/doc.go b/vendor/cloud.google.com/go/spanner/doc.go
index 97a3c9aa0..0055b8ca6 100644
--- a/vendor/cloud.google.com/go/spanner/doc.go
+++ b/vendor/cloud.google.com/go/spanner/doc.go
@@ -24,6 +24,10 @@ Note: This package is in beta. Some backwards-incompatible changes may occur.
See https://cloud.google.com/spanner/docs/getting-started/go/ for an introduction
to Cloud Spanner and additional help on using this API.
+See https://godoc.org/cloud.google.com/go for authentication, timeouts,
+connection pooling and similar aspects of this package.
+
+
Creating a Client
To start working with this package, create a client that refers to the database
@@ -307,10 +311,5 @@ Tracing
This client has been instrumented to use OpenCensus tracing (http://opencensus.io).
To enable tracing, see "Enabling Tracing for a Program" at
https://godoc.org/go.opencensus.io/trace. OpenCensus tracing requires Go 1.8 or higher.
-
-Authentication
-
-See examples of authorization and authentication at
-https://godoc.org/cloud.google.com/go#pkg-examples.
*/
package spanner // import "cloud.google.com/go/spanner"
diff --git a/vendor/cloud.google.com/go/spanner/row_test.go b/vendor/cloud.google.com/go/spanner/row_test.go
index 3e3dbc1c3..02bfe3ea4 100644
--- a/vendor/cloud.google.com/go/spanner/row_test.go
+++ b/vendor/cloud.google.com/go/spanner/row_test.go
@@ -37,45 +37,45 @@ var (
row = Row{
[]*sppb.StructType_Field{
// STRING / STRING ARRAY
- {"STRING", stringType()},
- {"NULL_STRING", stringType()},
- {"STRING_ARRAY", listType(stringType())},
- {"NULL_STRING_ARRAY", listType(stringType())},
+ {Name: "STRING", Type: stringType()},
+ {Name: "NULL_STRING", Type: stringType()},
+ {Name: "STRING_ARRAY", Type: listType(stringType())},
+ {Name: "NULL_STRING_ARRAY", Type: listType(stringType())},
// BYTES / BYTES ARRAY
- {"BYTES", bytesType()},
- {"NULL_BYTES", bytesType()},
- {"BYTES_ARRAY", listType(bytesType())},
- {"NULL_BYTES_ARRAY", listType(bytesType())},
+ {Name: "BYTES", Type: bytesType()},
+ {Name: "NULL_BYTES", Type: bytesType()},
+ {Name: "BYTES_ARRAY", Type: listType(bytesType())},
+ {Name: "NULL_BYTES_ARRAY", Type: listType(bytesType())},
// INT64 / INT64 ARRAY
- {"INT64", intType()},
- {"NULL_INT64", intType()},
- {"INT64_ARRAY", listType(intType())},
- {"NULL_INT64_ARRAY", listType(intType())},
+ {Name: "INT64", Type: intType()},
+ {Name: "NULL_INT64", Type: intType()},
+ {Name: "INT64_ARRAY", Type: listType(intType())},
+ {Name: "NULL_INT64_ARRAY", Type: listType(intType())},
// BOOL / BOOL ARRAY
- {"BOOL", boolType()},
- {"NULL_BOOL", boolType()},
- {"BOOL_ARRAY", listType(boolType())},
- {"NULL_BOOL_ARRAY", listType(boolType())},
+ {Name: "BOOL", Type: boolType()},
+ {Name: "NULL_BOOL", Type: boolType()},
+ {Name: "BOOL_ARRAY", Type: listType(boolType())},
+ {Name: "NULL_BOOL_ARRAY", Type: listType(boolType())},
// FLOAT64 / FLOAT64 ARRAY
- {"FLOAT64", floatType()},
- {"NULL_FLOAT64", floatType()},
- {"FLOAT64_ARRAY", listType(floatType())},
- {"NULL_FLOAT64_ARRAY", listType(floatType())},
+ {Name: "FLOAT64", Type: floatType()},
+ {Name: "NULL_FLOAT64", Type: floatType()},
+ {Name: "FLOAT64_ARRAY", Type: listType(floatType())},
+ {Name: "NULL_FLOAT64_ARRAY", Type: listType(floatType())},
// TIMESTAMP / TIMESTAMP ARRAY
- {"TIMESTAMP", timeType()},
- {"NULL_TIMESTAMP", timeType()},
- {"TIMESTAMP_ARRAY", listType(timeType())},
- {"NULL_TIMESTAMP_ARRAY", listType(timeType())},
+ {Name: "TIMESTAMP", Type: timeType()},
+ {Name: "NULL_TIMESTAMP", Type: timeType()},
+ {Name: "TIMESTAMP_ARRAY", Type: listType(timeType())},
+ {Name: "NULL_TIMESTAMP_ARRAY", Type: listType(timeType())},
// DATE / DATE ARRAY
- {"DATE", dateType()},
- {"NULL_DATE", dateType()},
- {"DATE_ARRAY", listType(dateType())},
- {"NULL_DATE_ARRAY", listType(dateType())},
+ {Name: "DATE", Type: dateType()},
+ {Name: "NULL_DATE", Type: dateType()},
+ {Name: "DATE_ARRAY", Type: listType(dateType())},
+ {Name: "NULL_DATE_ARRAY", Type: listType(dateType())},
// STRUCT ARRAY
{
- "STRUCT_ARRAY",
- listType(
+ Name: "STRUCT_ARRAY",
+ Type: listType(
structType(
mkField("Col1", intType()),
mkField("Col2", floatType()),
@@ -84,8 +84,8 @@ var (
),
},
{
- "NULL_STRUCT_ARRAY",
- listType(
+ Name: "NULL_STRUCT_ARRAY",
+ Type: listType(
structType(
mkField("Col1", intType()),
mkField("Col2", floatType()),
@@ -279,7 +279,7 @@ func TestNilDst(t *testing.T) {
{
&Row{
[]*sppb.StructType_Field{
- {"Col0", stringType()},
+ {Name: "Col0", Type: stringType()},
},
[]*proto3.Value{stringProto("value")},
},
@@ -291,7 +291,7 @@ func TestNilDst(t *testing.T) {
{
&Row{
[]*sppb.StructType_Field{
- {"Col0", stringType()},
+ {Name: "Col0", Type: stringType()},
},
[]*proto3.Value{stringProto("value")},
},
@@ -304,8 +304,8 @@ func TestNilDst(t *testing.T) {
&Row{
[]*sppb.StructType_Field{
{
- "Col0",
- listType(
+ Name: "Col0",
+ Type: listType(
structType(
mkField("Col1", intType()),
mkField("Col2", floatType()),
@@ -474,8 +474,8 @@ func TestInvalidColumnRequest(t *testing.T) {
var s string
r := &Row{
[]*sppb.StructType_Field{
- {"Val", stringType()},
- {"Val", stringType()},
+ {Name: "Val", Type: stringType()},
+ {Name: "Val", Type: stringType()},
},
[]*proto3.Value{stringProto("value1"), stringProto("value2")},
}
@@ -491,8 +491,8 @@ func TestInvalidColumnRequest(t *testing.T) {
}{}
r := &Row{
[]*sppb.StructType_Field{
- {"Val", stringType()},
- {"Val", stringType()},
+ {Name: "Val", Type: stringType()},
+ {Name: "Val", Type: stringType()},
},
[]*proto3.Value{stringProto("value1"), stringProto("value2")},
}
@@ -500,8 +500,8 @@ func TestInvalidColumnRequest(t *testing.T) {
},
errDupSpannerField("Val", &sppb.StructType{
Fields: []*sppb.StructType_Field{
- {"Val", stringType()},
- {"Val", stringType()},
+ {Name: "Val", Type: stringType()},
+ {Name: "Val", Type: stringType()},
},
}),
},
@@ -513,13 +513,15 @@ func TestInvalidColumnRequest(t *testing.T) {
}{}
r := &Row{
[]*sppb.StructType_Field{
- {"", stringType()},
+ {Name: "", Type: stringType()},
},
[]*proto3.Value{stringProto("value1")},
}
return r.ToStruct(s)
},
- errUnnamedField(&sppb.StructType{Fields: []*sppb.StructType_Field{{"", stringType()}}}, 0),
+ errUnnamedField(&sppb.StructType{Fields: []*sppb.StructType_Field{
+ {Name: "", Type: stringType()},
+ }}, 0),
},
} {
if gotErr := test.f(); !testEqual(gotErr, test.wantErr) {
@@ -612,10 +614,7 @@ func TestBrokenRow(t *testing.T) {
// Field is not nil, but its type is nil.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- nil,
- },
+ {Name: "Col0", Type: nil},
},
[]*proto3.Value{listProto(stringProto("value1"), stringProto("value2"))},
},
@@ -626,12 +625,7 @@ func TestBrokenRow(t *testing.T) {
// Field is not nil, field type is not nil, but it is an array and its array element type is nil.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- &sppb.Type{
- Code: sppb.TypeCode_ARRAY,
- },
- },
+ {Name: "Col0", Type: &sppb.Type{Code: sppb.TypeCode_ARRAY}},
},
[]*proto3.Value{listProto(stringProto("value1"), stringProto("value2"))},
},
@@ -642,10 +636,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies valid type, value is nil.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- intType(),
- },
+ {Name: "Col0", Type: intType()},
},
[]*proto3.Value{nil},
},
@@ -656,10 +647,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies INT64 type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- intType(),
- },
+ {Name: "Col0", Type: intType()},
},
[]*proto3.Value{{Kind: (*proto3.Value_StringValue)(nil)}},
},
@@ -670,10 +658,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies INT64 type, but value is for Number type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- intType(),
- },
+ {Name: "Col0", Type: intType()},
},
[]*proto3.Value{floatProto(1.0)},
},
@@ -684,10 +669,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies INT64 type, but value is wrongly encoded.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- intType(),
- },
+ {Name: "Col0", Type: intType()},
},
[]*proto3.Value{stringProto("&1")},
},
@@ -701,10 +683,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies INT64 type, but value is wrongly encoded.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- intType(),
- },
+ {Name: "Col0", Type: intType()},
},
[]*proto3.Value{stringProto("&1")},
},
@@ -718,10 +697,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies STRING type, but value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- stringType(),
- },
+ {Name: "Col0", Type: stringType()},
},
[]*proto3.Value{{Kind: (*proto3.Value_StringValue)(nil)}},
},
@@ -732,10 +708,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies STRING type, but value is for ARRAY type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- stringType(),
- },
+ {Name: "Col0", Type: stringType()},
},
[]*proto3.Value{listProto(stringProto("value"))},
},
@@ -746,10 +719,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies FLOAT64 type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- floatType(),
- },
+ {Name: "Col0", Type: floatType()},
},
[]*proto3.Value{{Kind: (*proto3.Value_NumberValue)(nil)}},
},
@@ -760,10 +730,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies FLOAT64 type, but value is for BOOL type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- floatType(),
- },
+ {Name: "Col0", Type: floatType()},
},
[]*proto3.Value{boolProto(true)},
},
@@ -774,10 +741,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies FLOAT64 type, but value is wrongly encoded.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- floatType(),
- },
+ {Name: "Col0", Type: floatType()},
},
[]*proto3.Value{stringProto("nan")},
},
@@ -788,10 +752,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies FLOAT64 type, but value is wrongly encoded.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- floatType(),
- },
+ {Name: "Col0", Type: floatType()},
},
[]*proto3.Value{stringProto("nan")},
},
@@ -802,10 +763,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies BYTES type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- bytesType(),
- },
+ {Name: "Col0", Type: bytesType()},
},
[]*proto3.Value{{Kind: (*proto3.Value_StringValue)(nil)}},
},
@@ -816,10 +774,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies BYTES type, but value is for BOOL type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- bytesType(),
- },
+ {Name: "Col0", Type: bytesType()},
},
[]*proto3.Value{boolProto(false)},
},
@@ -830,10 +785,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies BYTES type, but value is wrongly encoded.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- bytesType(),
- },
+ {Name: "Col0", Type: bytesType()},
},
[]*proto3.Value{stringProto("&&")},
},
@@ -847,10 +799,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies BOOL type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- boolType(),
- },
+ {Name: "Col0", Type: boolType()},
},
[]*proto3.Value{{Kind: (*proto3.Value_BoolValue)(nil)}},
},
@@ -861,10 +810,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies BOOL type, but value is for STRING type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- boolType(),
- },
+ {Name: "Col0", Type: boolType()},
},
[]*proto3.Value{stringProto("false")},
},
@@ -875,10 +821,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies TIMESTAMP type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- timeType(),
- },
+ {Name: "Col0", Type: timeType()},
},
[]*proto3.Value{{Kind: (*proto3.Value_StringValue)(nil)}},
},
@@ -889,10 +832,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies TIMESTAMP type, but value is for BOOL type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- timeType(),
- },
+ {Name: "Col0", Type: timeType()},
},
[]*proto3.Value{boolProto(false)},
},
@@ -903,10 +843,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies TIMESTAMP type, but value is invalid timestamp.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- timeType(),
- },
+ {Name: "Col0", Type: timeType()},
},
[]*proto3.Value{stringProto("junk")},
},
@@ -920,10 +857,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies DATE type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- dateType(),
- },
+ {Name: "Col0", Type: dateType()},
},
[]*proto3.Value{{Kind: (*proto3.Value_StringValue)(nil)}},
},
@@ -934,10 +868,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies DATE type, but value is for BOOL type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- dateType(),
- },
+ {Name: "Col0", Type: dateType()},
},
[]*proto3.Value{boolProto(false)},
},
@@ -948,10 +879,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies DATE type, but value is invalid timestamp.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- dateType(),
- },
+ {Name: "Col0", Type: dateType()},
},
[]*proto3.Value{stringProto("junk")},
},
@@ -966,10 +894,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(intType()),
- },
+ {Name: "Col0", Type: listType(intType())},
},
[]*proto3.Value{{Kind: (*proto3.Value_ListValue)(nil)}},
},
@@ -980,10 +905,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil ListValue.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(intType()),
- },
+ {Name: "Col0", Type: listType(intType())},
},
[]*proto3.Value{{Kind: &proto3.Value_ListValue{}}},
},
@@ -994,10 +916,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for BYTES type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(intType()),
- },
+ {Name: "Col0", Type: listType(intType())},
},
[]*proto3.Value{bytesProto([]byte("value"))},
},
@@ -1008,10 +927,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for ARRAY type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(intType()),
- },
+ {Name: "Col0", Type: listType(intType())},
},
[]*proto3.Value{listProto(boolProto(true))},
},
@@ -1023,10 +939,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(stringType()),
- },
+ {Name: "Col0", Type: listType(stringType())},
},
[]*proto3.Value{{Kind: (*proto3.Value_ListValue)(nil)}},
},
@@ -1037,10 +950,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil ListValue.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(stringType()),
- },
+ {Name: "Col0", Type: listType(stringType())},
},
[]*proto3.Value{{Kind: &proto3.Value_ListValue{}}},
},
@@ -1051,10 +961,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for BOOL type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(stringType()),
- },
+ {Name: "Col0", Type: listType(stringType())},
},
[]*proto3.Value{boolProto(true)},
},
@@ -1065,10 +972,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for ARRAY type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(stringType()),
- },
+ {Name: "Col0", Type: listType(stringType())},
},
[]*proto3.Value{listProto(boolProto(true))},
},
@@ -1080,10 +984,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(floatType()),
- },
+ {Name: "Col0", Type: listType(floatType())},
},
[]*proto3.Value{{Kind: (*proto3.Value_ListValue)(nil)}},
},
@@ -1094,10 +995,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil ListValue.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(floatType()),
- },
+ {Name: "Col0", Type: listType(floatType())},
},
[]*proto3.Value{{Kind: &proto3.Value_ListValue{}}},
},
@@ -1108,10 +1006,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for STRING type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(floatType()),
- },
+ {Name: "Col0", Type: listType(floatType())},
},
[]*proto3.Value{stringProto("value")},
},
@@ -1122,10 +1017,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for ARRAY type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(floatType()),
- },
+ {Name: "Col0", Type: listType(floatType())},
},
[]*proto3.Value{listProto(boolProto(true))},
},
@@ -1137,10 +1029,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(bytesType()),
- },
+ {Name: "Col0", Type: listType(bytesType())},
},
[]*proto3.Value{{Kind: (*proto3.Value_ListValue)(nil)}},
},
@@ -1151,10 +1040,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil ListValue.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(bytesType()),
- },
+ {Name: "Col0", Type: listType(bytesType())},
},
[]*proto3.Value{{Kind: &proto3.Value_ListValue{}}},
},
@@ -1165,10 +1051,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for FLOAT64 type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(bytesType()),
- },
+ {Name: "Col0", Type: listType(bytesType())},
},
[]*proto3.Value{floatProto(1.0)},
},
@@ -1179,10 +1062,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for ARRAY type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(bytesType()),
- },
+ {Name: "Col0", Type: listType(bytesType())},
},
[]*proto3.Value{listProto(floatProto(1.0))},
},
@@ -1194,10 +1074,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(boolType()),
- },
+ {Name: "Col0", Type: listType(boolType())},
},
[]*proto3.Value{{Kind: (*proto3.Value_ListValue)(nil)}},
},
@@ -1208,10 +1085,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil ListValue.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(boolType()),
- },
+ {Name: "Col0", Type: listType(boolType())},
},
[]*proto3.Value{{Kind: &proto3.Value_ListValue{}}},
},
@@ -1222,10 +1096,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for FLOAT64 type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(boolType()),
- },
+ {Name: "Col0", Type: listType(boolType())},
},
[]*proto3.Value{floatProto(1.0)},
},
@@ -1236,10 +1107,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for ARRAY type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(boolType()),
- },
+ {Name: "Col0", Type: listType(boolType())},
},
[]*proto3.Value{listProto(floatProto(1.0))},
},
@@ -1251,10 +1119,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(timeType()),
- },
+ {Name: "Col0", Type: listType(timeType())},
},
[]*proto3.Value{{Kind: (*proto3.Value_ListValue)(nil)}},
},
@@ -1265,10 +1130,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil ListValue.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(timeType()),
- },
+ {Name: "Col0", Type: listType(timeType())},
},
[]*proto3.Value{{Kind: &proto3.Value_ListValue{}}},
},
@@ -1279,10 +1141,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for FLOAT64 type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(timeType()),
- },
+ {Name: "Col0", Type: listType(timeType())},
},
[]*proto3.Value{floatProto(1.0)},
},
@@ -1293,10 +1152,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for ARRAY type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(timeType()),
- },
+ {Name: "Col0", Type: listType(timeType())},
},
[]*proto3.Value{listProto(floatProto(1.0))},
},
@@ -1308,10 +1164,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(dateType()),
- },
+ {Name: "Col0", Type: listType(dateType())},
},
[]*proto3.Value{{Kind: (*proto3.Value_ListValue)(nil)}},
},
@@ -1322,10 +1175,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil ListValue.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(dateType()),
- },
+ {Name: "Col0", Type: listType(dateType())},
},
[]*proto3.Value{{Kind: &proto3.Value_ListValue{}}},
},
@@ -1336,10 +1186,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for FLOAT64 type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(dateType()),
- },
+ {Name: "Col0", Type: listType(dateType())},
},
[]*proto3.Value{floatProto(1.0)},
},
@@ -1350,10 +1197,7 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, but value is for ARRAY type.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(dateType()),
- },
+ {Name: "Col0", Type: listType(dateType())},
},
[]*proto3.Value{listProto(floatProto(1.0))},
},
@@ -1365,16 +1209,11 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil Kind.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(
- structType(
- mkField("Col1", intType()),
- mkField("Col2", floatType()),
- mkField("Col3", stringType()),
- ),
- ),
- },
+ {Name: "Col0", Type: listType(structType(
+ mkField("Col1", intType()),
+ mkField("Col2", floatType()),
+ mkField("Col3", stringType()),
+ ))},
},
[]*proto3.Value{{Kind: (*proto3.Value_ListValue)(nil)}},
},
@@ -1389,16 +1228,11 @@ func TestBrokenRow(t *testing.T) {
// Field specifies ARRAY type, value is having a nil ListValue.
&Row{
[]*sppb.StructType_Field{
- {
- "Col0",
- listType(
- structType(
- mkField("Col1", intType()),
- mkField("Col2", floatType()),
- mkField("Col3", stringType()),
- ),
- ),
- },
+ {Name: "Col0", Type: listType(structType(
+ mkField("Col1", intType()),
+ mkField("Col2", floatType()),
+ mkField("Col3", stringType()),
+ ))},
},
[]*proto3.Value{{Kind: &proto3.Value_ListValue{}}},
},
@@ -1414,8 +1248,8 @@ func TestBrokenRow(t *testing.T) {
&Row{
[]*sppb.StructType_Field{
{
- "Col0",
- listType(
+ Name: "Col0",
+ Type: listType(
structType(
mkField("Col1", intType()),
mkField("Col2", floatType()),
@@ -1434,8 +1268,8 @@ func TestBrokenRow(t *testing.T) {
&Row{
[]*sppb.StructType_Field{
{
- "Col0",
- listType(
+ Name: "Col0",
+ Type: listType(
structType(
mkField("Col1", intType()),
mkField("Col2", floatType()),
@@ -1458,8 +1292,8 @@ func TestBrokenRow(t *testing.T) {
&Row{
[]*sppb.StructType_Field{
{
- "Col0",
- listType(
+ Name: "Col0",
+ Type: listType(
structType(
mkField("Col1", intType()),
mkField("Col2", floatType()),
@@ -1478,8 +1312,8 @@ func TestBrokenRow(t *testing.T) {
&Row{
[]*sppb.StructType_Field{
{
- "Col0",
- listType(
+ Name: "Col0",
+ Type: listType(
structType(
mkField("Col1", intType()),
mkField("Col2", floatType()),
@@ -1503,10 +1337,7 @@ func TestBrokenRow(t *testing.T) {
&Row{
[]*sppb.StructType_Field{
{
- "Col0",
- listType(
- &sppb.Type{Code: sppb.TypeCode_STRUCT},
- ),
+ Name: "Col0", Type: listType(&sppb.Type{Code: sppb.TypeCode_STRUCT}),
},
},
[]*proto3.Value{listProto(listProto(intProto(1), floatProto(2.0), stringProto("3")))},
@@ -1524,8 +1355,8 @@ func TestBrokenRow(t *testing.T) {
&Row{
[]*sppb.StructType_Field{
{
- "Col0",
- listType(
+ Name: "Col0",
+ Type: listType(
structType(
mkField("Col1", intType()),
mkField("Col2", floatType()),
@@ -1699,8 +1530,8 @@ func TestToStructEmbedded(t *testing.T) {
)
r := Row{
[]*sppb.StructType_Field{
- {"F1", stringType()},
- {"F2", stringType()},
+ {Name: "F1", Type: stringType()},
+ {Name: "F2", Type: stringType()},
},
[]*proto3.Value{
stringProto("v1"),
@@ -1777,9 +1608,9 @@ func TestNewRow(t *testing.T) {
values: []interface{}{5, "abc", GenericColumnValue{listType(intType()), listProto(intProto(91), nullProto(), intProto(87))}},
want: &Row{
[]*sppb.StructType_Field{
- {"a", intType()},
- {"b", stringType()},
- {"c", listType(intType())},
+ {Name: "a", Type: intType()},
+ {Name: "b", Type: stringType()},
+ {Name: "c", Type: listType(intType())},
},
[]*proto3.Value{
intProto(5),
diff --git a/vendor/cloud.google.com/go/spanner/session.go b/vendor/cloud.google.com/go/spanner/session.go
index 216e139e3..f4d203d09 100644
--- a/vendor/cloud.google.com/go/spanner/session.go
+++ b/vendor/cloud.google.com/go/spanner/session.go
@@ -310,6 +310,8 @@ type SessionPoolConfig struct {
HealthCheckInterval time.Duration
// healthCheckSampleInterval is how often the health checker samples live session (for use in maintaining session pool size). Defaults to 1 min.
healthCheckSampleInterval time.Duration
+ // sessionLabels for the sessions created in the session pool.
+ sessionLabels map[string]string
}
// errNoRPCGetter returns error for SessionPoolConfig missing getRPCClient method.
@@ -318,9 +320,9 @@ func errNoRPCGetter() error {
}
// errMinOpenedGTMapOpened returns error for SessionPoolConfig.MaxOpened < SessionPoolConfig.MinOpened when SessionPoolConfig.MaxOpened is set.
-func errMinOpenedGTMaxOpened(spc *SessionPoolConfig) error {
+func errMinOpenedGTMaxOpened(maxOpened, minOpened uint64) error {
return spannerErrorf(codes.InvalidArgument,
- "require SessionPoolConfig.MaxOpened >= SessionPoolConfig.MinOpened, got %v and %v", spc.MaxOpened, spc.MinOpened)
+ "require SessionPoolConfig.MaxOpened >= SessionPoolConfig.MinOpened, got %v and %v", maxOpened, minOpened)
}
// validate verifies that the SessionPoolConfig is good for use.
@@ -329,7 +331,7 @@ func (spc *SessionPoolConfig) validate() error {
return errNoRPCGetter()
}
if spc.MinOpened > spc.MaxOpened && spc.MaxOpened > 0 {
- return errMinOpenedGTMaxOpened(spc)
+ return errMinOpenedGTMaxOpened(spc.MaxOpened, spc.MinOpened)
}
return nil
}
@@ -463,7 +465,10 @@ func (p *sessionPool) createSession(ctx context.Context) (*session, error) {
}
var s *session
err = runRetryable(ctx, func(ctx context.Context) error {
- sid, e := sc.CreateSession(ctx, &sppb.CreateSessionRequest{Database: p.db})
+ sid, e := sc.CreateSession(ctx, &sppb.CreateSessionRequest{
+ Database: p.db,
+ Session: &sppb.Session{Labels: p.sessionLabels},
+ })
if e != nil {
return e
}
diff --git a/vendor/cloud.google.com/go/spanner/session_test.go b/vendor/cloud.google.com/go/spanner/session_test.go
index c5bc8c9a3..48ea2e999 100644
--- a/vendor/cloud.google.com/go/spanner/session_test.go
+++ b/vendor/cloud.google.com/go/spanner/session_test.go
@@ -54,6 +54,35 @@ func setup(t *testing.T, spc SessionPoolConfig) (sp *sessionPool, sc *testutil.M
return
}
+// TestSessionPoolConfigValidation tests session pool config validation.
+func TestSessionPoolConfigValidation(t *testing.T) {
+ t.Parallel()
+ sc := testutil.NewMockCloudSpannerClient(t)
+ for _, test := range []struct {
+ spc SessionPoolConfig
+ err error
+ }{
+ {
+ SessionPoolConfig{},
+ errNoRPCGetter(),
+ },
+ {
+ SessionPoolConfig{
+ getRPCClient: func() (sppb.SpannerClient, error) {
+ return sc, nil
+ },
+ MinOpened: 10,
+ MaxOpened: 5,
+ },
+ errMinOpenedGTMaxOpened(5, 10),
+ },
+ } {
+ if _, err := newSessionPool("mockdb", test.spc, nil); !testEqual(err, test.err) {
+ t.Errorf("want %v, got %v", test.err, err)
+ }
+ }
+}
+
// TestSessionCreation tests session creation during sessionPool.Take().
func TestSessionCreation(t *testing.T) {
t.Parallel()
diff --git a/vendor/cloud.google.com/go/spanner/spanner_test.go b/vendor/cloud.google.com/go/spanner/spanner_test.go
index d8dbec154..d5a56f38d 100644
--- a/vendor/cloud.google.com/go/spanner/spanner_test.go
+++ b/vendor/cloud.google.com/go/spanner/spanner_test.go
@@ -183,7 +183,7 @@ func prepare(ctx context.Context, t *testing.T, statements []string) (client *Cl
}
return client, dbPath, func() {
client.Close()
- if err := admin.DropDatabase(ctx, &adminpb.DropDatabaseRequest{dbPath}); err != nil {
+ if err := admin.DropDatabase(ctx, &adminpb.DropDatabaseRequest{Database: dbPath}); err != nil {
t.Logf("failed to drop database %s (error %v), might need a manual removal",
dbPath, err)
}
@@ -672,11 +672,10 @@ func TestReadWriteTransaction(t *testing.T) {
}
bf--
bb++
- tx.BufferWrite([]*Mutation{
+ return tx.BufferWrite([]*Mutation{
Update("Accounts", []string{"AccountId", "Balance"}, []interface{}{int64(1), bf}),
Update("Accounts", []string{"AccountId", "Balance"}, []interface{}{int64(2), bb}),
})
- return nil
})
if err != nil {
t.Fatalf("%d: failed to execute transaction: %v", iter, err)
@@ -924,7 +923,7 @@ func TestNestedTransaction(t *testing.T) {
ctx := context.Background()
client, _, tearDown := prepare(ctx, t, singerDBStatements)
defer tearDown()
- client.ReadWriteTransaction(ctx, func(ctx context.Context, tx *ReadWriteTransaction) error {
+ _, err := client.ReadWriteTransaction(ctx, func(ctx context.Context, tx *ReadWriteTransaction) error {
_, err := client.ReadWriteTransaction(ctx,
func(context.Context, *ReadWriteTransaction) error { return nil })
if ErrCode(err) != codes.FailedPrecondition {
@@ -942,6 +941,9 @@ func TestNestedTransaction(t *testing.T) {
}
return nil
})
+ if err != nil {
+ t.Fatal(err)
+ }
}
// Test client recovery on database recreation.
@@ -953,7 +955,7 @@ func TestDbRemovalRecovery(t *testing.T) {
defer tearDown()
// Drop the testing database.
- if err := admin.DropDatabase(ctx, &adminpb.DropDatabaseRequest{dbPath}); err != nil {
+ if err := admin.DropDatabase(ctx, &adminpb.DropDatabaseRequest{Database: dbPath}); err != nil {
t.Fatalf("failed to drop testing database %v: %v", dbPath, err)
}
@@ -1526,8 +1528,11 @@ func TestTransactionRunner(t *testing.T) {
}
// txn 1 can abort, in that case we skip closing the channel on retry.
once.Do(func() { close(cTxn1Start) })
- tx.BufferWrite([]*Mutation{
+ e = tx.BufferWrite([]*Mutation{
Update("Accounts", []string{"AccountId", "Balance"}, []interface{}{int64(1), int64(b + 1)})})
+ if e != nil {
+ return e
+ }
// Wait for second transaction.
<-cTxn2Start
return nil
@@ -1563,9 +1568,8 @@ func TestTransactionRunner(t *testing.T) {
if b2, e = readBalance(tx, 2, true); e != nil {
return e
}
- tx.BufferWrite([]*Mutation{
+ return tx.BufferWrite([]*Mutation{
Update("Accounts", []string{"AccountId", "Balance"}, []interface{}{int64(2), int64(b1 + b2)})})
- return nil
})
if e != nil {
t.Errorf("Transaction 2 commit, got %v, want nil.", e)
diff --git a/vendor/cloud.google.com/go/dlp/apiv2beta1/InspectContent_smoke_test.go b/vendor/cloud.google.com/go/speech/apiv1p1beta1/Recognize_smoke_test.go
similarity index 65%
rename from vendor/cloud.google.com/go/dlp/apiv2beta1/InspectContent_smoke_test.go
rename to vendor/cloud.google.com/go/speech/apiv1p1beta1/Recognize_smoke_test.go
index 3c66669d1..9df22c36d 100644
--- a/vendor/cloud.google.com/go/dlp/apiv2beta1/InspectContent_smoke_test.go
+++ b/vendor/cloud.google.com/go/speech/apiv1p1beta1/Recognize_smoke_test.go
@@ -14,10 +14,10 @@
// AUTO-GENERATED CODE. DO NOT EDIT.
-package dlp
+package speech
import (
- dlppb "google.golang.org/genproto/googleapis/privacy/dlp/v2beta1"
+ speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1"
)
import (
@@ -37,7 +37,7 @@ var _ = iterator.Done
var _ = strconv.FormatUint
var _ = time.Now
-func TestDlpServiceSmoke(t *testing.T) {
+func TestSpeechSmoke(t *testing.T) {
if testing.Short() {
t.Skip("skipping smoke test in short mode")
}
@@ -55,25 +55,26 @@ func TestDlpServiceSmoke(t *testing.T) {
t.Fatal(err)
}
- var minLikelihood dlppb.Likelihood = dlppb.Likelihood_POSSIBLE
- var inspectConfig = &dlppb.InspectConfig{
- MinLikelihood: minLikelihood,
+ var languageCode string = "en-US"
+ var sampleRateHertz int32 = 44100
+ var encoding speechpb.RecognitionConfig_AudioEncoding = speechpb.RecognitionConfig_FLAC
+ var config = &speechpb.RecognitionConfig{
+ LanguageCode: languageCode,
+ SampleRateHertz: sampleRateHertz,
+ Encoding: encoding,
}
- var type_ string = "text/plain"
- var value string = "my phone number is 215-512-1212"
- var itemsElement = &dlppb.ContentItem{
- Type: type_,
- DataItem: &dlppb.ContentItem_Value{
- Value: value,
+ var uri string = "gs://gapic-toolkit/hello.flac"
+ var audio = &speechpb.RecognitionAudio{
+ AudioSource: &speechpb.RecognitionAudio_Uri{
+ Uri: uri,
},
}
- var items = []*dlppb.ContentItem{itemsElement}
- var request = &dlppb.InspectContentRequest{
- InspectConfig: inspectConfig,
- Items: items,
+ var request = &speechpb.RecognizeRequest{
+ Config: config,
+ Audio: audio,
}
- if _, err := c.InspectContent(ctx, request); err != nil {
+ if _, err := c.Recognize(ctx, request); err != nil {
t.Error(err)
}
}
diff --git a/vendor/cloud.google.com/go/speech/apiv1p1beta1/doc.go b/vendor/cloud.google.com/go/speech/apiv1p1beta1/doc.go
new file mode 100644
index 000000000..6781bd156
--- /dev/null
+++ b/vendor/cloud.google.com/go/speech/apiv1p1beta1/doc.go
@@ -0,0 +1,46 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+// Package speech is an auto-generated package for the
+// Cloud Speech API.
+//
+// NOTE: This package is in alpha. It is not stable, and is likely to change.
+//
+// Converts audio to text by applying powerful neural network models.
+package speech // import "cloud.google.com/go/speech/apiv1p1beta1"
+
+import (
+ "golang.org/x/net/context"
+ "google.golang.org/grpc/metadata"
+)
+
+func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
+ out, _ := metadata.FromOutgoingContext(ctx)
+ out = out.Copy()
+ for _, md := range mds {
+ for k, v := range md {
+ out[k] = append(out[k], v...)
+ }
+ }
+ return metadata.NewOutgoingContext(ctx, out)
+}
+
+// DefaultAuthScopes reports the default set of authentication scopes to use with this package.
+func DefaultAuthScopes() []string {
+ return []string{
+ "https://www.googleapis.com/auth/cloud-platform",
+ }
+}
diff --git a/vendor/cloud.google.com/go/speech/apiv1p1beta1/mock_test.go b/vendor/cloud.google.com/go/speech/apiv1p1beta1/mock_test.go
new file mode 100644
index 000000000..21e6705af
--- /dev/null
+++ b/vendor/cloud.google.com/go/speech/apiv1p1beta1/mock_test.go
@@ -0,0 +1,405 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package speech
+
+import (
+ speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1"
+ longrunningpb "google.golang.org/genproto/googleapis/longrunning"
+)
+
+import (
+ "flag"
+ "fmt"
+ "io"
+ "log"
+ "net"
+ "os"
+ "strings"
+ "testing"
+
+ "github.com/golang/protobuf/proto"
+ "github.com/golang/protobuf/ptypes"
+ "golang.org/x/net/context"
+ "google.golang.org/api/option"
+ status "google.golang.org/genproto/googleapis/rpc/status"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+ gstatus "google.golang.org/grpc/status"
+)
+
+var _ = io.EOF
+var _ = ptypes.MarshalAny
+var _ status.Status
+
+type mockSpeechServer struct {
+ // Embed for forward compatibility.
+ // Tests will keep working if more methods are added
+ // in the future.
+ speechpb.SpeechServer
+
+ reqs []proto.Message
+
+ // If set, all calls return this error.
+ err error
+
+ // responses to return if err == nil
+ resps []proto.Message
+}
+
+func (s *mockSpeechServer) Recognize(ctx context.Context, req *speechpb.RecognizeRequest) (*speechpb.RecognizeResponse, 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].(*speechpb.RecognizeResponse), nil
+}
+
+func (s *mockSpeechServer) LongRunningRecognize(ctx context.Context, req *speechpb.LongRunningRecognizeRequest) (*longrunningpb.Operation, error) {
+ md, _ := metadata.FromIncomingContext(ctx)
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ s.reqs = append(s.reqs, req)
+ if s.err != nil {
+ return nil, s.err
+ }
+ return s.resps[0].(*longrunningpb.Operation), nil
+}
+
+func (s *mockSpeechServer) StreamingRecognize(stream speechpb.Speech_StreamingRecognizeServer) error {
+ md, _ := metadata.FromIncomingContext(stream.Context())
+ if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") {
+ return fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg)
+ }
+ for {
+ if req, err := stream.Recv(); err == io.EOF {
+ break
+ } else if err != nil {
+ return err
+ } else {
+ s.reqs = append(s.reqs, req)
+ }
+ }
+ if s.err != nil {
+ return s.err
+ }
+ for _, v := range s.resps {
+ if err := stream.Send(v.(*speechpb.StreamingRecognizeResponse)); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// clientOpt is the option tests should use to connect to the test server.
+// It is initialized by TestMain.
+var clientOpt option.ClientOption
+
+var (
+ mockSpeech mockSpeechServer
+)
+
+func TestMain(m *testing.M) {
+ flag.Parse()
+
+ serv := grpc.NewServer()
+ speechpb.RegisterSpeechServer(serv, &mockSpeech)
+
+ lis, err := net.Listen("tcp", "localhost:0")
+ if err != nil {
+ log.Fatal(err)
+ }
+ go serv.Serve(lis)
+
+ conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure())
+ if err != nil {
+ log.Fatal(err)
+ }
+ clientOpt = option.WithGRPCConn(conn)
+
+ os.Exit(m.Run())
+}
+
+func TestSpeechRecognize(t *testing.T) {
+ var expectedResponse *speechpb.RecognizeResponse = &speechpb.RecognizeResponse{}
+
+ mockSpeech.err = nil
+ mockSpeech.reqs = nil
+
+ mockSpeech.resps = append(mockSpeech.resps[:0], expectedResponse)
+
+ var encoding speechpb.RecognitionConfig_AudioEncoding = speechpb.RecognitionConfig_FLAC
+ var sampleRateHertz int32 = 44100
+ var languageCode string = "en-US"
+ var config = &speechpb.RecognitionConfig{
+ Encoding: encoding,
+ SampleRateHertz: sampleRateHertz,
+ LanguageCode: languageCode,
+ }
+ var uri string = "gs://bucket_name/file_name.flac"
+ var audio = &speechpb.RecognitionAudio{
+ AudioSource: &speechpb.RecognitionAudio_Uri{
+ Uri: uri,
+ },
+ }
+ var request = &speechpb.RecognizeRequest{
+ Config: config,
+ Audio: audio,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.Recognize(context.Background(), request)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockSpeech.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 TestSpeechRecognizeError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockSpeech.err = gstatus.Error(errCode, "test error")
+
+ var encoding speechpb.RecognitionConfig_AudioEncoding = speechpb.RecognitionConfig_FLAC
+ var sampleRateHertz int32 = 44100
+ var languageCode string = "en-US"
+ var config = &speechpb.RecognitionConfig{
+ Encoding: encoding,
+ SampleRateHertz: sampleRateHertz,
+ LanguageCode: languageCode,
+ }
+ var uri string = "gs://bucket_name/file_name.flac"
+ var audio = &speechpb.RecognitionAudio{
+ AudioSource: &speechpb.RecognitionAudio_Uri{
+ Uri: uri,
+ },
+ }
+ var request = &speechpb.RecognizeRequest{
+ Config: config,
+ Audio: audio,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.Recognize(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 TestSpeechLongRunningRecognize(t *testing.T) {
+ var expectedResponse *speechpb.LongRunningRecognizeResponse = &speechpb.LongRunningRecognizeResponse{}
+
+ mockSpeech.err = nil
+ mockSpeech.reqs = nil
+
+ any, err := ptypes.MarshalAny(expectedResponse)
+ if err != nil {
+ t.Fatal(err)
+ }
+ mockSpeech.resps = append(mockSpeech.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Response{Response: any},
+ })
+
+ var encoding speechpb.RecognitionConfig_AudioEncoding = speechpb.RecognitionConfig_FLAC
+ var sampleRateHertz int32 = 44100
+ var languageCode string = "en-US"
+ var config = &speechpb.RecognitionConfig{
+ Encoding: encoding,
+ SampleRateHertz: sampleRateHertz,
+ LanguageCode: languageCode,
+ }
+ var uri string = "gs://bucket_name/file_name.flac"
+ var audio = &speechpb.RecognitionAudio{
+ AudioSource: &speechpb.RecognitionAudio_Uri{
+ Uri: uri,
+ },
+ }
+ var request = &speechpb.LongRunningRecognizeRequest{
+ Config: config,
+ Audio: audio,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.LongRunningRecognize(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ resp, err := respLRO.Wait(context.Background())
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockSpeech.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 TestSpeechLongRunningRecognizeError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockSpeech.err = nil
+ mockSpeech.resps = append(mockSpeech.resps[:0], &longrunningpb.Operation{
+ Name: "longrunning-test",
+ Done: true,
+ Result: &longrunningpb.Operation_Error{
+ Error: &status.Status{
+ Code: int32(errCode),
+ Message: "test error",
+ },
+ },
+ })
+
+ var encoding speechpb.RecognitionConfig_AudioEncoding = speechpb.RecognitionConfig_FLAC
+ var sampleRateHertz int32 = 44100
+ var languageCode string = "en-US"
+ var config = &speechpb.RecognitionConfig{
+ Encoding: encoding,
+ SampleRateHertz: sampleRateHertz,
+ LanguageCode: languageCode,
+ }
+ var uri string = "gs://bucket_name/file_name.flac"
+ var audio = &speechpb.RecognitionAudio{
+ AudioSource: &speechpb.RecognitionAudio_Uri{
+ Uri: uri,
+ },
+ }
+ var request = &speechpb.LongRunningRecognizeRequest{
+ Config: config,
+ Audio: audio,
+ }
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ respLRO, err := c.LongRunningRecognize(context.Background(), request)
+ if err != nil {
+ t.Fatal(err)
+ }
+ resp, err := respLRO.Wait(context.Background())
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+ _ = resp
+}
+func TestSpeechStreamingRecognize(t *testing.T) {
+ var expectedResponse *speechpb.StreamingRecognizeResponse = &speechpb.StreamingRecognizeResponse{}
+
+ mockSpeech.err = nil
+ mockSpeech.reqs = nil
+
+ mockSpeech.resps = append(mockSpeech.resps[:0], expectedResponse)
+
+ var request *speechpb.StreamingRecognizeRequest = &speechpb.StreamingRecognizeRequest{}
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ stream, err := c.StreamingRecognize(context.Background())
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err := stream.Send(request); err != nil {
+ t.Fatal(err)
+ }
+ if err := stream.CloseSend(); err != nil {
+ t.Fatal(err)
+ }
+ resp, err := stream.Recv()
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockSpeech.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 TestSpeechStreamingRecognizeError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockSpeech.err = gstatus.Error(errCode, "test error")
+
+ var request *speechpb.StreamingRecognizeRequest = &speechpb.StreamingRecognizeRequest{}
+
+ c, err := NewClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ stream, err := c.StreamingRecognize(context.Background())
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err := stream.Send(request); err != nil {
+ t.Fatal(err)
+ }
+ if err := stream.CloseSend(); err != nil {
+ t.Fatal(err)
+ }
+ resp, err := stream.Recv()
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+ _ = resp
+}
diff --git a/vendor/cloud.google.com/go/speech/apiv1p1beta1/speech_client.go b/vendor/cloud.google.com/go/speech/apiv1p1beta1/speech_client.go
new file mode 100644
index 000000000..3ee77b9b2
--- /dev/null
+++ b/vendor/cloud.google.com/go/speech/apiv1p1beta1/speech_client.go
@@ -0,0 +1,263 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package speech
+
+import (
+ "time"
+
+ "cloud.google.com/go/internal/version"
+ "cloud.google.com/go/longrunning"
+ lroauto "cloud.google.com/go/longrunning/autogen"
+ gax "github.com/googleapis/gax-go"
+ "golang.org/x/net/context"
+ "google.golang.org/api/option"
+ "google.golang.org/api/transport"
+ speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1"
+ longrunningpb "google.golang.org/genproto/googleapis/longrunning"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+)
+
+// CallOptions contains the retry settings for each method of Client.
+type CallOptions struct {
+ Recognize []gax.CallOption
+ LongRunningRecognize []gax.CallOption
+ StreamingRecognize []gax.CallOption
+}
+
+func defaultClientOptions() []option.ClientOption {
+ return []option.ClientOption{
+ option.WithEndpoint("speech.googleapis.com:443"),
+ option.WithScopes(DefaultAuthScopes()...),
+ }
+}
+
+func defaultCallOptions() *CallOptions {
+ retry := map[[2]string][]gax.CallOption{
+ {"default", "idempotent"}: {
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.3,
+ })
+ }),
+ },
+ }
+ return &CallOptions{
+ Recognize: retry[[2]string{"default", "idempotent"}],
+ LongRunningRecognize: retry[[2]string{"default", "non_idempotent"}],
+ StreamingRecognize: retry[[2]string{"default", "idempotent"}],
+ }
+}
+
+// Client is a client for interacting with Cloud Speech API.
+type Client struct {
+ // The connection to the service.
+ conn *grpc.ClientConn
+
+ // The gRPC API client.
+ client speechpb.SpeechClient
+
+ // LROClient is used internally to handle longrunning operations.
+ // It is exposed so that its CallOptions can be modified if required.
+ // Users should not Close this client.
+ LROClient *lroauto.OperationsClient
+
+ // The call options for this service.
+ CallOptions *CallOptions
+
+ // The x-goog-* metadata to be sent with each request.
+ xGoogMetadata metadata.MD
+}
+
+// NewClient creates a new speech client.
+//
+// Service that implements Google Cloud Speech API.
+func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) {
+ conn, err := transport.DialGRPC(ctx, append(defaultClientOptions(), opts...)...)
+ if err != nil {
+ return nil, err
+ }
+ c := &Client{
+ conn: conn,
+ CallOptions: defaultCallOptions(),
+
+ client: speechpb.NewSpeechClient(conn),
+ }
+ c.setGoogleClientInfo()
+
+ c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn))
+ if err != nil {
+ // This error "should not happen", since we are just reusing old connection
+ // and never actually need to dial.
+ // If this does happen, we could leak conn. However, we cannot close conn:
+ // If the user invoked the function with option.WithGRPCConn,
+ // we would close a connection that's still in use.
+ // TODO(pongad): investigate error conditions.
+ return nil, err
+ }
+ return c, nil
+}
+
+// Connection returns the client's connection to the API service.
+func (c *Client) Connection() *grpc.ClientConn {
+ return c.conn
+}
+
+// Close closes the connection to the API service. The user should invoke this when
+// the client is no longer required.
+func (c *Client) Close() error {
+ return c.conn.Close()
+}
+
+// setGoogleClientInfo sets the name and version of the application in
+// the `x-goog-api-client` header passed on each request. Intended for
+// use by Google-written clients.
+func (c *Client) setGoogleClientInfo(keyval ...string) {
+ kv := append([]string{"gl-go", version.Go()}, keyval...)
+ kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
+ c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
+}
+
+// Recognize performs synchronous speech recognition: receive results after all audio
+// has been sent and processed.
+func (c *Client) Recognize(ctx context.Context, req *speechpb.RecognizeRequest, opts ...gax.CallOption) (*speechpb.RecognizeResponse, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.Recognize[0:len(c.CallOptions.Recognize):len(c.CallOptions.Recognize)], opts...)
+ var resp *speechpb.RecognizeResponse
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.Recognize(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// LongRunningRecognize performs asynchronous speech recognition: receive results via the
+// google.longrunning.Operations interface. Returns either an
+// Operation.error or an Operation.response which contains
+// a LongRunningRecognizeResponse message.
+func (c *Client) LongRunningRecognize(ctx context.Context, req *speechpb.LongRunningRecognizeRequest, opts ...gax.CallOption) (*LongRunningRecognizeOperation, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.LongRunningRecognize[0:len(c.CallOptions.LongRunningRecognize):len(c.CallOptions.LongRunningRecognize)], opts...)
+ var resp *longrunningpb.Operation
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.LongRunningRecognize(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &LongRunningRecognizeOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, resp),
+ }, nil
+}
+
+// StreamingRecognize performs bidirectional streaming speech recognition: receive results while
+// sending audio. This method is only available via the gRPC API (not REST).
+func (c *Client) StreamingRecognize(ctx context.Context, opts ...gax.CallOption) (speechpb.Speech_StreamingRecognizeClient, error) {
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
+ opts = append(c.CallOptions.StreamingRecognize[0:len(c.CallOptions.StreamingRecognize):len(c.CallOptions.StreamingRecognize)], opts...)
+ var resp speechpb.Speech_StreamingRecognizeClient
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.StreamingRecognize(ctx, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+// LongRunningRecognizeOperation manages a long-running operation from LongRunningRecognize.
+type LongRunningRecognizeOperation struct {
+ lro *longrunning.Operation
+}
+
+// LongRunningRecognizeOperation returns a new LongRunningRecognizeOperation from a given name.
+// The name must be that of a previously created LongRunningRecognizeOperation, possibly from a different process.
+func (c *Client) LongRunningRecognizeOperation(name string) *LongRunningRecognizeOperation {
+ return &LongRunningRecognizeOperation{
+ lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}),
+ }
+}
+
+// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
+//
+// See documentation of Poll for error-handling information.
+func (op *LongRunningRecognizeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*speechpb.LongRunningRecognizeResponse, error) {
+ var resp speechpb.LongRunningRecognizeResponse
+ if err := op.lro.WaitWithInterval(ctx, &resp, 45000*time.Millisecond, opts...); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// Poll fetches the latest state of the long-running operation.
+//
+// Poll also fetches the latest metadata, which can be retrieved by Metadata.
+//
+// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
+// the operation has completed with failure, the error is returned and op.Done will return true.
+// If Poll succeeds and the operation has completed successfully,
+// op.Done will return true, and the response of the operation is returned.
+// If Poll succeeds and the operation has not completed, the returned response and error are both nil.
+func (op *LongRunningRecognizeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*speechpb.LongRunningRecognizeResponse, error) {
+ var resp speechpb.LongRunningRecognizeResponse
+ if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
+ return nil, err
+ }
+ if !op.Done() {
+ return nil, nil
+ }
+ return &resp, nil
+}
+
+// Metadata returns metadata associated with the long-running operation.
+// Metadata itself does not contact the server, but Poll does.
+// To get the latest metadata, call this method after a successful call to Poll.
+// If the metadata is not available, the returned metadata and error are both nil.
+func (op *LongRunningRecognizeOperation) Metadata() (*speechpb.LongRunningRecognizeMetadata, error) {
+ var meta speechpb.LongRunningRecognizeMetadata
+ if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ return &meta, nil
+}
+
+// Done reports whether the long-running operation has completed.
+func (op *LongRunningRecognizeOperation) Done() bool {
+ return op.lro.Done()
+}
+
+// Name returns the name of the long-running operation.
+// The name is assigned by the server and is unique within the service from which the operation is created.
+func (op *LongRunningRecognizeOperation) Name() string {
+ return op.lro.Name()
+}
diff --git a/vendor/cloud.google.com/go/speech/apiv1p1beta1/speech_client_example_test.go b/vendor/cloud.google.com/go/speech/apiv1p1beta1/speech_client_example_test.go
new file mode 100644
index 000000000..c3ccb0755
--- /dev/null
+++ b/vendor/cloud.google.com/go/speech/apiv1p1beta1/speech_client_example_test.go
@@ -0,0 +1,110 @@
+// Copyright 2018 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// AUTO-GENERATED CODE. DO NOT EDIT.
+
+package speech_test
+
+import (
+ "io"
+
+ "cloud.google.com/go/speech/apiv1p1beta1"
+ "golang.org/x/net/context"
+ speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1"
+)
+
+func ExampleNewClient() {
+ ctx := context.Background()
+ c, err := speech.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use client.
+ _ = c
+}
+
+func ExampleClient_Recognize() {
+ ctx := context.Background()
+ c, err := speech.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &speechpb.RecognizeRequest{
+ // TODO: Fill request struct fields.
+ }
+ resp, err := c.Recognize(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleClient_LongRunningRecognize() {
+ ctx := context.Background()
+ c, err := speech.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &speechpb.LongRunningRecognizeRequest{
+ // TODO: Fill request struct fields.
+ }
+ op, err := c.LongRunningRecognize(ctx, req)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ resp, err := op.Wait(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+}
+
+func ExampleClient_StreamingRecognize() {
+ ctx := context.Background()
+ c, err := speech.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ stream, err := c.StreamingRecognize(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ go func() {
+ reqs := []*speechpb.StreamingRecognizeRequest{
+ // TODO: Create requests.
+ }
+ for _, req := range reqs {
+ if err := stream.Send(req); err != nil {
+ // TODO: Handle error.
+ }
+ }
+ stream.CloseSend()
+ }()
+ for {
+ resp, err := stream.Recv()
+ if err == io.EOF {
+ break
+ }
+ if err != nil {
+ // TODO: handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
diff --git a/vendor/cloud.google.com/go/storage/bucket.go b/vendor/cloud.google.com/go/storage/bucket.go
index 41e5d42b7..d484e421a 100644
--- a/vendor/cloud.google.com/go/storage/bucket.go
+++ b/vendor/cloud.google.com/go/storage/bucket.go
@@ -269,6 +269,9 @@ type BucketAttrs struct {
// The bucket's Cross-Origin Resource Sharing (CORS) configuration.
CORS []CORS
+
+ // The encryption configuration used by default for newly inserted objects.
+ Encryption *BucketEncryption
}
// Lifecycle is the lifecycle configuration for objects in the bucket.
@@ -406,6 +409,7 @@ func newBucket(b *raw.Bucket) (*BucketAttrs, error) {
Lifecycle: toLifecycle(b.Lifecycle),
RetentionPolicy: rp,
CORS: toCORS(b.Cors),
+ Encryption: toBucketEncryption(b.Encryption),
}
acl := make([]ACLRule, len(b.Acl))
for i, rule := range b.Acl {
@@ -470,10 +474,11 @@ func (b *BucketAttrs) toRawBucket() *raw.Bucket {
Lifecycle: toRawLifecycle(b.Lifecycle),
RetentionPolicy: b.RetentionPolicy.toRawRetentionPolicy(),
Cors: toRawCORS(b.CORS),
+ Encryption: b.Encryption.toRawBucketEncryption(),
}
}
-// The bucket's Cross-Origin Resource Sharing (CORS) configuration.
+// CORS is the bucket's Cross-Origin Resource Sharing (CORS) configuration.
type CORS struct {
// MaxAge is the value to return in the Access-Control-Max-Age
// header used in preflight responses.
@@ -495,14 +500,23 @@ type CORS struct {
ResponseHeaders []string
}
+// BucketEncryption is a bucket's encryption configuration.
+type BucketEncryption struct {
+ // A Cloud KMS key name, in the form
+ // projects/P/locations/L/keyRings/R/cryptoKeys/K, that will be used to encrypt
+ // objects inserted into this bucket, if no encryption method is specified.
+ // The key's location must be the same as the bucket's.
+ DefaultKMSKeyName string
+}
+
type BucketAttrsToUpdate struct {
- // VersioningEnabled, if set, updates whether the bucket uses versioning.
+ // If set, updates whether the bucket uses versioning.
VersioningEnabled optional.Bool
- // RequesterPays, if set, updates whether the bucket is a Requester Pays bucket.
+ // If set, updates whether the bucket is a Requester Pays bucket.
RequesterPays optional.Bool
- // RetentionPolicy, if set, updates the retention policy of the bucket. Using
+ // If set, updates the retention policy of the bucket. Using
// RetentionPolicy.RetentionPeriod = 0 will delete the existing policy.
//
// This feature is in private alpha release. It is not currently available to
@@ -510,11 +524,15 @@ type BucketAttrsToUpdate struct {
// subject to any SLA or deprecation policy.
RetentionPolicy *RetentionPolicy
- // CORS, if set, replaces the CORS configuration with a new configuration.
- // When an empty slice is provided, all CORS policies are removed; when nil
- // is provided, the value is ignored in the update.
+ // If set, replaces the CORS configuration with a new configuration.
+ // An empty (rather than nil) slice causes all CORS policies to be removed.
CORS []CORS
+ // If set, replaces the encryption configuration of the bucket. Using
+ // BucketEncryption.DefaultKMSKeyName = "" will delete the existing
+ // configuration.
+ Encryption *BucketEncryption
+
setLabels map[string]string
deleteLabels map[string]bool
}
@@ -563,6 +581,14 @@ func (ua *BucketAttrsToUpdate) toRawBucket() *raw.Bucket {
ForceSendFields: []string{"RequesterPays"},
}
}
+ if ua.Encryption != nil {
+ if ua.Encryption.DefaultKMSKeyName == "" {
+ rb.NullFields = append(rb.NullFields, "Encryption")
+ rb.Encryption = nil
+ } else {
+ rb.Encryption = ua.Encryption.toRawBucketEncryption()
+ }
+ }
if ua.setLabels != nil || ua.deleteLabels != nil {
rb.Labels = map[string]string{}
for k, v := range ua.setLabels {
@@ -788,6 +814,22 @@ func toLifecycle(rl *raw.BucketLifecycle) Lifecycle {
return l
}
+func (e *BucketEncryption) toRawBucketEncryption() *raw.BucketEncryption {
+ if e == nil {
+ return nil
+ }
+ return &raw.BucketEncryption{
+ DefaultKmsKeyName: e.DefaultKMSKeyName,
+ }
+}
+
+func toBucketEncryption(e *raw.BucketEncryption) *BucketEncryption {
+ if e == nil {
+ return nil
+ }
+ return &BucketEncryption{DefaultKMSKeyName: e.DefaultKmsKeyName}
+}
+
// Objects returns an iterator over the objects in the bucket that match the Query q.
// If q is nil, no filtering is done.
func (b *BucketHandle) Objects(ctx context.Context, q *Query) *ObjectIterator {
@@ -869,8 +911,6 @@ func (it *ObjectIterator) fetch(pageSize int, pageToken string) (string, error)
return resp.NextPageToken, nil
}
-// TODO(jbd): Add storage.buckets.update.
-
// Buckets returns an iterator over the buckets in the project. You may
// optionally set the iterator's Prefix field to restrict the list to buckets
// whose names begin with the prefix. By default, all buckets in the project
diff --git a/vendor/cloud.google.com/go/storage/bucket_test.go b/vendor/cloud.google.com/go/storage/bucket_test.go
index b52d59b3a..36fa4826a 100644
--- a/vendor/cloud.google.com/go/storage/bucket_test.go
+++ b/vendor/cloud.google.com/go/storage/bucket_test.go
@@ -51,6 +51,7 @@ func TestBucketAttrsToRawBucket(t *testing.T) {
ResponseHeaders: []string{"FOO"},
},
},
+ Encryption: &BucketEncryption{DefaultKMSKeyName: "key"},
}
got := attrs.toRawBucket()
want := &raw.Bucket{
@@ -76,6 +77,7 @@ func TestBucketAttrsToRawBucket(t *testing.T) {
ResponseHeader: []string{"FOO"},
},
},
+ Encryption: &raw.BucketEncryption{DefaultKmsKeyName: "key"},
}
if msg := testutil.Diff(got, want); msg != "" {
t.Error(msg)
@@ -96,6 +98,8 @@ func TestBucketAttrsToUpdateToRawBucket(t *testing.T) {
au := &BucketAttrsToUpdate{
VersioningEnabled: false,
RequesterPays: false,
+ RetentionPolicy: &RetentionPolicy{RetentionPeriod: time.Hour},
+ Encryption: &BucketEncryption{DefaultKMSKeyName: "key2"},
}
au.SetLabel("a", "foo")
au.DeleteLabel("b")
@@ -114,7 +118,9 @@ func TestBucketAttrsToUpdateToRawBucket(t *testing.T) {
RequesterPays: false,
ForceSendFields: []string{"RequesterPays"},
},
- NullFields: []string{"Labels.b"},
+ RetentionPolicy: &raw.BucketRetentionPolicy{RetentionPeriod: 3600},
+ Encryption: &raw.BucketEncryption{DefaultKmsKeyName: "key2"},
+ NullFields: []string{"Labels.b"},
}
if msg := testutil.Diff(got, want); msg != "" {
t.Error(msg)
@@ -128,7 +134,19 @@ func TestBucketAttrsToUpdateToRawBucket(t *testing.T) {
ForceSendFields: []string{"Labels"},
NullFields: []string{"Labels.b"},
}
+ if msg := testutil.Diff(got, want); msg != "" {
+ t.Error(msg)
+ }
+ // Test nulls.
+ au3 := &BucketAttrsToUpdate{
+ RetentionPolicy: &RetentionPolicy{},
+ Encryption: &BucketEncryption{},
+ }
+ got = au3.toRawBucket()
+ want = &raw.Bucket{
+ NullFields: []string{"RetentionPolicy", "Encryption"},
+ }
if msg := testutil.Diff(got, want); msg != "" {
t.Error(msg)
}
@@ -268,6 +286,7 @@ func TestNewBucket(t *testing.T) {
Acl: []*raw.BucketAccessControl{
{Bucket: "name", Role: "READER", Email: "joe@example.com", Entity: "allUsers"},
},
+ Encryption: &raw.BucketEncryption{DefaultKmsKeyName: "key"},
}
want := &BucketAttrs{
Name: "name",
@@ -306,6 +325,7 @@ func TestNewBucket(t *testing.T) {
ResponseHeaders: []string{"FOO"},
},
},
+ Encryption: &BucketEncryption{DefaultKMSKeyName: "key"},
ACL: []ACLRule{{Entity: "allUsers", Role: RoleReader}},
DefaultObjectACL: []ACLRule{},
}
diff --git a/vendor/cloud.google.com/go/storage/copy.go b/vendor/cloud.google.com/go/storage/copy.go
index c9fb0271a..50589e0e7 100644
--- a/vendor/cloud.google.com/go/storage/copy.go
+++ b/vendor/cloud.google.com/go/storage/copy.go
@@ -60,6 +60,15 @@ type Copier struct {
// ProgressFunc should return quickly without blocking.
ProgressFunc func(copiedBytes, totalBytes uint64)
+ // The Cloud KMS key, in the form projects/P/locations/L/keyRings/R/cryptoKeys/K,
+ // that will be used to encrypt the object. Overrides the object's KMSKeyName, if
+ // any.
+ //
+ // Providing both a DestinationKMSKeyName and a customer-supplied encryption key
+ // (via ObjectHandle.Key) on the destination object will result in an error when
+ // Run is called.
+ DestinationKMSKeyName string
+
dst, src *ObjectHandle
}
@@ -74,6 +83,9 @@ func (c *Copier) Run(ctx context.Context) (attrs *ObjectAttrs, err error) {
if err := c.dst.validate(); err != nil {
return nil, err
}
+ if c.DestinationKMSKeyName != "" && c.dst.encryptionKey != nil {
+ return nil, errors.New("storage: cannot use DestinationKMSKeyName with a customer-supplied encryption key")
+ }
// Convert destination attributes to raw form, omitting the bucket.
// If the bucket is included but name or content-type aren't, the service
// returns a 400 with "Required" as the only message. Omitting the bucket
@@ -100,6 +112,9 @@ func (c *Copier) callRewrite(ctx context.Context, rawObj *raw.Object) (*raw.Rewr
if c.RewriteToken != "" {
call.RewriteToken(c.RewriteToken)
}
+ if c.DestinationKMSKeyName != "" {
+ call.DestinationKmsKeyName(c.DestinationKMSKeyName)
+ }
if err := applyConds("Copy destination", c.dst.gen, c.dst.conds, call); err != nil {
return nil, err
}
diff --git a/vendor/cloud.google.com/go/storage/copy_test.go b/vendor/cloud.google.com/go/storage/copy_test.go
new file mode 100644
index 000000000..0f87c3033
--- /dev/null
+++ b/vendor/cloud.google.com/go/storage/copy_test.go
@@ -0,0 +1,80 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT 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 (
+ "net/http"
+ "strings"
+ "testing"
+
+ "golang.org/x/net/context"
+ "google.golang.org/api/option"
+)
+
+func TestCopyMissingFields(t *testing.T) {
+ // Verify that copying checks for missing fields.a
+ t.Parallel()
+ var tests = []struct {
+ srcBucket, srcName, destBucket, destName string
+ errMsg string
+ }{
+ {
+ "mybucket", "", "mybucket", "destname",
+ "name is empty",
+ },
+ {
+ "mybucket", "srcname", "mybucket", "",
+ "name is empty",
+ },
+ {
+ "", "srcfile", "mybucket", "destname",
+ "name is empty",
+ },
+ {
+ "mybucket", "srcfile", "", "destname",
+ "name is empty",
+ },
+ }
+ ctx := context.Background()
+ client, err := NewClient(ctx, option.WithHTTPClient(&http.Client{Transport: &fakeTransport{}}))
+ if err != nil {
+ t.Fatal(err)
+ }
+ for i, test := range tests {
+ src := client.Bucket(test.srcBucket).Object(test.srcName)
+ dst := client.Bucket(test.destBucket).Object(test.destName)
+ _, err := dst.CopierFrom(src).Run(ctx)
+ if !strings.Contains(err.Error(), test.errMsg) {
+ t.Errorf("CopyTo test #%v:\ngot err %q\nwant err %q", i, err, test.errMsg)
+ }
+ }
+}
+
+func TestCopyBothEncryptionKeys(t *testing.T) {
+ // Test that using both a customer-supplied key and a KMS key is an error.
+ ctx := context.Background()
+ client, err := NewClient(ctx, option.WithHTTPClient(&http.Client{Transport: &fakeTransport{}}))
+ if err != nil {
+ t.Fatal(err)
+ }
+ dest := client.Bucket("b").Object("d").Key(testEncryptionKey)
+ c := dest.CopierFrom(client.Bucket("b").Object("s"))
+ c.DestinationKMSKeyName = "key"
+ if _, err := c.Run(ctx); err == nil {
+ t.Error("got nil, want error")
+ } else if !strings.Contains(err.Error(), "KMS") {
+ t.Errorf(`got %q, want it to contain "KMS"`, err)
+ }
+}
diff --git a/vendor/cloud.google.com/go/storage/doc.go b/vendor/cloud.google.com/go/storage/doc.go
index 9040ac2af..1740708e3 100644
--- a/vendor/cloud.google.com/go/storage/doc.go
+++ b/vendor/cloud.google.com/go/storage/doc.go
@@ -19,6 +19,9 @@ Google Cloud Storage stores data in named objects, which are grouped into bucket
More information about Google Cloud Storage is available at
https://cloud.google.com/storage/docs.
+See https://godoc.org/cloud.google.com/go for authentication, timeouts,
+connection pooling and similar aspects of this package.
+
All of the methods of this package use exponential backoff to retry calls
that fail with certain errors, as described in
https://cloud.google.com/storage/docs/exponential-backoff.
@@ -158,10 +161,5 @@ SignedURL for details.
// TODO: Handle error.
}
fmt.Println(url)
-
-Authentication
-
-See examples of authorization and authentication at
-https://godoc.org/cloud.google.com/go#pkg-examples.
*/
package storage // import "cloud.google.com/go/storage"
diff --git a/vendor/cloud.google.com/go/storage/integration_test.go b/vendor/cloud.google.com/go/storage/integration_test.go
index 0b64142cf..8d61a2e15 100644
--- a/vendor/cloud.google.com/go/storage/integration_test.go
+++ b/vendor/cloud.google.com/go/storage/integration_test.go
@@ -30,6 +30,8 @@ import (
"math/rand"
"net/http"
"os"
+ "path/filepath"
+ "runtime"
"sort"
"strconv"
"strings"
@@ -41,6 +43,7 @@ import (
"cloud.google.com/go/iam"
"cloud.google.com/go/internal/testutil"
+ "cloud.google.com/go/internal/uid"
"google.golang.org/api/googleapi"
"google.golang.org/api/iterator"
itesting "google.golang.org/api/iterator/testing"
@@ -50,7 +53,7 @@ import (
const testPrefix = "go-integration-test"
var (
- uidSpace = testutil.NewUIDSpace(testPrefix)
+ uidSpace = uid.NewSpace(testPrefix, nil)
bucketName = uidSpace.New()
)
@@ -120,31 +123,24 @@ func TestIntegration_BucketMethods(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
projectID := testutil.ProjID()
newBucketName := uidSpace.New()
b := client.Bucket(newBucketName)
// Test Create and Delete.
- if err := b.Create(ctx, projectID, nil); err != nil {
- t.Fatalf("Bucket(%v).Create(%v, %v) failed: %v", newBucketName, projectID, nil, err)
+ h.mustCreate(b, projectID, nil)
+ attrs := h.mustBucketAttrs(b)
+ if got, want := attrs.MetaGeneration, int64(1); got != want {
+ t.Errorf("got metagen %d, want %d", got, want)
}
- attrs, err := b.Attrs(ctx)
- if err != nil {
- t.Error(err)
- } else {
- if got, want := attrs.MetaGeneration, int64(1); got != want {
- t.Errorf("got metagen %d, want %d", got, want)
- }
- if got, want := attrs.StorageClass, "STANDARD"; got != want {
- t.Errorf("got storage class %q, want %q", got, want)
- }
- if attrs.VersioningEnabled {
- t.Error("got versioning enabled, wanted it disabled")
- }
+ if got, want := attrs.StorageClass, "STANDARD"; got != want {
+ t.Errorf("got storage class %q, want %q", got, want)
}
- if err := client.Bucket(newBucketName).Delete(ctx); err != nil {
- t.Errorf("Bucket(%v).Delete failed: %v", newBucketName, err)
+ if attrs.VersioningEnabled {
+ t.Error("got versioning enabled, wanted it disabled")
}
+ h.mustDeleteBucket(b)
// Test Create and Delete with attributes.
labels := map[string]string{
@@ -182,41 +178,31 @@ func TestIntegration_BucketMethods(t *testing.T) {
}},
},
}
- if err := client.Bucket(newBucketName).Create(ctx, projectID, attrs); err != nil {
- t.Fatalf("Bucket(%v).Create(%v, %+v) failed: %v", newBucketName, projectID, attrs, err)
+ h.mustCreate(b, projectID, attrs)
+ attrs = h.mustBucketAttrs(b)
+ if got, want := attrs.MetaGeneration, int64(1); got != want {
+ t.Errorf("got metagen %d, want %d", got, want)
}
- attrs, err = b.Attrs(ctx)
- if err != nil {
- t.Error(err)
- } else {
- if got, want := attrs.MetaGeneration, int64(1); got != want {
- t.Errorf("got metagen %d, want %d", got, want)
- }
- if got, want := attrs.StorageClass, "NEARLINE"; got != want {
- t.Errorf("got storage class %q, want %q", got, want)
- }
- if !attrs.VersioningEnabled {
- t.Error("got versioning disabled, wanted it enabled")
- }
- if got, want := attrs.Labels, labels; !testutil.Equal(got, want) {
- t.Errorf("labels: got %v, want %v", got, want)
- }
+ if got, want := attrs.StorageClass, "NEARLINE"; got != want {
+ t.Errorf("got storage class %q, want %q", got, want)
}
- if err := client.Bucket(newBucketName).Delete(ctx); err != nil {
- t.Errorf("Bucket(%v).Delete failed: %v", newBucketName, err)
+ if !attrs.VersioningEnabled {
+ t.Error("got versioning disabled, wanted it enabled")
}
+ if got, want := attrs.Labels, labels; !testutil.Equal(got, want) {
+ t.Errorf("labels: got %v, want %v", got, want)
+ }
+ h.mustDeleteBucket(b)
}
func TestIntegration_BucketUpdate(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
b := client.Bucket(bucketName)
- attrs, err := b.Attrs(ctx)
- if err != nil {
- t.Fatal(err)
- }
+ attrs := h.mustBucketAttrs(b)
if attrs.VersioningEnabled {
t.Fatal("bucket should not have versioning by default")
}
@@ -225,10 +211,7 @@ func TestIntegration_BucketUpdate(t *testing.T) {
}
// Using empty BucketAttrsToUpdate should be a no-nop.
- attrs, err = b.Update(ctx, BucketAttrsToUpdate{})
- if err != nil {
- t.Fatal(err)
- }
+ attrs = h.mustUpdateBucket(b, BucketAttrsToUpdate{})
if attrs.VersioningEnabled {
t.Fatal("should not have versioning")
}
@@ -240,10 +223,7 @@ func TestIntegration_BucketUpdate(t *testing.T) {
ua := BucketAttrsToUpdate{VersioningEnabled: true}
ua.SetLabel("l1", "v1")
ua.SetLabel("empty", "")
- attrs, err = b.Update(ctx, ua)
- if err != nil {
- t.Fatal(err)
- }
+ attrs = h.mustUpdateBucket(b, ua)
if !attrs.VersioningEnabled {
t.Fatal("should have versioning now")
}
@@ -261,10 +241,7 @@ func TestIntegration_BucketUpdate(t *testing.T) {
ua.SetLabel("new", "new") // create
ua.DeleteLabel("empty") // delete
ua.DeleteLabel("absent") // delete non-existent
- attrs, err = b.Update(ctx, ua)
- if err != nil {
- t.Fatal(err)
- }
+ attrs = h.mustUpdateBucket(b, ua)
if attrs.VersioningEnabled {
t.Fatal("should have versioning off")
}
@@ -281,17 +258,13 @@ func TestIntegration_ConditionalDelete(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
o := client.Bucket(bucketName).Object("conddel")
wc := o.NewWriter(ctx)
wc.ContentType = "text/plain"
- if _, err := wc.Write([]byte("foo")); err != nil {
- t.Fatal(err)
- }
- if err := wc.Close(); err != nil {
- t.Fatal(err)
- }
+ h.mustWrite(wc, []byte("foo"))
gen := wc.Attrs().Generation
metaGen := wc.Attrs().Metageneration
@@ -315,6 +288,7 @@ func TestIntegration_Objects(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
bkt := client.Bucket(bucketName)
@@ -478,10 +452,7 @@ func TestIntegration_Objects(t *testing.T) {
}
// Test StatObject.
- o, err := bkt.Object(objName).Attrs(ctx)
- if err != nil {
- t.Error(err)
- }
+ o := h.mustObjectAttrs(bkt.Object(objName))
if got, want := o.Name, objName; got != want {
t.Errorf("Name (%v) = %q; want %q", objName, got, want)
}
@@ -490,10 +461,7 @@ func TestIntegration_Objects(t *testing.T) {
}
created := o.Created
// Check that the object is newer than its containing bucket.
- bAttrs, err := bkt.Attrs(ctx)
- if err != nil {
- t.Error(err)
- }
+ bAttrs := h.mustBucketAttrs(bkt)
if o.Created.Before(bAttrs.Created) {
t.Errorf("Object %v is older than its containing bucket, %v", o, bAttrs)
}
@@ -633,10 +601,8 @@ func TestIntegration_Objects(t *testing.T) {
t.Fatal(err)
}
- slurp, err := readObject(ctx, publicClient.Bucket(bucketName).Object(publicObj))
- if err != nil {
- t.Errorf("readObject failed with %v", err)
- } else if !bytes.Equal(slurp, contents[publicObj]) {
+ slurp := h.mustRead(publicClient.Bucket(bucketName).Object(publicObj))
+ if !bytes.Equal(slurp, contents[publicObj]) {
t.Errorf("Public object's content: got %q, want %q", slurp, contents[publicObj])
}
@@ -650,9 +616,7 @@ func TestIntegration_Objects(t *testing.T) {
}
// Test deleting the copy object.
- if err := bkt.Object(copyName).Delete(ctx); err != nil {
- t.Errorf("Deletion of %v failed with %v", copyName, err)
- }
+ h.mustDeleteObject(bkt.Object(copyName))
// Deleting it a second time should return ErrObjectNotExist.
if err := bkt.Object(copyName).Delete(ctx); err != ErrObjectNotExist {
t.Errorf("second deletion of %v = %v; want ErrObjectNotExist", copyName, err)
@@ -670,10 +634,7 @@ func TestIntegration_Objects(t *testing.T) {
wantContents = append(wantContents, contents[obj]...)
}
checkCompose := func(obj *ObjectHandle, wantContentType string) {
- rc, err := obj.NewReader(ctx)
- if err != nil {
- t.Fatalf("NewReader: %v", err)
- }
+ rc := h.mustNewReader(obj)
slurp, err = ioutil.ReadAll(rc)
if err != nil {
t.Fatalf("ioutil.ReadAll: %v", err)
@@ -711,18 +672,14 @@ func namesEqual(obj *ObjectAttrs, bucketName, objectName string) bool {
func testObjectIterator(t *testing.T, bkt *BucketHandle, objects []string) {
ctx := context.Background()
+ h := testHelper{t}
// Collect the list of items we expect: ObjectAttrs in lexical order by name.
names := make([]string, len(objects))
copy(names, objects)
sort.Strings(names)
var attrs []*ObjectAttrs
for _, name := range names {
- attr, err := bkt.Object(name).Attrs(ctx)
- if err != nil {
- t.Errorf("Object(%q).Attrs: %v", name, err)
- return
- }
- attrs = append(attrs, attr)
+ attrs = append(attrs, h.mustObjectAttrs(bkt.Object(name)))
}
msg, ok := itesting.TestIterator(attrs,
func() interface{} { return bkt.Objects(ctx, &Query{Prefix: "obj"}) },
@@ -997,6 +954,7 @@ func TestIntegration_ZeroSizedObject(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
obj := client.Bucket(bucketName).Object("zero")
@@ -1008,10 +966,7 @@ func TestIntegration_ZeroSizedObject(t *testing.T) {
defer obj.Delete(ctx)
// Check we can read it too.
- body, err := readObject(ctx, obj)
- if err != nil {
- t.Fatalf("readObject: %v", err)
- }
+ body := h.mustRead(obj)
if len(body) != 0 {
t.Errorf("Body is %v, want empty []byte{}", body)
}
@@ -1024,6 +979,7 @@ func TestIntegration_Encryption(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
obj := client.Bucket(bucketName).Object("customer-encryption")
key := []byte("my-secret-AES-256-encryption-key")
@@ -1073,10 +1029,7 @@ func TestIntegration_Encryption(t *testing.T) {
t.Errorf("%s: reading without key: want error, got nil", msg)
}
// Reading the object with the key should succeed.
- got, err := readObject(ctx, o.Key(k))
- if err != nil {
- t.Fatalf("%s: %v", msg, err)
- }
+ got := h.mustRead(o.Key(k))
gotContents := string(got)
// And the contents should match what we wrote.
if gotContents != wantContents {
@@ -1085,10 +1038,7 @@ func TestIntegration_Encryption(t *testing.T) {
}
checkReadUnencrypted := func(msg string, obj *ObjectHandle, wantContents string) {
- got, err := readObject(ctx, obj)
- if err != nil {
- t.Fatalf("%s: %v", msg, err)
- }
+ got := h.mustRead(obj)
gotContents := string(got)
if gotContents != wantContents {
t.Errorf("%s: got %q, want %q", msg, gotContents, wantContents)
@@ -1097,11 +1047,7 @@ func TestIntegration_Encryption(t *testing.T) {
// Write to obj using our own encryption key, which is a valid 32-byte
// AES-256 key.
- w := obj.Key(key).NewWriter(ctx)
- w.Write([]byte(contents))
- if err := w.Close(); err != nil {
- t.Fatal(err)
- }
+ h.mustWrite(obj.Key(key).NewWriter(ctx), []byte(contents))
checkMetadataCall("Attrs", func(o *ObjectHandle) (*ObjectAttrs, error) {
return o.Attrs(ctx)
@@ -1197,23 +1143,19 @@ func TestIntegration_PerObjectStorageClass(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
bkt := client.Bucket(bucketName)
// The bucket should have the default storage class.
- battrs, err := bkt.Attrs(ctx)
- if err != nil {
- t.Fatal(err)
- }
+ battrs := h.mustBucketAttrs(bkt)
if battrs.StorageClass != defaultStorageClass {
t.Fatalf("bucket storage class: got %q, want %q",
battrs.StorageClass, defaultStorageClass)
}
// Write an object; it should start with the bucket's storage class.
obj := bkt.Object("posc")
- if err := writeObject(ctx, obj, "", []byte("foo")); err != nil {
- t.Fatal(err)
- }
+ h.mustWrite(obj.NewWriter(ctx), []byte("foo"))
oattrs, err := obj.Attrs(ctx)
if err != nil {
t.Fatal(err)
@@ -1238,12 +1180,7 @@ func TestIntegration_PerObjectStorageClass(t *testing.T) {
obj2 := bkt.Object("posc2")
w := obj2.NewWriter(ctx)
w.StorageClass = newStorageClass
- if _, err := w.Write([]byte("xxx")); err != nil {
- t.Fatal(err)
- }
- if err := w.Close(); err != nil {
- t.Fatal(err)
- }
+ h.mustWrite(w, []byte("xxx"))
if w.Attrs().StorageClass != newStorageClass {
t.Fatalf("new object storage class: got %q, want %q",
w.Attrs().StorageClass, newStorageClass)
@@ -1257,12 +1194,11 @@ func TestIntegration_BucketInCopyAttrs(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
bkt := client.Bucket(bucketName)
obj := bkt.Object("bucketInCopyAttrs")
- if err := writeObject(ctx, obj, "", []byte("foo")); err != nil {
- t.Fatal(err)
- }
+ h.mustWrite(obj.NewWriter(ctx), []byte("foo"))
copier := obj.CopierFrom(obj)
rawObject := copier.ObjectAttrs.toRawObject(bucketName)
_, err := copier.callRewrite(ctx, rawObject)
@@ -1277,6 +1213,7 @@ func TestIntegration_NoUnicodeNormalization(t *testing.T) {
client := testConfig(ctx, t)
defer client.Close()
bkt := client.Bucket("storage-library-test-bucket")
+ h := testHelper{t}
for _, tst := range []struct {
nameQuoted, content string
@@ -1288,12 +1225,8 @@ func TestIntegration_NoUnicodeNormalization(t *testing.T) {
if err != nil {
t.Fatalf("invalid name: %s: %v", tst.nameQuoted, err)
}
- got, err := readObject(ctx, bkt.Object(name))
- if err != nil {
- t.Fatal(err)
- }
- if g := string(got); g != tst.content {
- t.Errorf("content of %s is %q, want %q", tst.nameQuoted, g, tst.content)
+ if got := string(h.mustRead(bkt.Object(name))); got != tst.content {
+ t.Errorf("content of %s is %q, want %q", tst.nameQuoted, got, tst.content)
}
}
}
@@ -1314,7 +1247,7 @@ func TestIntegration_HashesOnUpload(t *testing.T) {
write := func(w *Writer) error {
if _, err := w.Write(data); err != nil {
- w.Close()
+ _ = w.Close()
return err
}
return w.Close()
@@ -1442,8 +1375,10 @@ func TestIntegration_RequesterPays(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
+
bucketName2 := uidSpace.New()
- b := client.Bucket(bucketName2)
+ b1 := client.Bucket(bucketName2)
projID := testutil.ProjID()
// Use Firestore project as a project that does not contain the bucket.
otherProjID := os.Getenv(envFirestoreProjID)
@@ -1459,7 +1394,7 @@ func TestIntegration_RequesterPays(t *testing.T) {
t.Fatal(err)
}
defer otherClient.Close()
- ob := otherClient.Bucket(bucketName2)
+ b2 := otherClient.Bucket(bucketName2)
user, err := keyFileEmail(os.Getenv("GCLOUD_TESTS_GOLANG_KEY"))
if err != nil {
t.Fatal(err)
@@ -1470,10 +1405,8 @@ func TestIntegration_RequesterPays(t *testing.T) {
}
// Create a requester-pays bucket. The bucket is contained in the project projID.
- if err := b.Create(ctx, projID, &BucketAttrs{RequesterPays: true}); err != nil {
- t.Fatal(err)
- }
- if err := b.ACL().Set(ctx, ACLEntity("user-"+otherUser), RoleOwner); err != nil {
+ h.mustCreate(b1, projID, &BucketAttrs{RequesterPays: true})
+ if err := b1.ACL().Set(ctx, ACLEntity("user-"+otherUser), RoleOwner); err != nil {
t.Fatal(err)
}
@@ -1497,7 +1430,7 @@ func TestIntegration_RequesterPays(t *testing.T) {
// user: an Owner on the containing project
// userProject: absent
// result: success, by the rule permitting access by owners of the containing bucket.
- if err := f(b); err != nil {
+ if err := f(b1); err != nil {
t.Errorf("%s: %v, want nil\n"+
"confirm that %s is an Owner on %s",
msg, err, user, projID)
@@ -1505,22 +1438,22 @@ func TestIntegration_RequesterPays(t *testing.T) {
// user: an Owner on the containing project
// userProject: containing project
// result: success, by the same rule as above; userProject is unnecessary but allowed.
- if err := f(b.UserProject(projID)); err != nil {
+ if err := f(b1.UserProject(projID)); err != nil {
t.Errorf("%s: got %v, want nil", msg, err)
}
// user: not an Owner on the containing project
// userProject: absent
// result: failure, by the standard requester-pays rule
- err := f(ob)
+ err := f(b2)
if got, want := errCode(err), wantErrorCode; got != want {
- t.Errorf("%s: got error %s, want code %d\n"+
+ t.Errorf("%s: got error %v, want code %d\n"+
"confirm that %s is NOT an Owner on %s",
msg, err, want, otherUser, projID)
}
// user: not an Owner on the containing project
// userProject: not the containing one, but user has Editor role on it
// result: success, by the standard requester-pays rule
- if err := f(ob.UserProject(otherProjID)); err != nil {
+ if err := f(b2.UserProject(otherProjID)); err != nil {
t.Errorf("%s: got %v, want nil\n"+
"confirm that %s is an Editor on %s and that that project has billing enabled",
msg, err, otherUser, otherProjID)
@@ -1528,9 +1461,9 @@ func TestIntegration_RequesterPays(t *testing.T) {
// user: not an Owner on the containing project
// userProject: the containing one, on which the user does NOT have Editor permission.
// result: failure
- err = f(ob.UserProject("veener-jba"))
+ err = f(b2.UserProject("veener-jba"))
if got, want := errCode(err), 403; got != want {
- t.Errorf("%s: got error %s, want code %d\n"+
+ t.Errorf("%s: got error %v, want code %d\n"+
"confirm that %s is NOT an Editor on %s",
msg, err, want, otherUser, "veener-jba")
}
@@ -1623,23 +1556,22 @@ func TestIntegration_RequesterPays(t *testing.T) {
_, err := b.Object("compose").ComposerFrom(b.Object("foo"), b.Object("copy")).Run(ctx)
return err
})
-
- // Deletion.
call("delete object", func(b *BucketHandle) error {
- err := b.Object("foo").Delete(ctx)
- if err == ErrObjectNotExist {
- return nil
- }
- return err
+ // Make sure the object exists, so we don't get confused by ErrObjectNotExist.
+ // The storage service may perform validation in any order (perhaps in parallel),
+ // so if we delete an object that doesn't exist and for which we lack permission,
+ // we could see either of those two errors. (See Google-internal bug 78341001.)
+ h.mustWrite(b1.Object("foo").NewWriter(ctx), []byte("hello")) // note: b1, not b.
+ return b.Object("foo").Delete(ctx)
})
+ b1.Object("foo").Delete(ctx) // Make sure object is deleted.
for _, obj := range []string{"copy", "compose"} {
- if err := b.UserProject(projID).Object(obj).Delete(ctx); err != nil {
+ if err := b1.UserProject(projID).Object(obj).Delete(ctx); err != nil {
t.Fatalf("could not delete %q: %v", obj, err)
}
}
- if err := b.Delete(ctx); err != nil {
- t.Fatalf("deleting bucket: %v", err)
- }
+
+ h.mustDeleteBucket(b1)
}
// TODO(jba): move to testutil, factor out from firestore/integration_test.go.
@@ -1702,7 +1634,6 @@ func TestNotifications(t *testing.T) {
func TestIntegration_Public(t *testing.T) {
// Confirm that an unauthenticated client can access a public bucket.
-
// See https://cloud.google.com/storage/docs/public-datasets/landsat
const landsatBucket = "gcp-public-data-landsat"
const landsatPrefix = "LC08/PRE/044/034/LC80440342016259LGN00/"
@@ -1715,14 +1646,12 @@ func TestIntegration_Public(t *testing.T) {
t.Fatal(err)
}
defer client.Close()
+ h := testHelper{t}
bkt := client.Bucket(landsatBucket)
obj := bkt.Object(landsatObject)
// Read a public object.
- bytes, err := readObject(ctx, obj)
- if err != nil {
- t.Fatal(err)
- }
+ bytes := h.mustRead(obj)
if got, want := len(bytes), 7903; got != want {
t.Errorf("len(bytes) = %d, want %d", got, want)
}
@@ -1948,6 +1877,7 @@ func TestIntegration_UpdateCORS(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
initialSettings := []CORS{
{
@@ -1997,27 +1927,10 @@ func TestIntegration_UpdateCORS(t *testing.T) {
},
} {
bkt := client.Bucket(uidSpace.New())
- defer func(b *BucketHandle) {
- err := b.Delete(ctx)
- if err != nil {
- t.Fatal(err)
- }
- }(bkt)
- err := bkt.Create(ctx, testutil.ProjID(), &BucketAttrs{CORS: initialSettings})
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = bkt.Update(ctx, BucketAttrsToUpdate{CORS: test.input})
- if err != nil {
- t.Fatal(err)
- }
-
- attrs, err := bkt.Attrs(ctx)
- if err != nil {
- t.Fatal(err)
- }
-
+ h.mustCreate(bkt, testutil.ProjID(), &BucketAttrs{CORS: initialSettings})
+ defer h.mustDeleteBucket(bkt)
+ h.mustUpdateBucket(bkt, BucketAttrsToUpdate{CORS: test.input})
+ attrs := h.mustBucketAttrs(bkt)
if diff := testutil.Diff(attrs.CORS, test.want); diff != "" {
t.Errorf("input: %v\ngot=-, want=+:\n%s", test.input, diff)
}
@@ -2032,6 +1945,7 @@ func TestIntegration_UpdateRetentionPolicy(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
initial := &RetentionPolicy{RetentionPeriod: time.Minute}
@@ -2061,27 +1975,10 @@ func TestIntegration_UpdateRetentionPolicy(t *testing.T) {
},
} {
bkt := client.Bucket(uidSpace.New())
- err := bkt.Create(ctx, testutil.ProjID(), &BucketAttrs{RetentionPolicy: initial})
- if err != nil {
- t.Fatal(err)
- }
-
- defer func() {
- if err := bkt.Delete(ctx); err != nil {
- t.Fatal(err)
- }
- }()
-
- _, err = bkt.Update(ctx, BucketAttrsToUpdate{RetentionPolicy: test.input})
- if err != nil {
- t.Fatal(err)
- }
-
- attrs, err := bkt.Attrs(ctx)
- if err != nil {
- t.Fatal(err)
- }
-
+ h.mustCreate(bkt, testutil.ProjID(), &BucketAttrs{RetentionPolicy: initial})
+ defer h.mustDeleteBucket(bkt)
+ h.mustUpdateBucket(bkt, BucketAttrsToUpdate{RetentionPolicy: test.input})
+ attrs := h.mustBucketAttrs(bkt)
if attrs.RetentionPolicy != nil && attrs.RetentionPolicy.EffectiveTime.Unix() == 0 {
// Should be set by the server and parsed by the client
t.Fatal("EffectiveTime should be set, but it was not")
@@ -2100,37 +1997,24 @@ func TestIntegration_DeleteObjectInBucketWithRetentionPolicy(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
bkt := client.Bucket(uidSpace.New())
- err := bkt.Create(ctx, testutil.ProjID(), &BucketAttrs{RetentionPolicy: &RetentionPolicy{RetentionPeriod: 25 * time.Hour}})
- if err != nil {
- t.Fatal(err)
- }
+ h.mustCreate(bkt, testutil.ProjID(), &BucketAttrs{RetentionPolicy: &RetentionPolicy{RetentionPeriod: 25 * time.Hour}})
oh := bkt.Object("some-object")
- if err = writeObject(ctx, oh, "text/plain", []byte("hello world")); err != nil {
+ if err := writeObject(ctx, oh, "text/plain", []byte("hello world")); err != nil {
t.Fatal(err)
}
- err = oh.Delete(ctx)
- if err == nil {
+ if err := oh.Delete(ctx); err == nil {
t.Fatal("expected to err deleting an object in a bucket with retention period, but got nil")
}
// Remove the retention period
- _, err = bkt.Update(ctx, BucketAttrsToUpdate{RetentionPolicy: &RetentionPolicy{RetentionPeriod: 0}})
- if err != nil {
- t.Fatal(err)
- }
-
- err = oh.Delete(ctx)
- if err != nil {
- t.Fatal(err)
- }
-
- if err := bkt.Delete(ctx); err != nil {
- t.Fatal(err)
- }
+ h.mustUpdateBucket(bkt, BucketAttrsToUpdate{RetentionPolicy: &RetentionPolicy{RetentionPeriod: 0}})
+ h.mustDeleteObject(oh)
+ h.mustDeleteBucket(bkt)
}
func TestIntegration_LockBucket(t *testing.T) {
@@ -2141,19 +2025,12 @@ func TestIntegration_LockBucket(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
bkt := client.Bucket(uidSpace.New())
- err := bkt.Create(ctx, testutil.ProjID(), &BucketAttrs{RetentionPolicy: &RetentionPolicy{RetentionPeriod: time.Hour * 25}})
- if err != nil {
- t.Fatal(err)
- }
-
- attrs, err := bkt.Attrs(ctx)
- if err != nil {
- t.Fatal(err)
- }
-
- err = bkt.If(BucketConditions{MetagenerationMatch: attrs.MetaGeneration}).LockRetentionPolicy(ctx)
+ h.mustCreate(bkt, testutil.ProjID(), &BucketAttrs{RetentionPolicy: &RetentionPolicy{RetentionPeriod: time.Hour * 25}})
+ attrs := h.mustBucketAttrs(bkt)
+ err := bkt.If(BucketConditions{MetagenerationMatch: attrs.MetaGeneration}).LockRetentionPolicy(ctx)
if err != nil {
t.Fatal("could not lock", err)
}
@@ -2172,19 +2049,183 @@ func TestIntegration_LockBucket_MetagenerationRequired(t *testing.T) {
ctx := context.Background()
client := testConfig(ctx, t)
defer client.Close()
+ h := testHelper{t}
bkt := client.Bucket(uidSpace.New())
- err := bkt.Create(ctx, testutil.ProjID(), &BucketAttrs{RetentionPolicy: &RetentionPolicy{RetentionPeriod: time.Hour * 25}})
- if err != nil {
- t.Fatal(err)
- }
-
- err = bkt.LockRetentionPolicy(ctx)
+ h.mustCreate(bkt, testutil.ProjID(), &BucketAttrs{
+ RetentionPolicy: &RetentionPolicy{RetentionPeriod: time.Hour * 25},
+ })
+ err := bkt.LockRetentionPolicy(ctx)
if err == nil {
t.Fatal("expected error locking bucket without metageneration condition, got nil")
}
}
+func TestIntegration_KMS(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Integration tests skipped in short mode")
+ }
+ keyRingName := os.Getenv("GCLOUD_TESTS_GOLANG_KEYRING")
+ if keyRingName == "" {
+ t.Fatal("GCLOUD_TESTS_GOLANG_KEYRING must be set. See CONTRIBUTING.md for details")
+ }
+ ctx := context.Background()
+ client := testConfig(ctx, t)
+ defer client.Close()
+ h := testHelper{t}
+
+ keyName1 := keyRingName + "/cryptoKeys/key1"
+ keyName2 := keyRingName + "/cryptoKeys/key2"
+ contents := []byte("my secret")
+
+ write := func(obj *ObjectHandle, setKey bool) {
+ w := obj.NewWriter(ctx)
+ if setKey {
+ w.KMSKeyName = keyName1
+ }
+ h.mustWrite(w, contents)
+ }
+
+ checkRead := func(obj *ObjectHandle) {
+ got := h.mustRead(obj)
+ if !bytes.Equal(got, contents) {
+ t.Errorf("got %v, want %v", got, contents)
+ }
+ attrs := h.mustObjectAttrs(obj)
+ if len(attrs.KMSKeyName) < len(keyName1) || attrs.KMSKeyName[:len(keyName1)] != keyName1 {
+ t.Errorf("got %q, want %q", attrs.KMSKeyName, keyName1)
+ }
+ }
+
+ // Write an object with a key, then read it to verify its contents and the presence of the key name.
+ bkt := client.Bucket(bucketName)
+ obj := bkt.Object("kms")
+ write(obj, true)
+ checkRead(obj)
+ h.mustDeleteObject(obj)
+
+ // Encrypt an object with a CSEK, then copy it using a CMEK.
+ src := bkt.Object("csek").Key(testEncryptionKey)
+ if err := writeObject(ctx, src, "text/plain", contents); err != nil {
+ t.Fatal(err)
+ }
+ dest := bkt.Object("cmek")
+ c := dest.CopierFrom(src)
+ c.DestinationKMSKeyName = keyName1
+ if _, err := c.Run(ctx); err != nil {
+ t.Fatal(err)
+ }
+ checkRead(dest)
+ src.Delete(ctx)
+ dest.Delete(ctx)
+
+ // Create a bucket with a default key, then write and read an object.
+ bkt = client.Bucket(uidSpace.New())
+ h.mustCreate(bkt, testutil.ProjID(), &BucketAttrs{
+ Location: "US",
+ Encryption: &BucketEncryption{DefaultKMSKeyName: keyName1},
+ })
+ defer h.mustDeleteBucket(bkt)
+
+ attrs := h.mustBucketAttrs(bkt)
+ if got, want := attrs.Encryption.DefaultKMSKeyName, keyName1; got != want {
+ t.Fatalf("got %q, want %q", got, want)
+ }
+ obj = bkt.Object("kms")
+ write(obj, false)
+ checkRead(obj)
+ h.mustDeleteObject(obj)
+
+ // Update the bucket's default key to a different name.
+ // (This key doesn't have to exist.)
+ attrs = h.mustUpdateBucket(bkt, BucketAttrsToUpdate{Encryption: &BucketEncryption{DefaultKMSKeyName: keyName2}})
+ if got, want := attrs.Encryption.DefaultKMSKeyName, keyName2; got != want {
+ t.Fatalf("got %q, want %q", got, want)
+ }
+ attrs = h.mustBucketAttrs(bkt)
+ if got, want := attrs.Encryption.DefaultKMSKeyName, keyName2; got != want {
+ t.Fatalf("got %q, want %q", got, want)
+ }
+
+ // Remove the default KMS key.
+ attrs = h.mustUpdateBucket(bkt, BucketAttrsToUpdate{Encryption: &BucketEncryption{DefaultKMSKeyName: ""}})
+ if attrs.Encryption != nil {
+ t.Fatalf("got %#v, want nil", attrs.Encryption)
+ }
+}
+
+type testHelper struct {
+ t *testing.T
+}
+
+func (h testHelper) mustCreate(b *BucketHandle, projID string, attrs *BucketAttrs) {
+ if err := b.Create(context.Background(), projID, attrs); err != nil {
+ h.t.Fatalf("%s: bucket create: %v", loc(), err)
+ }
+}
+
+func (h testHelper) mustDeleteBucket(b *BucketHandle) {
+ if err := b.Delete(context.Background()); err != nil {
+ h.t.Fatalf("%s: bucket delete: %v", loc(), err)
+ }
+}
+
+func (h testHelper) mustBucketAttrs(b *BucketHandle) *BucketAttrs {
+ attrs, err := b.Attrs(context.Background())
+ if err != nil {
+ h.t.Fatalf("%s: bucket attrs: %v", loc(), err)
+ }
+ return attrs
+}
+
+func (h testHelper) mustUpdateBucket(b *BucketHandle, ua BucketAttrsToUpdate) *BucketAttrs {
+ attrs, err := b.Update(context.Background(), ua)
+ if err != nil {
+ h.t.Fatalf("%s: update: %v", loc(), err)
+ }
+ return attrs
+}
+
+func (h testHelper) mustObjectAttrs(o *ObjectHandle) *ObjectAttrs {
+ attrs, err := o.Attrs(context.Background())
+ if err != nil {
+ h.t.Fatalf("%s: object attrs: %v", loc(), err)
+ }
+ return attrs
+}
+
+func (h testHelper) mustDeleteObject(o *ObjectHandle) {
+ if err := o.Delete(context.Background()); err != nil {
+ h.t.Fatalf("%s: object delete: %v", loc(), err)
+ }
+}
+
+func (h testHelper) mustWrite(w *Writer, data []byte) {
+ if _, err := w.Write(data); err != nil {
+ w.Close()
+ h.t.Fatalf("%s: write: %v", loc(), err)
+ }
+ if err := w.Close(); err != nil {
+ h.t.Fatalf("%s: close write: %v", loc(), err)
+ }
+}
+
+func (h testHelper) mustRead(obj *ObjectHandle) []byte {
+ data, err := readObject(context.Background(), obj)
+ if err != nil {
+ h.t.Fatalf("%s: read: %v", loc(), err)
+ }
+ return data
+}
+
+func (h testHelper) mustNewReader(obj *ObjectHandle) *Reader {
+ r, err := obj.NewReader(context.Background())
+ if err != nil {
+ h.t.Fatalf("%s: new reader: %v", loc(), err)
+ }
+ return r
+}
+
func writeObject(ctx context.Context, obj *ObjectHandle, contentType string, contents []byte) error {
w := obj.NewWriter(ctx)
w.ContentType = contentType
@@ -2198,6 +2239,18 @@ func writeObject(ctx context.Context, obj *ObjectHandle, contentType string, con
return w.Close()
}
+// loc returns a string describing the file and line of its caller's call site. In
+// other words, if a test function calls a helper, and the helper calls loc, then the
+// string will refer to the line on which the test function called the helper.
+// TODO(jba): use t.Helper once we drop go 1.6.
+func loc() string {
+ _, file, line, ok := runtime.Caller(2)
+ if !ok {
+ return "???"
+ }
+ return fmt.Sprintf("%s:%d", filepath.Base(file), line)
+}
+
func readObject(ctx context.Context, obj *ObjectHandle) ([]byte, error) {
r, err := obj.NewReader(ctx)
if err != nil {
diff --git a/vendor/cloud.google.com/go/storage/reader.go b/vendor/cloud.google.com/go/storage/reader.go
index 6af5a94e0..68d9ca11a 100644
--- a/vendor/cloud.google.com/go/storage/reader.go
+++ b/vendor/cloud.google.com/go/storage/reader.go
@@ -22,6 +22,7 @@ import (
"io/ioutil"
"net/http"
"net/url"
+ "reflect"
"strconv"
"strings"
@@ -74,11 +75,6 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64)
return nil, err
}
req = withContext(req, ctx)
- if length < 0 && offset > 0 {
- req.Header.Set("Range", fmt.Sprintf("bytes=%d-", offset))
- } else if length > 0 {
- req.Header.Set("Range", fmt.Sprintf("bytes=%d-%d", offset, offset+length-1))
- }
if o.userProject != "" {
req.Header.Set("X-Goog-User-Project", o.userProject)
}
@@ -88,39 +84,57 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64)
if err := setEncryptionHeaders(req.Header, o.encryptionKey, false); err != nil {
return nil, err
}
- var res *http.Response
- err = runWithRetry(ctx, func() error {
- res, err = o.c.hc.Do(req)
- if err != nil {
- return err
+
+ // Define a function that initiates a Read with offset and length, assuming we
+ // have already read seen bytes.
+ reopen := func(seen int64) (*http.Response, error) {
+ start := offset + seen
+ if length < 0 && start > 0 {
+ req.Header.Set("Range", fmt.Sprintf("bytes=%d-", start))
+ } else if length > 0 {
+ // The end character isn't affected by how many bytes we've seen.
+ req.Header.Set("Range", fmt.Sprintf("bytes=%d-%d", start, offset+length-1))
}
- if res.StatusCode == http.StatusNotFound {
- res.Body.Close()
- return ErrObjectNotExist
- }
- if res.StatusCode < 200 || res.StatusCode > 299 {
- body, _ := ioutil.ReadAll(res.Body)
- res.Body.Close()
- return &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- Body: string(body),
+ var res *http.Response
+ err = runWithRetry(ctx, func() error {
+ res, err = o.c.hc.Do(req)
+ if err != nil {
+ return err
}
+ if res.StatusCode == http.StatusNotFound {
+ res.Body.Close()
+ return ErrObjectNotExist
+ }
+ if res.StatusCode < 200 || res.StatusCode > 299 {
+ body, _ := ioutil.ReadAll(res.Body)
+ res.Body.Close()
+ return &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ Body: string(body),
+ }
+ }
+ if start > 0 && length != 0 && res.StatusCode != http.StatusPartialContent {
+ res.Body.Close()
+ return errors.New("storage: partial request not satisfied")
+ }
+ return nil
+ })
+ if err != nil {
+ return nil, err
}
- if offset > 0 && length != 0 && res.StatusCode != http.StatusPartialContent {
- res.Body.Close()
- return errors.New("storage: partial request not satisfied")
- }
- return nil
- })
+ return res, nil
+ }
+
+ res, err := reopen(0)
if err != nil {
return nil, err
}
-
var size int64 // total size of object, even if a range was requested.
if res.StatusCode == http.StatusPartialContent {
cr := strings.TrimSpace(res.Header.Get("Content-Range"))
if !strings.HasPrefix(cr, "bytes ") || !strings.Contains(cr, "/") {
+
return nil, fmt.Errorf("storage: invalid Content-Range %q", cr)
}
size, err = strconv.ParseInt(cr[strings.LastIndex(cr, "/")+1:], 10, 64)
@@ -155,6 +169,7 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64)
cacheControl: res.Header.Get("Cache-Control"),
wantCRC: crc,
checkCRC: checkCRC,
+ reopen: reopen,
}, nil
}
@@ -180,15 +195,16 @@ var emptyBody = ioutil.NopCloser(strings.NewReader(""))
// the stored CRC, returning an error from Read if there is a mismatch. This integrity check
// is skipped if transcoding occurs. See https://cloud.google.com/storage/docs/transcoding.
type Reader struct {
- body io.ReadCloser
- remain, size int64
- contentType string
- contentEncoding string
- cacheControl string
- checkCRC bool // should we check the CRC?
- wantCRC uint32 // the CRC32c value the server sent in the header
- gotCRC uint32 // running crc
- checkedCRC bool // did we check the CRC? (For tests.)
+ body io.ReadCloser
+ seen, remain, size int64
+ contentType string
+ contentEncoding string
+ cacheControl string
+ checkCRC bool // should we check the CRC?
+ wantCRC uint32 // the CRC32c value the server sent in the header
+ gotCRC uint32 // running crc
+ checkedCRC bool // did we check the CRC? (For tests.)
+ reopen func(seen int64) (*http.Response, error)
}
// Close closes the Reader. It must be called when done reading.
@@ -197,7 +213,7 @@ func (r *Reader) Close() error {
}
func (r *Reader) Read(p []byte) (int, error) {
- n, err := r.body.Read(p)
+ n, err := r.readWithRetry(p)
if r.remain != -1 {
r.remain -= int64(n)
}
@@ -217,6 +233,35 @@ func (r *Reader) Read(p []byte) (int, error) {
return n, err
}
+func (r *Reader) readWithRetry(p []byte) (int, error) {
+ n := 0
+ for len(p[n:]) > 0 {
+ m, err := r.body.Read(p[n:])
+ n += m
+ r.seen += int64(m)
+ if !shouldRetryRead(err) {
+ return n, err
+ }
+ // Read failed, but we will try again. Send a ranged read request that takes
+ // into account the number of bytes we've already seen.
+ res, err := r.reopen(r.seen)
+ if err != nil {
+ // reopen already retries
+ return n, err
+ }
+ r.body.Close()
+ r.body = res.Body
+ }
+ return n, nil
+}
+
+func shouldRetryRead(err error) bool {
+ if err == nil {
+ return false
+ }
+ return strings.HasSuffix(err.Error(), "INTERNAL_ERROR") && strings.Contains(reflect.TypeOf(err).String(), "http2")
+}
+
// Size returns the size of the object in bytes.
// The returned value is always the same and is not affected by
// calls to Read or Close.
diff --git a/vendor/cloud.google.com/go/storage/reader_test.go b/vendor/cloud.google.com/go/storage/reader_test.go
index de734c636..c5e78b0e3 100644
--- a/vendor/cloud.google.com/go/storage/reader_test.go
+++ b/vendor/cloud.google.com/go/storage/reader_test.go
@@ -15,7 +15,9 @@
package storage
import (
+ "errors"
"fmt"
+ "io"
"io/ioutil"
"net/http"
"strconv"
@@ -110,3 +112,186 @@ func handleRangeRead(w http.ResponseWriter, r *http.Request) {
panic(err)
}
}
+
+type http2Error string
+
+func (h http2Error) Error() string {
+ return string(h)
+}
+
+func TestRangeReaderRetry(t *testing.T) {
+ retryErr := http2Error("blah blah INTERNAL_ERROR")
+ readBytes := []byte(readData)
+ hc, close := newTestServer(handleRangeRead)
+ defer close()
+ ctx := context.Background()
+ c, err := NewClient(ctx, option.WithHTTPClient(hc))
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ obj := c.Bucket("b").Object("o")
+ for i, test := range []struct {
+ offset, length int64
+ bodies []fakeReadCloser
+ want string
+ }{
+ {
+ offset: 0,
+ length: -1,
+ bodies: []fakeReadCloser{
+ {data: readBytes, counts: []int{10}, err: io.EOF},
+ },
+ want: readData,
+ },
+ {
+ offset: 0,
+ length: -1,
+ bodies: []fakeReadCloser{
+ {data: readBytes, counts: []int{3}, err: retryErr},
+ {data: readBytes[3:], counts: []int{5, 2}, err: io.EOF},
+ },
+ want: readData,
+ },
+ {
+ offset: 0,
+ length: -1,
+ bodies: []fakeReadCloser{
+ {data: readBytes, counts: []int{5}, err: retryErr},
+ {data: readBytes[5:], counts: []int{1, 3}, err: retryErr},
+ {data: readBytes[9:], counts: []int{1}, err: io.EOF},
+ },
+ want: readData,
+ },
+ {
+ offset: 0,
+ length: 5,
+ bodies: []fakeReadCloser{
+ {data: readBytes, counts: []int{3}, err: retryErr},
+ {data: readBytes[3:], counts: []int{2}, err: io.EOF},
+ },
+ want: readData[:5],
+ },
+ {
+ offset: 1,
+ length: 5,
+ bodies: []fakeReadCloser{
+ {data: readBytes, counts: []int{3}, err: retryErr},
+ {data: readBytes[3:], counts: []int{2}, err: io.EOF},
+ },
+ want: readData[:5],
+ },
+ {
+ offset: 1,
+ length: 3,
+ bodies: []fakeReadCloser{
+ {data: readBytes[1:], counts: []int{1}, err: retryErr},
+ {data: readBytes[2:], counts: []int{2}, err: io.EOF},
+ },
+ want: readData[1:4],
+ },
+ {
+ offset: 4,
+ length: -1,
+ bodies: []fakeReadCloser{
+ {data: readBytes[4:], counts: []int{1}, err: retryErr},
+ {data: readBytes[5:], counts: []int{4}, err: retryErr},
+ {data: readBytes[9:], counts: []int{1}, err: io.EOF},
+ },
+ want: readData[4:],
+ },
+ } {
+ r, err := obj.NewRangeReader(ctx, test.offset, test.length)
+ if err != nil {
+ t.Errorf("#%d: %v", i, err)
+ continue
+ }
+ r.body = &test.bodies[0]
+ b := 0
+ r.reopen = func(int64) (*http.Response, error) {
+ b++
+ return &http.Response{Body: &test.bodies[b]}, nil
+ }
+ buf := make([]byte, len(readData)/2)
+ var gotb []byte
+ for {
+ n, err := r.Read(buf)
+ gotb = append(gotb, buf[:n]...)
+ if err == io.EOF {
+ break
+ }
+ if err != nil {
+ t.Fatalf("#%d: %v", i, err)
+ }
+ }
+ if err != nil {
+ t.Errorf("#%d: %v", i, err)
+ continue
+ }
+ if got := string(gotb); got != test.want {
+ t.Errorf("#%d: got %q, want %q", i, got, test.want)
+ }
+ }
+}
+
+type fakeReadCloser struct {
+ data []byte
+ counts []int // how much of data to deliver on each read
+ err error // error to return with last count
+
+ d int // current position in data
+ c int // current position in counts
+}
+
+func (f *fakeReadCloser) Close() error {
+ return nil
+}
+
+func (f *fakeReadCloser) Read(buf []byte) (int, error) {
+ i := f.c
+ n := 0
+ if i < len(f.counts) {
+ n = f.counts[i]
+ }
+ var err error
+ if i >= len(f.counts)-1 {
+ err = f.err
+ }
+ copy(buf, f.data[f.d:f.d+n])
+ if len(buf) < n {
+ n = len(buf)
+ f.counts[i] -= n
+ err = nil
+ } else {
+ f.c++
+ }
+ f.d += n
+ return n, err
+}
+
+func TestFakeReadCloser(t *testing.T) {
+ e := errors.New("")
+ f := &fakeReadCloser{
+ data: []byte(readData),
+ counts: []int{1, 2, 3},
+ err: e,
+ }
+ wants := []string{"0", "12", "345"}
+ buf := make([]byte, 10)
+ for i := 0; i < 3; i++ {
+ n, err := f.Read(buf)
+ if got, want := n, f.counts[i]; got != want {
+ t.Fatalf("i=%d: got %d, want %d", i, got, want)
+ }
+ var wantErr error
+ if i == 2 {
+ wantErr = e
+ }
+ if err != wantErr {
+ t.Fatalf("i=%d: got error %v, want %v", i, err, wantErr)
+ }
+ if got, want := string(buf[:n]), wants[i]; got != want {
+ t.Fatalf("i=%d: got %q, want %q", i, got, want)
+ }
+ }
+}
diff --git a/vendor/cloud.google.com/go/storage/storage.go b/vendor/cloud.google.com/go/storage/storage.go
index c6a2704ce..df58bb74e 100644
--- a/vendor/cloud.google.com/go/storage/storage.go
+++ b/vendor/cloud.google.com/go/storage/storage.go
@@ -722,6 +722,14 @@ type ObjectAttrs struct {
// encryption in Google Cloud Storage.
CustomerKeySHA256 string
+ // Cloud KMS key name, in the form
+ // projects/P/locations/L/keyRings/R/cryptoKeys/K, used to encrypt this object,
+ // if the object is encrypted by such a key.
+ //
+ // Providing both a KMSKeyName and a customer-supplied encryption key (via
+ // ObjectHandle.Key) will result in an error when writing an object.
+ KMSKeyName string
+
// Prefix is set only for ObjectAttrs which represent synthetic "directory
// entries" when iterating over buckets using Query.Delimiter. See
// ObjectIterator.Next. When set, no other fields in ObjectAttrs will be
@@ -779,6 +787,7 @@ func newObject(o *raw.Object) *ObjectAttrs {
Metageneration: o.Metageneration,
StorageClass: o.StorageClass,
CustomerKeySHA256: sha256,
+ KMSKeyName: o.KmsKeyName,
Created: convertTime(o.TimeCreated),
Deleted: convertTime(o.TimeDeleted),
Updated: convertTime(o.Updated),
diff --git a/vendor/cloud.google.com/go/storage/storage_test.go b/vendor/cloud.google.com/go/storage/storage_test.go
index 23622a09a..a1ea7659d 100644
--- a/vendor/cloud.google.com/go/storage/storage_test.go
+++ b/vendor/cloud.google.com/go/storage/storage_test.go
@@ -264,44 +264,6 @@ func dummyKey(kind string) []byte {
return slurp
}
-func TestCopyToMissingFields(t *testing.T) {
- t.Parallel()
- var tests = []struct {
- srcBucket, srcName, destBucket, destName string
- errMsg string
- }{
- {
- "mybucket", "", "mybucket", "destname",
- "name is empty",
- },
- {
- "mybucket", "srcname", "mybucket", "",
- "name is empty",
- },
- {
- "", "srcfile", "mybucket", "destname",
- "name is empty",
- },
- {
- "mybucket", "srcfile", "", "destname",
- "name is empty",
- },
- }
- ctx := context.Background()
- client, err := NewClient(ctx, option.WithHTTPClient(&http.Client{Transport: &fakeTransport{}}))
- if err != nil {
- panic(err)
- }
- for i, test := range tests {
- src := client.Bucket(test.srcBucket).Object(test.srcName)
- dst := client.Bucket(test.destBucket).Object(test.destName)
- _, err := dst.CopierFrom(src).Run(ctx)
- if !strings.Contains(err.Error(), test.errMsg) {
- t.Errorf("CopyTo test #%v:\ngot err %q\nwant err %q", i, err, test.errMsg)
- }
- }
-}
-
func TestObjectNames(t *testing.T) {
t.Parallel()
// Naming requirements: https://cloud.google.com/storage/docs/bucket-naming
diff --git a/vendor/cloud.google.com/go/storage/writer.go b/vendor/cloud.google.com/go/storage/writer.go
index 21d146f0f..3e9709b8f 100644
--- a/vendor/cloud.google.com/go/storage/writer.go
+++ b/vendor/cloud.google.com/go/storage/writer.go
@@ -88,6 +88,9 @@ func (w *Writer) open() error {
if !utf8.ValidString(attrs.Name) {
return fmt.Errorf("storage: object name %q is not valid UTF-8", attrs.Name)
}
+ if attrs.KMSKeyName != "" && w.o.encryptionKey != nil {
+ return errors.New("storage: cannot use KMSKeyName with a customer-supplied encryption key")
+ }
pr, pw := io.Pipe()
w.pw = pw
w.opened = true
@@ -119,6 +122,9 @@ func (w *Writer) open() error {
if w.ProgressFunc != nil {
call.ProgressUpdater(func(n, _ int64) { w.ProgressFunc(n) })
}
+ if attrs.KMSKeyName != "" {
+ call.KmsKeyName(attrs.KMSKeyName)
+ }
if err := setEncryptionHeaders(call.Header(), w.o.encryptionKey, false); err != nil {
w.mu.Lock()
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 c1f73809a..ca6f58c7a 100644
--- a/vendor/cloud.google.com/go/storage/writer_test.go
+++ b/vendor/cloud.google.com/go/storage/writer_test.go
@@ -15,10 +15,10 @@
package storage
import (
- "bytes"
"crypto/sha256"
"encoding/base64"
"fmt"
+ "io"
"io/ioutil"
"net/http"
"strings"
@@ -32,6 +32,8 @@ import (
"google.golang.org/api/option"
)
+var testEncryptionKey = []byte("secret-key-that-is-32-bytes-long")
+
type fakeTransport struct {
gotReq *http.Request
gotBody []byte
@@ -93,14 +95,9 @@ func TestErrorOnObjectsInsertCall(t *testing.T) {
// Retry on 5xx
ft := &fakeTransport{}
- ft.addResult(&http.Response{
- StatusCode: 503,
- Body: ioutil.NopCloser(&bytes.Buffer{}),
- }, nil)
- ft.addResult(&http.Response{
- StatusCode: 200,
- Body: ioutil.NopCloser(strings.NewReader("{}")),
- }, nil)
+ ft.addResult(&http.Response{StatusCode: 503, Body: bodyReader("")}, nil)
+ ft.addResult(&http.Response{StatusCode: 200, Body: bodyReader("{}")}, nil)
+
wc = doWrite(&http.Client{Transport: ft})
if err := wc.Close(); err != nil {
t.Errorf("got %v, want nil", err)
@@ -115,17 +112,20 @@ func TestEncryption(t *testing.T) {
t.Parallel()
ctx := context.Background()
ft := &fakeTransport{}
+ ft.addResult(&http.Response{StatusCode: 200, Body: bodyReader("{}")}, nil)
hc := &http.Client{Transport: ft}
client, err := NewClient(ctx, option.WithHTTPClient(hc))
if err != nil {
t.Fatalf("error when creating client: %v", err)
}
obj := client.Bucket("bucketname").Object("filename1")
- key := []byte("secret-key-that-is-32-bytes-long")
- wc := obj.Key(key).NewWriter(ctx)
- // TODO(jba): use something other than fakeTransport, which always returns error.
- wc.Write([]byte("hello world"))
- wc.Close()
+ wc := obj.Key(testEncryptionKey).NewWriter(ctx)
+ if _, err := wc.Write([]byte("hello world")); err != nil {
+ t.Fatal(err)
+ }
+ if err := wc.Close(); err != nil {
+ t.Fatal(err)
+ }
if got, want := ft.gotReq.Header.Get("x-goog-encryption-algorithm"), "AES256"; got != want {
t.Errorf("algorithm: got %q, want %q", got, want)
}
@@ -133,10 +133,10 @@ func TestEncryption(t *testing.T) {
if err != nil {
t.Fatalf("decoding key: %v", err)
}
- if !testutil.Equal(gotKey, key) {
- t.Errorf("key: got %v, want %v", gotKey, key)
+ if !testutil.Equal(gotKey, testEncryptionKey) {
+ t.Errorf("key: got %v, want %v", gotKey, testEncryptionKey)
}
- wantHash := sha256.Sum256(key)
+ wantHash := sha256.Sum256(testEncryptionKey)
gotHash, err := base64.StdEncoding.DecodeString(ft.gotReq.Header.Get("x-goog-encryption-key-sha256"))
if err != nil {
t.Fatalf("decoding hash: %v", err)
@@ -144,6 +144,21 @@ func TestEncryption(t *testing.T) {
if !testutil.Equal(gotHash, wantHash[:]) { // wantHash is an array
t.Errorf("hash: got\n%v, want\n%v", gotHash, wantHash)
}
+
+ // Using a customer-supplied encryption key and a KMS key together is an error.
+ checkKMSError := func(msg string, err error) {
+ if err == nil {
+ t.Errorf("%s: got nil, want error", msg)
+ } else if !strings.Contains(err.Error(), "KMS") {
+ t.Errorf(`%s: got %q, want it to contain "KMS"`, msg, err)
+ }
+ }
+
+ wc = obj.Key(testEncryptionKey).NewWriter(ctx)
+ wc.KMSKeyName = "key"
+ _, err = wc.Write([]byte{})
+ checkKMSError("Write", err)
+ checkKMSError("Close", wc.Close())
}
// This test demonstrates the data race on Writer.err that can happen when the
@@ -172,3 +187,7 @@ func TestRaceOnCancel(t *testing.T) {
// This call to Write concurrently reads w.err (L169).
w.Write([]byte(nil))
}
+
+func bodyReader(s string) io.ReadCloser {
+ return ioutil.NopCloser(strings.NewReader(s))
+}
diff --git a/vendor/cloud.google.com/go/trace/trace.go b/vendor/cloud.google.com/go/trace/trace.go
index df7020256..7d9283267 100644
--- a/vendor/cloud.google.com/go/trace/trace.go
+++ b/vendor/cloud.google.com/go/trace/trace.go
@@ -13,7 +13,7 @@
// limitations under the License.
// This package is OBSOLETE. See https://godoc.org/go.opencensus.io/trace; and use
-// OpenCensus Stackdriver exporter, https://godoc.org/go.opencensus.io/exporter/stackdriver.
+// OpenCensus Stackdriver exporter, https://godoc.org/contrib.go.opencensus.io/exporter/stackdriver.
//
// Package trace is a Google Stackdriver Trace library.
//
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 981f900c9..194b5b845 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/CHANGELOG.md
+++ b/vendor/github.com/Azure/azure-sdk-for-go/CHANGELOG.md
@@ -1,147 +1,368 @@
# CHANGELOG
+## `v17.3.0`
+
+### New Services
+
+| Package Name | API Version |
+| --------------------: | :-----------------: |
+| containerinstance | 2018-06-01 |
+| reservations | 2018-06-01 |
+
+### Updated Services
+
+| Package Name | API Version |
+| --------------------: | :-----------------: |
+| datafactory | 2017-09-01 |
+| network | 2015-06-15 |
+
+## `v17.2.0`
+
+### New Services
+
+| Package Name | API Version |
+| --------------------: | :-----------------: |
+| managedapplications | 2018-06-01 |
+| resources | 2018-05-01 |
+
+### Updated Services
+
+| Package Name | API Version |
+| --------------------: | :-----------------: |
+| networksecuritygroup | classic |
+
+## `v17.1.0`
+
+### New Services
+
+| Package Name | API Version |
+| --------------------: | :-----------------: |
+| iotcentral | 2017-07-01-privatepreview |
+
+## `v17.0.0`
+
+### New Services
+
+| Package Name | API Version |
+| --------------------: | :-----------------: |
+| batchai | 2018-05-01 |
+| adhybridhealthservice | 2014-01-01 |
+| consumption | 2018-05-31 |
+| customimagesearch | v1.0 |
+| luis/authoring | v2.0 |
+| management | 2018-03-01-preview |
+| maps | 2017-01-01-preview |
+| maps | 2018-05-01 |
+| network | 2018-05-01 |
+| policy | "2018-03-01 |
+| servicefabric | "2018-02-01 |
+| services | "2018-03-01-preview |
+| storage | 2018-03-01-preview |
+| trafficmanager | 2018-02-01 |
+| workspaces | 2016-04-01 |
+
+### Updated Services
+
+| Package Name | API Version |
+| ------------------: | :----------------: |
+| aad | 2017-01-01 |
+| aad | 2017-06-01 |
+| account | 2016-11-01 |
+| advisor | 2017-04-19 |
+| analysisservices | 2016-05-16 |
+| analysisservices | 2017-07-14 |
+| analysisservices | 2017-08-01 |
+| apimanagement | 2016-07-07 |
+| apimanagement | 2016-10-10 |
+| apimanagement | 2017-03-01 |
+| apimanagement | 2018-01-01 |
+| batch | 2015-12-01 |
+| batch | 2017-01-01 |
+| batch | 2017-05-01 |
+| batch | 2017-09-01 |
+| batchai | 2018-03-01 |
+| batchai | 2018-05-01 |
+| botservices | 2017-12-01 |
+| catalog | 2016-11-01-preview |
+| cdn | 2015-06-01 |
+| cdn | 2016-04-02 |
+| cdn | 2016-10-02 |
+| cdn | 2017-04-02 |
+| cdn | 2017-10-12 |
+| compute | 2015-06-15 |
+| compute | 2016-03-30 |
+| compute | 2017-03-30 |
+| compute | 2018-04-01 |
+| computervision | v1.0 |
+| consumption | 2018-03-31 |
+| containerinstance | 2018-04-01 |
+| containerregistry | 2017-03-01 |
+| containerregistry | 2017-10-01 |
+| containerregistry | 2018-02-01 |
+| containerservice | 2016-03-30 |
+| containerservice | 2016-09-30 |
+| containerservice | 2017-01-31 |
+| containerservice | 2017-07-01 |
+| containerservice | 2017-08-31 |
+| containerservice | 2017-09-30 |
+| customerinsights | 2017-01-01 |
+| customerinsights | 2017-04-26 |
+| databox | 2018-01-01 |
+| databricks | 2018-04-01 |
+| datacatalog | 2016-03-30 |
+| datafactory | 2017-09-01-preview |
+| datamigration | 2018-03-31-preview |
+| devices | 2016-02-03 |
+| devices | 2017-01-19 |
+| devices | 2017-07-01 |
+| devices | 2018-01-22 |
+| devices | 2018-04-01 |
+| dns | 2016-04-01 |
+| dns | 2017-09-01 |
+| dns | 2017-10-01 |
+| documentdb | 2015-04-08 |
+| dtl | 2016-05-15 |
+| eventgrid | 2018-01-01 |
+| eventgrid | 2018-05-01-preview |
+| eventhub | 2015-08-01 |
+| eventhub | 2017-04-01 |
+| eventhub | 2018-01-01-preview |
+| insights | 2015-05-01 |
+| iothub | 2017-08-21-preview |
+| iothub | 2017-11-15 |
+| iothub | 2018-01-22 |
+| iotspaces | 2017-10-01-preview |
+| logic | 2016-06-01 |
+| managedapplications | 2016-09-01-preview |
+| managedapplications | 2017-09-01 |
+| management | 2018-01-01-preview |
+| media | 2018-03-30-preview |
+| mysql | 2017-12-01 |
+| network | 2015-06-15 |
+| network | 2016-03-30 |
+| network | 2016-06-01 |
+| network | 2016-09-01 |
+| network | 2016-12-01 |
+| network | 2017-03-01 |
+| network | 2017-06-01 |
+| network | 2017-08-01 |
+| network | 2017-09-01 |
+| network | 2017-10-01 |
+| network | 2017-11-01 |
+| network | 2018-01-01 |
+| network | 2018-02-01 |
+| network | 2018-04-01 |
+| notificationhubs | 2014-09-01 |
+| notificationhubs | 2016-03-01 |
+| notificationhubs | 2017-04-01 |
+| operationalinsights | 2015-03-20 |
+| operationalinsights | v1 |
+| postgresql | 2017-12-01 |
+| powerbidedicated | 2017-10-01 |
+| powerbiembedded | 2016-01-29 |
+| prediction | customvision |
+| luis/programmatic | v2.0 |
+| redis | 2016-04-01 |
+| redis | 2017-02-01 |
+| redis | 2017-10-01 |
+| redis | 2018-03-01 |
+| relay | 2016-07-01 |
+| relay | 2017-04-01 |
+| reservations | 2017-11-01 |
+| resources | 2015-11-01 |
+| resources | 2016-02-01 |
+| resources | 2016-07-01 |
+| resources | 2016-09-01 |
+| resources | 2017-05-10 |
+| resources | 2018-02-01 |
+| luis/runtime | v2.0 |
+| scheduler | 2016-03-01 |
+| search | 2015-08-19 |
+| servermanagement | 2015-07-01-preview |
+| servermanagement | 2016-07-01-preview |
+| servicebus | 2015-08-01 |
+| servicebus | 2017-04-01 |
+| servicefabric | 2016-09-01 |
+| servicefabric | 2017-07-01-preview |
+| signalr | 2018-03-01-preview |
+| siterecovery | 2016-08-10 |
+| siterecovery | 2018-01-10 |
+| sql | 2014-04-01 |
+| sql | 2015-05-01-preview |
+| sql | 2017-03-01-preview |
+| sql | 2017-10-01-preview |
+| storage | 2015-05-01-preview |
+| storage | 2015-06-15 |
+| storage | 2016-01-01 |
+| storage | 2016-05-01 |
+| storage | 2016-12-01 |
+| storage | 2017-06-01 |
+| storage | 2017-10-01 |
+| storage | 2018-02-01 |
+| storsimple | 2017-06-01 |
+| streamanalytics | 2016-03-01 |
+| subscription | 2017-11-01-preview |
+| subscription | 2018-03-01-preview |
+| timeseriesinsights | 2017-02-28-preview |
+| timeseriesinsights | 2017-11-15 |
+| trafficmanager | 2018-03-01 |
+| training | customvision |
+| visualstudio | 2014-04-01-preview |
+| web | 2015-08-preview |
+| web | 2016-09-01 |
+| web | 2018-02-01 |
+| webservices | 2017-01-01 |
+
+## `v16.2.2`
+
+### Updated Services
+
+| Package Name | API Version |
+| -----------: | :----------------: |
+| signalr | 2018-03-01-preview |
+
## `v16.2.1`
### Updated Services
-| Package Name | API Version |
-|-------------:|:-----------:|
-|web | 2016-09-01
2018-02-01 |
+| Package Name | API Version |
+| -----------: | :-----------------------: |
+| web | 2016-09-01
2018-02-01 |
## `v16.2.0`
### New Services
-| Package Name | API Version |
-|-------------:|:-----------:|
-|eventgrid | 2018-05-01-preview |
-|trafficmanager | 2018-03-01 |
+| Package Name | API Version |
+| -------------: | :----------------: |
+| eventgrid | 2018-05-01-preview |
+| trafficmanager | 2018-03-01 |
### Updated Services
-| Package Name | API Version |
-|-------------:|:-----------:|
-|redis | 2017-10-01
2018-03-01 |
-|textanalytics | v2.0 |
-|web | 2016-09-01
2018-02-01 |
+| Package Name | API Version |
+| ------------: | :-----------------------: |
+| redis | 2017-10-01
2018-03-01 |
+| textanalytics | v2.0 |
+| web | 2016-09-01
2018-02-01 |
## `v16.1.0`
-- Added a `NewAuthorizerFromEnvironment()` function for the keyvault service.
+* Added a `NewAuthorizerFromEnvironment()` function for the keyvault service.
## `v16.0.0`
### New Services
-| Package Name | API Version |
-|-------------:|:-----------:|
-|batchai | 2018-05-01 |
-|botservices | 2017-12-01 |
-|containerinstance | 2018-04-01 |
-|containerregistry | 2018-02-01 |
-|keyvault | v7.0 |
-|managedapplications | 2017-09-01 |
-|network | 2018-04-01 |
-|policyinsights | 2018-04-04 |
-|signalr | 2018-03-01-preview |
-|storage | 2018-02-0 |
-|visualsearch | v1.0 |
-|web | 2018-02-01 |
+| Package Name | API Version |
+| ------------------: | :----------------: |
+| batchai | 2018-05-01 |
+| botservices | 2017-12-01 |
+| containerinstance | 2018-04-01 |
+| containerregistry | 2018-02-01 |
+| keyvault | v7.0 |
+| managedapplications | 2017-09-01 |
+| network | 2018-04-01 |
+| policyinsights | 2018-04-04 |
+| signalr | 2018-03-01-preview |
+| storage | 2018-02-0 |
+| visualsearch | v1.0 |
+| web | 2018-02-01 |
### Updated Services
-| Package Name | API Version |
-|-------------:|:-----------:|
-|apimanagement | 2018-01-01 |
-|automation | 2015-10-31
2017-05-15-preview |
-|billing | 2018-03-01-preview |
-|botservices | 2017-12-01 |
-|catalog | 2016-11-01-preview |
-|cognitiveservices | 2017-04-18 |
-|commerce | 2015-06-01-preview |
-|compute | 2018-04-01 |
-|consumption | 2018-03-31 |
-|contentmoderator | v1.0 |
-|datafactory | 2017-09-01-preview |
-|datamigration | 2017-11-15-preview|
-|eventhub | 2017-04-01 |
-|insights | 2015-05-0 |
-|iothub | 2017-11-15 |
-|network | 2018-02-01 |
-|operationalinsights | 2015-03-20
2015-11-01-preview |
-|servicebus | 2017-04-01 |
-|siterecovery | 2018-01-10 |
-|sql | 2017-03-01-preview
2017-10-01-preview
2015-05-01-preview |
-|timeseriesinsights | 2017-11-15 |
-|luis/runtime | v2.0 |
-|web | 2016-09-01 |
+| Package Name | API Version |
+| ------------------: | :--------------------------------------------------------------: |
+| apimanagement | 2018-01-01 |
+| automation | 2015-10-31
2017-05-15-preview |
+| billing | 2018-03-01-preview |
+| botservices | 2017-12-01 |
+| catalog | 2016-11-01-preview |
+| cognitiveservices | 2017-04-18 |
+| commerce | 2015-06-01-preview |
+| compute | 2018-04-01 |
+| consumption | 2018-03-31 |
+| contentmoderator | v1.0 |
+| datafactory | 2017-09-01-preview |
+| datamigration | 2017-11-15-preview |
+| eventhub | 2017-04-01 |
+| insights | 2015-05-0 |
+| iothub | 2017-11-15 |
+| network | 2018-02-01 |
+| operationalinsights | 2015-03-20
2015-11-01-preview |
+| servicebus | 2017-04-01 |
+| siterecovery | 2018-01-10 |
+| sql | 2017-03-01-preview
2017-10-01-preview
2015-05-01-preview |
+| timeseriesinsights | 2017-11-15 |
+| luis/runtime | v2.0 |
+| web | 2016-09-01 |
## `v15.3.0`
### New Services
-| Package Name | API Version |
-|-------------:|:-----------:|
-|databox | 2018-01-01 |
-|devices | 2018-04-01 |
-|media | 2018-03-30-preview |
-|servicefabric | 6.2 |
+| Package Name | API Version |
+| ------------: | :----------------: |
+| databox | 2018-01-01 |
+| devices | 2018-04-01 |
+| media | 2018-03-30-preview |
+| servicefabric | 6.2 |
### Updated Services
-| Package Name | API Version |
-|-------------:|:-----------:|
-|apimanagement | 2018-01-01 |
-|batch | 2018-03-01.6.1 |
-|containerregistry | 2017-10-01 |
-|documentdb | 2015-04-08 |
-|servicebus | 2017-04-01 |
+| Package Name | API Version |
+| ----------------: | :------------: |
+| apimanagement | 2018-01-01 |
+| batch | 2018-03-01.6.1 |
+| containerregistry | 2017-10-01 |
+| documentdb | 2015-04-08 |
+| servicebus | 2017-04-01 |
## `v15.2.0`
### New Services
| Package Name | API Version |
-|-------------:|:-----------:|
-|addons | 2017-05-15 |
-|addons | 2018-03-01 |
+| -----------: | :---------: |
+| addons | 2017-05-15 |
+| addons | 2018-03-01 |
### Updated Services
-| Package Name | API Version |
-|-------------:|:-----------:|
-|apimanagement | 2017-03-01 |
-|apimanagement | 2018-01-01 |
-|insights | 2015-05-01 |
+| Package Name | API Version |
+| ------------: | :---------: |
+| apimanagement | 2017-03-01 |
+| apimanagement | 2018-01-01 |
+| insights | 2015-05-01 |
## `v15.1.1`
### Bug Fixes
-- Drain the response body when retrying a request.
-- Avoid allocating when draining a response body.
+* Drain the response body when retrying a request.
+* Avoid allocating when draining a response body.
## `v15.1.0`
### New Services
-| Package Name | API Version |
-|-------------:|:-----------:|
-|datamigration | 2018-03-31-preview |
-|devices | 2018-01-22 |
-|network | 2018-02-01 |
-|cognitiveservices | customvision |
+| Package Name | API Version |
+| ----------------: | :----------------: |
+| datamigration | 2018-03-31-preview |
+| devices | 2018-01-22 |
+| network | 2018-02-01 |
+| cognitiveservices | customvision |
## Updated Services
-| Package Name | API Version |
-|-------------:|:-----------:|
-|compute | 2015-06-15
2016-03-30
2016-04-30-preview
2017-03-30
2018-04-01 |
-|datafactory | 2017-09-01-preview |
-|insights | 2018-03-01 |
-|mysql | 2017-12-01 |
-|postgresql | 2017-12-01 |
-|web | 2016-09-01 |
+| Package Name | API Version |
+| -----------: | :----------------------------------------------------------------------------: |
+| compute | 2015-06-15
2016-03-30
2016-04-30-preview
2017-03-30
2018-04-01 |
+| datafactory | 2017-09-01-preview |
+| insights | 2018-03-01 |
+| mysql | 2017-12-01 |
+| postgresql | 2017-12-01 |
+| web | 2016-09-01 |
## `v15.0.1`
@@ -153,147 +374,147 @@ NOTE: There is a new subdirectory, ./services/preview, which going forward will
### New Features
-- Added helper func per enum type that returns a slice of all possible values for that type.
+* Added helper func per enum type that returns a slice of all possible values for that type.
### Bug Fixes
-- Removed the "arm-" prefix from user-agent strings as not all services are for ARM.
-- Fixed missing marshaller for structs with flattened fields.
-- Fixed an issue where the incorrect content MIME type was being specified.
-- Marshalling of empty values for enum types now works as expected.
+* Removed the "arm-" prefix from user-agent strings as not all services are for ARM.
+* Fixed missing marshaller for structs with flattened fields.
+* Fixed an issue where the incorrect content MIME type was being specified.
+* Marshalling of empty values for enum types now works as expected.
### New Services
-| Package Name | API Version |
-|-------------:|:-----------:|
-|apimanagement | 2017-03-01 |
-|azurestack | 2017-06-01 |
-|billing | 2018-03-01-preview |
-|compute | 2018-04-01 |
-|consumption | 2018-03-31 |
-|databricks | 2018-04-01 |
-|dns | 2017-10-01 |
-|insights | 2018-03-01 |
-|iothub | 2018-01-22 |
-|iotspaces | 2017-10-01-preview |
-|management | 2018-01-01-preview |
-|migrate | 2018-02-02 |
-|policyinsights | 2017-08-09-preview
2017-10-17-preview
2017-12-12-preview |
-|resources | 2018-02-01 |
-|siterecovery | 2018-01-10 |
-|sql | 2017-10-01-preview |
+| Package Name | API Version |
+| -------------: | :--------------------------------------------------------------: |
+| apimanagement | 2017-03-01 |
+| azurestack | 2017-06-01 |
+| billing | 2018-03-01-preview |
+| compute | 2018-04-01 |
+| consumption | 2018-03-31 |
+| databricks | 2018-04-01 |
+| dns | 2017-10-01 |
+| insights | 2018-03-01 |
+| iothub | 2018-01-22 |
+| iotspaces | 2017-10-01-preview |
+| management | 2018-01-01-preview |
+| migrate | 2018-02-02 |
+| policyinsights | 2017-08-09-preview
2017-10-17-preview
2017-12-12-preview |
+| resources | 2018-02-01 |
+| siterecovery | 2018-01-10 |
+| sql | 2017-10-01-preview |
### Breaking Changes
-| Package Name | API Version |
-|-------------:|:-----------:|
-| automation | 2017-05-15-preview |
-| advisor | 2017-04-19 |
-| cognitiveservices | 2017-04-18 |
-| compute | 2017-03-30
2017-12-01 |
-| consumption | 2018-01-31 |
-| containerinstance | 2018-02-01-preview |
-| containerservice | 2017-08-31
2017-09-30 |
-| customsearch | v1.0 |
-| datafactory | 2017-09-01-preview |
-| datamigration | 2017-11-15-preview |
-| dns | 2018-03-01-preview |
-| entitysearch | v1.0 |
-| imagesearch | v1.0 |
-| insights | 2017-05-01-preview |
-| iothub | 2017-11-15 |
-| management | 2017-08-31-preview
2017-11-01-preview |
-| mysql | 2017-12-01-preview |
-| newssearch | v1.0 |
-| operationalinsights | 2015-03-20 |
-| postgresql | 2017-12-01-preview |
-| servicebus | 2015-08-01 |
-| servicefabric | 2017-07-01-preview
5.6
6.0
6.1 |
-| servicemap | 2015-11-01-preview |
-| spellcheck | v1.0 |
-| timeseriesinsights | 2017-02-28-preview
2017-11-15 |
-| videosearch | v1.0 |
-| web | 2016-09-01 |
-| websearch | v1.0 |
+| Package Name | API Version |
+| ------------------: | :----------------------------------------: |
+| automation | 2017-05-15-preview |
+| advisor | 2017-04-19 |
+| cognitiveservices | 2017-04-18 |
+| compute | 2017-03-30
2017-12-01 |
+| consumption | 2018-01-31 |
+| containerinstance | 2018-02-01-preview |
+| containerservice | 2017-08-31
2017-09-30 |
+| customsearch | v1.0 |
+| datafactory | 2017-09-01-preview |
+| datamigration | 2017-11-15-preview |
+| dns | 2018-03-01-preview |
+| entitysearch | v1.0 |
+| imagesearch | v1.0 |
+| insights | 2017-05-01-preview |
+| iothub | 2017-11-15 |
+| management | 2017-08-31-preview
2017-11-01-preview |
+| mysql | 2017-12-01-preview |
+| newssearch | v1.0 |
+| operationalinsights | 2015-03-20 |
+| postgresql | 2017-12-01-preview |
+| servicebus | 2015-08-01 |
+| servicefabric | 2017-07-01-preview
5.6
6.0
6.1 |
+| servicemap | 2015-11-01-preview |
+| spellcheck | v1.0 |
+| timeseriesinsights | 2017-02-28-preview
2017-11-15 |
+| videosearch | v1.0 |
+| web | 2016-09-01 |
+| websearch | v1.0 |
## `v14.6.0`
### New Services
-- Batch 2018-03-01.6.1
-- BatchAI 2018-03-01
-- Cognitive services custom vision prediction v1.1
-- Eventhub 2018-01-01-preview
-- MySQL 2017-12-01
-- PostgreSQL 2017-12-01
-- Redis 2018-03-01
-- Subscription 2018-03-01-preview
+* Batch 2018-03-01.6.1
+* BatchAI 2018-03-01
+* Cognitive services custom vision prediction v1.1
+* Eventhub 2018-01-01-preview
+* MySQL 2017-12-01
+* PostgreSQL 2017-12-01
+* Redis 2018-03-01
+* Subscription 2018-03-01-preview
## `v14.5.0`
### Changes
-- Added new preview packages for apimanagement and dns.
+* Added new preview packages for apimanagement and dns.
## `v14.4.0`
### Changes
-- Added new preview API versions for mysql and postgresql.
+* Added new preview API versions for mysql and postgresql.
## `v14.3.0`
### Changes
-- Add exports for max file range and sizes for files in storage.
-- Updated README regarding blob storage support.
-- Add godoc indexer tool.
-- Add apidiff tool.
+* Add exports for max file range and sizes for files in storage.
+* Updated README regarding blob storage support.
+* Add godoc indexer tool.
+* Add apidiff tool.
## `v14.2.0`
### Changes
-- For blob storage, added GetProperties() method to Container.
-- Added PublicAccess field to ContainerProperties struct.
+* For blob storage, added GetProperties() method to Container.
+* Added PublicAccess field to ContainerProperties struct.
## `v14.1.1`
-- Fixing timestamp marshalling bug in the `storage` package.
-- Updating `profileBuilder` to clear-output folders when it is run by `go generate`.
-- Tweaking Swagger -> SDK config to use "latest" instead of "nightly" and be tied to a particular version of autorest.go.
+* Fixing timestamp marshalling bug in the `storage` package.
+* Updating `profileBuilder` to clear-output folders when it is run by `go generate`.
+* Tweaking Swagger -> SDK config to use "latest" instead of "nightly" and be tied to a particular version of autorest.go.
## `v14.1.0`
### Changes
-- Update README with details on new authentication helpers.
-- Update `latest` profile to point to latest stable API versions.
-- Add new API version for Azure Monitoring service and for Batch Data plane service.
+* Update README with details on new authentication helpers.
+* Update `latest` profile to point to latest stable API versions.
+* Add new API version for Azure Monitoring service and for Batch Data plane service.
## `v14.0.2`
### Changes
-- Updating `profileBuilder list` to accept an `input` flag instead of reading from `stdin`.
-- Simplifying CI to have less chatter, be faster, and have no special cases.
+* Updating `profileBuilder list` to accept an `input` flag instead of reading from `stdin`.
+* Simplifying CI to have less chatter, be faster, and have no special cases.
## `v14.0.1`
### Changes
-- Removed the ./services/search/2016-09-01/search package, it was never intended to be included and doesn't work.
+* Removed the ./services/search/2016-09-01/search package, it was never intended to be included and doesn't work.
## `v14.0.0`
### Breaking Changes
-- Removed the ./arm, ./datalake-store and ./dataplane directories. You can find the same packages under ./services
-- The management package was moved to ./services/classic/management
-- Renamed package ./services/redis/mgmt/2017-10-01/cache to ./services/redis/mgmt/2017-10-01/redis
+* Removed the ./arm, ./datalake-store and ./dataplane directories. You can find the same packages under ./services
+* The management package was moved to ./services/classic/management
+* Renamed package ./services/redis/mgmt/2017-10-01/cache to ./services/redis/mgmt/2017-10-01/redis
### Changes
-- Removed the "-beta" suffix.
-- Added various new services.
-- Added ./version package for centralized SDK versioning.
+* Removed the "-beta" suffix.
+* Added various new services.
+* Added ./version package for centralized SDK versioning.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/Gopkg.lock b/vendor/github.com/Azure/azure-sdk-for-go/Gopkg.lock
index 27909ff8c..8ccb75b62 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/Gopkg.lock
+++ b/vendor/github.com/Azure/azure-sdk-for-go/Gopkg.lock
@@ -12,8 +12,8 @@
"autorest/to",
"autorest/validation"
]
- revision = "eaa7994b2278094c904d31993d26f56324db3052"
- version = "v10.8.1"
+ revision = "4de44cd533576f3c7b44dcb08dc03754d217144d"
+ version = "v10.9.2"
[[projects]]
name = "github.com/dgrijalva/jwt-go"
@@ -34,7 +34,7 @@
"cassette",
"recorder"
]
- revision = "b68d3628568e385c2f706bf3f0db84f9c32fe610"
+ revision = "f8a7e8b9c630b486df74145bb887793a1b85459b"
[[projects]]
name = "github.com/fsnotify/fsnotify"
@@ -80,8 +80,8 @@
[[projects]]
name = "github.com/magiconair/properties"
packages = ["."]
- revision = "c3beff4c2358b44d0493c7dda585e7db7ff28ae6"
- version = "v1.7.6"
+ revision = "c2353362d570a7bfa228149c62842019201cfb71"
+ version = "v1.8.0"
[[projects]]
name = "github.com/marstr/collection"
@@ -111,13 +111,13 @@
branch = "master"
name = "github.com/mitchellh/go-homedir"
packages = ["."]
- revision = "b8bc1bf767474819792c23f32d8286a45736f1c6"
+ revision = "3864e76763d94a6df2f9960b16a20a33da9f9a66"
[[projects]]
branch = "master"
name = "github.com/mitchellh/mapstructure"
packages = ["."]
- revision = "00c29f56e2386353d58c599509e8dc3801b0d716"
+ revision = "bb74f1db0675b241733089d5a1faa5dd8b0ef57b"
[[projects]]
name = "github.com/pelletier/go-toml"
@@ -155,8 +155,8 @@
[[projects]]
name = "github.com/spf13/cobra"
packages = ["."]
- revision = "a1f051bc3eba734da4772d60e2d677f47cf93ef4"
- version = "v0.0.2"
+ revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385"
+ version = "v0.0.3"
[[projects]]
branch = "master"
@@ -183,13 +183,13 @@
"pkcs12",
"pkcs12/internal/rc2"
]
- revision = "76a954637dfa3223c13edb4529f981f0d62cfa26"
+ revision = "5ba7f63082460102a45837dbd1827e10f9479ac0"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = ["unix"]
- revision = "78d5f264b493f125018180c204871ecf58a2dce1"
+ revision = "c11f84a56e43e20a78cee75a7c034031ecf57d1f"
[[projects]]
name = "golang.org/x/text"
@@ -212,7 +212,7 @@
"imports",
"internal/fastwalk"
]
- revision = "ae8027637c91c400af8a3e006c35c7011b3ca1fe"
+ revision = "a5b4c53f6e8bdcafa95a94671bf2d1203365858b"
[[projects]]
branch = "v1"
@@ -229,6 +229,6 @@
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
- inputs-digest = "fe4a318be50163472da549167fc3c68e0e1e6fd39987f7028721365cfe8a82ed"
+ inputs-digest = "3ba7e7e6599059a0ac88f854eca95495c02501ebe2e0be13b38e4f2b823d5c53"
solver-name = "gps-cdcl"
solver-version = 1
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/Gopkg.toml b/vendor/github.com/Azure/azure-sdk-for-go/Gopkg.toml
index fdd8ea633..83e67124a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/Gopkg.toml
+++ b/vendor/github.com/Azure/azure-sdk-for-go/Gopkg.toml
@@ -22,7 +22,7 @@
[[constraint]]
name = "github.com/Azure/go-autorest"
- version = "10.8.1"
+ version = "10.9.2"
[[constraint]]
branch = "master"
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/cognitiveservices/computervision/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/cognitiveservices/computervision/models.go
index 2dc6f7da8..954a0e004 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/cognitiveservices/computervision/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/cognitiveservices/computervision/models.go
@@ -78,43 +78,36 @@ const (
Male Gender = original.Male
)
-type Language1 = original.Language1
-
-const (
- En Language1 = original.En
- Zh Language1 = original.Zh
-)
-
type OcrLanguages = original.OcrLanguages
const (
- OcrLanguagesAr OcrLanguages = original.OcrLanguagesAr
- OcrLanguagesCs OcrLanguages = original.OcrLanguagesCs
- OcrLanguagesDa OcrLanguages = original.OcrLanguagesDa
- OcrLanguagesDe OcrLanguages = original.OcrLanguagesDe
- OcrLanguagesEl OcrLanguages = original.OcrLanguagesEl
- OcrLanguagesEn OcrLanguages = original.OcrLanguagesEn
- OcrLanguagesEs OcrLanguages = original.OcrLanguagesEs
- OcrLanguagesFi OcrLanguages = original.OcrLanguagesFi
- OcrLanguagesFr OcrLanguages = original.OcrLanguagesFr
- OcrLanguagesHu OcrLanguages = original.OcrLanguagesHu
- OcrLanguagesIt OcrLanguages = original.OcrLanguagesIt
- OcrLanguagesJa OcrLanguages = original.OcrLanguagesJa
- OcrLanguagesKo OcrLanguages = original.OcrLanguagesKo
- OcrLanguagesNb OcrLanguages = original.OcrLanguagesNb
- OcrLanguagesNl OcrLanguages = original.OcrLanguagesNl
- OcrLanguagesPl OcrLanguages = original.OcrLanguagesPl
- OcrLanguagesPt OcrLanguages = original.OcrLanguagesPt
- OcrLanguagesRo OcrLanguages = original.OcrLanguagesRo
- OcrLanguagesRu OcrLanguages = original.OcrLanguagesRu
- OcrLanguagesSk OcrLanguages = original.OcrLanguagesSk
- OcrLanguagesSrCyrl OcrLanguages = original.OcrLanguagesSrCyrl
- OcrLanguagesSrLatn OcrLanguages = original.OcrLanguagesSrLatn
- OcrLanguagesSv OcrLanguages = original.OcrLanguagesSv
- OcrLanguagesTr OcrLanguages = original.OcrLanguagesTr
- OcrLanguagesUnk OcrLanguages = original.OcrLanguagesUnk
- OcrLanguagesZhHans OcrLanguages = original.OcrLanguagesZhHans
- OcrLanguagesZhHant OcrLanguages = original.OcrLanguagesZhHant
+ Ar OcrLanguages = original.Ar
+ Cs OcrLanguages = original.Cs
+ Da OcrLanguages = original.Da
+ De OcrLanguages = original.De
+ El OcrLanguages = original.El
+ En OcrLanguages = original.En
+ Es OcrLanguages = original.Es
+ Fi OcrLanguages = original.Fi
+ Fr OcrLanguages = original.Fr
+ Hu OcrLanguages = original.Hu
+ It OcrLanguages = original.It
+ Ja OcrLanguages = original.Ja
+ Ko OcrLanguages = original.Ko
+ Nb OcrLanguages = original.Nb
+ Nl OcrLanguages = original.Nl
+ Pl OcrLanguages = original.Pl
+ Pt OcrLanguages = original.Pt
+ Ro OcrLanguages = original.Ro
+ Ru OcrLanguages = original.Ru
+ Sk OcrLanguages = original.Sk
+ SrCyrl OcrLanguages = original.SrCyrl
+ SrLatn OcrLanguages = original.SrLatn
+ Sv OcrLanguages = original.Sv
+ Tr OcrLanguages = original.Tr
+ Unk OcrLanguages = original.Unk
+ ZhHans OcrLanguages = original.ZhHans
+ ZhHant OcrLanguages = original.ZhHant
)
type TextOperationStatusCodes = original.TextOperationStatusCodes
@@ -190,9 +183,6 @@ func PossibleErrorCodesValues() []ErrorCodes {
func PossibleGenderValues() []Gender {
return original.PossibleGenderValues()
}
-func PossibleLanguage1Values() []Language1 {
- return original.PossibleLanguage1Values()
-}
func PossibleOcrLanguagesValues() []OcrLanguages {
return original.PossibleOcrLanguagesValues()
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/cognitiveservices/luis/programmatic/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/cognitiveservices/luis/programmatic/models.go
index 4c32da0f1..8cfe5c154 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/cognitiveservices/luis/programmatic/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/cognitiveservices/luis/programmatic/models.go
@@ -60,7 +60,9 @@ const (
ReadableTypeHierarchicalChildEntityExtractor ReadableType = original.ReadableTypeHierarchicalChildEntityExtractor
ReadableTypeHierarchicalEntityExtractor ReadableType = original.ReadableTypeHierarchicalEntityExtractor
ReadableTypeIntentClassifier ReadableType = original.ReadableTypeIntentClassifier
+ ReadableTypePatternAnyEntityExtractor ReadableType = original.ReadableTypePatternAnyEntityExtractor
ReadableTypePrebuiltEntityExtractor ReadableType = original.ReadableTypePrebuiltEntityExtractor
+ ReadableTypeRegexEntityExtractor ReadableType = original.ReadableTypeRegexEntityExtractor
)
type ReadableType1 = original.ReadableType1
@@ -72,7 +74,23 @@ const (
ReadableType1HierarchicalChildEntityExtractor ReadableType1 = original.ReadableType1HierarchicalChildEntityExtractor
ReadableType1HierarchicalEntityExtractor ReadableType1 = original.ReadableType1HierarchicalEntityExtractor
ReadableType1IntentClassifier ReadableType1 = original.ReadableType1IntentClassifier
+ ReadableType1PatternAnyEntityExtractor ReadableType1 = original.ReadableType1PatternAnyEntityExtractor
ReadableType1PrebuiltEntityExtractor ReadableType1 = original.ReadableType1PrebuiltEntityExtractor
+ ReadableType1RegexEntityExtractor ReadableType1 = original.ReadableType1RegexEntityExtractor
+)
+
+type ReadableType10 = original.ReadableType10
+
+const (
+ ReadableType10ClosedListEntityExtractor ReadableType10 = original.ReadableType10ClosedListEntityExtractor
+ ReadableType10CompositeEntityExtractor ReadableType10 = original.ReadableType10CompositeEntityExtractor
+ ReadableType10EntityExtractor ReadableType10 = original.ReadableType10EntityExtractor
+ ReadableType10HierarchicalChildEntityExtractor ReadableType10 = original.ReadableType10HierarchicalChildEntityExtractor
+ ReadableType10HierarchicalEntityExtractor ReadableType10 = original.ReadableType10HierarchicalEntityExtractor
+ ReadableType10IntentClassifier ReadableType10 = original.ReadableType10IntentClassifier
+ ReadableType10PatternAnyEntityExtractor ReadableType10 = original.ReadableType10PatternAnyEntityExtractor
+ ReadableType10PrebuiltEntityExtractor ReadableType10 = original.ReadableType10PrebuiltEntityExtractor
+ ReadableType10RegexEntityExtractor ReadableType10 = original.ReadableType10RegexEntityExtractor
)
type ReadableType2 = original.ReadableType2
@@ -84,7 +102,9 @@ const (
ReadableType2HierarchicalChildEntityExtractor ReadableType2 = original.ReadableType2HierarchicalChildEntityExtractor
ReadableType2HierarchicalEntityExtractor ReadableType2 = original.ReadableType2HierarchicalEntityExtractor
ReadableType2IntentClassifier ReadableType2 = original.ReadableType2IntentClassifier
+ ReadableType2PatternAnyEntityExtractor ReadableType2 = original.ReadableType2PatternAnyEntityExtractor
ReadableType2PrebuiltEntityExtractor ReadableType2 = original.ReadableType2PrebuiltEntityExtractor
+ ReadableType2RegexEntityExtractor ReadableType2 = original.ReadableType2RegexEntityExtractor
)
type ReadableType3 = original.ReadableType3
@@ -96,7 +116,93 @@ const (
ReadableType3HierarchicalChildEntityExtractor ReadableType3 = original.ReadableType3HierarchicalChildEntityExtractor
ReadableType3HierarchicalEntityExtractor ReadableType3 = original.ReadableType3HierarchicalEntityExtractor
ReadableType3IntentClassifier ReadableType3 = original.ReadableType3IntentClassifier
+ ReadableType3PatternAnyEntityExtractor ReadableType3 = original.ReadableType3PatternAnyEntityExtractor
ReadableType3PrebuiltEntityExtractor ReadableType3 = original.ReadableType3PrebuiltEntityExtractor
+ ReadableType3RegexEntityExtractor ReadableType3 = original.ReadableType3RegexEntityExtractor
+)
+
+type ReadableType4 = original.ReadableType4
+
+const (
+ ReadableType4ClosedListEntityExtractor ReadableType4 = original.ReadableType4ClosedListEntityExtractor
+ ReadableType4CompositeEntityExtractor ReadableType4 = original.ReadableType4CompositeEntityExtractor
+ ReadableType4EntityExtractor ReadableType4 = original.ReadableType4EntityExtractor
+ ReadableType4HierarchicalChildEntityExtractor ReadableType4 = original.ReadableType4HierarchicalChildEntityExtractor
+ ReadableType4HierarchicalEntityExtractor ReadableType4 = original.ReadableType4HierarchicalEntityExtractor
+ ReadableType4IntentClassifier ReadableType4 = original.ReadableType4IntentClassifier
+ ReadableType4PatternAnyEntityExtractor ReadableType4 = original.ReadableType4PatternAnyEntityExtractor
+ ReadableType4PrebuiltEntityExtractor ReadableType4 = original.ReadableType4PrebuiltEntityExtractor
+ ReadableType4RegexEntityExtractor ReadableType4 = original.ReadableType4RegexEntityExtractor
+)
+
+type ReadableType5 = original.ReadableType5
+
+const (
+ ReadableType5ClosedListEntityExtractor ReadableType5 = original.ReadableType5ClosedListEntityExtractor
+ ReadableType5CompositeEntityExtractor ReadableType5 = original.ReadableType5CompositeEntityExtractor
+ ReadableType5EntityExtractor ReadableType5 = original.ReadableType5EntityExtractor
+ ReadableType5HierarchicalChildEntityExtractor ReadableType5 = original.ReadableType5HierarchicalChildEntityExtractor
+ ReadableType5HierarchicalEntityExtractor ReadableType5 = original.ReadableType5HierarchicalEntityExtractor
+ ReadableType5IntentClassifier ReadableType5 = original.ReadableType5IntentClassifier
+ ReadableType5PatternAnyEntityExtractor ReadableType5 = original.ReadableType5PatternAnyEntityExtractor
+ ReadableType5PrebuiltEntityExtractor ReadableType5 = original.ReadableType5PrebuiltEntityExtractor
+ ReadableType5RegexEntityExtractor ReadableType5 = original.ReadableType5RegexEntityExtractor
+)
+
+type ReadableType6 = original.ReadableType6
+
+const (
+ ReadableType6ClosedListEntityExtractor ReadableType6 = original.ReadableType6ClosedListEntityExtractor
+ ReadableType6CompositeEntityExtractor ReadableType6 = original.ReadableType6CompositeEntityExtractor
+ ReadableType6EntityExtractor ReadableType6 = original.ReadableType6EntityExtractor
+ ReadableType6HierarchicalChildEntityExtractor ReadableType6 = original.ReadableType6HierarchicalChildEntityExtractor
+ ReadableType6HierarchicalEntityExtractor ReadableType6 = original.ReadableType6HierarchicalEntityExtractor
+ ReadableType6IntentClassifier ReadableType6 = original.ReadableType6IntentClassifier
+ ReadableType6PatternAnyEntityExtractor ReadableType6 = original.ReadableType6PatternAnyEntityExtractor
+ ReadableType6PrebuiltEntityExtractor ReadableType6 = original.ReadableType6PrebuiltEntityExtractor
+ ReadableType6RegexEntityExtractor ReadableType6 = original.ReadableType6RegexEntityExtractor
+)
+
+type ReadableType7 = original.ReadableType7
+
+const (
+ ReadableType7ClosedListEntityExtractor ReadableType7 = original.ReadableType7ClosedListEntityExtractor
+ ReadableType7CompositeEntityExtractor ReadableType7 = original.ReadableType7CompositeEntityExtractor
+ ReadableType7EntityExtractor ReadableType7 = original.ReadableType7EntityExtractor
+ ReadableType7HierarchicalChildEntityExtractor ReadableType7 = original.ReadableType7HierarchicalChildEntityExtractor
+ ReadableType7HierarchicalEntityExtractor ReadableType7 = original.ReadableType7HierarchicalEntityExtractor
+ ReadableType7IntentClassifier ReadableType7 = original.ReadableType7IntentClassifier
+ ReadableType7PatternAnyEntityExtractor ReadableType7 = original.ReadableType7PatternAnyEntityExtractor
+ ReadableType7PrebuiltEntityExtractor ReadableType7 = original.ReadableType7PrebuiltEntityExtractor
+ ReadableType7RegexEntityExtractor ReadableType7 = original.ReadableType7RegexEntityExtractor
+)
+
+type ReadableType8 = original.ReadableType8
+
+const (
+ ReadableType8ClosedListEntityExtractor ReadableType8 = original.ReadableType8ClosedListEntityExtractor
+ ReadableType8CompositeEntityExtractor ReadableType8 = original.ReadableType8CompositeEntityExtractor
+ ReadableType8EntityExtractor ReadableType8 = original.ReadableType8EntityExtractor
+ ReadableType8HierarchicalChildEntityExtractor ReadableType8 = original.ReadableType8HierarchicalChildEntityExtractor
+ ReadableType8HierarchicalEntityExtractor ReadableType8 = original.ReadableType8HierarchicalEntityExtractor
+ ReadableType8IntentClassifier ReadableType8 = original.ReadableType8IntentClassifier
+ ReadableType8PatternAnyEntityExtractor ReadableType8 = original.ReadableType8PatternAnyEntityExtractor
+ ReadableType8PrebuiltEntityExtractor ReadableType8 = original.ReadableType8PrebuiltEntityExtractor
+ ReadableType8RegexEntityExtractor ReadableType8 = original.ReadableType8RegexEntityExtractor
+)
+
+type ReadableType9 = original.ReadableType9
+
+const (
+ ReadableType9ClosedListEntityExtractor ReadableType9 = original.ReadableType9ClosedListEntityExtractor
+ ReadableType9CompositeEntityExtractor ReadableType9 = original.ReadableType9CompositeEntityExtractor
+ ReadableType9EntityExtractor ReadableType9 = original.ReadableType9EntityExtractor
+ ReadableType9HierarchicalChildEntityExtractor ReadableType9 = original.ReadableType9HierarchicalChildEntityExtractor
+ ReadableType9HierarchicalEntityExtractor ReadableType9 = original.ReadableType9HierarchicalEntityExtractor
+ ReadableType9IntentClassifier ReadableType9 = original.ReadableType9IntentClassifier
+ ReadableType9PatternAnyEntityExtractor ReadableType9 = original.ReadableType9PatternAnyEntityExtractor
+ ReadableType9PrebuiltEntityExtractor ReadableType9 = original.ReadableType9PrebuiltEntityExtractor
+ ReadableType9RegexEntityExtractor ReadableType9 = original.ReadableType9RegexEntityExtractor
)
type Status = original.Status
@@ -153,9 +259,16 @@ type EntitiesSuggestionExample = original.EntitiesSuggestionExample
type EntityExtractor = original.EntityExtractor
type EntityLabel = original.EntityLabel
type EntityLabelObject = original.EntityLabelObject
+type EntityModelInfo = original.EntityModelInfo
type EntityPrediction = original.EntityPrediction
+type EntityRole = original.EntityRole
+type EntityRoleCreateObject = original.EntityRoleCreateObject
+type EntityRoleUpdateObject = original.EntityRoleUpdateObject
type ErrorResponse = original.ErrorResponse
type ExampleLabelObject = original.ExampleLabelObject
+type ExplicitListItem = original.ExplicitListItem
+type ExplicitListItemCreateObject = original.ExplicitListItemCreateObject
+type ExplicitListItemUpdateObject = original.ExplicitListItemUpdateObject
type FeatureInfoObject = original.FeatureInfoObject
type FeaturesResponseObject = original.FeaturesResponseObject
type HierarchicalChildEntity = original.HierarchicalChildEntity
@@ -183,15 +296,20 @@ type ListCompositeEntityExtractor = original.ListCompositeEntityExtractor
type ListCustomPrebuiltModel = original.ListCustomPrebuiltModel
type ListEntitiesSuggestionExample = original.ListEntitiesSuggestionExample
type ListEntityExtractor = original.ListEntityExtractor
+type ListEntityRole = original.ListEntityRole
+type ListExplicitListItem = original.ListExplicitListItem
type ListHierarchicalEntityExtractor = original.ListHierarchicalEntityExtractor
type ListIntentClassifier = original.ListIntentClassifier
type ListIntentsSuggestionExample = original.ListIntentsSuggestionExample
type ListLabeledUtterance = original.ListLabeledUtterance
type ListModelInfoResponse = original.ListModelInfoResponse
type ListModelTrainingInfo = original.ListModelTrainingInfo
+type ListPatternAnyEntityExtractor = original.ListPatternAnyEntityExtractor
+type ListPatternRuleInfo = original.ListPatternRuleInfo
type ListPhraseListFeatureInfo = original.ListPhraseListFeatureInfo
type ListPrebuiltDomain = original.ListPrebuiltDomain
type ListPrebuiltEntityExtractor = original.ListPrebuiltEntityExtractor
+type ListRegexEntityExtractor = original.ListRegexEntityExtractor
type ListString = original.ListString
type ListUUID = original.ListUUID
type ListVersionInfo = original.ListVersionInfo
@@ -204,8 +322,16 @@ type ModelTrainingInfo = original.ModelTrainingInfo
type ModelUpdateObject = original.ModelUpdateObject
type OperationError = original.OperationError
type OperationStatus = original.OperationStatus
+type PatternAny = original.PatternAny
+type PatternAnyEntityExtractor = original.PatternAnyEntityExtractor
+type PatternAnyModelCreateObject = original.PatternAnyModelCreateObject
+type PatternAnyModelUpdateObject = original.PatternAnyModelUpdateObject
type PatternCreateObject = original.PatternCreateObject
type PatternFeatureInfo = original.PatternFeatureInfo
+type PatternRule = original.PatternRule
+type PatternRuleCreateObject = original.PatternRuleCreateObject
+type PatternRuleInfo = original.PatternRuleInfo
+type PatternRuleUpdateObject = original.PatternRuleUpdateObject
type PatternUpdateObject = original.PatternUpdateObject
type PersonalAssistantsResponse = original.PersonalAssistantsResponse
type PhraselistCreateObject = original.PhraselistCreateObject
@@ -216,9 +342,15 @@ type PrebuiltDomainCreateBaseObject = original.PrebuiltDomainCreateBaseObject
type PrebuiltDomainCreateObject = original.PrebuiltDomainCreateObject
type PrebuiltDomainItem = original.PrebuiltDomainItem
type PrebuiltDomainModelCreateObject = original.PrebuiltDomainModelCreateObject
+type PrebuiltDomainObject = original.PrebuiltDomainObject
+type PrebuiltEntity = original.PrebuiltEntity
type PrebuiltEntityExtractor = original.PrebuiltEntityExtractor
type ProductionOrStagingEndpointInfo = original.ProductionOrStagingEndpointInfo
type ReadCloser = original.ReadCloser
+type RegexEntity = original.RegexEntity
+type RegexEntityExtractor = original.RegexEntityExtractor
+type RegexModelCreateObject = original.RegexModelCreateObject
+type RegexModelUpdateObject = original.RegexModelUpdateObject
type SetString = original.SetString
type String = original.String
type SubClosedList = original.SubClosedList
@@ -230,6 +362,7 @@ type UUID = original.UUID
type VersionInfo = original.VersionInfo
type WordListBaseUpdateObject = original.WordListBaseUpdateObject
type WordListObject = original.WordListObject
+type PatternClient = original.PatternClient
type PermissionsClient = original.PermissionsClient
type TrainClient = original.TrainClient
type VersionsClient = original.VersionsClient
@@ -264,12 +397,33 @@ func PossibleReadableTypeValues() []ReadableType {
func PossibleReadableType1Values() []ReadableType1 {
return original.PossibleReadableType1Values()
}
+func PossibleReadableType10Values() []ReadableType10 {
+ return original.PossibleReadableType10Values()
+}
func PossibleReadableType2Values() []ReadableType2 {
return original.PossibleReadableType2Values()
}
func PossibleReadableType3Values() []ReadableType3 {
return original.PossibleReadableType3Values()
}
+func PossibleReadableType4Values() []ReadableType4 {
+ return original.PossibleReadableType4Values()
+}
+func PossibleReadableType5Values() []ReadableType5 {
+ return original.PossibleReadableType5Values()
+}
+func PossibleReadableType6Values() []ReadableType6 {
+ return original.PossibleReadableType6Values()
+}
+func PossibleReadableType7Values() []ReadableType7 {
+ return original.PossibleReadableType7Values()
+}
+func PossibleReadableType8Values() []ReadableType8 {
+ return original.PossibleReadableType8Values()
+}
+func PossibleReadableType9Values() []ReadableType9 {
+ return original.PossibleReadableType9Values()
+}
func PossibleStatusValues() []Status {
return original.PossibleStatusValues()
}
@@ -279,6 +433,9 @@ func PossibleStatus1Values() []Status1 {
func PossibleTrainingStatusValues() []TrainingStatus {
return original.PossibleTrainingStatusValues()
}
+func NewPatternClient(azureRegion AzureRegions) PatternClient {
+ return original.NewPatternClient(azureRegion)
+}
func NewPermissionsClient(azureRegion AzureRegions) PermissionsClient {
return original.NewPermissionsClient(azureRegion)
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/compute/mgmt/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/compute/mgmt/compute/models.go
index 60f83ea30..62f73987a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/compute/mgmt/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/compute/mgmt/compute/models.go
@@ -486,12 +486,11 @@ const (
)
type AccessURI = original.AccessURI
-type AccessURIOutput = original.AccessURIOutput
-type AccessURIRaw = original.AccessURIRaw
type AdditionalUnattendContent = original.AdditionalUnattendContent
type APIEntityReference = original.APIEntityReference
type APIError = original.APIError
type APIErrorBase = original.APIErrorBase
+type AutoOSUpgradePolicy = original.AutoOSUpgradePolicy
type AvailabilitySet = original.AvailabilitySet
type AvailabilitySetListResult = original.AvailabilitySetListResult
type AvailabilitySetProperties = original.AvailabilitySetProperties
@@ -597,7 +596,6 @@ type ResourceSkuRestrictions = original.ResourceSkuRestrictions
type ResourceSkusResult = original.ResourceSkusResult
type ResourceSkusResultIterator = original.ResourceSkusResultIterator
type ResourceSkusResultPage = original.ResourceSkusResultPage
-type ResourceUpdate = original.ResourceUpdate
type RollbackStatusInfo = original.RollbackStatusInfo
type RollingUpgradePolicy = original.RollingUpgradePolicy
type RollingUpgradeProgressInfo = original.RollingUpgradeProgressInfo
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/containerservice/mgmt/containerservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/containerservice/mgmt/containerservice/models.go
index 4e5252e6f..a830d9f3d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/containerservice/mgmt/containerservice/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/containerservice/mgmt/containerservice/models.go
@@ -55,7 +55,6 @@ const (
type VMSizeTypes = original.VMSizeTypes
const (
- StandardA0 VMSizeTypes = original.StandardA0
StandardA1 VMSizeTypes = original.StandardA1
StandardA10 VMSizeTypes = original.StandardA10
StandardA11 VMSizeTypes = original.StandardA11
@@ -74,8 +73,6 @@ const (
StandardA8mV2 VMSizeTypes = original.StandardA8mV2
StandardA8V2 VMSizeTypes = original.StandardA8V2
StandardA9 VMSizeTypes = original.StandardA9
- StandardB1ms VMSizeTypes = original.StandardB1ms
- StandardB1s VMSizeTypes = original.StandardB1s
StandardB2ms VMSizeTypes = original.StandardB2ms
StandardB2s VMSizeTypes = original.StandardB2s
StandardB4ms VMSizeTypes = original.StandardB4ms
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/cosmos-db/mgmt/documentdb/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/cosmos-db/mgmt/documentdb/models.go
index 706e5caa9..4600400c5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/cosmos-db/mgmt/documentdb/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/cosmos-db/mgmt/documentdb/models.go
@@ -106,8 +106,11 @@ type DatabaseAccountsCreateOrUpdateFuture = original.DatabaseAccountsCreateOrUpd
type DatabaseAccountsDeleteFuture = original.DatabaseAccountsDeleteFuture
type DatabaseAccountsFailoverPriorityChangeFuture = original.DatabaseAccountsFailoverPriorityChangeFuture
type DatabaseAccountsListResult = original.DatabaseAccountsListResult
+type DatabaseAccountsOfflineRegionFuture = original.DatabaseAccountsOfflineRegionFuture
+type DatabaseAccountsOnlineRegionFuture = original.DatabaseAccountsOnlineRegionFuture
type DatabaseAccountsPatchFuture = original.DatabaseAccountsPatchFuture
type DatabaseAccountsRegenerateKeyFuture = original.DatabaseAccountsRegenerateKeyFuture
+type ErrorResponse = original.ErrorResponse
type FailoverPolicies = original.FailoverPolicies
type FailoverPolicy = original.FailoverPolicy
type Location = original.Location
@@ -130,6 +133,7 @@ type PartitionUsagesResult = original.PartitionUsagesResult
type PercentileMetric = original.PercentileMetric
type PercentileMetricListResult = original.PercentileMetricListResult
type PercentileMetricValue = original.PercentileMetricValue
+type RegionForOnlineOffline = original.RegionForOnlineOffline
type Resource = original.Resource
type Usage = original.Usage
type UsagesResult = original.UsagesResult
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/datalake/analytics/catalog/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/datalake/analytics/catalog/models.go
index 66a0adcb1..f560907da 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/datalake/analytics/catalog/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/datalake/analytics/catalog/models.go
@@ -122,6 +122,7 @@ type USQLTablePartition = original.USQLTablePartition
type USQLTablePartitionList = original.USQLTablePartitionList
type USQLTablePartitionListIterator = original.USQLTablePartitionListIterator
type USQLTablePartitionListPage = original.USQLTablePartitionListPage
+type USQLTablePreview = original.USQLTablePreview
type USQLTableStatistics = original.USQLTableStatistics
type USQLTableStatisticsList = original.USQLTableStatisticsList
type USQLTableStatisticsListIterator = original.USQLTableStatisticsListIterator
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/datalake/store/mgmt/account/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/datalake/store/mgmt/account/models.go
index 4698d4173..1293ad054 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/datalake/store/mgmt/account/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/datalake/store/mgmt/account/models.go
@@ -137,7 +137,10 @@ type CreateOrUpdateFirewallRuleParameters = original.CreateOrUpdateFirewallRuleP
type CreateOrUpdateFirewallRuleProperties = original.CreateOrUpdateFirewallRuleProperties
type CreateOrUpdateTrustedIDProviderParameters = original.CreateOrUpdateTrustedIDProviderParameters
type CreateOrUpdateTrustedIDProviderProperties = original.CreateOrUpdateTrustedIDProviderProperties
+type CreateOrUpdateVirtualNetworkRuleParameters = original.CreateOrUpdateVirtualNetworkRuleParameters
+type CreateOrUpdateVirtualNetworkRuleProperties = original.CreateOrUpdateVirtualNetworkRuleProperties
type CreateTrustedIDProviderWithAccountParameters = original.CreateTrustedIDProviderWithAccountParameters
+type CreateVirtualNetworkRuleWithAccountParameters = original.CreateVirtualNetworkRuleWithAccountParameters
type DataLakeStoreAccount = original.DataLakeStoreAccount
type DataLakeStoreAccountBasic = original.DataLakeStoreAccountBasic
type DataLakeStoreAccountListResult = original.DataLakeStoreAccountListResult
@@ -174,8 +177,17 @@ type UpdateKeyVaultMetaInfo = original.UpdateKeyVaultMetaInfo
type UpdateTrustedIDProviderParameters = original.UpdateTrustedIDProviderParameters
type UpdateTrustedIDProviderProperties = original.UpdateTrustedIDProviderProperties
type UpdateTrustedIDProviderWithAccountParameters = original.UpdateTrustedIDProviderWithAccountParameters
+type UpdateVirtualNetworkRuleParameters = original.UpdateVirtualNetworkRuleParameters
+type UpdateVirtualNetworkRuleProperties = original.UpdateVirtualNetworkRuleProperties
+type UpdateVirtualNetworkRuleWithAccountParameters = original.UpdateVirtualNetworkRuleWithAccountParameters
+type VirtualNetworkRule = original.VirtualNetworkRule
+type VirtualNetworkRuleListResult = original.VirtualNetworkRuleListResult
+type VirtualNetworkRuleListResultIterator = original.VirtualNetworkRuleListResultIterator
+type VirtualNetworkRuleListResultPage = original.VirtualNetworkRuleListResultPage
+type VirtualNetworkRuleProperties = original.VirtualNetworkRuleProperties
type OperationsClient = original.OperationsClient
type TrustedIDProvidersClient = original.TrustedIDProvidersClient
+type VirtualNetworkRulesClient = original.VirtualNetworkRulesClient
func NewAccountsClient(subscriptionID string) AccountsClient {
return original.NewAccountsClient(subscriptionID)
@@ -252,3 +264,9 @@ func UserAgent() string {
func Version() string {
return original.Version()
}
+func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClient {
+ return original.NewVirtualNetworkRulesClient(subscriptionID)
+}
+func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient {
+ return original.NewVirtualNetworkRulesClientWithBaseURI(baseURI, subscriptionID)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/eventgrid/eventgrid/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/eventgrid/eventgrid/models.go
index 411f0f0d5..f23bfd20b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/eventgrid/eventgrid/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/eventgrid/eventgrid/models.go
@@ -22,6 +22,18 @@ package eventgrid
import original "github.com/Azure/azure-sdk-for-go/services/eventgrid/2018-01-01/eventgrid"
type BaseClient = original.BaseClient
+type JobState = original.JobState
+
+const (
+ Canceled JobState = original.Canceled
+ Canceling JobState = original.Canceling
+ Error JobState = original.Error
+ Finished JobState = original.Finished
+ Processing JobState = original.Processing
+ Queued JobState = original.Queued
+ Scheduled JobState = original.Scheduled
+)
+
type ContainerRegistryEventActor = original.ContainerRegistryEventActor
type ContainerRegistryEventData = original.ContainerRegistryEventData
type ContainerRegistryEventRequest = original.ContainerRegistryEventRequest
@@ -39,14 +51,20 @@ type Event = original.Event
type EventHubCaptureFileCreatedEventData = original.EventHubCaptureFileCreatedEventData
type IotHubDeviceCreatedEventData = original.IotHubDeviceCreatedEventData
type IotHubDeviceDeletedEventData = original.IotHubDeviceDeletedEventData
+type MediaJobStateChangeEventData = original.MediaJobStateChangeEventData
type ResourceDeleteCancelData = original.ResourceDeleteCancelData
type ResourceDeleteFailureData = original.ResourceDeleteFailureData
type ResourceDeleteSuccessData = original.ResourceDeleteSuccessData
type ResourceWriteCancelData = original.ResourceWriteCancelData
type ResourceWriteFailureData = original.ResourceWriteFailureData
type ResourceWriteSuccessData = original.ResourceWriteSuccessData
+type ServiceBusActiveMessagesAvailableWithNoListenersEventData = original.ServiceBusActiveMessagesAvailableWithNoListenersEventData
+type ServiceBusDeadletterMessagesAvailableWithNoListenersEventData = original.ServiceBusDeadletterMessagesAvailableWithNoListenersEventData
type StorageBlobCreatedEventData = original.StorageBlobCreatedEventData
type StorageBlobDeletedEventData = original.StorageBlobDeletedEventData
+type SubscriptionDeletedEventData = original.SubscriptionDeletedEventData
+type SubscriptionValidationEventData = original.SubscriptionValidationEventData
+type SubscriptionValidationResponse = original.SubscriptionValidationResponse
func New() BaseClient {
return original.New()
@@ -54,6 +72,9 @@ func New() BaseClient {
func NewWithoutDefaults() BaseClient {
return original.NewWithoutDefaults()
}
+func PossibleJobStateValues() []JobState {
+ return original.PossibleJobStateValues()
+}
func UserAgent() string {
return original.UserAgent() + " profiles/latest"
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/logic/mgmt/logic/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/logic/mgmt/logic/models.go
index 6006b8c1c..282b1ecca 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/logic/mgmt/logic/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/logic/mgmt/logic/models.go
@@ -29,15 +29,25 @@ const (
)
type BaseClient = original.BaseClient
+type IntegrationAccountAssembliesClient = original.IntegrationAccountAssembliesClient
+type IntegrationAccountBatchConfigurationsClient = original.IntegrationAccountBatchConfigurationsClient
type IntegrationAccountsClient = original.IntegrationAccountsClient
type MapsClient = original.MapsClient
+type AccessKeyType = original.AccessKeyType
+
+const (
+ NotSpecified AccessKeyType = original.NotSpecified
+ Primary AccessKeyType = original.Primary
+ Secondary AccessKeyType = original.Secondary
+)
+
type AgreementType = original.AgreementType
const (
- AS2 AgreementType = original.AS2
- Edifact AgreementType = original.Edifact
- NotSpecified AgreementType = original.NotSpecified
- X12 AgreementType = original.X12
+ AgreementTypeAS2 AgreementType = original.AgreementTypeAS2
+ AgreementTypeEdifact AgreementType = original.AgreementTypeEdifact
+ AgreementTypeNotSpecified AgreementType = original.AgreementTypeNotSpecified
+ AgreementTypeX12 AgreementType = original.AgreementTypeX12
)
type DayOfWeek = original.DayOfWeek
@@ -104,6 +114,17 @@ const (
EncryptionAlgorithmRC2 EncryptionAlgorithm = original.EncryptionAlgorithmRC2
)
+type EventLevel = original.EventLevel
+
+const (
+ Critical EventLevel = original.Critical
+ Error EventLevel = original.Error
+ Informational EventLevel = original.Informational
+ LogAlways EventLevel = original.LogAlways
+ Verbose EventLevel = original.Verbose
+ Warning EventLevel = original.Warning
+)
+
type HashingAlgorithm = original.HashingAlgorithm
const (
@@ -220,6 +241,34 @@ const (
SkuNameStandard SkuName = original.SkuNameStandard
)
+type TrackEventsOperationOptions = original.TrackEventsOperationOptions
+
+const (
+ DisableSourceInfoEnrich TrackEventsOperationOptions = original.DisableSourceInfoEnrich
+ None TrackEventsOperationOptions = original.None
+)
+
+type TrackingRecordType = original.TrackingRecordType
+
+const (
+ TrackingRecordTypeAS2MDN TrackingRecordType = original.TrackingRecordTypeAS2MDN
+ TrackingRecordTypeAS2Message TrackingRecordType = original.TrackingRecordTypeAS2Message
+ TrackingRecordTypeCustom TrackingRecordType = original.TrackingRecordTypeCustom
+ TrackingRecordTypeEdifactFunctionalGroup TrackingRecordType = original.TrackingRecordTypeEdifactFunctionalGroup
+ TrackingRecordTypeEdifactFunctionalGroupAcknowledgment TrackingRecordType = original.TrackingRecordTypeEdifactFunctionalGroupAcknowledgment
+ TrackingRecordTypeEdifactInterchange TrackingRecordType = original.TrackingRecordTypeEdifactInterchange
+ TrackingRecordTypeEdifactInterchangeAcknowledgment TrackingRecordType = original.TrackingRecordTypeEdifactInterchangeAcknowledgment
+ TrackingRecordTypeEdifactTransactionSet TrackingRecordType = original.TrackingRecordTypeEdifactTransactionSet
+ TrackingRecordTypeEdifactTransactionSetAcknowledgment TrackingRecordType = original.TrackingRecordTypeEdifactTransactionSetAcknowledgment
+ TrackingRecordTypeNotSpecified TrackingRecordType = original.TrackingRecordTypeNotSpecified
+ TrackingRecordTypeX12FunctionalGroup TrackingRecordType = original.TrackingRecordTypeX12FunctionalGroup
+ TrackingRecordTypeX12FunctionalGroupAcknowledgment TrackingRecordType = original.TrackingRecordTypeX12FunctionalGroupAcknowledgment
+ TrackingRecordTypeX12Interchange TrackingRecordType = original.TrackingRecordTypeX12Interchange
+ TrackingRecordTypeX12InterchangeAcknowledgment TrackingRecordType = original.TrackingRecordTypeX12InterchangeAcknowledgment
+ TrackingRecordTypeX12TransactionSet TrackingRecordType = original.TrackingRecordTypeX12TransactionSet
+ TrackingRecordTypeX12TransactionSetAcknowledgment TrackingRecordType = original.TrackingRecordTypeX12TransactionSetAcknowledgment
+)
+
type TrailingSeparatorPolicy = original.TrailingSeparatorPolicy
const (
@@ -340,7 +389,10 @@ const (
X12TimeFormatNotSpecified X12TimeFormat = original.X12TimeFormatNotSpecified
)
+type AccessKeyRegenerateActionDefinition = original.AccessKeyRegenerateActionDefinition
type AgreementContent = original.AgreementContent
+type ArtifactContentPropertiesDefinition = original.ArtifactContentPropertiesDefinition
+type ArtifactProperties = original.ArtifactProperties
type AS2AcknowledgementConnectionSettings = original.AS2AcknowledgementConnectionSettings
type AS2AgreementContent = original.AS2AgreementContent
type AS2EnvelopeSettings = original.AS2EnvelopeSettings
@@ -351,7 +403,15 @@ type AS2OneWayAgreement = original.AS2OneWayAgreement
type AS2ProtocolSettings = original.AS2ProtocolSettings
type AS2SecuritySettings = original.AS2SecuritySettings
type AS2ValidationSettings = original.AS2ValidationSettings
+type AssemblyCollection = original.AssemblyCollection
+type AssemblyDefinition = original.AssemblyDefinition
+type AssemblyProperties = original.AssemblyProperties
+type AzureResourceErrorInfo = original.AzureResourceErrorInfo
type B2BPartnerContent = original.B2BPartnerContent
+type BatchConfiguration = original.BatchConfiguration
+type BatchConfigurationCollection = original.BatchConfigurationCollection
+type BatchConfigurationProperties = original.BatchConfigurationProperties
+type BatchReleaseCriteria = original.BatchReleaseCriteria
type BusinessIdentity = original.BusinessIdentity
type CallbackURL = original.CallbackURL
type ContentHash = original.ContentHash
@@ -371,8 +431,12 @@ type EdifactProtocolSettings = original.EdifactProtocolSettings
type EdifactSchemaReference = original.EdifactSchemaReference
type EdifactValidationOverride = original.EdifactValidationOverride
type EdifactValidationSettings = original.EdifactValidationSettings
+type ErrorInfo = original.ErrorInfo
type ErrorProperties = original.ErrorProperties
type ErrorResponse = original.ErrorResponse
+type Expression = original.Expression
+type ExpressionRoot = original.ExpressionRoot
+type ExpressionTraces = original.ExpressionTraces
type GenerateUpgradedDefinitionParameters = original.GenerateUpgradedDefinitionParameters
type GetCallbackURLParameters = original.GetCallbackURLParameters
type IntegrationAccount = original.IntegrationAccount
@@ -416,23 +480,38 @@ type IntegrationAccountSessionListResultIterator = original.IntegrationAccountSe
type IntegrationAccountSessionListResultPage = original.IntegrationAccountSessionListResultPage
type IntegrationAccountSessionProperties = original.IntegrationAccountSessionProperties
type IntegrationAccountSku = original.IntegrationAccountSku
+type JSONSchema = original.JSONSchema
+type KeyVaultKey = original.KeyVaultKey
+type KeyVaultKeyAttributes = original.KeyVaultKeyAttributes
+type KeyVaultKeyCollection = original.KeyVaultKeyCollection
type KeyVaultKeyReference = original.KeyVaultKeyReference
type KeyVaultKeyReferenceKeyVault = original.KeyVaultKeyReferenceKeyVault
+type KeyVaultReference = original.KeyVaultReference
+type ListKeyVaultKeysDefinition = original.ListKeyVaultKeysDefinition
type Operation = original.Operation
type OperationDisplay = original.OperationDisplay
type OperationListResult = original.OperationListResult
type OperationListResultIterator = original.OperationListResultIterator
type OperationListResultPage = original.OperationListResultPage
+type OperationResult = original.OperationResult
+type OperationResultProperties = original.OperationResultProperties
type PartnerContent = original.PartnerContent
type RecurrenceSchedule = original.RecurrenceSchedule
type RecurrenceScheduleOccurrence = original.RecurrenceScheduleOccurrence
type RegenerateActionParameter = original.RegenerateActionParameter
+type RepetitionIndex = original.RepetitionIndex
type Resource = original.Resource
type ResourceReference = original.ResourceReference
type RetryHistory = original.RetryHistory
+type RunActionCorrelation = original.RunActionCorrelation
+type RunCorrelation = original.RunCorrelation
type SetObject = original.SetObject
+type SetTriggerStateActionDefinition = original.SetTriggerStateActionDefinition
type Sku = original.Sku
type SubResource = original.SubResource
+type TrackingEvent = original.TrackingEvent
+type TrackingEventErrorInfo = original.TrackingEventErrorInfo
+type TrackingEventsDefinition = original.TrackingEventsDefinition
type Workflow = original.Workflow
type WorkflowFilter = original.WorkflowFilter
type WorkflowListResult = original.WorkflowListResult
@@ -448,6 +527,9 @@ type WorkflowRunActionListResult = original.WorkflowRunActionListResult
type WorkflowRunActionListResultIterator = original.WorkflowRunActionListResultIterator
type WorkflowRunActionListResultPage = original.WorkflowRunActionListResultPage
type WorkflowRunActionProperties = original.WorkflowRunActionProperties
+type WorkflowRunActionRepetitionDefinition = original.WorkflowRunActionRepetitionDefinition
+type WorkflowRunActionRepetitionDefinitionCollection = original.WorkflowRunActionRepetitionDefinitionCollection
+type WorkflowRunActionRepetitionProperties = original.WorkflowRunActionRepetitionProperties
type WorkflowRunFilter = original.WorkflowRunFilter
type WorkflowRunListResult = original.WorkflowRunListResult
type WorkflowRunListResultIterator = original.WorkflowRunListResultIterator
@@ -492,7 +574,10 @@ type X12ValidationSettings = original.X12ValidationSettings
type PartnersClient = original.PartnersClient
type SchemasClient = original.SchemasClient
type SessionsClient = original.SessionsClient
+type WorkflowRunActionRepetitionsClient = original.WorkflowRunActionRepetitionsClient
type WorkflowRunActionsClient = original.WorkflowRunActionsClient
+type WorkflowRunActionScopedRepetitionsClient = original.WorkflowRunActionScopedRepetitionsClient
+type WorkflowRunOperationsClient = original.WorkflowRunOperationsClient
type WorkflowRunsClient = original.WorkflowRunsClient
type WorkflowsClient = original.WorkflowsClient
type WorkflowTriggerHistoriesClient = original.WorkflowTriggerHistoriesClient
@@ -517,6 +602,18 @@ func New(subscriptionID string) BaseClient {
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return original.NewWithBaseURI(baseURI, subscriptionID)
}
+func NewIntegrationAccountAssembliesClient(subscriptionID string) IntegrationAccountAssembliesClient {
+ return original.NewIntegrationAccountAssembliesClient(subscriptionID)
+}
+func NewIntegrationAccountAssembliesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountAssembliesClient {
+ return original.NewIntegrationAccountAssembliesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewIntegrationAccountBatchConfigurationsClient(subscriptionID string) IntegrationAccountBatchConfigurationsClient {
+ return original.NewIntegrationAccountBatchConfigurationsClient(subscriptionID)
+}
+func NewIntegrationAccountBatchConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountBatchConfigurationsClient {
+ return original.NewIntegrationAccountBatchConfigurationsClientWithBaseURI(baseURI, subscriptionID)
+}
func NewIntegrationAccountsClient(subscriptionID string) IntegrationAccountsClient {
return original.NewIntegrationAccountsClient(subscriptionID)
}
@@ -529,6 +626,9 @@ func NewMapsClient(subscriptionID string) MapsClient {
func NewMapsClientWithBaseURI(baseURI string, subscriptionID string) MapsClient {
return original.NewMapsClientWithBaseURI(baseURI, subscriptionID)
}
+func PossibleAccessKeyTypeValues() []AccessKeyType {
+ return original.PossibleAccessKeyTypeValues()
+}
func PossibleAgreementTypeValues() []AgreementType {
return original.PossibleAgreementTypeValues()
}
@@ -547,6 +647,9 @@ func PossibleEdifactDecimalIndicatorValues() []EdifactDecimalIndicator {
func PossibleEncryptionAlgorithmValues() []EncryptionAlgorithm {
return original.PossibleEncryptionAlgorithmValues()
}
+func PossibleEventLevelValues() []EventLevel {
+ return original.PossibleEventLevelValues()
+}
func PossibleHashingAlgorithmValues() []HashingAlgorithm {
return original.PossibleHashingAlgorithmValues()
}
@@ -583,6 +686,12 @@ func PossibleSigningAlgorithmValues() []SigningAlgorithm {
func PossibleSkuNameValues() []SkuName {
return original.PossibleSkuNameValues()
}
+func PossibleTrackEventsOperationOptionsValues() []TrackEventsOperationOptions {
+ return original.PossibleTrackEventsOperationOptionsValues()
+}
+func PossibleTrackingRecordTypeValues() []TrackingRecordType {
+ return original.PossibleTrackingRecordTypeValues()
+}
func PossibleTrailingSeparatorPolicyValues() []TrailingSeparatorPolicy {
return original.PossibleTrailingSeparatorPolicyValues()
}
@@ -634,12 +743,30 @@ func UserAgent() string {
func Version() string {
return original.Version()
}
+func NewWorkflowRunActionRepetitionsClient(subscriptionID string) WorkflowRunActionRepetitionsClient {
+ return original.NewWorkflowRunActionRepetitionsClient(subscriptionID)
+}
+func NewWorkflowRunActionRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsClient {
+ return original.NewWorkflowRunActionRepetitionsClientWithBaseURI(baseURI, subscriptionID)
+}
func NewWorkflowRunActionsClient(subscriptionID string) WorkflowRunActionsClient {
return original.NewWorkflowRunActionsClient(subscriptionID)
}
func NewWorkflowRunActionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionsClient {
return original.NewWorkflowRunActionsClientWithBaseURI(baseURI, subscriptionID)
}
+func NewWorkflowRunActionScopedRepetitionsClient(subscriptionID string) WorkflowRunActionScopedRepetitionsClient {
+ return original.NewWorkflowRunActionScopedRepetitionsClient(subscriptionID)
+}
+func NewWorkflowRunActionScopedRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionScopedRepetitionsClient {
+ return original.NewWorkflowRunActionScopedRepetitionsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewWorkflowRunOperationsClient(subscriptionID string) WorkflowRunOperationsClient {
+ return original.NewWorkflowRunOperationsClient(subscriptionID)
+}
+func NewWorkflowRunOperationsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunOperationsClient {
+ return original.NewWorkflowRunOperationsClientWithBaseURI(baseURI, subscriptionID)
+}
func NewWorkflowRunsClient(subscriptionID string) WorkflowRunsClient {
return original.NewWorkflowRunsClient(subscriptionID)
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/mysql/mgmt/mysql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/mysql/mgmt/mysql/models.go
index cf6f6f0ed..88eb94954 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/mysql/mgmt/mysql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/mysql/mgmt/mysql/models.go
@@ -87,6 +87,16 @@ const (
SslEnforcementEnumEnabled SslEnforcementEnum = original.SslEnforcementEnumEnabled
)
+type VirtualNetworkRuleState = original.VirtualNetworkRuleState
+
+const (
+ Deleting VirtualNetworkRuleState = original.Deleting
+ Initializing VirtualNetworkRuleState = original.Initializing
+ InProgress VirtualNetworkRuleState = original.InProgress
+ Ready VirtualNetworkRuleState = original.Ready
+ Unknown VirtualNetworkRuleState = original.Unknown
+)
+
type Configuration = original.Configuration
type ConfigurationListResult = original.ConfigurationListResult
type ConfigurationProperties = original.ConfigurationProperties
@@ -130,8 +140,16 @@ type ServerUpdateParametersProperties = original.ServerUpdateParametersPropertie
type Sku = original.Sku
type StorageProfile = original.StorageProfile
type TrackedResource = original.TrackedResource
+type VirtualNetworkRule = original.VirtualNetworkRule
+type VirtualNetworkRuleListResult = original.VirtualNetworkRuleListResult
+type VirtualNetworkRuleListResultIterator = original.VirtualNetworkRuleListResultIterator
+type VirtualNetworkRuleListResultPage = original.VirtualNetworkRuleListResultPage
+type VirtualNetworkRuleProperties = original.VirtualNetworkRuleProperties
+type VirtualNetworkRulesCreateOrUpdateFuture = original.VirtualNetworkRulesCreateOrUpdateFuture
+type VirtualNetworkRulesDeleteFuture = original.VirtualNetworkRulesDeleteFuture
type OperationsClient = original.OperationsClient
type ServersClient = original.ServersClient
+type VirtualNetworkRulesClient = original.VirtualNetworkRulesClient
func NewCheckNameAvailabilityClient(subscriptionID string) CheckNameAvailabilityClient {
return original.NewCheckNameAvailabilityClient(subscriptionID)
@@ -196,6 +214,9 @@ func PossibleSkuTierValues() []SkuTier {
func PossibleSslEnforcementEnumValues() []SslEnforcementEnum {
return original.PossibleSslEnforcementEnumValues()
}
+func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState {
+ return original.PossibleVirtualNetworkRuleStateValues()
+}
func NewOperationsClient(subscriptionID string) OperationsClient {
return original.NewOperationsClient(subscriptionID)
}
@@ -214,3 +235,9 @@ func UserAgent() string {
func Version() string {
return original.Version()
}
+func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClient {
+ return original.NewVirtualNetworkRulesClient(subscriptionID)
+}
+func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient {
+ return original.NewVirtualNetworkRulesClientWithBaseURI(baseURI, subscriptionID)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/notificationhubs/mgmt/notificationhubs/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/notificationhubs/mgmt/notificationhubs/models.go
index 8e85785d7..887270844 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/notificationhubs/mgmt/notificationhubs/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/notificationhubs/mgmt/notificationhubs/models.go
@@ -26,7 +26,6 @@ const (
)
type BaseClient = original.BaseClient
-type HubsClient = original.HubsClient
type AccessRights = original.AccessRights
const (
@@ -58,9 +57,8 @@ type BaiduCredential = original.BaiduCredential
type BaiduCredentialProperties = original.BaiduCredentialProperties
type CheckAvailabilityParameters = original.CheckAvailabilityParameters
type CheckAvailabilityResult = original.CheckAvailabilityResult
-type CheckNameAvailabilityRequestParameters = original.CheckNameAvailabilityRequestParameters
-type CheckNameAvailabilityResponse = original.CheckNameAvailabilityResponse
type CreateOrUpdateParameters = original.CreateOrUpdateParameters
+type ErrorResponse = original.ErrorResponse
type GcmCredential = original.GcmCredential
type GcmCredentialProperties = original.GcmCredentialProperties
type ListResult = original.ListResult
@@ -76,6 +74,11 @@ type NamespacePatchParameters = original.NamespacePatchParameters
type NamespaceProperties = original.NamespaceProperties
type NamespaceResource = original.NamespaceResource
type NamespacesDeleteFuture = original.NamespacesDeleteFuture
+type Operation = original.Operation
+type OperationDisplay = original.OperationDisplay
+type OperationListResult = original.OperationListResult
+type OperationListResultIterator = original.OperationListResultIterator
+type OperationListResultPage = original.OperationListResultPage
type PnsCredentialsProperties = original.PnsCredentialsProperties
type PnsCredentialsResource = original.PnsCredentialsResource
type PolicykeyResource = original.PolicykeyResource
@@ -93,9 +96,9 @@ type Sku = original.Sku
type SubResource = original.SubResource
type WnsCredential = original.WnsCredential
type WnsCredentialProperties = original.WnsCredentialProperties
-type NameClient = original.NameClient
type NamespacesClient = original.NamespacesClient
type Client = original.Client
+type OperationsClient = original.OperationsClient
func New(subscriptionID string) BaseClient {
return original.New(subscriptionID)
@@ -103,12 +106,6 @@ func New(subscriptionID string) BaseClient {
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return original.NewWithBaseURI(baseURI, subscriptionID)
}
-func NewHubsClient(subscriptionID string) HubsClient {
- return original.NewHubsClient(subscriptionID)
-}
-func NewHubsClientWithBaseURI(baseURI string, subscriptionID string) HubsClient {
- return original.NewHubsClientWithBaseURI(baseURI, subscriptionID)
-}
func PossibleAccessRightsValues() []AccessRights {
return original.PossibleAccessRightsValues()
}
@@ -118,12 +115,6 @@ func PossibleNamespaceTypeValues() []NamespaceType {
func PossibleSkuNameValues() []SkuName {
return original.PossibleSkuNameValues()
}
-func NewNameClient(subscriptionID string) NameClient {
- return original.NewNameClient(subscriptionID)
-}
-func NewNameClientWithBaseURI(baseURI string, subscriptionID string) NameClient {
- return original.NewNameClientWithBaseURI(baseURI, subscriptionID)
-}
func NewNamespacesClient(subscriptionID string) NamespacesClient {
return original.NewNamespacesClient(subscriptionID)
}
@@ -136,6 +127,12 @@ func NewClient(subscriptionID string) Client {
func NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
return original.NewClientWithBaseURI(baseURI, subscriptionID)
}
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return original.NewOperationsClient(subscriptionID)
+}
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID)
+}
func UserAgent() string {
return original.UserAgent() + " profiles/latest"
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/postgresql/mgmt/postgresql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/postgresql/mgmt/postgresql/models.go
index f8ccdf947..1e36d49bb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/postgresql/mgmt/postgresql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/postgresql/mgmt/postgresql/models.go
@@ -57,6 +57,13 @@ const (
User OperationOrigin = original.User
)
+type ServerSecurityAlertPolicyState = original.ServerSecurityAlertPolicyState
+
+const (
+ ServerSecurityAlertPolicyStateDisabled ServerSecurityAlertPolicyState = original.ServerSecurityAlertPolicyStateDisabled
+ ServerSecurityAlertPolicyStateEnabled ServerSecurityAlertPolicyState = original.ServerSecurityAlertPolicyStateEnabled
+)
+
type ServerState = original.ServerState
const (
@@ -87,6 +94,16 @@ const (
SslEnforcementEnumEnabled SslEnforcementEnum = original.SslEnforcementEnumEnabled
)
+type VirtualNetworkRuleState = original.VirtualNetworkRuleState
+
+const (
+ Deleting VirtualNetworkRuleState = original.Deleting
+ Initializing VirtualNetworkRuleState = original.Initializing
+ InProgress VirtualNetworkRuleState = original.InProgress
+ Ready VirtualNetworkRuleState = original.Ready
+ Unknown VirtualNetworkRuleState = original.Unknown
+)
+
type Configuration = original.Configuration
type ConfigurationListResult = original.ConfigurationListResult
type ConfigurationProperties = original.ConfigurationProperties
@@ -113,6 +130,7 @@ type PerformanceTierListResult = original.PerformanceTierListResult
type PerformanceTierProperties = original.PerformanceTierProperties
type PerformanceTierServiceLevelObjectives = original.PerformanceTierServiceLevelObjectives
type ProxyResource = original.ProxyResource
+type SecurityAlertPolicyProperties = original.SecurityAlertPolicyProperties
type Server = original.Server
type ServerForCreate = original.ServerForCreate
type ServerListResult = original.ServerListResult
@@ -124,14 +142,25 @@ type ServerPropertiesForGeoRestore = original.ServerPropertiesForGeoRestore
type ServerPropertiesForRestore = original.ServerPropertiesForRestore
type ServersCreateFuture = original.ServersCreateFuture
type ServersDeleteFuture = original.ServersDeleteFuture
+type ServerSecurityAlertPoliciesCreateOrUpdateFuture = original.ServerSecurityAlertPoliciesCreateOrUpdateFuture
+type ServerSecurityAlertPolicy = original.ServerSecurityAlertPolicy
type ServersUpdateFuture = original.ServersUpdateFuture
type ServerUpdateParameters = original.ServerUpdateParameters
type ServerUpdateParametersProperties = original.ServerUpdateParametersProperties
type Sku = original.Sku
type StorageProfile = original.StorageProfile
type TrackedResource = original.TrackedResource
+type VirtualNetworkRule = original.VirtualNetworkRule
+type VirtualNetworkRuleListResult = original.VirtualNetworkRuleListResult
+type VirtualNetworkRuleListResultIterator = original.VirtualNetworkRuleListResultIterator
+type VirtualNetworkRuleListResultPage = original.VirtualNetworkRuleListResultPage
+type VirtualNetworkRuleProperties = original.VirtualNetworkRuleProperties
+type VirtualNetworkRulesCreateOrUpdateFuture = original.VirtualNetworkRulesCreateOrUpdateFuture
+type VirtualNetworkRulesDeleteFuture = original.VirtualNetworkRulesDeleteFuture
type OperationsClient = original.OperationsClient
type ServersClient = original.ServersClient
+type ServerSecurityAlertPoliciesClient = original.ServerSecurityAlertPoliciesClient
+type VirtualNetworkRulesClient = original.VirtualNetworkRulesClient
func NewCheckNameAvailabilityClient(subscriptionID string) CheckNameAvailabilityClient {
return original.NewCheckNameAvailabilityClient(subscriptionID)
@@ -184,6 +213,9 @@ func PossibleGeoRedundantBackupValues() []GeoRedundantBackup {
func PossibleOperationOriginValues() []OperationOrigin {
return original.PossibleOperationOriginValues()
}
+func PossibleServerSecurityAlertPolicyStateValues() []ServerSecurityAlertPolicyState {
+ return original.PossibleServerSecurityAlertPolicyStateValues()
+}
func PossibleServerStateValues() []ServerState {
return original.PossibleServerStateValues()
}
@@ -196,6 +228,9 @@ func PossibleSkuTierValues() []SkuTier {
func PossibleSslEnforcementEnumValues() []SslEnforcementEnum {
return original.PossibleSslEnforcementEnumValues()
}
+func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState {
+ return original.PossibleVirtualNetworkRuleStateValues()
+}
func NewOperationsClient(subscriptionID string) OperationsClient {
return original.NewOperationsClient(subscriptionID)
}
@@ -208,9 +243,21 @@ func NewServersClient(subscriptionID string) ServersClient {
func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient {
return original.NewServersClientWithBaseURI(baseURI, subscriptionID)
}
+func NewServerSecurityAlertPoliciesClient(subscriptionID string) ServerSecurityAlertPoliciesClient {
+ return original.NewServerSecurityAlertPoliciesClient(subscriptionID)
+}
+func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerSecurityAlertPoliciesClient {
+ return original.NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI, subscriptionID)
+}
func UserAgent() string {
return original.UserAgent() + " profiles/latest"
}
func Version() string {
return original.Version()
}
+func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClient {
+ return original.NewVirtualNetworkRulesClient(subscriptionID)
+}
+func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient {
+ return original.NewVirtualNetworkRulesClientWithBaseURI(baseURI, subscriptionID)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/recoveryservices/mgmt/siterecovery/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/recoveryservices/mgmt/siterecovery/models.go
index 3fe4baff2..670bb7a76 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/recoveryservices/mgmt/siterecovery/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/recoveryservices/mgmt/siterecovery/models.go
@@ -728,6 +728,7 @@ type ProtectableItemCollection = original.ProtectableItemCollection
type ProtectableItemCollectionIterator = original.ProtectableItemCollectionIterator
type ProtectableItemCollectionPage = original.ProtectableItemCollectionPage
type ProtectableItemProperties = original.ProtectableItemProperties
+type ProtectableItemQueryParameter = original.ProtectableItemQueryParameter
type ProtectedItemsQueryParameter = original.ProtectedItemsQueryParameter
type ProtectionContainer = original.ProtectionContainer
type ProtectionContainerCollection = original.ProtectionContainerCollection
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/adhybridhealthservice/mgmt/adhybridhealthservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/adhybridhealthservice/mgmt/adhybridhealthservice/models.go
new file mode 100644
index 000000000..d9564268b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/adhybridhealthservice/mgmt/adhybridhealthservice/models.go
@@ -0,0 +1,356 @@
+// +build go1.9
+
+// Copyright 2018 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package adhybridhealthservice
+
+import original "github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice"
+
+type AdDomainServiceMembersClient = original.AdDomainServiceMembersClient
+type AddsServiceMembersClient = original.AddsServiceMembersClient
+type AddsServicesClient = original.AddsServicesClient
+type AlertsClient = original.AlertsClient
+
+const (
+ DefaultBaseURI = original.DefaultBaseURI
+)
+
+type BaseClient = original.BaseClient
+type ConfigurationClient = original.ConfigurationClient
+type DimensionsClient = original.DimensionsClient
+type AlgorithmStepType = original.AlgorithmStepType
+
+const (
+ ConnectorFilter AlgorithmStepType = original.ConnectorFilter
+ Deprovisioning AlgorithmStepType = original.Deprovisioning
+ ExportFlow AlgorithmStepType = original.ExportFlow
+ ImportFlow AlgorithmStepType = original.ImportFlow
+ Join AlgorithmStepType = original.Join
+ MvDeletion AlgorithmStepType = original.MvDeletion
+ MvObjectTypeChange AlgorithmStepType = original.MvObjectTypeChange
+ Projection AlgorithmStepType = original.Projection
+ Provisioning AlgorithmStepType = original.Provisioning
+ Recall AlgorithmStepType = original.Recall
+ Staging AlgorithmStepType = original.Staging
+ Undefined AlgorithmStepType = original.Undefined
+ ValidateConnectorFilter AlgorithmStepType = original.ValidateConnectorFilter
+)
+
+type AttributeDeltaOperationType = original.AttributeDeltaOperationType
+
+const (
+ AttributeDeltaOperationTypeAdd AttributeDeltaOperationType = original.AttributeDeltaOperationTypeAdd
+ AttributeDeltaOperationTypeDelete AttributeDeltaOperationType = original.AttributeDeltaOperationTypeDelete
+ AttributeDeltaOperationTypeReplace AttributeDeltaOperationType = original.AttributeDeltaOperationTypeReplace
+ AttributeDeltaOperationTypeUndefined AttributeDeltaOperationType = original.AttributeDeltaOperationTypeUndefined
+ AttributeDeltaOperationTypeUpdate AttributeDeltaOperationType = original.AttributeDeltaOperationTypeUpdate
+)
+
+type AttributeMappingType = original.AttributeMappingType
+
+const (
+ Constant AttributeMappingType = original.Constant
+ Direct AttributeMappingType = original.Direct
+ DnPart AttributeMappingType = original.DnPart
+ Script AttributeMappingType = original.Script
+)
+
+type DeltaOperationType = original.DeltaOperationType
+
+const (
+ DeltaOperationTypeAdd DeltaOperationType = original.DeltaOperationTypeAdd
+ DeltaOperationTypeDeletAdd DeltaOperationType = original.DeltaOperationTypeDeletAdd
+ DeltaOperationTypeDelete DeltaOperationType = original.DeltaOperationTypeDelete
+ DeltaOperationTypeNone DeltaOperationType = original.DeltaOperationTypeNone
+ DeltaOperationTypeObsolete DeltaOperationType = original.DeltaOperationTypeObsolete
+ DeltaOperationTypeReplace DeltaOperationType = original.DeltaOperationTypeReplace
+ DeltaOperationTypeUndefined DeltaOperationType = original.DeltaOperationTypeUndefined
+ DeltaOperationTypeUpdate DeltaOperationType = original.DeltaOperationTypeUpdate
+)
+
+type HealthStatus = original.HealthStatus
+
+const (
+ Error HealthStatus = original.Error
+ Healthy HealthStatus = original.Healthy
+ Missing HealthStatus = original.Missing
+ NotMonitored HealthStatus = original.NotMonitored
+ Warning HealthStatus = original.Warning
+)
+
+type Level = original.Level
+
+const (
+ LevelError Level = original.LevelError
+ LevelPreWarning Level = original.LevelPreWarning
+ LevelWarning Level = original.LevelWarning
+)
+
+type MonitoringLevel = original.MonitoringLevel
+
+const (
+ Full MonitoringLevel = original.Full
+ Off MonitoringLevel = original.Off
+ Partial MonitoringLevel = original.Partial
+)
+
+type PasswordOperationTypes = original.PasswordOperationTypes
+
+const (
+ PasswordOperationTypesChange PasswordOperationTypes = original.PasswordOperationTypesChange
+ PasswordOperationTypesSet PasswordOperationTypes = original.PasswordOperationTypesSet
+ PasswordOperationTypesUndefined PasswordOperationTypes = original.PasswordOperationTypesUndefined
+)
+
+type State = original.State
+
+const (
+ Active State = original.Active
+ ResolvedByPositiveResult State = original.ResolvedByPositiveResult
+ ResolvedByStateChange State = original.ResolvedByStateChange
+ ResolvedByTimer State = original.ResolvedByTimer
+ ResolvedManually State = original.ResolvedManually
+)
+
+type ValueDeltaOperationType = original.ValueDeltaOperationType
+
+const (
+ ValueDeltaOperationTypeAdd ValueDeltaOperationType = original.ValueDeltaOperationTypeAdd
+ ValueDeltaOperationTypeDelete ValueDeltaOperationType = original.ValueDeltaOperationTypeDelete
+ ValueDeltaOperationTypeUndefined ValueDeltaOperationType = original.ValueDeltaOperationTypeUndefined
+ ValueDeltaOperationTypeUpdate ValueDeltaOperationType = original.ValueDeltaOperationTypeUpdate
+)
+
+type ValueType = original.ValueType
+
+const (
+ ValueTypeBinary ValueType = original.ValueTypeBinary
+ ValueTypeBoolean ValueType = original.ValueTypeBoolean
+ ValueTypeDn ValueType = original.ValueTypeDn
+ ValueTypeInteger ValueType = original.ValueTypeInteger
+ ValueTypeString ValueType = original.ValueTypeString
+ ValueTypeUndefined ValueType = original.ValueTypeUndefined
+)
+
+type AdditionalInformation = original.AdditionalInformation
+type AddsConfiguration = original.AddsConfiguration
+type AddsConfigurationIterator = original.AddsConfigurationIterator
+type AddsConfigurationPage = original.AddsConfigurationPage
+type AddsServiceMember = original.AddsServiceMember
+type AddsServiceMembers = original.AddsServiceMembers
+type AddsServiceMembersIterator = original.AddsServiceMembersIterator
+type AddsServiceMembersPage = original.AddsServiceMembersPage
+type Agent = original.Agent
+type Alert = original.Alert
+type AlertFeedback = original.AlertFeedback
+type AlertFeedbacks = original.AlertFeedbacks
+type Alerts = original.Alerts
+type AlertsIterator = original.AlertsIterator
+type AlertsPage = original.AlertsPage
+type AssociatedObject = original.AssociatedObject
+type AttributeDelta = original.AttributeDelta
+type AttributeMapping = original.AttributeMapping
+type AttributeMppingSource = original.AttributeMppingSource
+type ChangeNotReimported = original.ChangeNotReimported
+type ChangeNotReimportedDelta = original.ChangeNotReimportedDelta
+type ChangeNotReimportedEntry = original.ChangeNotReimportedEntry
+type Connector = original.Connector
+type ConnectorConnectionError = original.ConnectorConnectionError
+type ConnectorConnectionErrors = original.ConnectorConnectionErrors
+type ConnectorObjectError = original.ConnectorObjectError
+type ConnectorObjectErrors = original.ConnectorObjectErrors
+type Connectors = original.Connectors
+type Credential = original.Credential
+type Credentials = original.Credentials
+type DataFreshnessDetails = original.DataFreshnessDetails
+type Dimension = original.Dimension
+type Dimensions = original.Dimensions
+type DimensionsIterator = original.DimensionsIterator
+type DimensionsPage = original.DimensionsPage
+type Display = original.Display
+type ErrorCount = original.ErrorCount
+type ErrorCounts = original.ErrorCounts
+type ErrorDetail = original.ErrorDetail
+type ErrorReportUsersEntries = original.ErrorReportUsersEntries
+type ErrorReportUsersEntry = original.ErrorReportUsersEntry
+type ExportError = original.ExportError
+type ExportErrors = original.ExportErrors
+type ExportStatus = original.ExportStatus
+type ExportStatuses = original.ExportStatuses
+type ExportStatusesIterator = original.ExportStatusesIterator
+type ExportStatusesPage = original.ExportStatusesPage
+type ExtensionErrorInfo = original.ExtensionErrorInfo
+type ForestSummary = original.ForestSummary
+type GlobalConfiguration = original.GlobalConfiguration
+type GlobalConfigurations = original.GlobalConfigurations
+type HelpLink = original.HelpLink
+type Hotfix = original.Hotfix
+type Hotfixes = original.Hotfixes
+type ImportError = original.ImportError
+type ImportErrors = original.ImportErrors
+type InboundReplicationNeighbor = original.InboundReplicationNeighbor
+type InboundReplicationNeighbors = original.InboundReplicationNeighbors
+type Item = original.Item
+type Items = original.Items
+type MergedExportError = original.MergedExportError
+type MergedExportErrors = original.MergedExportErrors
+type MetricGroup = original.MetricGroup
+type MetricMetadata = original.MetricMetadata
+type MetricMetadataList = original.MetricMetadataList
+type MetricMetadataListIterator = original.MetricMetadataListIterator
+type MetricMetadataListPage = original.MetricMetadataListPage
+type Metrics = original.Metrics
+type MetricSet = original.MetricSet
+type MetricSets = original.MetricSets
+type MetricsIterator = original.MetricsIterator
+type MetricsPage = original.MetricsPage
+type ModuleConfiguration = original.ModuleConfiguration
+type ModuleConfigurations = original.ModuleConfigurations
+type ObjectWithSyncError = original.ObjectWithSyncError
+type Operation = original.Operation
+type OperationListResponse = original.OperationListResponse
+type OperationListResponseIterator = original.OperationListResponseIterator
+type OperationListResponsePage = original.OperationListResponsePage
+type Partition = original.Partition
+type PartitionScope = original.PartitionScope
+type PasswordHashSyncConfiguration = original.PasswordHashSyncConfiguration
+type PasswordManagementSettings = original.PasswordManagementSettings
+type ReplicationStatus = original.ReplicationStatus
+type ReplicationSummary = original.ReplicationSummary
+type ReplicationSummaryList = original.ReplicationSummaryList
+type Result = original.Result
+type RuleErrorInfo = original.RuleErrorInfo
+type RunProfile = original.RunProfile
+type RunProfiles = original.RunProfiles
+type RunStep = original.RunStep
+type ServiceConfiguration = original.ServiceConfiguration
+type ServiceMember = original.ServiceMember
+type ServiceMembers = original.ServiceMembers
+type ServiceMembersIterator = original.ServiceMembersIterator
+type ServiceMembersPage = original.ServiceMembersPage
+type ServiceProperties = original.ServiceProperties
+type Services = original.Services
+type ServicesIterator = original.ServicesIterator
+type ServicesPage = original.ServicesPage
+type TabularExportError = original.TabularExportError
+type Tenant = original.Tenant
+type TenantOnboardingDetails = original.TenantOnboardingDetails
+type ValueDelta = original.ValueDelta
+type OperationsClient = original.OperationsClient
+type ServiceMembersClient = original.ServiceMembersClient
+type ServicesClient = original.ServicesClient
+
+func NewAdDomainServiceMembersClient() AdDomainServiceMembersClient {
+ return original.NewAdDomainServiceMembersClient()
+}
+func NewAdDomainServiceMembersClientWithBaseURI(baseURI string) AdDomainServiceMembersClient {
+ return original.NewAdDomainServiceMembersClientWithBaseURI(baseURI)
+}
+func NewAddsServiceMembersClient() AddsServiceMembersClient {
+ return original.NewAddsServiceMembersClient()
+}
+func NewAddsServiceMembersClientWithBaseURI(baseURI string) AddsServiceMembersClient {
+ return original.NewAddsServiceMembersClientWithBaseURI(baseURI)
+}
+func NewAddsServicesClient() AddsServicesClient {
+ return original.NewAddsServicesClient()
+}
+func NewAddsServicesClientWithBaseURI(baseURI string) AddsServicesClient {
+ return original.NewAddsServicesClientWithBaseURI(baseURI)
+}
+func NewAlertsClient() AlertsClient {
+ return original.NewAlertsClient()
+}
+func NewAlertsClientWithBaseURI(baseURI string) AlertsClient {
+ return original.NewAlertsClientWithBaseURI(baseURI)
+}
+func New() BaseClient {
+ return original.New()
+}
+func NewWithBaseURI(baseURI string) BaseClient {
+ return original.NewWithBaseURI(baseURI)
+}
+func NewConfigurationClient() ConfigurationClient {
+ return original.NewConfigurationClient()
+}
+func NewConfigurationClientWithBaseURI(baseURI string) ConfigurationClient {
+ return original.NewConfigurationClientWithBaseURI(baseURI)
+}
+func NewDimensionsClient() DimensionsClient {
+ return original.NewDimensionsClient()
+}
+func NewDimensionsClientWithBaseURI(baseURI string) DimensionsClient {
+ return original.NewDimensionsClientWithBaseURI(baseURI)
+}
+func PossibleAlgorithmStepTypeValues() []AlgorithmStepType {
+ return original.PossibleAlgorithmStepTypeValues()
+}
+func PossibleAttributeDeltaOperationTypeValues() []AttributeDeltaOperationType {
+ return original.PossibleAttributeDeltaOperationTypeValues()
+}
+func PossibleAttributeMappingTypeValues() []AttributeMappingType {
+ return original.PossibleAttributeMappingTypeValues()
+}
+func PossibleDeltaOperationTypeValues() []DeltaOperationType {
+ return original.PossibleDeltaOperationTypeValues()
+}
+func PossibleHealthStatusValues() []HealthStatus {
+ return original.PossibleHealthStatusValues()
+}
+func PossibleLevelValues() []Level {
+ return original.PossibleLevelValues()
+}
+func PossibleMonitoringLevelValues() []MonitoringLevel {
+ return original.PossibleMonitoringLevelValues()
+}
+func PossiblePasswordOperationTypesValues() []PasswordOperationTypes {
+ return original.PossiblePasswordOperationTypesValues()
+}
+func PossibleStateValues() []State {
+ return original.PossibleStateValues()
+}
+func PossibleValueDeltaOperationTypeValues() []ValueDeltaOperationType {
+ return original.PossibleValueDeltaOperationTypeValues()
+}
+func PossibleValueTypeValues() []ValueType {
+ return original.PossibleValueTypeValues()
+}
+func NewOperationsClient() OperationsClient {
+ return original.NewOperationsClient()
+}
+func NewOperationsClientWithBaseURI(baseURI string) OperationsClient {
+ return original.NewOperationsClientWithBaseURI(baseURI)
+}
+func NewServiceMembersClient() ServiceMembersClient {
+ return original.NewServiceMembersClient()
+}
+func NewServiceMembersClientWithBaseURI(baseURI string) ServiceMembersClient {
+ return original.NewServiceMembersClientWithBaseURI(baseURI)
+}
+func NewServicesClient() ServicesClient {
+ return original.NewServicesClient()
+}
+func NewServicesClientWithBaseURI(baseURI string) ServicesClient {
+ return original.NewServicesClientWithBaseURI(baseURI)
+}
+func UserAgent() string {
+ return original.UserAgent() + " profiles/preview"
+}
+func Version() string {
+ return original.Version()
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/computervision/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/computervision/models.go
index 05c118243..bbb11cb1d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/computervision/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/computervision/models.go
@@ -78,43 +78,36 @@ const (
Male Gender = original.Male
)
-type Language1 = original.Language1
-
-const (
- En Language1 = original.En
- Zh Language1 = original.Zh
-)
-
type OcrLanguages = original.OcrLanguages
const (
- OcrLanguagesAr OcrLanguages = original.OcrLanguagesAr
- OcrLanguagesCs OcrLanguages = original.OcrLanguagesCs
- OcrLanguagesDa OcrLanguages = original.OcrLanguagesDa
- OcrLanguagesDe OcrLanguages = original.OcrLanguagesDe
- OcrLanguagesEl OcrLanguages = original.OcrLanguagesEl
- OcrLanguagesEn OcrLanguages = original.OcrLanguagesEn
- OcrLanguagesEs OcrLanguages = original.OcrLanguagesEs
- OcrLanguagesFi OcrLanguages = original.OcrLanguagesFi
- OcrLanguagesFr OcrLanguages = original.OcrLanguagesFr
- OcrLanguagesHu OcrLanguages = original.OcrLanguagesHu
- OcrLanguagesIt OcrLanguages = original.OcrLanguagesIt
- OcrLanguagesJa OcrLanguages = original.OcrLanguagesJa
- OcrLanguagesKo OcrLanguages = original.OcrLanguagesKo
- OcrLanguagesNb OcrLanguages = original.OcrLanguagesNb
- OcrLanguagesNl OcrLanguages = original.OcrLanguagesNl
- OcrLanguagesPl OcrLanguages = original.OcrLanguagesPl
- OcrLanguagesPt OcrLanguages = original.OcrLanguagesPt
- OcrLanguagesRo OcrLanguages = original.OcrLanguagesRo
- OcrLanguagesRu OcrLanguages = original.OcrLanguagesRu
- OcrLanguagesSk OcrLanguages = original.OcrLanguagesSk
- OcrLanguagesSrCyrl OcrLanguages = original.OcrLanguagesSrCyrl
- OcrLanguagesSrLatn OcrLanguages = original.OcrLanguagesSrLatn
- OcrLanguagesSv OcrLanguages = original.OcrLanguagesSv
- OcrLanguagesTr OcrLanguages = original.OcrLanguagesTr
- OcrLanguagesUnk OcrLanguages = original.OcrLanguagesUnk
- OcrLanguagesZhHans OcrLanguages = original.OcrLanguagesZhHans
- OcrLanguagesZhHant OcrLanguages = original.OcrLanguagesZhHant
+ Ar OcrLanguages = original.Ar
+ Cs OcrLanguages = original.Cs
+ Da OcrLanguages = original.Da
+ De OcrLanguages = original.De
+ El OcrLanguages = original.El
+ En OcrLanguages = original.En
+ Es OcrLanguages = original.Es
+ Fi OcrLanguages = original.Fi
+ Fr OcrLanguages = original.Fr
+ Hu OcrLanguages = original.Hu
+ It OcrLanguages = original.It
+ Ja OcrLanguages = original.Ja
+ Ko OcrLanguages = original.Ko
+ Nb OcrLanguages = original.Nb
+ Nl OcrLanguages = original.Nl
+ Pl OcrLanguages = original.Pl
+ Pt OcrLanguages = original.Pt
+ Ro OcrLanguages = original.Ro
+ Ru OcrLanguages = original.Ru
+ Sk OcrLanguages = original.Sk
+ SrCyrl OcrLanguages = original.SrCyrl
+ SrLatn OcrLanguages = original.SrLatn
+ Sv OcrLanguages = original.Sv
+ Tr OcrLanguages = original.Tr
+ Unk OcrLanguages = original.Unk
+ ZhHans OcrLanguages = original.ZhHans
+ ZhHant OcrLanguages = original.ZhHant
)
type TextOperationStatusCodes = original.TextOperationStatusCodes
@@ -190,9 +183,6 @@ func PossibleErrorCodesValues() []ErrorCodes {
func PossibleGenderValues() []Gender {
return original.PossibleGenderValues()
}
-func PossibleLanguage1Values() []Language1 {
- return original.PossibleLanguage1Values()
-}
func PossibleOcrLanguagesValues() []OcrLanguages {
return original.PossibleOcrLanguagesValues()
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/customimagesearch/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/customimagesearch/models.go
new file mode 100644
index 000000000..87f3d9c48
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/customimagesearch/models.go
@@ -0,0 +1,231 @@
+// +build go1.9
+
+// Copyright 2018 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package customimagesearch
+
+import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/customimagesearch"
+
+const (
+ DefaultBaseURI = original.DefaultBaseURI
+)
+
+type BaseClient = original.BaseClient
+type CustomInstanceClient = original.CustomInstanceClient
+type ErrorCode = original.ErrorCode
+
+const (
+ InsufficientAuthorization ErrorCode = original.InsufficientAuthorization
+ InvalidAuthorization ErrorCode = original.InvalidAuthorization
+ InvalidRequest ErrorCode = original.InvalidRequest
+ None ErrorCode = original.None
+ RateLimitExceeded ErrorCode = original.RateLimitExceeded
+ ServerError ErrorCode = original.ServerError
+)
+
+type ErrorSubCode = original.ErrorSubCode
+
+const (
+ AuthorizationDisabled ErrorSubCode = original.AuthorizationDisabled
+ AuthorizationExpired ErrorSubCode = original.AuthorizationExpired
+ AuthorizationMissing ErrorSubCode = original.AuthorizationMissing
+ AuthorizationRedundancy ErrorSubCode = original.AuthorizationRedundancy
+ Blocked ErrorSubCode = original.Blocked
+ HTTPNotAllowed ErrorSubCode = original.HTTPNotAllowed
+ NotImplemented ErrorSubCode = original.NotImplemented
+ ParameterInvalidValue ErrorSubCode = original.ParameterInvalidValue
+ ParameterMissing ErrorSubCode = original.ParameterMissing
+ ResourceError ErrorSubCode = original.ResourceError
+ UnexpectedError ErrorSubCode = original.UnexpectedError
+)
+
+type Freshness = original.Freshness
+
+const (
+ Day Freshness = original.Day
+ Month Freshness = original.Month
+ Week Freshness = original.Week
+)
+
+type ImageAspect = original.ImageAspect
+
+const (
+ All ImageAspect = original.All
+ Square ImageAspect = original.Square
+ Tall ImageAspect = original.Tall
+ Wide ImageAspect = original.Wide
+)
+
+type ImageColor = original.ImageColor
+
+const (
+ Black ImageColor = original.Black
+ Blue ImageColor = original.Blue
+ Brown ImageColor = original.Brown
+ ColorOnly ImageColor = original.ColorOnly
+ Gray ImageColor = original.Gray
+ Green ImageColor = original.Green
+ Monochrome ImageColor = original.Monochrome
+ Orange ImageColor = original.Orange
+ Pink ImageColor = original.Pink
+ Purple ImageColor = original.Purple
+ Red ImageColor = original.Red
+ Teal ImageColor = original.Teal
+ White ImageColor = original.White
+ Yellow ImageColor = original.Yellow
+)
+
+type ImageContent = original.ImageContent
+
+const (
+ Face ImageContent = original.Face
+ Portrait ImageContent = original.Portrait
+)
+
+type ImageLicense = original.ImageLicense
+
+const (
+ ImageLicenseAll ImageLicense = original.ImageLicenseAll
+ ImageLicenseAny ImageLicense = original.ImageLicenseAny
+ ImageLicenseModify ImageLicense = original.ImageLicenseModify
+ ImageLicenseModifyCommercially ImageLicense = original.ImageLicenseModifyCommercially
+ ImageLicensePublic ImageLicense = original.ImageLicensePublic
+ ImageLicenseShare ImageLicense = original.ImageLicenseShare
+ ImageLicenseShareCommercially ImageLicense = original.ImageLicenseShareCommercially
+)
+
+type ImageSize = original.ImageSize
+
+const (
+ ImageSizeAll ImageSize = original.ImageSizeAll
+ ImageSizeLarge ImageSize = original.ImageSizeLarge
+ ImageSizeMedium ImageSize = original.ImageSizeMedium
+ ImageSizeSmall ImageSize = original.ImageSizeSmall
+ ImageSizeWallpaper ImageSize = original.ImageSizeWallpaper
+)
+
+type ImageType = original.ImageType
+
+const (
+ AnimatedGif ImageType = original.AnimatedGif
+ Clipart ImageType = original.Clipart
+ Line ImageType = original.Line
+ Photo ImageType = original.Photo
+ Shopping ImageType = original.Shopping
+ Transparent ImageType = original.Transparent
+)
+
+type SafeSearch = original.SafeSearch
+
+const (
+ Moderate SafeSearch = original.Moderate
+ Off SafeSearch = original.Off
+ Strict SafeSearch = original.Strict
+)
+
+type Type = original.Type
+
+const (
+ TypeAnswer Type = original.TypeAnswer
+ TypeCreativeWork Type = original.TypeCreativeWork
+ TypeErrorResponse Type = original.TypeErrorResponse
+ TypeIdentifiable Type = original.TypeIdentifiable
+ TypeImageObject Type = original.TypeImageObject
+ TypeImages Type = original.TypeImages
+ TypeMediaObject Type = original.TypeMediaObject
+ TypeResponse Type = original.TypeResponse
+ TypeResponseBase Type = original.TypeResponseBase
+ TypeSearchResultsAnswer Type = original.TypeSearchResultsAnswer
+ TypeThing Type = original.TypeThing
+ TypeWebPage Type = original.TypeWebPage
+)
+
+type BasicAnswer = original.BasicAnswer
+type Answer = original.Answer
+type BasicCreativeWork = original.BasicCreativeWork
+type CreativeWork = original.CreativeWork
+type Error = original.Error
+type ErrorResponse = original.ErrorResponse
+type BasicIdentifiable = original.BasicIdentifiable
+type Identifiable = original.Identifiable
+type ImageObject = original.ImageObject
+type Images = original.Images
+type BasicMediaObject = original.BasicMediaObject
+type MediaObject = original.MediaObject
+type Query = original.Query
+type BasicResponse = original.BasicResponse
+type Response = original.Response
+type BasicResponseBase = original.BasicResponseBase
+type ResponseBase = original.ResponseBase
+type BasicSearchResultsAnswer = original.BasicSearchResultsAnswer
+type SearchResultsAnswer = original.SearchResultsAnswer
+type BasicThing = original.BasicThing
+type Thing = original.Thing
+type WebPage = original.WebPage
+
+func New() BaseClient {
+ return original.New()
+}
+func NewWithBaseURI(baseURI string) BaseClient {
+ return original.NewWithBaseURI(baseURI)
+}
+func NewCustomInstanceClient() CustomInstanceClient {
+ return original.NewCustomInstanceClient()
+}
+func NewCustomInstanceClientWithBaseURI(baseURI string) CustomInstanceClient {
+ return original.NewCustomInstanceClientWithBaseURI(baseURI)
+}
+func PossibleErrorCodeValues() []ErrorCode {
+ return original.PossibleErrorCodeValues()
+}
+func PossibleErrorSubCodeValues() []ErrorSubCode {
+ return original.PossibleErrorSubCodeValues()
+}
+func PossibleFreshnessValues() []Freshness {
+ return original.PossibleFreshnessValues()
+}
+func PossibleImageAspectValues() []ImageAspect {
+ return original.PossibleImageAspectValues()
+}
+func PossibleImageColorValues() []ImageColor {
+ return original.PossibleImageColorValues()
+}
+func PossibleImageContentValues() []ImageContent {
+ return original.PossibleImageContentValues()
+}
+func PossibleImageLicenseValues() []ImageLicense {
+ return original.PossibleImageLicenseValues()
+}
+func PossibleImageSizeValues() []ImageSize {
+ return original.PossibleImageSizeValues()
+}
+func PossibleImageTypeValues() []ImageType {
+ return original.PossibleImageTypeValues()
+}
+func PossibleSafeSearchValues() []SafeSearch {
+ return original.PossibleSafeSearchValues()
+}
+func PossibleTypeValues() []Type {
+ return original.PossibleTypeValues()
+}
+func UserAgent() string {
+ return original.UserAgent() + " profiles/preview"
+}
+func Version() string {
+ return original.Version()
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/customvision/prediction/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/customvision/prediction/models.go
index f8e437a2e..83ca5628d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/customvision/prediction/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/customvision/prediction/models.go
@@ -26,9 +26,10 @@ const (
)
type BaseClient = original.BaseClient
-type ImagePredictionResultModel = original.ImagePredictionResultModel
-type ImageTagPredictionModel = original.ImageTagPredictionModel
+type BoundingBox = original.BoundingBox
+type ImagePrediction = original.ImagePrediction
type ImageURL = original.ImageURL
+type Model = original.Model
func New(aPIKey string) BaseClient {
return original.New(aPIKey)
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/customvision/training/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/customvision/training/models.go
index eaa5dd6a1..b8cf8b219 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/customvision/training/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/customvision/training/models.go
@@ -26,6 +26,52 @@ const (
)
type BaseClient = original.BaseClient
+type DomainType = original.DomainType
+
+const (
+ Classification DomainType = original.Classification
+ ObjectDetection DomainType = original.ObjectDetection
+)
+
+type ExportFlavor = original.ExportFlavor
+
+const (
+ Linux ExportFlavor = original.Linux
+ Windows ExportFlavor = original.Windows
+)
+
+type ExportPlatform = original.ExportPlatform
+
+const (
+ CoreML ExportPlatform = original.CoreML
+ DockerFile ExportPlatform = original.DockerFile
+ ONNX ExportPlatform = original.ONNX
+ TensorFlow ExportPlatform = original.TensorFlow
+)
+
+type ExportStatusModel = original.ExportStatusModel
+
+const (
+ Done ExportStatusModel = original.Done
+ Exporting ExportStatusModel = original.Exporting
+ Failed ExportStatusModel = original.Failed
+)
+
+type ImageUploadStatus = original.ImageUploadStatus
+
+const (
+ ErrorImageFormat ImageUploadStatus = original.ErrorImageFormat
+ ErrorImageSize ImageUploadStatus = original.ErrorImageSize
+ ErrorLimitExceed ImageUploadStatus = original.ErrorLimitExceed
+ ErrorRegionLimitExceed ImageUploadStatus = original.ErrorRegionLimitExceed
+ ErrorSource ImageUploadStatus = original.ErrorSource
+ ErrorStorage ImageUploadStatus = original.ErrorStorage
+ ErrorTagLimitExceed ImageUploadStatus = original.ErrorTagLimitExceed
+ ErrorUnknown ImageUploadStatus = original.ErrorUnknown
+ OK ImageUploadStatus = original.OK
+ OKDuplicate ImageUploadStatus = original.OKDuplicate
+)
+
type OrderBy = original.OrderBy
const (
@@ -34,38 +80,7 @@ const (
Suggested OrderBy = original.Suggested
)
-type Platform = original.Platform
-
-const (
- CoreML Platform = original.CoreML
- TensorFlow Platform = original.TensorFlow
-)
-
-type Status = original.Status
-
-const (
- ErrorImageFormat Status = original.ErrorImageFormat
- ErrorImageSize Status = original.ErrorImageSize
- ErrorLimitExceed Status = original.ErrorLimitExceed
- ErrorSource Status = original.ErrorSource
- ErrorStorage Status = original.ErrorStorage
- ErrorTagLimitExceed Status = original.ErrorTagLimitExceed
- ErrorUnknown Status = original.ErrorUnknown
- OK Status = original.OK
- OKDuplicate Status = original.OKDuplicate
-)
-
-type Status1 = original.Status1
-
-const (
- Done Status1 = original.Done
- Exporting Status1 = original.Exporting
- Failed Status1 = original.Failed
-)
-
-type Account = original.Account
-type AccountQuota = original.AccountQuota
-type APIKeys = original.APIKeys
+type BoundingBox = original.BoundingBox
type Domain = original.Domain
type Export = original.Export
type Image = original.Image
@@ -75,34 +90,41 @@ type ImageFileCreateBatch = original.ImageFileCreateBatch
type ImageFileCreateEntry = original.ImageFileCreateEntry
type ImageIDCreateBatch = original.ImageIDCreateBatch
type ImageIDCreateEntry = original.ImageIDCreateEntry
-type ImagePredictionResult = original.ImagePredictionResult
+type ImagePerformance = original.ImagePerformance
+type ImagePrediction = original.ImagePrediction
+type ImageRegion = original.ImageRegion
+type ImageRegionCreateBatch = original.ImageRegionCreateBatch
+type ImageRegionCreateEntry = original.ImageRegionCreateEntry
+type ImageRegionCreateResult = original.ImageRegionCreateResult
+type ImageRegionCreateSummary = original.ImageRegionCreateSummary
+type ImageRegionProposal = original.ImageRegionProposal
type ImageTag = original.ImageTag
type ImageTagCreateBatch = original.ImageTagCreateBatch
type ImageTagCreateEntry = original.ImageTagCreateEntry
type ImageTagCreateSummary = original.ImageTagCreateSummary
-type ImageTagPrediction = original.ImageTagPrediction
type ImageURL = original.ImageURL
type ImageURLCreateBatch = original.ImageURLCreateBatch
type ImageURLCreateEntry = original.ImageURLCreateEntry
+type Int32 = original.Int32
type Iteration = original.Iteration
type IterationPerformance = original.IterationPerformance
-type KeyPair = original.KeyPair
type ListDomain = original.ListDomain
type ListExport = original.ListExport
type ListImage = original.ListImage
+type ListImagePerformance = original.ListImagePerformance
type ListIteration = original.ListIteration
type ListProject = original.ListProject
-type PerProjectQuota = original.PerProjectQuota
+type ListTag = original.ListTag
type Prediction = original.Prediction
-type PredictionQuery = original.PredictionQuery
+type PredictionQueryResult = original.PredictionQueryResult
type PredictionQueryTag = original.PredictionQueryTag
type PredictionQueryToken = original.PredictionQueryToken
-type PredictionTag = original.PredictionTag
type Project = original.Project
type ProjectSettings = original.ProjectSettings
-type Quota = original.Quota
+type Region = original.Region
+type RegionProposal = original.RegionProposal
+type StoredImagePrediction = original.StoredImagePrediction
type Tag = original.Tag
-type TagList = original.TagList
type TagPerformance = original.TagPerformance
func New(aPIKey string) BaseClient {
@@ -111,18 +133,24 @@ func New(aPIKey string) BaseClient {
func NewWithBaseURI(baseURI string, aPIKey string) BaseClient {
return original.NewWithBaseURI(baseURI, aPIKey)
}
+func PossibleDomainTypeValues() []DomainType {
+ return original.PossibleDomainTypeValues()
+}
+func PossibleExportFlavorValues() []ExportFlavor {
+ return original.PossibleExportFlavorValues()
+}
+func PossibleExportPlatformValues() []ExportPlatform {
+ return original.PossibleExportPlatformValues()
+}
+func PossibleExportStatusModelValues() []ExportStatusModel {
+ return original.PossibleExportStatusModelValues()
+}
+func PossibleImageUploadStatusValues() []ImageUploadStatus {
+ return original.PossibleImageUploadStatusValues()
+}
func PossibleOrderByValues() []OrderBy {
return original.PossibleOrderByValues()
}
-func PossiblePlatformValues() []Platform {
- return original.PossiblePlatformValues()
-}
-func PossibleStatusValues() []Status {
- return original.PossibleStatusValues()
-}
-func PossibleStatus1Values() []Status1 {
- return original.PossibleStatus1Values()
-}
func UserAgent() string {
return original.UserAgent() + " profiles/preview"
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/luis/authoring/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/luis/authoring/models.go
new file mode 100644
index 000000000..b4b34b529
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/luis/authoring/models.go
@@ -0,0 +1,457 @@
+// +build go1.9
+
+// Copyright 2018 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package authoring
+
+import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring"
+
+type AppsClient = original.AppsClient
+type BaseClient = original.BaseClient
+type ExamplesClient = original.ExamplesClient
+type FeaturesClient = original.FeaturesClient
+type ModelClient = original.ModelClient
+type AzureRegions = original.AzureRegions
+
+const (
+ Australiaeast AzureRegions = original.Australiaeast
+ Brazilsouth AzureRegions = original.Brazilsouth
+ Eastasia AzureRegions = original.Eastasia
+ Eastus AzureRegions = original.Eastus
+ Eastus2 AzureRegions = original.Eastus2
+ Northeurope AzureRegions = original.Northeurope
+ Southcentralus AzureRegions = original.Southcentralus
+ Southeastasia AzureRegions = original.Southeastasia
+ Westcentralus AzureRegions = original.Westcentralus
+ Westeurope AzureRegions = original.Westeurope
+ Westus AzureRegions = original.Westus
+ Westus2 AzureRegions = original.Westus2
+)
+
+type OperationStatusType = original.OperationStatusType
+
+const (
+ Failed OperationStatusType = original.Failed
+ FAILED OperationStatusType = original.FAILED
+ Success OperationStatusType = original.Success
+)
+
+type ReadableType = original.ReadableType
+
+const (
+ ReadableTypeClosedListEntityExtractor ReadableType = original.ReadableTypeClosedListEntityExtractor
+ ReadableTypeCompositeEntityExtractor ReadableType = original.ReadableTypeCompositeEntityExtractor
+ ReadableTypeEntityExtractor ReadableType = original.ReadableTypeEntityExtractor
+ ReadableTypeHierarchicalChildEntityExtractor ReadableType = original.ReadableTypeHierarchicalChildEntityExtractor
+ ReadableTypeHierarchicalEntityExtractor ReadableType = original.ReadableTypeHierarchicalEntityExtractor
+ ReadableTypeIntentClassifier ReadableType = original.ReadableTypeIntentClassifier
+ ReadableTypePatternAnyEntityExtractor ReadableType = original.ReadableTypePatternAnyEntityExtractor
+ ReadableTypePrebuiltEntityExtractor ReadableType = original.ReadableTypePrebuiltEntityExtractor
+ ReadableTypeRegexEntityExtractor ReadableType = original.ReadableTypeRegexEntityExtractor
+)
+
+type ReadableType1 = original.ReadableType1
+
+const (
+ ReadableType1ClosedListEntityExtractor ReadableType1 = original.ReadableType1ClosedListEntityExtractor
+ ReadableType1CompositeEntityExtractor ReadableType1 = original.ReadableType1CompositeEntityExtractor
+ ReadableType1EntityExtractor ReadableType1 = original.ReadableType1EntityExtractor
+ ReadableType1HierarchicalChildEntityExtractor ReadableType1 = original.ReadableType1HierarchicalChildEntityExtractor
+ ReadableType1HierarchicalEntityExtractor ReadableType1 = original.ReadableType1HierarchicalEntityExtractor
+ ReadableType1IntentClassifier ReadableType1 = original.ReadableType1IntentClassifier
+ ReadableType1PatternAnyEntityExtractor ReadableType1 = original.ReadableType1PatternAnyEntityExtractor
+ ReadableType1PrebuiltEntityExtractor ReadableType1 = original.ReadableType1PrebuiltEntityExtractor
+ ReadableType1RegexEntityExtractor ReadableType1 = original.ReadableType1RegexEntityExtractor
+)
+
+type ReadableType10 = original.ReadableType10
+
+const (
+ ReadableType10ClosedListEntityExtractor ReadableType10 = original.ReadableType10ClosedListEntityExtractor
+ ReadableType10CompositeEntityExtractor ReadableType10 = original.ReadableType10CompositeEntityExtractor
+ ReadableType10EntityExtractor ReadableType10 = original.ReadableType10EntityExtractor
+ ReadableType10HierarchicalChildEntityExtractor ReadableType10 = original.ReadableType10HierarchicalChildEntityExtractor
+ ReadableType10HierarchicalEntityExtractor ReadableType10 = original.ReadableType10HierarchicalEntityExtractor
+ ReadableType10IntentClassifier ReadableType10 = original.ReadableType10IntentClassifier
+ ReadableType10PatternAnyEntityExtractor ReadableType10 = original.ReadableType10PatternAnyEntityExtractor
+ ReadableType10PrebuiltEntityExtractor ReadableType10 = original.ReadableType10PrebuiltEntityExtractor
+ ReadableType10RegexEntityExtractor ReadableType10 = original.ReadableType10RegexEntityExtractor
+)
+
+type ReadableType2 = original.ReadableType2
+
+const (
+ ReadableType2ClosedListEntityExtractor ReadableType2 = original.ReadableType2ClosedListEntityExtractor
+ ReadableType2CompositeEntityExtractor ReadableType2 = original.ReadableType2CompositeEntityExtractor
+ ReadableType2EntityExtractor ReadableType2 = original.ReadableType2EntityExtractor
+ ReadableType2HierarchicalChildEntityExtractor ReadableType2 = original.ReadableType2HierarchicalChildEntityExtractor
+ ReadableType2HierarchicalEntityExtractor ReadableType2 = original.ReadableType2HierarchicalEntityExtractor
+ ReadableType2IntentClassifier ReadableType2 = original.ReadableType2IntentClassifier
+ ReadableType2PatternAnyEntityExtractor ReadableType2 = original.ReadableType2PatternAnyEntityExtractor
+ ReadableType2PrebuiltEntityExtractor ReadableType2 = original.ReadableType2PrebuiltEntityExtractor
+ ReadableType2RegexEntityExtractor ReadableType2 = original.ReadableType2RegexEntityExtractor
+)
+
+type ReadableType3 = original.ReadableType3
+
+const (
+ ReadableType3ClosedListEntityExtractor ReadableType3 = original.ReadableType3ClosedListEntityExtractor
+ ReadableType3CompositeEntityExtractor ReadableType3 = original.ReadableType3CompositeEntityExtractor
+ ReadableType3EntityExtractor ReadableType3 = original.ReadableType3EntityExtractor
+ ReadableType3HierarchicalChildEntityExtractor ReadableType3 = original.ReadableType3HierarchicalChildEntityExtractor
+ ReadableType3HierarchicalEntityExtractor ReadableType3 = original.ReadableType3HierarchicalEntityExtractor
+ ReadableType3IntentClassifier ReadableType3 = original.ReadableType3IntentClassifier
+ ReadableType3PatternAnyEntityExtractor ReadableType3 = original.ReadableType3PatternAnyEntityExtractor
+ ReadableType3PrebuiltEntityExtractor ReadableType3 = original.ReadableType3PrebuiltEntityExtractor
+ ReadableType3RegexEntityExtractor ReadableType3 = original.ReadableType3RegexEntityExtractor
+)
+
+type ReadableType4 = original.ReadableType4
+
+const (
+ ReadableType4ClosedListEntityExtractor ReadableType4 = original.ReadableType4ClosedListEntityExtractor
+ ReadableType4CompositeEntityExtractor ReadableType4 = original.ReadableType4CompositeEntityExtractor
+ ReadableType4EntityExtractor ReadableType4 = original.ReadableType4EntityExtractor
+ ReadableType4HierarchicalChildEntityExtractor ReadableType4 = original.ReadableType4HierarchicalChildEntityExtractor
+ ReadableType4HierarchicalEntityExtractor ReadableType4 = original.ReadableType4HierarchicalEntityExtractor
+ ReadableType4IntentClassifier ReadableType4 = original.ReadableType4IntentClassifier
+ ReadableType4PatternAnyEntityExtractor ReadableType4 = original.ReadableType4PatternAnyEntityExtractor
+ ReadableType4PrebuiltEntityExtractor ReadableType4 = original.ReadableType4PrebuiltEntityExtractor
+ ReadableType4RegexEntityExtractor ReadableType4 = original.ReadableType4RegexEntityExtractor
+)
+
+type ReadableType5 = original.ReadableType5
+
+const (
+ ReadableType5ClosedListEntityExtractor ReadableType5 = original.ReadableType5ClosedListEntityExtractor
+ ReadableType5CompositeEntityExtractor ReadableType5 = original.ReadableType5CompositeEntityExtractor
+ ReadableType5EntityExtractor ReadableType5 = original.ReadableType5EntityExtractor
+ ReadableType5HierarchicalChildEntityExtractor ReadableType5 = original.ReadableType5HierarchicalChildEntityExtractor
+ ReadableType5HierarchicalEntityExtractor ReadableType5 = original.ReadableType5HierarchicalEntityExtractor
+ ReadableType5IntentClassifier ReadableType5 = original.ReadableType5IntentClassifier
+ ReadableType5PatternAnyEntityExtractor ReadableType5 = original.ReadableType5PatternAnyEntityExtractor
+ ReadableType5PrebuiltEntityExtractor ReadableType5 = original.ReadableType5PrebuiltEntityExtractor
+ ReadableType5RegexEntityExtractor ReadableType5 = original.ReadableType5RegexEntityExtractor
+)
+
+type ReadableType6 = original.ReadableType6
+
+const (
+ ReadableType6ClosedListEntityExtractor ReadableType6 = original.ReadableType6ClosedListEntityExtractor
+ ReadableType6CompositeEntityExtractor ReadableType6 = original.ReadableType6CompositeEntityExtractor
+ ReadableType6EntityExtractor ReadableType6 = original.ReadableType6EntityExtractor
+ ReadableType6HierarchicalChildEntityExtractor ReadableType6 = original.ReadableType6HierarchicalChildEntityExtractor
+ ReadableType6HierarchicalEntityExtractor ReadableType6 = original.ReadableType6HierarchicalEntityExtractor
+ ReadableType6IntentClassifier ReadableType6 = original.ReadableType6IntentClassifier
+ ReadableType6PatternAnyEntityExtractor ReadableType6 = original.ReadableType6PatternAnyEntityExtractor
+ ReadableType6PrebuiltEntityExtractor ReadableType6 = original.ReadableType6PrebuiltEntityExtractor
+ ReadableType6RegexEntityExtractor ReadableType6 = original.ReadableType6RegexEntityExtractor
+)
+
+type ReadableType7 = original.ReadableType7
+
+const (
+ ReadableType7ClosedListEntityExtractor ReadableType7 = original.ReadableType7ClosedListEntityExtractor
+ ReadableType7CompositeEntityExtractor ReadableType7 = original.ReadableType7CompositeEntityExtractor
+ ReadableType7EntityExtractor ReadableType7 = original.ReadableType7EntityExtractor
+ ReadableType7HierarchicalChildEntityExtractor ReadableType7 = original.ReadableType7HierarchicalChildEntityExtractor
+ ReadableType7HierarchicalEntityExtractor ReadableType7 = original.ReadableType7HierarchicalEntityExtractor
+ ReadableType7IntentClassifier ReadableType7 = original.ReadableType7IntentClassifier
+ ReadableType7PatternAnyEntityExtractor ReadableType7 = original.ReadableType7PatternAnyEntityExtractor
+ ReadableType7PrebuiltEntityExtractor ReadableType7 = original.ReadableType7PrebuiltEntityExtractor
+ ReadableType7RegexEntityExtractor ReadableType7 = original.ReadableType7RegexEntityExtractor
+)
+
+type ReadableType8 = original.ReadableType8
+
+const (
+ ReadableType8ClosedListEntityExtractor ReadableType8 = original.ReadableType8ClosedListEntityExtractor
+ ReadableType8CompositeEntityExtractor ReadableType8 = original.ReadableType8CompositeEntityExtractor
+ ReadableType8EntityExtractor ReadableType8 = original.ReadableType8EntityExtractor
+ ReadableType8HierarchicalChildEntityExtractor ReadableType8 = original.ReadableType8HierarchicalChildEntityExtractor
+ ReadableType8HierarchicalEntityExtractor ReadableType8 = original.ReadableType8HierarchicalEntityExtractor
+ ReadableType8IntentClassifier ReadableType8 = original.ReadableType8IntentClassifier
+ ReadableType8PatternAnyEntityExtractor ReadableType8 = original.ReadableType8PatternAnyEntityExtractor
+ ReadableType8PrebuiltEntityExtractor ReadableType8 = original.ReadableType8PrebuiltEntityExtractor
+ ReadableType8RegexEntityExtractor ReadableType8 = original.ReadableType8RegexEntityExtractor
+)
+
+type ReadableType9 = original.ReadableType9
+
+const (
+ ReadableType9ClosedListEntityExtractor ReadableType9 = original.ReadableType9ClosedListEntityExtractor
+ ReadableType9CompositeEntityExtractor ReadableType9 = original.ReadableType9CompositeEntityExtractor
+ ReadableType9EntityExtractor ReadableType9 = original.ReadableType9EntityExtractor
+ ReadableType9HierarchicalChildEntityExtractor ReadableType9 = original.ReadableType9HierarchicalChildEntityExtractor
+ ReadableType9HierarchicalEntityExtractor ReadableType9 = original.ReadableType9HierarchicalEntityExtractor
+ ReadableType9IntentClassifier ReadableType9 = original.ReadableType9IntentClassifier
+ ReadableType9PatternAnyEntityExtractor ReadableType9 = original.ReadableType9PatternAnyEntityExtractor
+ ReadableType9PrebuiltEntityExtractor ReadableType9 = original.ReadableType9PrebuiltEntityExtractor
+ ReadableType9RegexEntityExtractor ReadableType9 = original.ReadableType9RegexEntityExtractor
+)
+
+type Status = original.Status
+
+const (
+ StatusFail Status = original.StatusFail
+ StatusInProgress Status = original.StatusInProgress
+ StatusQueued Status = original.StatusQueued
+ StatusSuccess Status = original.StatusSuccess
+ StatusUpToDate Status = original.StatusUpToDate
+)
+
+type Status1 = original.Status1
+
+const (
+ Status1Fail Status1 = original.Status1Fail
+ Status1InProgress Status1 = original.Status1InProgress
+ Status1Queued Status1 = original.Status1Queued
+ Status1Success Status1 = original.Status1Success
+ Status1UpToDate Status1 = original.Status1UpToDate
+)
+
+type TrainingStatus = original.TrainingStatus
+
+const (
+ InProgress TrainingStatus = original.InProgress
+ NeedsTraining TrainingStatus = original.NeedsTraining
+ Trained TrainingStatus = original.Trained
+)
+
+type ApplicationCreateObject = original.ApplicationCreateObject
+type ApplicationInfoResponse = original.ApplicationInfoResponse
+type ApplicationPublishObject = original.ApplicationPublishObject
+type ApplicationSettings = original.ApplicationSettings
+type ApplicationSettingUpdateObject = original.ApplicationSettingUpdateObject
+type ApplicationUpdateObject = original.ApplicationUpdateObject
+type AvailableCulture = original.AvailableCulture
+type AvailablePrebuiltEntityModel = original.AvailablePrebuiltEntityModel
+type BatchLabelExample = original.BatchLabelExample
+type ChildEntity = original.ChildEntity
+type ClosedList = original.ClosedList
+type ClosedListEntityExtractor = original.ClosedListEntityExtractor
+type ClosedListModelCreateObject = original.ClosedListModelCreateObject
+type ClosedListModelPatchObject = original.ClosedListModelPatchObject
+type ClosedListModelUpdateObject = original.ClosedListModelUpdateObject
+type CollaboratorsArray = original.CollaboratorsArray
+type CompositeChildModelCreateObject = original.CompositeChildModelCreateObject
+type CompositeEntityExtractor = original.CompositeEntityExtractor
+type CompositeEntityModel = original.CompositeEntityModel
+type CustomPrebuiltModel = original.CustomPrebuiltModel
+type EndpointInfo = original.EndpointInfo
+type EnqueueTrainingResponse = original.EnqueueTrainingResponse
+type EntitiesSuggestionExample = original.EntitiesSuggestionExample
+type EntityExtractor = original.EntityExtractor
+type EntityLabel = original.EntityLabel
+type EntityLabelObject = original.EntityLabelObject
+type EntityModelInfo = original.EntityModelInfo
+type EntityPrediction = original.EntityPrediction
+type EntityRole = original.EntityRole
+type EntityRoleCreateObject = original.EntityRoleCreateObject
+type EntityRoleUpdateObject = original.EntityRoleUpdateObject
+type ErrorResponse = original.ErrorResponse
+type ExampleLabelObject = original.ExampleLabelObject
+type ExplicitListItem = original.ExplicitListItem
+type ExplicitListItemCreateObject = original.ExplicitListItemCreateObject
+type ExplicitListItemUpdateObject = original.ExplicitListItemUpdateObject
+type FeatureInfoObject = original.FeatureInfoObject
+type FeaturesResponseObject = original.FeaturesResponseObject
+type HierarchicalChildEntity = original.HierarchicalChildEntity
+type HierarchicalChildModelCreateObject = original.HierarchicalChildModelCreateObject
+type HierarchicalChildModelUpdateObject = original.HierarchicalChildModelUpdateObject
+type HierarchicalEntityExtractor = original.HierarchicalEntityExtractor
+type HierarchicalEntityModel = original.HierarchicalEntityModel
+type HierarchicalModel = original.HierarchicalModel
+type Int32 = original.Int32
+type IntentClassifier = original.IntentClassifier
+type IntentPrediction = original.IntentPrediction
+type IntentsSuggestionExample = original.IntentsSuggestionExample
+type JSONEntity = original.JSONEntity
+type JSONModelFeature = original.JSONModelFeature
+type JSONRegexFeature = original.JSONRegexFeature
+type JSONUtterance = original.JSONUtterance
+type LabeledUtterance = original.LabeledUtterance
+type LabelExampleResponse = original.LabelExampleResponse
+type LabelTextObject = original.LabelTextObject
+type ListApplicationInfoResponse = original.ListApplicationInfoResponse
+type ListAvailableCulture = original.ListAvailableCulture
+type ListAvailablePrebuiltEntityModel = original.ListAvailablePrebuiltEntityModel
+type ListBatchLabelExample = original.ListBatchLabelExample
+type ListClosedListEntityExtractor = original.ListClosedListEntityExtractor
+type ListCompositeEntityExtractor = original.ListCompositeEntityExtractor
+type ListCustomPrebuiltModel = original.ListCustomPrebuiltModel
+type ListEntitiesSuggestionExample = original.ListEntitiesSuggestionExample
+type ListEntityExtractor = original.ListEntityExtractor
+type ListEntityRole = original.ListEntityRole
+type ListExplicitListItem = original.ListExplicitListItem
+type ListHierarchicalEntityExtractor = original.ListHierarchicalEntityExtractor
+type ListIntentClassifier = original.ListIntentClassifier
+type ListIntentsSuggestionExample = original.ListIntentsSuggestionExample
+type ListLabeledUtterance = original.ListLabeledUtterance
+type ListLabelTextObject = original.ListLabelTextObject
+type ListModelInfoResponse = original.ListModelInfoResponse
+type ListModelTrainingInfo = original.ListModelTrainingInfo
+type ListPatternAnyEntityExtractor = original.ListPatternAnyEntityExtractor
+type ListPatternRuleInfo = original.ListPatternRuleInfo
+type ListPhraseListFeatureInfo = original.ListPhraseListFeatureInfo
+type ListPrebuiltDomain = original.ListPrebuiltDomain
+type ListPrebuiltEntityExtractor = original.ListPrebuiltEntityExtractor
+type ListRegexEntityExtractor = original.ListRegexEntityExtractor
+type ListString = original.ListString
+type ListUUID = original.ListUUID
+type ListVersionInfo = original.ListVersionInfo
+type LuisApp = original.LuisApp
+type ModelCreateObject = original.ModelCreateObject
+type ModelInfo = original.ModelInfo
+type ModelInfoResponse = original.ModelInfoResponse
+type ModelTrainingDetails = original.ModelTrainingDetails
+type ModelTrainingInfo = original.ModelTrainingInfo
+type ModelUpdateObject = original.ModelUpdateObject
+type OperationError = original.OperationError
+type OperationStatus = original.OperationStatus
+type PatternAny = original.PatternAny
+type PatternAnyEntityExtractor = original.PatternAnyEntityExtractor
+type PatternAnyModelCreateObject = original.PatternAnyModelCreateObject
+type PatternAnyModelUpdateObject = original.PatternAnyModelUpdateObject
+type PatternCreateObject = original.PatternCreateObject
+type PatternFeatureInfo = original.PatternFeatureInfo
+type PatternRule = original.PatternRule
+type PatternRuleCreateObject = original.PatternRuleCreateObject
+type PatternRuleInfo = original.PatternRuleInfo
+type PatternRuleUpdateObject = original.PatternRuleUpdateObject
+type PatternUpdateObject = original.PatternUpdateObject
+type PersonalAssistantsResponse = original.PersonalAssistantsResponse
+type PhraselistCreateObject = original.PhraselistCreateObject
+type PhraseListFeatureInfo = original.PhraseListFeatureInfo
+type PhraselistUpdateObject = original.PhraselistUpdateObject
+type PrebuiltDomain = original.PrebuiltDomain
+type PrebuiltDomainCreateBaseObject = original.PrebuiltDomainCreateBaseObject
+type PrebuiltDomainCreateObject = original.PrebuiltDomainCreateObject
+type PrebuiltDomainItem = original.PrebuiltDomainItem
+type PrebuiltDomainModelCreateObject = original.PrebuiltDomainModelCreateObject
+type PrebuiltDomainObject = original.PrebuiltDomainObject
+type PrebuiltEntity = original.PrebuiltEntity
+type PrebuiltEntityExtractor = original.PrebuiltEntityExtractor
+type ProductionOrStagingEndpointInfo = original.ProductionOrStagingEndpointInfo
+type PublishSettings = original.PublishSettings
+type PublishSettingUpdateObject = original.PublishSettingUpdateObject
+type ReadCloser = original.ReadCloser
+type RegexEntity = original.RegexEntity
+type RegexEntityExtractor = original.RegexEntityExtractor
+type RegexModelCreateObject = original.RegexModelCreateObject
+type RegexModelUpdateObject = original.RegexModelUpdateObject
+type SetString = original.SetString
+type String = original.String
+type SubClosedList = original.SubClosedList
+type SubClosedListResponse = original.SubClosedListResponse
+type TaskUpdateObject = original.TaskUpdateObject
+type UserAccessList = original.UserAccessList
+type UserCollaborator = original.UserCollaborator
+type UUID = original.UUID
+type VersionInfo = original.VersionInfo
+type WordListBaseUpdateObject = original.WordListBaseUpdateObject
+type WordListObject = original.WordListObject
+type PatternClient = original.PatternClient
+type PermissionsClient = original.PermissionsClient
+type TrainClient = original.TrainClient
+type VersionsClient = original.VersionsClient
+
+func NewAppsClient(azureRegion AzureRegions) AppsClient {
+ return original.NewAppsClient(azureRegion)
+}
+func New(azureRegion AzureRegions) BaseClient {
+ return original.New(azureRegion)
+}
+func NewWithoutDefaults(azureRegion AzureRegions) BaseClient {
+ return original.NewWithoutDefaults(azureRegion)
+}
+func NewExamplesClient(azureRegion AzureRegions) ExamplesClient {
+ return original.NewExamplesClient(azureRegion)
+}
+func NewFeaturesClient(azureRegion AzureRegions) FeaturesClient {
+ return original.NewFeaturesClient(azureRegion)
+}
+func NewModelClient(azureRegion AzureRegions) ModelClient {
+ return original.NewModelClient(azureRegion)
+}
+func PossibleAzureRegionsValues() []AzureRegions {
+ return original.PossibleAzureRegionsValues()
+}
+func PossibleOperationStatusTypeValues() []OperationStatusType {
+ return original.PossibleOperationStatusTypeValues()
+}
+func PossibleReadableTypeValues() []ReadableType {
+ return original.PossibleReadableTypeValues()
+}
+func PossibleReadableType1Values() []ReadableType1 {
+ return original.PossibleReadableType1Values()
+}
+func PossibleReadableType10Values() []ReadableType10 {
+ return original.PossibleReadableType10Values()
+}
+func PossibleReadableType2Values() []ReadableType2 {
+ return original.PossibleReadableType2Values()
+}
+func PossibleReadableType3Values() []ReadableType3 {
+ return original.PossibleReadableType3Values()
+}
+func PossibleReadableType4Values() []ReadableType4 {
+ return original.PossibleReadableType4Values()
+}
+func PossibleReadableType5Values() []ReadableType5 {
+ return original.PossibleReadableType5Values()
+}
+func PossibleReadableType6Values() []ReadableType6 {
+ return original.PossibleReadableType6Values()
+}
+func PossibleReadableType7Values() []ReadableType7 {
+ return original.PossibleReadableType7Values()
+}
+func PossibleReadableType8Values() []ReadableType8 {
+ return original.PossibleReadableType8Values()
+}
+func PossibleReadableType9Values() []ReadableType9 {
+ return original.PossibleReadableType9Values()
+}
+func PossibleStatusValues() []Status {
+ return original.PossibleStatusValues()
+}
+func PossibleStatus1Values() []Status1 {
+ return original.PossibleStatus1Values()
+}
+func PossibleTrainingStatusValues() []TrainingStatus {
+ return original.PossibleTrainingStatusValues()
+}
+func NewPatternClient(azureRegion AzureRegions) PatternClient {
+ return original.NewPatternClient(azureRegion)
+}
+func NewPermissionsClient(azureRegion AzureRegions) PermissionsClient {
+ return original.NewPermissionsClient(azureRegion)
+}
+func NewTrainClient(azureRegion AzureRegions) TrainClient {
+ return original.NewTrainClient(azureRegion)
+}
+func UserAgent() string {
+ return original.UserAgent() + " profiles/preview"
+}
+func Version() string {
+ return original.Version()
+}
+func NewVersionsClient(azureRegion AzureRegions) VersionsClient {
+ return original.NewVersionsClient(azureRegion)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/luis/programmatic/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/luis/programmatic/models.go
index 71297148f..a8fa3acca 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/luis/programmatic/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cognitiveservices/luis/programmatic/models.go
@@ -60,7 +60,9 @@ const (
ReadableTypeHierarchicalChildEntityExtractor ReadableType = original.ReadableTypeHierarchicalChildEntityExtractor
ReadableTypeHierarchicalEntityExtractor ReadableType = original.ReadableTypeHierarchicalEntityExtractor
ReadableTypeIntentClassifier ReadableType = original.ReadableTypeIntentClassifier
+ ReadableTypePatternAnyEntityExtractor ReadableType = original.ReadableTypePatternAnyEntityExtractor
ReadableTypePrebuiltEntityExtractor ReadableType = original.ReadableTypePrebuiltEntityExtractor
+ ReadableTypeRegexEntityExtractor ReadableType = original.ReadableTypeRegexEntityExtractor
)
type ReadableType1 = original.ReadableType1
@@ -72,7 +74,23 @@ const (
ReadableType1HierarchicalChildEntityExtractor ReadableType1 = original.ReadableType1HierarchicalChildEntityExtractor
ReadableType1HierarchicalEntityExtractor ReadableType1 = original.ReadableType1HierarchicalEntityExtractor
ReadableType1IntentClassifier ReadableType1 = original.ReadableType1IntentClassifier
+ ReadableType1PatternAnyEntityExtractor ReadableType1 = original.ReadableType1PatternAnyEntityExtractor
ReadableType1PrebuiltEntityExtractor ReadableType1 = original.ReadableType1PrebuiltEntityExtractor
+ ReadableType1RegexEntityExtractor ReadableType1 = original.ReadableType1RegexEntityExtractor
+)
+
+type ReadableType10 = original.ReadableType10
+
+const (
+ ReadableType10ClosedListEntityExtractor ReadableType10 = original.ReadableType10ClosedListEntityExtractor
+ ReadableType10CompositeEntityExtractor ReadableType10 = original.ReadableType10CompositeEntityExtractor
+ ReadableType10EntityExtractor ReadableType10 = original.ReadableType10EntityExtractor
+ ReadableType10HierarchicalChildEntityExtractor ReadableType10 = original.ReadableType10HierarchicalChildEntityExtractor
+ ReadableType10HierarchicalEntityExtractor ReadableType10 = original.ReadableType10HierarchicalEntityExtractor
+ ReadableType10IntentClassifier ReadableType10 = original.ReadableType10IntentClassifier
+ ReadableType10PatternAnyEntityExtractor ReadableType10 = original.ReadableType10PatternAnyEntityExtractor
+ ReadableType10PrebuiltEntityExtractor ReadableType10 = original.ReadableType10PrebuiltEntityExtractor
+ ReadableType10RegexEntityExtractor ReadableType10 = original.ReadableType10RegexEntityExtractor
)
type ReadableType2 = original.ReadableType2
@@ -84,7 +102,9 @@ const (
ReadableType2HierarchicalChildEntityExtractor ReadableType2 = original.ReadableType2HierarchicalChildEntityExtractor
ReadableType2HierarchicalEntityExtractor ReadableType2 = original.ReadableType2HierarchicalEntityExtractor
ReadableType2IntentClassifier ReadableType2 = original.ReadableType2IntentClassifier
+ ReadableType2PatternAnyEntityExtractor ReadableType2 = original.ReadableType2PatternAnyEntityExtractor
ReadableType2PrebuiltEntityExtractor ReadableType2 = original.ReadableType2PrebuiltEntityExtractor
+ ReadableType2RegexEntityExtractor ReadableType2 = original.ReadableType2RegexEntityExtractor
)
type ReadableType3 = original.ReadableType3
@@ -96,7 +116,93 @@ const (
ReadableType3HierarchicalChildEntityExtractor ReadableType3 = original.ReadableType3HierarchicalChildEntityExtractor
ReadableType3HierarchicalEntityExtractor ReadableType3 = original.ReadableType3HierarchicalEntityExtractor
ReadableType3IntentClassifier ReadableType3 = original.ReadableType3IntentClassifier
+ ReadableType3PatternAnyEntityExtractor ReadableType3 = original.ReadableType3PatternAnyEntityExtractor
ReadableType3PrebuiltEntityExtractor ReadableType3 = original.ReadableType3PrebuiltEntityExtractor
+ ReadableType3RegexEntityExtractor ReadableType3 = original.ReadableType3RegexEntityExtractor
+)
+
+type ReadableType4 = original.ReadableType4
+
+const (
+ ReadableType4ClosedListEntityExtractor ReadableType4 = original.ReadableType4ClosedListEntityExtractor
+ ReadableType4CompositeEntityExtractor ReadableType4 = original.ReadableType4CompositeEntityExtractor
+ ReadableType4EntityExtractor ReadableType4 = original.ReadableType4EntityExtractor
+ ReadableType4HierarchicalChildEntityExtractor ReadableType4 = original.ReadableType4HierarchicalChildEntityExtractor
+ ReadableType4HierarchicalEntityExtractor ReadableType4 = original.ReadableType4HierarchicalEntityExtractor
+ ReadableType4IntentClassifier ReadableType4 = original.ReadableType4IntentClassifier
+ ReadableType4PatternAnyEntityExtractor ReadableType4 = original.ReadableType4PatternAnyEntityExtractor
+ ReadableType4PrebuiltEntityExtractor ReadableType4 = original.ReadableType4PrebuiltEntityExtractor
+ ReadableType4RegexEntityExtractor ReadableType4 = original.ReadableType4RegexEntityExtractor
+)
+
+type ReadableType5 = original.ReadableType5
+
+const (
+ ReadableType5ClosedListEntityExtractor ReadableType5 = original.ReadableType5ClosedListEntityExtractor
+ ReadableType5CompositeEntityExtractor ReadableType5 = original.ReadableType5CompositeEntityExtractor
+ ReadableType5EntityExtractor ReadableType5 = original.ReadableType5EntityExtractor
+ ReadableType5HierarchicalChildEntityExtractor ReadableType5 = original.ReadableType5HierarchicalChildEntityExtractor
+ ReadableType5HierarchicalEntityExtractor ReadableType5 = original.ReadableType5HierarchicalEntityExtractor
+ ReadableType5IntentClassifier ReadableType5 = original.ReadableType5IntentClassifier
+ ReadableType5PatternAnyEntityExtractor ReadableType5 = original.ReadableType5PatternAnyEntityExtractor
+ ReadableType5PrebuiltEntityExtractor ReadableType5 = original.ReadableType5PrebuiltEntityExtractor
+ ReadableType5RegexEntityExtractor ReadableType5 = original.ReadableType5RegexEntityExtractor
+)
+
+type ReadableType6 = original.ReadableType6
+
+const (
+ ReadableType6ClosedListEntityExtractor ReadableType6 = original.ReadableType6ClosedListEntityExtractor
+ ReadableType6CompositeEntityExtractor ReadableType6 = original.ReadableType6CompositeEntityExtractor
+ ReadableType6EntityExtractor ReadableType6 = original.ReadableType6EntityExtractor
+ ReadableType6HierarchicalChildEntityExtractor ReadableType6 = original.ReadableType6HierarchicalChildEntityExtractor
+ ReadableType6HierarchicalEntityExtractor ReadableType6 = original.ReadableType6HierarchicalEntityExtractor
+ ReadableType6IntentClassifier ReadableType6 = original.ReadableType6IntentClassifier
+ ReadableType6PatternAnyEntityExtractor ReadableType6 = original.ReadableType6PatternAnyEntityExtractor
+ ReadableType6PrebuiltEntityExtractor ReadableType6 = original.ReadableType6PrebuiltEntityExtractor
+ ReadableType6RegexEntityExtractor ReadableType6 = original.ReadableType6RegexEntityExtractor
+)
+
+type ReadableType7 = original.ReadableType7
+
+const (
+ ReadableType7ClosedListEntityExtractor ReadableType7 = original.ReadableType7ClosedListEntityExtractor
+ ReadableType7CompositeEntityExtractor ReadableType7 = original.ReadableType7CompositeEntityExtractor
+ ReadableType7EntityExtractor ReadableType7 = original.ReadableType7EntityExtractor
+ ReadableType7HierarchicalChildEntityExtractor ReadableType7 = original.ReadableType7HierarchicalChildEntityExtractor
+ ReadableType7HierarchicalEntityExtractor ReadableType7 = original.ReadableType7HierarchicalEntityExtractor
+ ReadableType7IntentClassifier ReadableType7 = original.ReadableType7IntentClassifier
+ ReadableType7PatternAnyEntityExtractor ReadableType7 = original.ReadableType7PatternAnyEntityExtractor
+ ReadableType7PrebuiltEntityExtractor ReadableType7 = original.ReadableType7PrebuiltEntityExtractor
+ ReadableType7RegexEntityExtractor ReadableType7 = original.ReadableType7RegexEntityExtractor
+)
+
+type ReadableType8 = original.ReadableType8
+
+const (
+ ReadableType8ClosedListEntityExtractor ReadableType8 = original.ReadableType8ClosedListEntityExtractor
+ ReadableType8CompositeEntityExtractor ReadableType8 = original.ReadableType8CompositeEntityExtractor
+ ReadableType8EntityExtractor ReadableType8 = original.ReadableType8EntityExtractor
+ ReadableType8HierarchicalChildEntityExtractor ReadableType8 = original.ReadableType8HierarchicalChildEntityExtractor
+ ReadableType8HierarchicalEntityExtractor ReadableType8 = original.ReadableType8HierarchicalEntityExtractor
+ ReadableType8IntentClassifier ReadableType8 = original.ReadableType8IntentClassifier
+ ReadableType8PatternAnyEntityExtractor ReadableType8 = original.ReadableType8PatternAnyEntityExtractor
+ ReadableType8PrebuiltEntityExtractor ReadableType8 = original.ReadableType8PrebuiltEntityExtractor
+ ReadableType8RegexEntityExtractor ReadableType8 = original.ReadableType8RegexEntityExtractor
+)
+
+type ReadableType9 = original.ReadableType9
+
+const (
+ ReadableType9ClosedListEntityExtractor ReadableType9 = original.ReadableType9ClosedListEntityExtractor
+ ReadableType9CompositeEntityExtractor ReadableType9 = original.ReadableType9CompositeEntityExtractor
+ ReadableType9EntityExtractor ReadableType9 = original.ReadableType9EntityExtractor
+ ReadableType9HierarchicalChildEntityExtractor ReadableType9 = original.ReadableType9HierarchicalChildEntityExtractor
+ ReadableType9HierarchicalEntityExtractor ReadableType9 = original.ReadableType9HierarchicalEntityExtractor
+ ReadableType9IntentClassifier ReadableType9 = original.ReadableType9IntentClassifier
+ ReadableType9PatternAnyEntityExtractor ReadableType9 = original.ReadableType9PatternAnyEntityExtractor
+ ReadableType9PrebuiltEntityExtractor ReadableType9 = original.ReadableType9PrebuiltEntityExtractor
+ ReadableType9RegexEntityExtractor ReadableType9 = original.ReadableType9RegexEntityExtractor
)
type Status = original.Status
@@ -153,9 +259,16 @@ type EntitiesSuggestionExample = original.EntitiesSuggestionExample
type EntityExtractor = original.EntityExtractor
type EntityLabel = original.EntityLabel
type EntityLabelObject = original.EntityLabelObject
+type EntityModelInfo = original.EntityModelInfo
type EntityPrediction = original.EntityPrediction
+type EntityRole = original.EntityRole
+type EntityRoleCreateObject = original.EntityRoleCreateObject
+type EntityRoleUpdateObject = original.EntityRoleUpdateObject
type ErrorResponse = original.ErrorResponse
type ExampleLabelObject = original.ExampleLabelObject
+type ExplicitListItem = original.ExplicitListItem
+type ExplicitListItemCreateObject = original.ExplicitListItemCreateObject
+type ExplicitListItemUpdateObject = original.ExplicitListItemUpdateObject
type FeatureInfoObject = original.FeatureInfoObject
type FeaturesResponseObject = original.FeaturesResponseObject
type HierarchicalChildEntity = original.HierarchicalChildEntity
@@ -183,15 +296,20 @@ type ListCompositeEntityExtractor = original.ListCompositeEntityExtractor
type ListCustomPrebuiltModel = original.ListCustomPrebuiltModel
type ListEntitiesSuggestionExample = original.ListEntitiesSuggestionExample
type ListEntityExtractor = original.ListEntityExtractor
+type ListEntityRole = original.ListEntityRole
+type ListExplicitListItem = original.ListExplicitListItem
type ListHierarchicalEntityExtractor = original.ListHierarchicalEntityExtractor
type ListIntentClassifier = original.ListIntentClassifier
type ListIntentsSuggestionExample = original.ListIntentsSuggestionExample
type ListLabeledUtterance = original.ListLabeledUtterance
type ListModelInfoResponse = original.ListModelInfoResponse
type ListModelTrainingInfo = original.ListModelTrainingInfo
+type ListPatternAnyEntityExtractor = original.ListPatternAnyEntityExtractor
+type ListPatternRuleInfo = original.ListPatternRuleInfo
type ListPhraseListFeatureInfo = original.ListPhraseListFeatureInfo
type ListPrebuiltDomain = original.ListPrebuiltDomain
type ListPrebuiltEntityExtractor = original.ListPrebuiltEntityExtractor
+type ListRegexEntityExtractor = original.ListRegexEntityExtractor
type ListString = original.ListString
type ListUUID = original.ListUUID
type ListVersionInfo = original.ListVersionInfo
@@ -204,8 +322,16 @@ type ModelTrainingInfo = original.ModelTrainingInfo
type ModelUpdateObject = original.ModelUpdateObject
type OperationError = original.OperationError
type OperationStatus = original.OperationStatus
+type PatternAny = original.PatternAny
+type PatternAnyEntityExtractor = original.PatternAnyEntityExtractor
+type PatternAnyModelCreateObject = original.PatternAnyModelCreateObject
+type PatternAnyModelUpdateObject = original.PatternAnyModelUpdateObject
type PatternCreateObject = original.PatternCreateObject
type PatternFeatureInfo = original.PatternFeatureInfo
+type PatternRule = original.PatternRule
+type PatternRuleCreateObject = original.PatternRuleCreateObject
+type PatternRuleInfo = original.PatternRuleInfo
+type PatternRuleUpdateObject = original.PatternRuleUpdateObject
type PatternUpdateObject = original.PatternUpdateObject
type PersonalAssistantsResponse = original.PersonalAssistantsResponse
type PhraselistCreateObject = original.PhraselistCreateObject
@@ -216,9 +342,15 @@ type PrebuiltDomainCreateBaseObject = original.PrebuiltDomainCreateBaseObject
type PrebuiltDomainCreateObject = original.PrebuiltDomainCreateObject
type PrebuiltDomainItem = original.PrebuiltDomainItem
type PrebuiltDomainModelCreateObject = original.PrebuiltDomainModelCreateObject
+type PrebuiltDomainObject = original.PrebuiltDomainObject
+type PrebuiltEntity = original.PrebuiltEntity
type PrebuiltEntityExtractor = original.PrebuiltEntityExtractor
type ProductionOrStagingEndpointInfo = original.ProductionOrStagingEndpointInfo
type ReadCloser = original.ReadCloser
+type RegexEntity = original.RegexEntity
+type RegexEntityExtractor = original.RegexEntityExtractor
+type RegexModelCreateObject = original.RegexModelCreateObject
+type RegexModelUpdateObject = original.RegexModelUpdateObject
type SetString = original.SetString
type String = original.String
type SubClosedList = original.SubClosedList
@@ -230,6 +362,7 @@ type UUID = original.UUID
type VersionInfo = original.VersionInfo
type WordListBaseUpdateObject = original.WordListBaseUpdateObject
type WordListObject = original.WordListObject
+type PatternClient = original.PatternClient
type PermissionsClient = original.PermissionsClient
type TrainClient = original.TrainClient
type VersionsClient = original.VersionsClient
@@ -264,12 +397,33 @@ func PossibleReadableTypeValues() []ReadableType {
func PossibleReadableType1Values() []ReadableType1 {
return original.PossibleReadableType1Values()
}
+func PossibleReadableType10Values() []ReadableType10 {
+ return original.PossibleReadableType10Values()
+}
func PossibleReadableType2Values() []ReadableType2 {
return original.PossibleReadableType2Values()
}
func PossibleReadableType3Values() []ReadableType3 {
return original.PossibleReadableType3Values()
}
+func PossibleReadableType4Values() []ReadableType4 {
+ return original.PossibleReadableType4Values()
+}
+func PossibleReadableType5Values() []ReadableType5 {
+ return original.PossibleReadableType5Values()
+}
+func PossibleReadableType6Values() []ReadableType6 {
+ return original.PossibleReadableType6Values()
+}
+func PossibleReadableType7Values() []ReadableType7 {
+ return original.PossibleReadableType7Values()
+}
+func PossibleReadableType8Values() []ReadableType8 {
+ return original.PossibleReadableType8Values()
+}
+func PossibleReadableType9Values() []ReadableType9 {
+ return original.PossibleReadableType9Values()
+}
func PossibleStatusValues() []Status {
return original.PossibleStatusValues()
}
@@ -279,6 +433,9 @@ func PossibleStatus1Values() []Status1 {
func PossibleTrainingStatusValues() []TrainingStatus {
return original.PossibleTrainingStatusValues()
}
+func NewPatternClient(azureRegion AzureRegions) PatternClient {
+ return original.NewPatternClient(azureRegion)
+}
func NewPermissionsClient(azureRegion AzureRegions) PermissionsClient {
return original.NewPermissionsClient(azureRegion)
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/compute/mgmt/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/compute/mgmt/compute/models.go
index 198ee2052..0b7b12da2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/compute/mgmt/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/compute/mgmt/compute/models.go
@@ -486,12 +486,11 @@ const (
)
type AccessURI = original.AccessURI
-type AccessURIOutput = original.AccessURIOutput
-type AccessURIRaw = original.AccessURIRaw
type AdditionalUnattendContent = original.AdditionalUnattendContent
type APIEntityReference = original.APIEntityReference
type APIError = original.APIError
type APIErrorBase = original.APIErrorBase
+type AutoOSUpgradePolicy = original.AutoOSUpgradePolicy
type AvailabilitySet = original.AvailabilitySet
type AvailabilitySetListResult = original.AvailabilitySetListResult
type AvailabilitySetProperties = original.AvailabilitySetProperties
@@ -597,7 +596,6 @@ type ResourceSkuRestrictions = original.ResourceSkuRestrictions
type ResourceSkusResult = original.ResourceSkusResult
type ResourceSkusResultIterator = original.ResourceSkusResultIterator
type ResourceSkusResultPage = original.ResourceSkusResultPage
-type ResourceUpdate = original.ResourceUpdate
type RollbackStatusInfo = original.RollbackStatusInfo
type RollingUpgradePolicy = original.RollingUpgradePolicy
type RollingUpgradeProgressInfo = original.RollingUpgradeProgressInfo
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/consumption/mgmt/consumption/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/consumption/mgmt/consumption/models.go
index 8ebf23e92..cf86760f7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/consumption/mgmt/consumption/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/consumption/mgmt/consumption/models.go
@@ -19,144 +19,70 @@
package consumption
-import original "github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption"
-
-type BudgetsClient = original.BudgetsClient
+import original "github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption"
const (
DefaultBaseURI = original.DefaultBaseURI
)
type BaseClient = original.BaseClient
-type CostTagsClient = original.CostTagsClient
-type MarketplacesClient = original.MarketplacesClient
-type CategoryType = original.CategoryType
+type ForecastsClient = original.ForecastsClient
+type Bound = original.Bound
const (
- Cost CategoryType = original.Cost
- Usage CategoryType = original.Usage
+ Lower Bound = original.Lower
+ Upper Bound = original.Upper
)
-type Datagrain = original.Datagrain
+type ChargeType = original.ChargeType
const (
- DailyGrain Datagrain = original.DailyGrain
- MonthlyGrain Datagrain = original.MonthlyGrain
+ ChargeTypeActual ChargeType = original.ChargeTypeActual
+ ChargeTypeForecast ChargeType = original.ChargeTypeForecast
)
-type OperatorType = original.OperatorType
+type Grain = original.Grain
const (
- EqualTo OperatorType = original.EqualTo
- GreaterThan OperatorType = original.GreaterThan
- GreaterThanOrEqualTo OperatorType = original.GreaterThanOrEqualTo
+ Daily Grain = original.Daily
+ Monthly Grain = original.Monthly
+ Yearly Grain = original.Yearly
)
-type TimeGrainType = original.TimeGrainType
-
-const (
- Annually TimeGrainType = original.Annually
- Monthly TimeGrainType = original.Monthly
- Quarterly TimeGrainType = original.Quarterly
-)
-
-type Budget = original.Budget
-type BudgetProperties = original.BudgetProperties
-type BudgetsListResult = original.BudgetsListResult
-type BudgetsListResultIterator = original.BudgetsListResultIterator
-type BudgetsListResultPage = original.BudgetsListResultPage
-type BudgetTimePeriod = original.BudgetTimePeriod
-type CostTag = original.CostTag
-type CostTagProperties = original.CostTagProperties
-type CostTags = original.CostTags
-type CurrentSpend = original.CurrentSpend
type ErrorDetails = original.ErrorDetails
type ErrorResponse = original.ErrorResponse
-type Filters = original.Filters
-type Marketplace = original.Marketplace
-type MarketplaceProperties = original.MarketplaceProperties
-type MarketplacesListResult = original.MarketplacesListResult
-type MarketplacesListResultIterator = original.MarketplacesListResultIterator
-type MarketplacesListResultPage = original.MarketplacesListResultPage
-type MeterDetails = original.MeterDetails
-type Notification = original.Notification
+type Forecast = original.Forecast
+type ForecastProperties = original.ForecastProperties
+type ForecastPropertiesConfidenceLevelsItem = original.ForecastPropertiesConfidenceLevelsItem
+type ForecastsListResult = original.ForecastsListResult
type Operation = original.Operation
type OperationDisplay = original.OperationDisplay
type OperationListResult = original.OperationListResult
type OperationListResultIterator = original.OperationListResultIterator
type OperationListResultPage = original.OperationListResultPage
-type PriceSheetModel = original.PriceSheetModel
-type PriceSheetProperties = original.PriceSheetProperties
-type PriceSheetResult = original.PriceSheetResult
-type ProxyResource = original.ProxyResource
-type ReservationDetails = original.ReservationDetails
-type ReservationDetailsListResult = original.ReservationDetailsListResult
-type ReservationDetailsListResultIterator = original.ReservationDetailsListResultIterator
-type ReservationDetailsListResultPage = original.ReservationDetailsListResultPage
-type ReservationDetailsProperties = original.ReservationDetailsProperties
-type ReservationRecommendations = original.ReservationRecommendations
-type ReservationRecommendationsListResult = original.ReservationRecommendationsListResult
-type ReservationRecommendationsListResultIterator = original.ReservationRecommendationsListResultIterator
-type ReservationRecommendationsListResultPage = original.ReservationRecommendationsListResultPage
-type ReservationRecommendationsProperties = original.ReservationRecommendationsProperties
-type ReservationSummaries = original.ReservationSummaries
-type ReservationSummariesListResult = original.ReservationSummariesListResult
-type ReservationSummariesListResultIterator = original.ReservationSummariesListResultIterator
-type ReservationSummariesListResultPage = original.ReservationSummariesListResultPage
-type ReservationSummariesProperties = original.ReservationSummariesProperties
type Resource = original.Resource
-type ResourceAttributes = original.ResourceAttributes
-type Tag = original.Tag
-type TagProperties = original.TagProperties
-type Tags = original.Tags
-type UsageDetail = original.UsageDetail
-type UsageDetailProperties = original.UsageDetailProperties
-type UsageDetailsListResult = original.UsageDetailsListResult
-type UsageDetailsListResultIterator = original.UsageDetailsListResultIterator
-type UsageDetailsListResultPage = original.UsageDetailsListResultPage
type OperationsClient = original.OperationsClient
-type PriceSheetClient = original.PriceSheetClient
-type ReservationRecommendationsClient = original.ReservationRecommendationsClient
-type ReservationsDetailsClient = original.ReservationsDetailsClient
-type ReservationsSummariesClient = original.ReservationsSummariesClient
-type TagsClient = original.TagsClient
-type UsageDetailsClient = original.UsageDetailsClient
-func NewBudgetsClient(subscriptionID string) BudgetsClient {
- return original.NewBudgetsClient(subscriptionID)
-}
-func NewBudgetsClientWithBaseURI(baseURI string, subscriptionID string) BudgetsClient {
- return original.NewBudgetsClientWithBaseURI(baseURI, subscriptionID)
-}
func New(subscriptionID string) BaseClient {
return original.New(subscriptionID)
}
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return original.NewWithBaseURI(baseURI, subscriptionID)
}
-func NewCostTagsClient(subscriptionID string) CostTagsClient {
- return original.NewCostTagsClient(subscriptionID)
+func NewForecastsClient(subscriptionID string) ForecastsClient {
+ return original.NewForecastsClient(subscriptionID)
}
-func NewCostTagsClientWithBaseURI(baseURI string, subscriptionID string) CostTagsClient {
- return original.NewCostTagsClientWithBaseURI(baseURI, subscriptionID)
+func NewForecastsClientWithBaseURI(baseURI string, subscriptionID string) ForecastsClient {
+ return original.NewForecastsClientWithBaseURI(baseURI, subscriptionID)
}
-func NewMarketplacesClient(subscriptionID string) MarketplacesClient {
- return original.NewMarketplacesClient(subscriptionID)
+func PossibleBoundValues() []Bound {
+ return original.PossibleBoundValues()
}
-func NewMarketplacesClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesClient {
- return original.NewMarketplacesClientWithBaseURI(baseURI, subscriptionID)
+func PossibleChargeTypeValues() []ChargeType {
+ return original.PossibleChargeTypeValues()
}
-func PossibleCategoryTypeValues() []CategoryType {
- return original.PossibleCategoryTypeValues()
-}
-func PossibleDatagrainValues() []Datagrain {
- return original.PossibleDatagrainValues()
-}
-func PossibleOperatorTypeValues() []OperatorType {
- return original.PossibleOperatorTypeValues()
-}
-func PossibleTimeGrainTypeValues() []TimeGrainType {
- return original.PossibleTimeGrainTypeValues()
+func PossibleGrainValues() []Grain {
+ return original.PossibleGrainValues()
}
func NewOperationsClient(subscriptionID string) OperationsClient {
return original.NewOperationsClient(subscriptionID)
@@ -164,42 +90,6 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID)
}
-func NewPriceSheetClient(subscriptionID string) PriceSheetClient {
- return original.NewPriceSheetClient(subscriptionID)
-}
-func NewPriceSheetClientWithBaseURI(baseURI string, subscriptionID string) PriceSheetClient {
- return original.NewPriceSheetClientWithBaseURI(baseURI, subscriptionID)
-}
-func NewReservationRecommendationsClient(subscriptionID string) ReservationRecommendationsClient {
- return original.NewReservationRecommendationsClient(subscriptionID)
-}
-func NewReservationRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) ReservationRecommendationsClient {
- return original.NewReservationRecommendationsClientWithBaseURI(baseURI, subscriptionID)
-}
-func NewReservationsDetailsClient(subscriptionID string) ReservationsDetailsClient {
- return original.NewReservationsDetailsClient(subscriptionID)
-}
-func NewReservationsDetailsClientWithBaseURI(baseURI string, subscriptionID string) ReservationsDetailsClient {
- return original.NewReservationsDetailsClientWithBaseURI(baseURI, subscriptionID)
-}
-func NewReservationsSummariesClient(subscriptionID string) ReservationsSummariesClient {
- return original.NewReservationsSummariesClient(subscriptionID)
-}
-func NewReservationsSummariesClientWithBaseURI(baseURI string, subscriptionID string) ReservationsSummariesClient {
- return original.NewReservationsSummariesClientWithBaseURI(baseURI, subscriptionID)
-}
-func NewTagsClient(subscriptionID string) TagsClient {
- return original.NewTagsClient(subscriptionID)
-}
-func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient {
- return original.NewTagsClientWithBaseURI(baseURI, subscriptionID)
-}
-func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient {
- return original.NewUsageDetailsClient(subscriptionID)
-}
-func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsClient {
- return original.NewUsageDetailsClientWithBaseURI(baseURI, subscriptionID)
-}
func UserAgent() string {
return original.UserAgent() + " profiles/preview"
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/containerinstance/mgmt/containerinstance/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/containerinstance/mgmt/containerinstance/models.go
index 9a45b0101..143fd9a09 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/containerinstance/mgmt/containerinstance/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/containerinstance/mgmt/containerinstance/models.go
@@ -19,7 +19,7 @@
package containerinstance
-import original "github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-04-01/containerinstance"
+import original "github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance"
const (
DefaultBaseURI = original.DefaultBaseURI
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/containerservice/mgmt/containerservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/containerservice/mgmt/containerservice/models.go
index b5a51aead..78a104f10 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/containerservice/mgmt/containerservice/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/containerservice/mgmt/containerservice/models.go
@@ -55,7 +55,6 @@ const (
type VMSizeTypes = original.VMSizeTypes
const (
- StandardA0 VMSizeTypes = original.StandardA0
StandardA1 VMSizeTypes = original.StandardA1
StandardA10 VMSizeTypes = original.StandardA10
StandardA11 VMSizeTypes = original.StandardA11
@@ -74,8 +73,6 @@ const (
StandardA8mV2 VMSizeTypes = original.StandardA8mV2
StandardA8V2 VMSizeTypes = original.StandardA8V2
StandardA9 VMSizeTypes = original.StandardA9
- StandardB1ms VMSizeTypes = original.StandardB1ms
- StandardB1s VMSizeTypes = original.StandardB1s
StandardB2ms VMSizeTypes = original.StandardB2ms
StandardB2s VMSizeTypes = original.StandardB2s
StandardB4ms VMSizeTypes = original.StandardB4ms
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cosmos-db/mgmt/documentdb/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cosmos-db/mgmt/documentdb/models.go
index 673d393d8..766894588 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cosmos-db/mgmt/documentdb/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/cosmos-db/mgmt/documentdb/models.go
@@ -106,8 +106,11 @@ type DatabaseAccountsCreateOrUpdateFuture = original.DatabaseAccountsCreateOrUpd
type DatabaseAccountsDeleteFuture = original.DatabaseAccountsDeleteFuture
type DatabaseAccountsFailoverPriorityChangeFuture = original.DatabaseAccountsFailoverPriorityChangeFuture
type DatabaseAccountsListResult = original.DatabaseAccountsListResult
+type DatabaseAccountsOfflineRegionFuture = original.DatabaseAccountsOfflineRegionFuture
+type DatabaseAccountsOnlineRegionFuture = original.DatabaseAccountsOnlineRegionFuture
type DatabaseAccountsPatchFuture = original.DatabaseAccountsPatchFuture
type DatabaseAccountsRegenerateKeyFuture = original.DatabaseAccountsRegenerateKeyFuture
+type ErrorResponse = original.ErrorResponse
type FailoverPolicies = original.FailoverPolicies
type FailoverPolicy = original.FailoverPolicy
type Location = original.Location
@@ -130,6 +133,7 @@ type PartitionUsagesResult = original.PartitionUsagesResult
type PercentileMetric = original.PercentileMetric
type PercentileMetricListResult = original.PercentileMetricListResult
type PercentileMetricValue = original.PercentileMetricValue
+type RegionForOnlineOffline = original.RegionForOnlineOffline
type Resource = original.Resource
type Usage = original.Usage
type UsagesResult = original.UsagesResult
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/databricks/mgmt/databricks/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/databricks/mgmt/databricks/models.go
index 4627ddb9f..ae0c76e2c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/databricks/mgmt/databricks/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/databricks/mgmt/databricks/models.go
@@ -45,6 +45,11 @@ const (
type ErrorDetail = original.ErrorDetail
type ErrorInfo = original.ErrorInfo
type ErrorResponse = original.ErrorResponse
+type Operation = original.Operation
+type OperationDisplay = original.OperationDisplay
+type OperationListResult = original.OperationListResult
+type OperationListResultIterator = original.OperationListResultIterator
+type OperationListResultPage = original.OperationListResultPage
type Resource = original.Resource
type Sku = original.Sku
type TrackedResource = original.TrackedResource
@@ -58,6 +63,7 @@ type WorkspacesCreateOrUpdateFuture = original.WorkspacesCreateOrUpdateFuture
type WorkspacesDeleteFuture = original.WorkspacesDeleteFuture
type WorkspacesUpdateFuture = original.WorkspacesUpdateFuture
type WorkspaceUpdate = original.WorkspaceUpdate
+type OperationsClient = original.OperationsClient
type WorkspacesClient = original.WorkspacesClient
func New(subscriptionID string) BaseClient {
@@ -69,6 +75,12 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
func PossibleProvisioningStateValues() []ProvisioningState {
return original.PossibleProvisioningStateValues()
}
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return original.NewOperationsClient(subscriptionID)
+}
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID)
+}
func UserAgent() string {
return original.UserAgent() + " profiles/preview"
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/datafactory/mgmt/datafactory/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/datafactory/mgmt/datafactory/models.go
index 410701dd9..6214614e7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/datafactory/mgmt/datafactory/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/datafactory/mgmt/datafactory/models.go
@@ -987,7 +987,9 @@ type FactoryListResponse = original.FactoryListResponse
type FactoryListResponseIterator = original.FactoryListResponseIterator
type FactoryListResponsePage = original.FactoryListResponsePage
type FactoryProperties = original.FactoryProperties
+type FactoryRepoUpdate = original.FactoryRepoUpdate
type FactoryUpdateParameters = original.FactoryUpdateParameters
+type FactoryVSTSConfiguration = original.FactoryVSTSConfiguration
type FileServerLinkedService = original.FileServerLinkedService
type FileServerLinkedServiceTypeProperties = original.FileServerLinkedServiceTypeProperties
type FileShareDataset = original.FileShareDataset
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/datalake/analytics/catalog/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/datalake/analytics/catalog/models.go
index 4a11d0d26..92aa93a18 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/datalake/analytics/catalog/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/datalake/analytics/catalog/models.go
@@ -122,6 +122,7 @@ type USQLTablePartition = original.USQLTablePartition
type USQLTablePartitionList = original.USQLTablePartitionList
type USQLTablePartitionListIterator = original.USQLTablePartitionListIterator
type USQLTablePartitionListPage = original.USQLTablePartitionListPage
+type USQLTablePreview = original.USQLTablePreview
type USQLTableStatistics = original.USQLTableStatistics
type USQLTableStatisticsList = original.USQLTableStatisticsList
type USQLTableStatisticsListIterator = original.USQLTableStatisticsListIterator
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/datalake/store/mgmt/account/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/datalake/store/mgmt/account/models.go
index f7bdd891a..06280f09c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/datalake/store/mgmt/account/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/datalake/store/mgmt/account/models.go
@@ -137,7 +137,10 @@ type CreateOrUpdateFirewallRuleParameters = original.CreateOrUpdateFirewallRuleP
type CreateOrUpdateFirewallRuleProperties = original.CreateOrUpdateFirewallRuleProperties
type CreateOrUpdateTrustedIDProviderParameters = original.CreateOrUpdateTrustedIDProviderParameters
type CreateOrUpdateTrustedIDProviderProperties = original.CreateOrUpdateTrustedIDProviderProperties
+type CreateOrUpdateVirtualNetworkRuleParameters = original.CreateOrUpdateVirtualNetworkRuleParameters
+type CreateOrUpdateVirtualNetworkRuleProperties = original.CreateOrUpdateVirtualNetworkRuleProperties
type CreateTrustedIDProviderWithAccountParameters = original.CreateTrustedIDProviderWithAccountParameters
+type CreateVirtualNetworkRuleWithAccountParameters = original.CreateVirtualNetworkRuleWithAccountParameters
type DataLakeStoreAccount = original.DataLakeStoreAccount
type DataLakeStoreAccountBasic = original.DataLakeStoreAccountBasic
type DataLakeStoreAccountListResult = original.DataLakeStoreAccountListResult
@@ -174,8 +177,17 @@ type UpdateKeyVaultMetaInfo = original.UpdateKeyVaultMetaInfo
type UpdateTrustedIDProviderParameters = original.UpdateTrustedIDProviderParameters
type UpdateTrustedIDProviderProperties = original.UpdateTrustedIDProviderProperties
type UpdateTrustedIDProviderWithAccountParameters = original.UpdateTrustedIDProviderWithAccountParameters
+type UpdateVirtualNetworkRuleParameters = original.UpdateVirtualNetworkRuleParameters
+type UpdateVirtualNetworkRuleProperties = original.UpdateVirtualNetworkRuleProperties
+type UpdateVirtualNetworkRuleWithAccountParameters = original.UpdateVirtualNetworkRuleWithAccountParameters
+type VirtualNetworkRule = original.VirtualNetworkRule
+type VirtualNetworkRuleListResult = original.VirtualNetworkRuleListResult
+type VirtualNetworkRuleListResultIterator = original.VirtualNetworkRuleListResultIterator
+type VirtualNetworkRuleListResultPage = original.VirtualNetworkRuleListResultPage
+type VirtualNetworkRuleProperties = original.VirtualNetworkRuleProperties
type OperationsClient = original.OperationsClient
type TrustedIDProvidersClient = original.TrustedIDProvidersClient
+type VirtualNetworkRulesClient = original.VirtualNetworkRulesClient
func NewAccountsClient(subscriptionID string) AccountsClient {
return original.NewAccountsClient(subscriptionID)
@@ -252,3 +264,9 @@ func UserAgent() string {
func Version() string {
return original.Version()
}
+func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClient {
+ return original.NewVirtualNetworkRulesClient(subscriptionID)
+}
+func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient {
+ return original.NewVirtualNetworkRulesClientWithBaseURI(baseURI, subscriptionID)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/eventgrid/eventgrid/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/eventgrid/eventgrid/models.go
index 5c7b6bb2e..b262413c0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/eventgrid/eventgrid/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/eventgrid/eventgrid/models.go
@@ -22,6 +22,18 @@ package eventgrid
import original "github.com/Azure/azure-sdk-for-go/services/eventgrid/2018-01-01/eventgrid"
type BaseClient = original.BaseClient
+type JobState = original.JobState
+
+const (
+ Canceled JobState = original.Canceled
+ Canceling JobState = original.Canceling
+ Error JobState = original.Error
+ Finished JobState = original.Finished
+ Processing JobState = original.Processing
+ Queued JobState = original.Queued
+ Scheduled JobState = original.Scheduled
+)
+
type ContainerRegistryEventActor = original.ContainerRegistryEventActor
type ContainerRegistryEventData = original.ContainerRegistryEventData
type ContainerRegistryEventRequest = original.ContainerRegistryEventRequest
@@ -39,14 +51,20 @@ type Event = original.Event
type EventHubCaptureFileCreatedEventData = original.EventHubCaptureFileCreatedEventData
type IotHubDeviceCreatedEventData = original.IotHubDeviceCreatedEventData
type IotHubDeviceDeletedEventData = original.IotHubDeviceDeletedEventData
+type MediaJobStateChangeEventData = original.MediaJobStateChangeEventData
type ResourceDeleteCancelData = original.ResourceDeleteCancelData
type ResourceDeleteFailureData = original.ResourceDeleteFailureData
type ResourceDeleteSuccessData = original.ResourceDeleteSuccessData
type ResourceWriteCancelData = original.ResourceWriteCancelData
type ResourceWriteFailureData = original.ResourceWriteFailureData
type ResourceWriteSuccessData = original.ResourceWriteSuccessData
+type ServiceBusActiveMessagesAvailableWithNoListenersEventData = original.ServiceBusActiveMessagesAvailableWithNoListenersEventData
+type ServiceBusDeadletterMessagesAvailableWithNoListenersEventData = original.ServiceBusDeadletterMessagesAvailableWithNoListenersEventData
type StorageBlobCreatedEventData = original.StorageBlobCreatedEventData
type StorageBlobDeletedEventData = original.StorageBlobDeletedEventData
+type SubscriptionDeletedEventData = original.SubscriptionDeletedEventData
+type SubscriptionValidationEventData = original.SubscriptionValidationEventData
+type SubscriptionValidationResponse = original.SubscriptionValidationResponse
func New() BaseClient {
return original.New()
@@ -54,6 +72,9 @@ func New() BaseClient {
func NewWithoutDefaults() BaseClient {
return original.NewWithoutDefaults()
}
+func PossibleJobStateValues() []JobState {
+ return original.PossibleJobStateValues()
+}
func UserAgent() string {
return original.UserAgent() + " profiles/preview"
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/iothub/mgmt/devices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/iothub/mgmt/devices/models.go
index 285ab2b31..bede53555 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/iothub/mgmt/devices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/iothub/mgmt/devices/models.go
@@ -56,6 +56,15 @@ const (
None Capabilities = original.None
)
+type EndpointHealthStatus = original.EndpointHealthStatus
+
+const (
+ Dead EndpointHealthStatus = original.Dead
+ Healthy EndpointHealthStatus = original.Healthy
+ Unhealthy EndpointHealthStatus = original.Unhealthy
+ Unknown EndpointHealthStatus = original.Unknown
+)
+
type IotHubNameUnavailabilityReason = original.IotHubNameUnavailabilityReason
const (
@@ -101,12 +110,12 @@ const (
type JobStatus = original.JobStatus
const (
- Cancelled JobStatus = original.Cancelled
- Completed JobStatus = original.Completed
- Enqueued JobStatus = original.Enqueued
- Failed JobStatus = original.Failed
- Running JobStatus = original.Running
- Unknown JobStatus = original.Unknown
+ JobStatusCancelled JobStatus = original.JobStatusCancelled
+ JobStatusCompleted JobStatus = original.JobStatusCompleted
+ JobStatusEnqueued JobStatus = original.JobStatusEnqueued
+ JobStatusFailed JobStatus = original.JobStatusFailed
+ JobStatusRunning JobStatus = original.JobStatusRunning
+ JobStatusUnknown JobStatus = original.JobStatusUnknown
)
type JobType = original.JobType
@@ -133,13 +142,29 @@ const (
OperationMonitoringLevelNone OperationMonitoringLevel = original.OperationMonitoringLevelNone
)
+type RouteErrorSeverity = original.RouteErrorSeverity
+
+const (
+ Error RouteErrorSeverity = original.Error
+ Warning RouteErrorSeverity = original.Warning
+)
+
type RoutingSource = original.RoutingSource
const (
- DeviceJobLifecycleEvents RoutingSource = original.DeviceJobLifecycleEvents
- DeviceLifecycleEvents RoutingSource = original.DeviceLifecycleEvents
- DeviceMessages RoutingSource = original.DeviceMessages
- TwinChangeEvents RoutingSource = original.TwinChangeEvents
+ RoutingSourceDeviceJobLifecycleEvents RoutingSource = original.RoutingSourceDeviceJobLifecycleEvents
+ RoutingSourceDeviceLifecycleEvents RoutingSource = original.RoutingSourceDeviceLifecycleEvents
+ RoutingSourceDeviceMessages RoutingSource = original.RoutingSourceDeviceMessages
+ RoutingSourceInvalid RoutingSource = original.RoutingSourceInvalid
+ RoutingSourceTwinChangeEvents RoutingSource = original.RoutingSourceTwinChangeEvents
+)
+
+type TestResultStatus = original.TestResultStatus
+
+const (
+ False TestResultStatus = original.False
+ True TestResultStatus = original.True
+ Undefined TestResultStatus = original.Undefined
)
type CertificateBodyDescription = original.CertificateBodyDescription
@@ -150,6 +175,10 @@ type CertificatePropertiesWithNonce = original.CertificatePropertiesWithNonce
type CertificateVerificationDescription = original.CertificateVerificationDescription
type CertificateWithNonceDescription = original.CertificateWithNonceDescription
type CloudToDeviceProperties = original.CloudToDeviceProperties
+type EndpointHealthData = original.EndpointHealthData
+type EndpointHealthDataListResult = original.EndpointHealthDataListResult
+type EndpointHealthDataListResultIterator = original.EndpointHealthDataListResultIterator
+type EndpointHealthDataListResultPage = original.EndpointHealthDataListResultPage
type ErrorDetails = original.ErrorDetails
type EventHubConsumerGroupInfo = original.EventHubConsumerGroupInfo
type EventHubConsumerGroupsListResult = original.EventHubConsumerGroupsListResult
@@ -184,7 +213,9 @@ type JobResponse = original.JobResponse
type JobResponseListResult = original.JobResponseListResult
type JobResponseListResultIterator = original.JobResponseListResultIterator
type JobResponseListResultPage = original.JobResponseListResultPage
+type MatchedRoute = original.MatchedRoute
type MessagingEndpointProperties = original.MessagingEndpointProperties
+type Name = original.Name
type Operation = original.Operation
type OperationDisplay = original.OperationDisplay
type OperationInputs = original.OperationInputs
@@ -194,9 +225,13 @@ type OperationListResultPage = original.OperationListResultPage
type OperationsMonitoringProperties = original.OperationsMonitoringProperties
type RegistryStatistics = original.RegistryStatistics
type Resource = original.Resource
+type RouteCompilationError = original.RouteCompilationError
+type RouteErrorPosition = original.RouteErrorPosition
+type RouteErrorRange = original.RouteErrorRange
type RouteProperties = original.RouteProperties
type RoutingEndpoints = original.RoutingEndpoints
type RoutingEventHubProperties = original.RoutingEventHubProperties
+type RoutingMessage = original.RoutingMessage
type RoutingProperties = original.RoutingProperties
type RoutingServiceBusQueueEndpointProperties = original.RoutingServiceBusQueueEndpointProperties
type RoutingServiceBusTopicEndpointProperties = original.RoutingServiceBusTopicEndpointProperties
@@ -208,7 +243,15 @@ type SharedAccessSignatureAuthorizationRuleListResultIterator = original.SharedA
type SharedAccessSignatureAuthorizationRuleListResultPage = original.SharedAccessSignatureAuthorizationRuleListResultPage
type StorageEndpointProperties = original.StorageEndpointProperties
type TagsResource = original.TagsResource
+type TestAllRoutesInput = original.TestAllRoutesInput
+type TestAllRoutesResult = original.TestAllRoutesResult
+type TestRouteInput = original.TestRouteInput
+type TestRouteResult = original.TestRouteResult
+type TestRouteResultDetails = original.TestRouteResultDetails
+type UserSubscriptionQuota = original.UserSubscriptionQuota
+type UserSubscriptionQuotaListResult = original.UserSubscriptionQuotaListResult
type OperationsClient = original.OperationsClient
+type ResourceProviderCommonClient = original.ResourceProviderCommonClient
func NewCertificatesClient(subscriptionID string) CertificatesClient {
return original.NewCertificatesClient(subscriptionID)
@@ -234,6 +277,9 @@ func PossibleAccessRightsValues() []AccessRights {
func PossibleCapabilitiesValues() []Capabilities {
return original.PossibleCapabilitiesValues()
}
+func PossibleEndpointHealthStatusValues() []EndpointHealthStatus {
+ return original.PossibleEndpointHealthStatusValues()
+}
func PossibleIotHubNameUnavailabilityReasonValues() []IotHubNameUnavailabilityReason {
return original.PossibleIotHubNameUnavailabilityReasonValues()
}
@@ -258,15 +304,27 @@ func PossibleJobTypeValues() []JobType {
func PossibleOperationMonitoringLevelValues() []OperationMonitoringLevel {
return original.PossibleOperationMonitoringLevelValues()
}
+func PossibleRouteErrorSeverityValues() []RouteErrorSeverity {
+ return original.PossibleRouteErrorSeverityValues()
+}
func PossibleRoutingSourceValues() []RoutingSource {
return original.PossibleRoutingSourceValues()
}
+func PossibleTestResultStatusValues() []TestResultStatus {
+ return original.PossibleTestResultStatusValues()
+}
func NewOperationsClient(subscriptionID string) OperationsClient {
return original.NewOperationsClient(subscriptionID)
}
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID)
}
+func NewResourceProviderCommonClient(subscriptionID string) ResourceProviderCommonClient {
+ return original.NewResourceProviderCommonClient(subscriptionID)
+}
+func NewResourceProviderCommonClientWithBaseURI(baseURI string, subscriptionID string) ResourceProviderCommonClient {
+ return original.NewResourceProviderCommonClientWithBaseURI(baseURI, subscriptionID)
+}
func UserAgent() string {
return original.UserAgent() + " profiles/preview"
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/logic/mgmt/logic/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/logic/mgmt/logic/models.go
index c9bf4c1a2..71ac16117 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/logic/mgmt/logic/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/logic/mgmt/logic/models.go
@@ -29,15 +29,25 @@ const (
)
type BaseClient = original.BaseClient
+type IntegrationAccountAssembliesClient = original.IntegrationAccountAssembliesClient
+type IntegrationAccountBatchConfigurationsClient = original.IntegrationAccountBatchConfigurationsClient
type IntegrationAccountsClient = original.IntegrationAccountsClient
type MapsClient = original.MapsClient
+type AccessKeyType = original.AccessKeyType
+
+const (
+ NotSpecified AccessKeyType = original.NotSpecified
+ Primary AccessKeyType = original.Primary
+ Secondary AccessKeyType = original.Secondary
+)
+
type AgreementType = original.AgreementType
const (
- AS2 AgreementType = original.AS2
- Edifact AgreementType = original.Edifact
- NotSpecified AgreementType = original.NotSpecified
- X12 AgreementType = original.X12
+ AgreementTypeAS2 AgreementType = original.AgreementTypeAS2
+ AgreementTypeEdifact AgreementType = original.AgreementTypeEdifact
+ AgreementTypeNotSpecified AgreementType = original.AgreementTypeNotSpecified
+ AgreementTypeX12 AgreementType = original.AgreementTypeX12
)
type DayOfWeek = original.DayOfWeek
@@ -104,6 +114,17 @@ const (
EncryptionAlgorithmRC2 EncryptionAlgorithm = original.EncryptionAlgorithmRC2
)
+type EventLevel = original.EventLevel
+
+const (
+ Critical EventLevel = original.Critical
+ Error EventLevel = original.Error
+ Informational EventLevel = original.Informational
+ LogAlways EventLevel = original.LogAlways
+ Verbose EventLevel = original.Verbose
+ Warning EventLevel = original.Warning
+)
+
type HashingAlgorithm = original.HashingAlgorithm
const (
@@ -220,6 +241,34 @@ const (
SkuNameStandard SkuName = original.SkuNameStandard
)
+type TrackEventsOperationOptions = original.TrackEventsOperationOptions
+
+const (
+ DisableSourceInfoEnrich TrackEventsOperationOptions = original.DisableSourceInfoEnrich
+ None TrackEventsOperationOptions = original.None
+)
+
+type TrackingRecordType = original.TrackingRecordType
+
+const (
+ TrackingRecordTypeAS2MDN TrackingRecordType = original.TrackingRecordTypeAS2MDN
+ TrackingRecordTypeAS2Message TrackingRecordType = original.TrackingRecordTypeAS2Message
+ TrackingRecordTypeCustom TrackingRecordType = original.TrackingRecordTypeCustom
+ TrackingRecordTypeEdifactFunctionalGroup TrackingRecordType = original.TrackingRecordTypeEdifactFunctionalGroup
+ TrackingRecordTypeEdifactFunctionalGroupAcknowledgment TrackingRecordType = original.TrackingRecordTypeEdifactFunctionalGroupAcknowledgment
+ TrackingRecordTypeEdifactInterchange TrackingRecordType = original.TrackingRecordTypeEdifactInterchange
+ TrackingRecordTypeEdifactInterchangeAcknowledgment TrackingRecordType = original.TrackingRecordTypeEdifactInterchangeAcknowledgment
+ TrackingRecordTypeEdifactTransactionSet TrackingRecordType = original.TrackingRecordTypeEdifactTransactionSet
+ TrackingRecordTypeEdifactTransactionSetAcknowledgment TrackingRecordType = original.TrackingRecordTypeEdifactTransactionSetAcknowledgment
+ TrackingRecordTypeNotSpecified TrackingRecordType = original.TrackingRecordTypeNotSpecified
+ TrackingRecordTypeX12FunctionalGroup TrackingRecordType = original.TrackingRecordTypeX12FunctionalGroup
+ TrackingRecordTypeX12FunctionalGroupAcknowledgment TrackingRecordType = original.TrackingRecordTypeX12FunctionalGroupAcknowledgment
+ TrackingRecordTypeX12Interchange TrackingRecordType = original.TrackingRecordTypeX12Interchange
+ TrackingRecordTypeX12InterchangeAcknowledgment TrackingRecordType = original.TrackingRecordTypeX12InterchangeAcknowledgment
+ TrackingRecordTypeX12TransactionSet TrackingRecordType = original.TrackingRecordTypeX12TransactionSet
+ TrackingRecordTypeX12TransactionSetAcknowledgment TrackingRecordType = original.TrackingRecordTypeX12TransactionSetAcknowledgment
+)
+
type TrailingSeparatorPolicy = original.TrailingSeparatorPolicy
const (
@@ -340,7 +389,10 @@ const (
X12TimeFormatNotSpecified X12TimeFormat = original.X12TimeFormatNotSpecified
)
+type AccessKeyRegenerateActionDefinition = original.AccessKeyRegenerateActionDefinition
type AgreementContent = original.AgreementContent
+type ArtifactContentPropertiesDefinition = original.ArtifactContentPropertiesDefinition
+type ArtifactProperties = original.ArtifactProperties
type AS2AcknowledgementConnectionSettings = original.AS2AcknowledgementConnectionSettings
type AS2AgreementContent = original.AS2AgreementContent
type AS2EnvelopeSettings = original.AS2EnvelopeSettings
@@ -351,7 +403,15 @@ type AS2OneWayAgreement = original.AS2OneWayAgreement
type AS2ProtocolSettings = original.AS2ProtocolSettings
type AS2SecuritySettings = original.AS2SecuritySettings
type AS2ValidationSettings = original.AS2ValidationSettings
+type AssemblyCollection = original.AssemblyCollection
+type AssemblyDefinition = original.AssemblyDefinition
+type AssemblyProperties = original.AssemblyProperties
+type AzureResourceErrorInfo = original.AzureResourceErrorInfo
type B2BPartnerContent = original.B2BPartnerContent
+type BatchConfiguration = original.BatchConfiguration
+type BatchConfigurationCollection = original.BatchConfigurationCollection
+type BatchConfigurationProperties = original.BatchConfigurationProperties
+type BatchReleaseCriteria = original.BatchReleaseCriteria
type BusinessIdentity = original.BusinessIdentity
type CallbackURL = original.CallbackURL
type ContentHash = original.ContentHash
@@ -371,8 +431,12 @@ type EdifactProtocolSettings = original.EdifactProtocolSettings
type EdifactSchemaReference = original.EdifactSchemaReference
type EdifactValidationOverride = original.EdifactValidationOverride
type EdifactValidationSettings = original.EdifactValidationSettings
+type ErrorInfo = original.ErrorInfo
type ErrorProperties = original.ErrorProperties
type ErrorResponse = original.ErrorResponse
+type Expression = original.Expression
+type ExpressionRoot = original.ExpressionRoot
+type ExpressionTraces = original.ExpressionTraces
type GenerateUpgradedDefinitionParameters = original.GenerateUpgradedDefinitionParameters
type GetCallbackURLParameters = original.GetCallbackURLParameters
type IntegrationAccount = original.IntegrationAccount
@@ -416,23 +480,38 @@ type IntegrationAccountSessionListResultIterator = original.IntegrationAccountSe
type IntegrationAccountSessionListResultPage = original.IntegrationAccountSessionListResultPage
type IntegrationAccountSessionProperties = original.IntegrationAccountSessionProperties
type IntegrationAccountSku = original.IntegrationAccountSku
+type JSONSchema = original.JSONSchema
+type KeyVaultKey = original.KeyVaultKey
+type KeyVaultKeyAttributes = original.KeyVaultKeyAttributes
+type KeyVaultKeyCollection = original.KeyVaultKeyCollection
type KeyVaultKeyReference = original.KeyVaultKeyReference
type KeyVaultKeyReferenceKeyVault = original.KeyVaultKeyReferenceKeyVault
+type KeyVaultReference = original.KeyVaultReference
+type ListKeyVaultKeysDefinition = original.ListKeyVaultKeysDefinition
type Operation = original.Operation
type OperationDisplay = original.OperationDisplay
type OperationListResult = original.OperationListResult
type OperationListResultIterator = original.OperationListResultIterator
type OperationListResultPage = original.OperationListResultPage
+type OperationResult = original.OperationResult
+type OperationResultProperties = original.OperationResultProperties
type PartnerContent = original.PartnerContent
type RecurrenceSchedule = original.RecurrenceSchedule
type RecurrenceScheduleOccurrence = original.RecurrenceScheduleOccurrence
type RegenerateActionParameter = original.RegenerateActionParameter
+type RepetitionIndex = original.RepetitionIndex
type Resource = original.Resource
type ResourceReference = original.ResourceReference
type RetryHistory = original.RetryHistory
+type RunActionCorrelation = original.RunActionCorrelation
+type RunCorrelation = original.RunCorrelation
type SetObject = original.SetObject
+type SetTriggerStateActionDefinition = original.SetTriggerStateActionDefinition
type Sku = original.Sku
type SubResource = original.SubResource
+type TrackingEvent = original.TrackingEvent
+type TrackingEventErrorInfo = original.TrackingEventErrorInfo
+type TrackingEventsDefinition = original.TrackingEventsDefinition
type Workflow = original.Workflow
type WorkflowFilter = original.WorkflowFilter
type WorkflowListResult = original.WorkflowListResult
@@ -448,6 +527,9 @@ type WorkflowRunActionListResult = original.WorkflowRunActionListResult
type WorkflowRunActionListResultIterator = original.WorkflowRunActionListResultIterator
type WorkflowRunActionListResultPage = original.WorkflowRunActionListResultPage
type WorkflowRunActionProperties = original.WorkflowRunActionProperties
+type WorkflowRunActionRepetitionDefinition = original.WorkflowRunActionRepetitionDefinition
+type WorkflowRunActionRepetitionDefinitionCollection = original.WorkflowRunActionRepetitionDefinitionCollection
+type WorkflowRunActionRepetitionProperties = original.WorkflowRunActionRepetitionProperties
type WorkflowRunFilter = original.WorkflowRunFilter
type WorkflowRunListResult = original.WorkflowRunListResult
type WorkflowRunListResultIterator = original.WorkflowRunListResultIterator
@@ -492,7 +574,10 @@ type X12ValidationSettings = original.X12ValidationSettings
type PartnersClient = original.PartnersClient
type SchemasClient = original.SchemasClient
type SessionsClient = original.SessionsClient
+type WorkflowRunActionRepetitionsClient = original.WorkflowRunActionRepetitionsClient
type WorkflowRunActionsClient = original.WorkflowRunActionsClient
+type WorkflowRunActionScopedRepetitionsClient = original.WorkflowRunActionScopedRepetitionsClient
+type WorkflowRunOperationsClient = original.WorkflowRunOperationsClient
type WorkflowRunsClient = original.WorkflowRunsClient
type WorkflowsClient = original.WorkflowsClient
type WorkflowTriggerHistoriesClient = original.WorkflowTriggerHistoriesClient
@@ -517,6 +602,18 @@ func New(subscriptionID string) BaseClient {
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return original.NewWithBaseURI(baseURI, subscriptionID)
}
+func NewIntegrationAccountAssembliesClient(subscriptionID string) IntegrationAccountAssembliesClient {
+ return original.NewIntegrationAccountAssembliesClient(subscriptionID)
+}
+func NewIntegrationAccountAssembliesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountAssembliesClient {
+ return original.NewIntegrationAccountAssembliesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewIntegrationAccountBatchConfigurationsClient(subscriptionID string) IntegrationAccountBatchConfigurationsClient {
+ return original.NewIntegrationAccountBatchConfigurationsClient(subscriptionID)
+}
+func NewIntegrationAccountBatchConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountBatchConfigurationsClient {
+ return original.NewIntegrationAccountBatchConfigurationsClientWithBaseURI(baseURI, subscriptionID)
+}
func NewIntegrationAccountsClient(subscriptionID string) IntegrationAccountsClient {
return original.NewIntegrationAccountsClient(subscriptionID)
}
@@ -529,6 +626,9 @@ func NewMapsClient(subscriptionID string) MapsClient {
func NewMapsClientWithBaseURI(baseURI string, subscriptionID string) MapsClient {
return original.NewMapsClientWithBaseURI(baseURI, subscriptionID)
}
+func PossibleAccessKeyTypeValues() []AccessKeyType {
+ return original.PossibleAccessKeyTypeValues()
+}
func PossibleAgreementTypeValues() []AgreementType {
return original.PossibleAgreementTypeValues()
}
@@ -547,6 +647,9 @@ func PossibleEdifactDecimalIndicatorValues() []EdifactDecimalIndicator {
func PossibleEncryptionAlgorithmValues() []EncryptionAlgorithm {
return original.PossibleEncryptionAlgorithmValues()
}
+func PossibleEventLevelValues() []EventLevel {
+ return original.PossibleEventLevelValues()
+}
func PossibleHashingAlgorithmValues() []HashingAlgorithm {
return original.PossibleHashingAlgorithmValues()
}
@@ -583,6 +686,12 @@ func PossibleSigningAlgorithmValues() []SigningAlgorithm {
func PossibleSkuNameValues() []SkuName {
return original.PossibleSkuNameValues()
}
+func PossibleTrackEventsOperationOptionsValues() []TrackEventsOperationOptions {
+ return original.PossibleTrackEventsOperationOptionsValues()
+}
+func PossibleTrackingRecordTypeValues() []TrackingRecordType {
+ return original.PossibleTrackingRecordTypeValues()
+}
func PossibleTrailingSeparatorPolicyValues() []TrailingSeparatorPolicy {
return original.PossibleTrailingSeparatorPolicyValues()
}
@@ -634,12 +743,30 @@ func UserAgent() string {
func Version() string {
return original.Version()
}
+func NewWorkflowRunActionRepetitionsClient(subscriptionID string) WorkflowRunActionRepetitionsClient {
+ return original.NewWorkflowRunActionRepetitionsClient(subscriptionID)
+}
+func NewWorkflowRunActionRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsClient {
+ return original.NewWorkflowRunActionRepetitionsClientWithBaseURI(baseURI, subscriptionID)
+}
func NewWorkflowRunActionsClient(subscriptionID string) WorkflowRunActionsClient {
return original.NewWorkflowRunActionsClient(subscriptionID)
}
func NewWorkflowRunActionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionsClient {
return original.NewWorkflowRunActionsClientWithBaseURI(baseURI, subscriptionID)
}
+func NewWorkflowRunActionScopedRepetitionsClient(subscriptionID string) WorkflowRunActionScopedRepetitionsClient {
+ return original.NewWorkflowRunActionScopedRepetitionsClient(subscriptionID)
+}
+func NewWorkflowRunActionScopedRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionScopedRepetitionsClient {
+ return original.NewWorkflowRunActionScopedRepetitionsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewWorkflowRunOperationsClient(subscriptionID string) WorkflowRunOperationsClient {
+ return original.NewWorkflowRunOperationsClient(subscriptionID)
+}
+func NewWorkflowRunOperationsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunOperationsClient {
+ return original.NewWorkflowRunOperationsClientWithBaseURI(baseURI, subscriptionID)
+}
func NewWorkflowRunsClient(subscriptionID string) WorkflowRunsClient {
return original.NewWorkflowRunsClient(subscriptionID)
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/machinelearning/mgmt/workspaces/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/machinelearning/mgmt/workspaces/models.go
new file mode 100644
index 000000000..6a4c09970
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/machinelearning/mgmt/workspaces/models.go
@@ -0,0 +1,96 @@
+// +build go1.9
+
+// Copyright 2018 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package workspaces
+
+import original "github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces"
+
+const (
+ DefaultBaseURI = original.DefaultBaseURI
+)
+
+type BaseClient = original.BaseClient
+type State = original.State
+
+const (
+ Deleted State = original.Deleted
+ Disabled State = original.Disabled
+ Enabled State = original.Enabled
+ Migrated State = original.Migrated
+ Registered State = original.Registered
+ Unregistered State = original.Unregistered
+ Updated State = original.Updated
+)
+
+type WorkspaceType = original.WorkspaceType
+
+const (
+ Anonymous WorkspaceType = original.Anonymous
+ Free WorkspaceType = original.Free
+ PaidPremium WorkspaceType = original.PaidPremium
+ PaidStandard WorkspaceType = original.PaidStandard
+ Production WorkspaceType = original.Production
+)
+
+type ErrorResponse = original.ErrorResponse
+type KeysResponse = original.KeysResponse
+type ListResult = original.ListResult
+type ListResultIterator = original.ListResultIterator
+type ListResultPage = original.ListResultPage
+type Operation = original.Operation
+type OperationDisplay = original.OperationDisplay
+type OperationListResult = original.OperationListResult
+type Properties = original.Properties
+type PropertiesUpdateParameters = original.PropertiesUpdateParameters
+type Resource = original.Resource
+type UpdateParameters = original.UpdateParameters
+type Workspace = original.Workspace
+type OperationsClient = original.OperationsClient
+type Client = original.Client
+
+func New(subscriptionID string) BaseClient {
+ return original.New(subscriptionID)
+}
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return original.NewWithBaseURI(baseURI, subscriptionID)
+}
+func PossibleStateValues() []State {
+ return original.PossibleStateValues()
+}
+func PossibleWorkspaceTypeValues() []WorkspaceType {
+ return original.PossibleWorkspaceTypeValues()
+}
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return original.NewOperationsClient(subscriptionID)
+}
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID)
+}
+func UserAgent() string {
+ return original.UserAgent() + " profiles/preview"
+}
+func Version() string {
+ return original.Version()
+}
+func NewClient(subscriptionID string) Client {
+ return original.NewClient(subscriptionID)
+}
+func NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
+ return original.NewClientWithBaseURI(baseURI, subscriptionID)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/maps/mgmt/maps/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/maps/mgmt/maps/models.go
new file mode 100644
index 000000000..32bfec789
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/maps/mgmt/maps/models.go
@@ -0,0 +1,73 @@
+// +build go1.9
+
+// Copyright 2018 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package maps
+
+import original "github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps"
+
+type AccountsClient = original.AccountsClient
+
+const (
+ DefaultBaseURI = original.DefaultBaseURI
+)
+
+type BaseClient = original.BaseClient
+type KeyType = original.KeyType
+
+const (
+ Primary KeyType = original.Primary
+ Secondary KeyType = original.Secondary
+)
+
+type Account = original.Account
+type AccountCreateParameters = original.AccountCreateParameters
+type AccountKeys = original.AccountKeys
+type Accounts = original.Accounts
+type AccountsMoveRequest = original.AccountsMoveRequest
+type AccountUpdateParameters = original.AccountUpdateParameters
+type Error = original.Error
+type ErrorDetailsItem = original.ErrorDetailsItem
+type KeySpecification = original.KeySpecification
+type Operations = original.Operations
+type OperationsValueItem = original.OperationsValueItem
+type OperationsValueItemDisplay = original.OperationsValueItemDisplay
+type Resource = original.Resource
+type Sku = original.Sku
+
+func NewAccountsClient(subscriptionID string) AccountsClient {
+ return original.NewAccountsClient(subscriptionID)
+}
+func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient {
+ return original.NewAccountsClientWithBaseURI(baseURI, subscriptionID)
+}
+func New(subscriptionID string) BaseClient {
+ return original.New(subscriptionID)
+}
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return original.NewWithBaseURI(baseURI, subscriptionID)
+}
+func PossibleKeyTypeValues() []KeyType {
+ return original.PossibleKeyTypeValues()
+}
+func UserAgent() string {
+ return original.UserAgent() + " profiles/preview"
+}
+func Version() string {
+ return original.Version()
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/mysql/mgmt/mysql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/mysql/mgmt/mysql/models.go
index 63afc82f5..c54dbb930 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/mysql/mgmt/mysql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/mysql/mgmt/mysql/models.go
@@ -87,6 +87,16 @@ const (
SslEnforcementEnumEnabled SslEnforcementEnum = original.SslEnforcementEnumEnabled
)
+type VirtualNetworkRuleState = original.VirtualNetworkRuleState
+
+const (
+ Deleting VirtualNetworkRuleState = original.Deleting
+ Initializing VirtualNetworkRuleState = original.Initializing
+ InProgress VirtualNetworkRuleState = original.InProgress
+ Ready VirtualNetworkRuleState = original.Ready
+ Unknown VirtualNetworkRuleState = original.Unknown
+)
+
type Configuration = original.Configuration
type ConfigurationListResult = original.ConfigurationListResult
type ConfigurationProperties = original.ConfigurationProperties
@@ -130,8 +140,16 @@ type ServerUpdateParametersProperties = original.ServerUpdateParametersPropertie
type Sku = original.Sku
type StorageProfile = original.StorageProfile
type TrackedResource = original.TrackedResource
+type VirtualNetworkRule = original.VirtualNetworkRule
+type VirtualNetworkRuleListResult = original.VirtualNetworkRuleListResult
+type VirtualNetworkRuleListResultIterator = original.VirtualNetworkRuleListResultIterator
+type VirtualNetworkRuleListResultPage = original.VirtualNetworkRuleListResultPage
+type VirtualNetworkRuleProperties = original.VirtualNetworkRuleProperties
+type VirtualNetworkRulesCreateOrUpdateFuture = original.VirtualNetworkRulesCreateOrUpdateFuture
+type VirtualNetworkRulesDeleteFuture = original.VirtualNetworkRulesDeleteFuture
type OperationsClient = original.OperationsClient
type ServersClient = original.ServersClient
+type VirtualNetworkRulesClient = original.VirtualNetworkRulesClient
func NewCheckNameAvailabilityClient(subscriptionID string) CheckNameAvailabilityClient {
return original.NewCheckNameAvailabilityClient(subscriptionID)
@@ -196,6 +214,9 @@ func PossibleSkuTierValues() []SkuTier {
func PossibleSslEnforcementEnumValues() []SslEnforcementEnum {
return original.PossibleSslEnforcementEnumValues()
}
+func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState {
+ return original.PossibleVirtualNetworkRuleStateValues()
+}
func NewOperationsClient(subscriptionID string) OperationsClient {
return original.NewOperationsClient(subscriptionID)
}
@@ -214,3 +235,9 @@ func UserAgent() string {
func Version() string {
return original.Version()
}
+func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClient {
+ return original.NewVirtualNetworkRulesClient(subscriptionID)
+}
+func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient {
+ return original.NewVirtualNetworkRulesClientWithBaseURI(baseURI, subscriptionID)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/network/mgmt/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/network/mgmt/network/models.go
index 84628ba73..1c80f0297 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/network/mgmt/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/network/mgmt/network/models.go
@@ -19,7 +19,7 @@
package network
-import original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network"
+import original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network"
type ApplicationGatewaysClient = original.ApplicationGatewaysClient
type ApplicationSecurityGroupsClient = original.ApplicationSecurityGroupsClient
@@ -636,24 +636,36 @@ type VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuName
const (
VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameBasic
+ VirtualNetworkGatewaySkuNameErGw1AZ VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameErGw1AZ
+ VirtualNetworkGatewaySkuNameErGw2AZ VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameErGw2AZ
+ VirtualNetworkGatewaySkuNameErGw3AZ VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameErGw3AZ
VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameHighPerformance
VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameStandard
VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameUltraPerformance
VirtualNetworkGatewaySkuNameVpnGw1 VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameVpnGw1
+ VirtualNetworkGatewaySkuNameVpnGw1AZ VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameVpnGw1AZ
VirtualNetworkGatewaySkuNameVpnGw2 VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameVpnGw2
+ VirtualNetworkGatewaySkuNameVpnGw2AZ VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameVpnGw2AZ
VirtualNetworkGatewaySkuNameVpnGw3 VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameVpnGw3
+ VirtualNetworkGatewaySkuNameVpnGw3AZ VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameVpnGw3AZ
)
type VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTier
const (
VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierBasic
+ VirtualNetworkGatewaySkuTierErGw1AZ VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierErGw1AZ
+ VirtualNetworkGatewaySkuTierErGw2AZ VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierErGw2AZ
+ VirtualNetworkGatewaySkuTierErGw3AZ VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierErGw3AZ
VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierHighPerformance
VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierStandard
VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierUltraPerformance
VirtualNetworkGatewaySkuTierVpnGw1 VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierVpnGw1
+ VirtualNetworkGatewaySkuTierVpnGw1AZ VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierVpnGw1AZ
VirtualNetworkGatewaySkuTierVpnGw2 VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierVpnGw2
+ VirtualNetworkGatewaySkuTierVpnGw2AZ VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierVpnGw2AZ
VirtualNetworkGatewaySkuTierVpnGw3 VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierVpnGw3
+ VirtualNetworkGatewaySkuTierVpnGw3AZ VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierVpnGw3AZ
)
type VirtualNetworkGatewayType = original.VirtualNetworkGatewayType
@@ -1071,6 +1083,8 @@ type Topology = original.Topology
type TopologyAssociation = original.TopologyAssociation
type TopologyParameters = original.TopologyParameters
type TopologyResource = original.TopologyResource
+type TrafficAnalyticsConfigurationProperties = original.TrafficAnalyticsConfigurationProperties
+type TrafficAnalyticsProperties = original.TrafficAnalyticsProperties
type TroubleshootingDetails = original.TroubleshootingDetails
type TroubleshootingParameters = original.TroubleshootingParameters
type TroubleshootingProperties = original.TroubleshootingProperties
@@ -1115,11 +1129,9 @@ type VirtualNetworkGatewaysGenerateVpnProfileFuture = original.VirtualNetworkGat
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture = original.VirtualNetworkGatewaysGetAdvertisedRoutesFuture
type VirtualNetworkGatewaysGetBgpPeerStatusFuture = original.VirtualNetworkGatewaysGetBgpPeerStatusFuture
type VirtualNetworkGatewaysGetLearnedRoutesFuture = original.VirtualNetworkGatewaysGetLearnedRoutesFuture
-type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture = original.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture
type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture = original.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture
type VirtualNetworkGatewaySku = original.VirtualNetworkGatewaySku
type VirtualNetworkGatewaysResetFuture = original.VirtualNetworkGatewaysResetFuture
-type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture = original.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture
type VirtualNetworkGatewaysUpdateTagsFuture = original.VirtualNetworkGatewaysUpdateTagsFuture
type VirtualNetworkListResult = original.VirtualNetworkListResult
type VirtualNetworkListResultIterator = original.VirtualNetworkListResultIterator
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/notificationhubs/mgmt/notificationhubs/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/notificationhubs/mgmt/notificationhubs/models.go
index 36564a0d9..3e8fbef3a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/notificationhubs/mgmt/notificationhubs/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/notificationhubs/mgmt/notificationhubs/models.go
@@ -26,7 +26,6 @@ const (
)
type BaseClient = original.BaseClient
-type HubsClient = original.HubsClient
type AccessRights = original.AccessRights
const (
@@ -58,9 +57,8 @@ type BaiduCredential = original.BaiduCredential
type BaiduCredentialProperties = original.BaiduCredentialProperties
type CheckAvailabilityParameters = original.CheckAvailabilityParameters
type CheckAvailabilityResult = original.CheckAvailabilityResult
-type CheckNameAvailabilityRequestParameters = original.CheckNameAvailabilityRequestParameters
-type CheckNameAvailabilityResponse = original.CheckNameAvailabilityResponse
type CreateOrUpdateParameters = original.CreateOrUpdateParameters
+type ErrorResponse = original.ErrorResponse
type GcmCredential = original.GcmCredential
type GcmCredentialProperties = original.GcmCredentialProperties
type ListResult = original.ListResult
@@ -76,6 +74,11 @@ type NamespacePatchParameters = original.NamespacePatchParameters
type NamespaceProperties = original.NamespaceProperties
type NamespaceResource = original.NamespaceResource
type NamespacesDeleteFuture = original.NamespacesDeleteFuture
+type Operation = original.Operation
+type OperationDisplay = original.OperationDisplay
+type OperationListResult = original.OperationListResult
+type OperationListResultIterator = original.OperationListResultIterator
+type OperationListResultPage = original.OperationListResultPage
type PnsCredentialsProperties = original.PnsCredentialsProperties
type PnsCredentialsResource = original.PnsCredentialsResource
type PolicykeyResource = original.PolicykeyResource
@@ -93,9 +96,9 @@ type Sku = original.Sku
type SubResource = original.SubResource
type WnsCredential = original.WnsCredential
type WnsCredentialProperties = original.WnsCredentialProperties
-type NameClient = original.NameClient
type NamespacesClient = original.NamespacesClient
type Client = original.Client
+type OperationsClient = original.OperationsClient
func New(subscriptionID string) BaseClient {
return original.New(subscriptionID)
@@ -103,12 +106,6 @@ func New(subscriptionID string) BaseClient {
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return original.NewWithBaseURI(baseURI, subscriptionID)
}
-func NewHubsClient(subscriptionID string) HubsClient {
- return original.NewHubsClient(subscriptionID)
-}
-func NewHubsClientWithBaseURI(baseURI string, subscriptionID string) HubsClient {
- return original.NewHubsClientWithBaseURI(baseURI, subscriptionID)
-}
func PossibleAccessRightsValues() []AccessRights {
return original.PossibleAccessRightsValues()
}
@@ -118,12 +115,6 @@ func PossibleNamespaceTypeValues() []NamespaceType {
func PossibleSkuNameValues() []SkuName {
return original.PossibleSkuNameValues()
}
-func NewNameClient(subscriptionID string) NameClient {
- return original.NewNameClient(subscriptionID)
-}
-func NewNameClientWithBaseURI(baseURI string, subscriptionID string) NameClient {
- return original.NewNameClientWithBaseURI(baseURI, subscriptionID)
-}
func NewNamespacesClient(subscriptionID string) NamespacesClient {
return original.NewNamespacesClient(subscriptionID)
}
@@ -136,6 +127,12 @@ func NewClient(subscriptionID string) Client {
func NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
return original.NewClientWithBaseURI(baseURI, subscriptionID)
}
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return original.NewOperationsClient(subscriptionID)
+}
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID)
+}
func UserAgent() string {
return original.UserAgent() + " profiles/preview"
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/postgresql/mgmt/postgresql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/postgresql/mgmt/postgresql/models.go
index f2301f2f6..a6edb8c0e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/postgresql/mgmt/postgresql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/postgresql/mgmt/postgresql/models.go
@@ -57,6 +57,13 @@ const (
User OperationOrigin = original.User
)
+type ServerSecurityAlertPolicyState = original.ServerSecurityAlertPolicyState
+
+const (
+ ServerSecurityAlertPolicyStateDisabled ServerSecurityAlertPolicyState = original.ServerSecurityAlertPolicyStateDisabled
+ ServerSecurityAlertPolicyStateEnabled ServerSecurityAlertPolicyState = original.ServerSecurityAlertPolicyStateEnabled
+)
+
type ServerState = original.ServerState
const (
@@ -87,6 +94,16 @@ const (
SslEnforcementEnumEnabled SslEnforcementEnum = original.SslEnforcementEnumEnabled
)
+type VirtualNetworkRuleState = original.VirtualNetworkRuleState
+
+const (
+ Deleting VirtualNetworkRuleState = original.Deleting
+ Initializing VirtualNetworkRuleState = original.Initializing
+ InProgress VirtualNetworkRuleState = original.InProgress
+ Ready VirtualNetworkRuleState = original.Ready
+ Unknown VirtualNetworkRuleState = original.Unknown
+)
+
type Configuration = original.Configuration
type ConfigurationListResult = original.ConfigurationListResult
type ConfigurationProperties = original.ConfigurationProperties
@@ -113,6 +130,7 @@ type PerformanceTierListResult = original.PerformanceTierListResult
type PerformanceTierProperties = original.PerformanceTierProperties
type PerformanceTierServiceLevelObjectives = original.PerformanceTierServiceLevelObjectives
type ProxyResource = original.ProxyResource
+type SecurityAlertPolicyProperties = original.SecurityAlertPolicyProperties
type Server = original.Server
type ServerForCreate = original.ServerForCreate
type ServerListResult = original.ServerListResult
@@ -124,14 +142,25 @@ type ServerPropertiesForGeoRestore = original.ServerPropertiesForGeoRestore
type ServerPropertiesForRestore = original.ServerPropertiesForRestore
type ServersCreateFuture = original.ServersCreateFuture
type ServersDeleteFuture = original.ServersDeleteFuture
+type ServerSecurityAlertPoliciesCreateOrUpdateFuture = original.ServerSecurityAlertPoliciesCreateOrUpdateFuture
+type ServerSecurityAlertPolicy = original.ServerSecurityAlertPolicy
type ServersUpdateFuture = original.ServersUpdateFuture
type ServerUpdateParameters = original.ServerUpdateParameters
type ServerUpdateParametersProperties = original.ServerUpdateParametersProperties
type Sku = original.Sku
type StorageProfile = original.StorageProfile
type TrackedResource = original.TrackedResource
+type VirtualNetworkRule = original.VirtualNetworkRule
+type VirtualNetworkRuleListResult = original.VirtualNetworkRuleListResult
+type VirtualNetworkRuleListResultIterator = original.VirtualNetworkRuleListResultIterator
+type VirtualNetworkRuleListResultPage = original.VirtualNetworkRuleListResultPage
+type VirtualNetworkRuleProperties = original.VirtualNetworkRuleProperties
+type VirtualNetworkRulesCreateOrUpdateFuture = original.VirtualNetworkRulesCreateOrUpdateFuture
+type VirtualNetworkRulesDeleteFuture = original.VirtualNetworkRulesDeleteFuture
type OperationsClient = original.OperationsClient
type ServersClient = original.ServersClient
+type ServerSecurityAlertPoliciesClient = original.ServerSecurityAlertPoliciesClient
+type VirtualNetworkRulesClient = original.VirtualNetworkRulesClient
func NewCheckNameAvailabilityClient(subscriptionID string) CheckNameAvailabilityClient {
return original.NewCheckNameAvailabilityClient(subscriptionID)
@@ -184,6 +213,9 @@ func PossibleGeoRedundantBackupValues() []GeoRedundantBackup {
func PossibleOperationOriginValues() []OperationOrigin {
return original.PossibleOperationOriginValues()
}
+func PossibleServerSecurityAlertPolicyStateValues() []ServerSecurityAlertPolicyState {
+ return original.PossibleServerSecurityAlertPolicyStateValues()
+}
func PossibleServerStateValues() []ServerState {
return original.PossibleServerStateValues()
}
@@ -196,6 +228,9 @@ func PossibleSkuTierValues() []SkuTier {
func PossibleSslEnforcementEnumValues() []SslEnforcementEnum {
return original.PossibleSslEnforcementEnumValues()
}
+func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState {
+ return original.PossibleVirtualNetworkRuleStateValues()
+}
func NewOperationsClient(subscriptionID string) OperationsClient {
return original.NewOperationsClient(subscriptionID)
}
@@ -208,9 +243,21 @@ func NewServersClient(subscriptionID string) ServersClient {
func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient {
return original.NewServersClientWithBaseURI(baseURI, subscriptionID)
}
+func NewServerSecurityAlertPoliciesClient(subscriptionID string) ServerSecurityAlertPoliciesClient {
+ return original.NewServerSecurityAlertPoliciesClient(subscriptionID)
+}
+func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerSecurityAlertPoliciesClient {
+ return original.NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI, subscriptionID)
+}
func UserAgent() string {
return original.UserAgent() + " profiles/preview"
}
func Version() string {
return original.Version()
}
+func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClient {
+ return original.NewVirtualNetworkRulesClient(subscriptionID)
+}
+func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient {
+ return original.NewVirtualNetworkRulesClientWithBaseURI(baseURI, subscriptionID)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/apimanagement/mgmt/apimanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/apimanagement/mgmt/apimanagement/models.go
index 624275aec..963e7c98f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/apimanagement/mgmt/apimanagement/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/apimanagement/mgmt/apimanagement/models.go
@@ -424,6 +424,7 @@ type EmailTemplateUpdateParameterProperties = original.EmailTemplateUpdateParame
type EmailTemplateUpdateParameters = original.EmailTemplateUpdateParameters
type ErrorFieldContract = original.ErrorFieldContract
type ErrorResponse = original.ErrorResponse
+type ErrorResponseBody = original.ErrorResponseBody
type GenerateSsoURLResult = original.GenerateSsoURLResult
type GroupCollection = original.GroupCollection
type GroupCollectionIterator = original.GroupCollectionIterator
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/botservice/mgmt/botservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/botservice/mgmt/botservices/models.go
index 1ca4e6599..6895cc656 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/botservice/mgmt/botservices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/botservice/mgmt/botservices/models.go
@@ -21,6 +21,7 @@ package botservice
import original "github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices"
+type BotConnectionClient = original.BotConnectionClient
type BotsClient = original.BotsClient
type ChannelsClient = original.ChannelsClient
@@ -96,6 +97,13 @@ type ChannelResponseListIterator = original.ChannelResponseListIterator
type ChannelResponseListPage = original.ChannelResponseListPage
type CheckNameAvailabilityRequestBody = original.CheckNameAvailabilityRequestBody
type CheckNameAvailabilityResponseBody = original.CheckNameAvailabilityResponseBody
+type ConnectionItemName = original.ConnectionItemName
+type ConnectionSetting = original.ConnectionSetting
+type ConnectionSettingParameter = original.ConnectionSettingParameter
+type ConnectionSettingProperties = original.ConnectionSettingProperties
+type ConnectionSettingResponseList = original.ConnectionSettingResponseList
+type ConnectionSettingResponseListIterator = original.ConnectionSettingResponseListIterator
+type ConnectionSettingResponseListPage = original.ConnectionSettingResponseListPage
type DirectLineChannel = original.DirectLineChannel
type DirectLineChannelProperties = original.DirectLineChannelProperties
type DirectLineSite = original.DirectLineSite
@@ -116,6 +124,10 @@ type OperationEntityListResult = original.OperationEntityListResult
type OperationEntityListResultIterator = original.OperationEntityListResultIterator
type OperationEntityListResultPage = original.OperationEntityListResultPage
type Resource = original.Resource
+type ServiceProvider = original.ServiceProvider
+type ServiceProviderParameter = original.ServiceProviderParameter
+type ServiceProviderProperties = original.ServiceProviderProperties
+type ServiceProviderResponseList = original.ServiceProviderResponseList
type Sku = original.Sku
type SkypeChannel = original.SkypeChannel
type SkypeChannelProperties = original.SkypeChannelProperties
@@ -130,6 +142,12 @@ type WebChatChannelProperties = original.WebChatChannelProperties
type WebChatSite = original.WebChatSite
type OperationsClient = original.OperationsClient
+func NewBotConnectionClient(subscriptionID string) BotConnectionClient {
+ return original.NewBotConnectionClient(subscriptionID)
+}
+func NewBotConnectionClientWithBaseURI(baseURI string, subscriptionID string) BotConnectionClient {
+ return original.NewBotConnectionClientWithBaseURI(baseURI, subscriptionID)
+}
func NewBotsClient(subscriptionID string) BotsClient {
return original.NewBotsClient(subscriptionID)
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/datafactory/mgmt/datafactory/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/datafactory/mgmt/datafactory/models.go
index 6b320836f..e142e7082 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/datafactory/mgmt/datafactory/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/datafactory/mgmt/datafactory/models.go
@@ -57,6 +57,13 @@ const (
Upload AzureSearchIndexWriteBehaviorType = original.Upload
)
+type BlobEventTypes = original.BlobEventTypes
+
+const (
+ MicrosoftStorageBlobCreated BlobEventTypes = original.MicrosoftStorageBlobCreated
+ MicrosoftStorageBlobDeleted BlobEventTypes = original.MicrosoftStorageBlobDeleted
+)
+
type CassandraSourceReadConsistencyLevels = original.CassandraSourceReadConsistencyLevels
const (
@@ -809,6 +816,7 @@ const (
type TypeBasicTrigger = original.TypeBasicTrigger
const (
+ TypeBlobEventsTrigger TypeBasicTrigger = original.TypeBlobEventsTrigger
TypeBlobTrigger TypeBasicTrigger = original.TypeBlobTrigger
TypeMultiplePipelineTrigger TypeBasicTrigger = original.TypeMultiplePipelineTrigger
TypeScheduleTrigger TypeBasicTrigger = original.TypeScheduleTrigger
@@ -898,6 +906,8 @@ type AzureTableDataset = original.AzureTableDataset
type AzureTableDatasetTypeProperties = original.AzureTableDatasetTypeProperties
type AzureTableSink = original.AzureTableSink
type AzureTableSource = original.AzureTableSource
+type BlobEventsTrigger = original.BlobEventsTrigger
+type BlobEventsTriggerTypeProperties = original.BlobEventsTriggerTypeProperties
type BlobSink = original.BlobSink
type BlobSource = original.BlobSource
type BlobTrigger = original.BlobTrigger
@@ -987,7 +997,9 @@ type FactoryListResponse = original.FactoryListResponse
type FactoryListResponseIterator = original.FactoryListResponseIterator
type FactoryListResponsePage = original.FactoryListResponsePage
type FactoryProperties = original.FactoryProperties
+type FactoryRepoUpdate = original.FactoryRepoUpdate
type FactoryUpdateParameters = original.FactoryUpdateParameters
+type FactoryVSTSConfiguration = original.FactoryVSTSConfiguration
type FileServerLinkedService = original.FileServerLinkedService
type FileServerLinkedServiceTypeProperties = original.FileServerLinkedServiceTypeProperties
type FileShareDataset = original.FileShareDataset
@@ -1371,6 +1383,9 @@ func PossibleAuthorizationTypeValues() []AuthorizationType {
func PossibleAzureSearchIndexWriteBehaviorTypeValues() []AzureSearchIndexWriteBehaviorType {
return original.PossibleAzureSearchIndexWriteBehaviorTypeValues()
}
+func PossibleBlobEventTypesValues() []BlobEventTypes {
+ return original.PossibleBlobEventTypesValues()
+}
func PossibleCassandraSourceReadConsistencyLevelsValues() []CassandraSourceReadConsistencyLevels {
return original.PossibleCassandraSourceReadConsistencyLevelsValues()
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/hanaonazure/mgmt/hanaonazure/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/hanaonazure/mgmt/hanaonazure/models.go
index 2bbb4b88a..1c03bb1e2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/hanaonazure/mgmt/hanaonazure/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/hanaonazure/mgmt/hanaonazure/models.go
@@ -31,17 +31,29 @@ type HanaHardwareTypeNamesEnum = original.HanaHardwareTypeNamesEnum
const (
CiscoUCS HanaHardwareTypeNamesEnum = original.CiscoUCS
+ HPE HanaHardwareTypeNamesEnum = original.HPE
)
type HanaInstanceSizeNamesEnum = original.HanaInstanceSizeNamesEnum
const (
- S144 HanaInstanceSizeNamesEnum = original.S144
- S144m HanaInstanceSizeNamesEnum = original.S144m
- S192 HanaInstanceSizeNamesEnum = original.S192
- S192m HanaInstanceSizeNamesEnum = original.S192m
- S72 HanaInstanceSizeNamesEnum = original.S72
- S72m HanaInstanceSizeNamesEnum = original.S72m
+ S144 HanaInstanceSizeNamesEnum = original.S144
+ S144m HanaInstanceSizeNamesEnum = original.S144m
+ S192 HanaInstanceSizeNamesEnum = original.S192
+ S192m HanaInstanceSizeNamesEnum = original.S192m
+ S192xm HanaInstanceSizeNamesEnum = original.S192xm
+ S384 HanaInstanceSizeNamesEnum = original.S384
+ S384m HanaInstanceSizeNamesEnum = original.S384m
+ S384xm HanaInstanceSizeNamesEnum = original.S384xm
+ S384xxm HanaInstanceSizeNamesEnum = original.S384xxm
+ S576m HanaInstanceSizeNamesEnum = original.S576m
+ S576xm HanaInstanceSizeNamesEnum = original.S576xm
+ S72 HanaInstanceSizeNamesEnum = original.S72
+ S72m HanaInstanceSizeNamesEnum = original.S72m
+ S768 HanaInstanceSizeNamesEnum = original.S768
+ S768m HanaInstanceSizeNamesEnum = original.S768m
+ S768xm HanaInstanceSizeNamesEnum = original.S768xm
+ S960m HanaInstanceSizeNamesEnum = original.S960m
)
type Disk = original.Disk
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/iotcentral/mgmt/iotcentral/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/iotcentral/mgmt/iotcentral/models.go
new file mode 100644
index 000000000..921bdfa91
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/iotcentral/mgmt/iotcentral/models.go
@@ -0,0 +1,98 @@
+// +build go1.9
+
+// Copyright 2018 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package iotcentral
+
+import (
+ original "github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral"
+ uuid "github.com/satori/go.uuid"
+)
+
+type AppsClient = original.AppsClient
+
+const (
+ DefaultBaseURI = original.DefaultBaseURI
+)
+
+type BaseClient = original.BaseClient
+type AppNameUnavailabilityReason = original.AppNameUnavailabilityReason
+
+const (
+ AlreadyExists AppNameUnavailabilityReason = original.AlreadyExists
+ Invalid AppNameUnavailabilityReason = original.Invalid
+)
+
+type AppSku = original.AppSku
+
+const (
+ F1 AppSku = original.F1
+ S1 AppSku = original.S1
+)
+
+type App = original.App
+type AppListResult = original.AppListResult
+type AppListResultIterator = original.AppListResultIterator
+type AppListResultPage = original.AppListResultPage
+type AppNameAvailabilityInfo = original.AppNameAvailabilityInfo
+type AppPatch = original.AppPatch
+type AppProperties = original.AppProperties
+type AppsCreateOrUpdateFuture = original.AppsCreateOrUpdateFuture
+type AppsDeleteFuture = original.AppsDeleteFuture
+type AppSkuInfo = original.AppSkuInfo
+type AppsUpdateFuture = original.AppsUpdateFuture
+type ErrorDetails = original.ErrorDetails
+type Operation = original.Operation
+type OperationDisplay = original.OperationDisplay
+type OperationInputs = original.OperationInputs
+type OperationListResult = original.OperationListResult
+type OperationListResultIterator = original.OperationListResultIterator
+type OperationListResultPage = original.OperationListResultPage
+type Resource = original.Resource
+type OperationsClient = original.OperationsClient
+
+func NewAppsClient(subscriptionID uuid.UUID) AppsClient {
+ return original.NewAppsClient(subscriptionID)
+}
+func NewAppsClientWithBaseURI(baseURI string, subscriptionID uuid.UUID) AppsClient {
+ return original.NewAppsClientWithBaseURI(baseURI, subscriptionID)
+}
+func New(subscriptionID uuid.UUID) BaseClient {
+ return original.New(subscriptionID)
+}
+func NewWithBaseURI(baseURI string, subscriptionID uuid.UUID) BaseClient {
+ return original.NewWithBaseURI(baseURI, subscriptionID)
+}
+func PossibleAppNameUnavailabilityReasonValues() []AppNameUnavailabilityReason {
+ return original.PossibleAppNameUnavailabilityReasonValues()
+}
+func PossibleAppSkuValues() []AppSku {
+ return original.PossibleAppSkuValues()
+}
+func NewOperationsClient(subscriptionID uuid.UUID) OperationsClient {
+ return original.NewOperationsClient(subscriptionID)
+}
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID uuid.UUID) OperationsClient {
+ return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID)
+}
+func UserAgent() string {
+ return original.UserAgent() + " profiles/preview"
+}
+func Version() string {
+ return original.Version()
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/machinelearning/mgmt/services/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/machinelearning/mgmt/services/models.go
new file mode 100644
index 000000000..01ea33e03
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/machinelearning/mgmt/services/models.go
@@ -0,0 +1,175 @@
+// +build go1.9
+
+// Copyright 2018 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package services
+
+import original "github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services"
+
+const (
+ DefaultBaseURI = original.DefaultBaseURI
+)
+
+type BaseClient = original.BaseClient
+type MachineLearningComputeClient = original.MachineLearningComputeClient
+type ComputeType = original.ComputeType
+
+const (
+ ComputeTypeAKS ComputeType = original.ComputeTypeAKS
+ ComputeTypeBatchAI ComputeType = original.ComputeTypeBatchAI
+ ComputeTypeDataFactory ComputeType = original.ComputeTypeDataFactory
+ ComputeTypeVirtualMachine ComputeType = original.ComputeTypeVirtualMachine
+)
+
+type ComputeTypeBasicCompute = original.ComputeTypeBasicCompute
+
+const (
+ ComputeTypeAKS1 ComputeTypeBasicCompute = original.ComputeTypeAKS1
+ ComputeTypeBatchAI1 ComputeTypeBasicCompute = original.ComputeTypeBatchAI1
+ ComputeTypeCompute ComputeTypeBasicCompute = original.ComputeTypeCompute
+ ComputeTypeDataFactory1 ComputeTypeBasicCompute = original.ComputeTypeDataFactory1
+ ComputeTypeVirtualMachine1 ComputeTypeBasicCompute = original.ComputeTypeVirtualMachine1
+)
+
+type ComputeTypeBasicComputeSecrets = original.ComputeTypeBasicComputeSecrets
+
+const (
+ ComputeTypeBasicComputeSecretsComputeTypeAKS ComputeTypeBasicComputeSecrets = original.ComputeTypeBasicComputeSecretsComputeTypeAKS
+ ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets ComputeTypeBasicComputeSecrets = original.ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets
+ ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine ComputeTypeBasicComputeSecrets = original.ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine
+)
+
+type ProvisioningState = original.ProvisioningState
+
+const (
+ Canceled ProvisioningState = original.Canceled
+ Creating ProvisioningState = original.Creating
+ Deleting ProvisioningState = original.Deleting
+ Failed ProvisioningState = original.Failed
+ Succeeded ProvisioningState = original.Succeeded
+ Unknown ProvisioningState = original.Unknown
+ Updating ProvisioningState = original.Updating
+)
+
+type ResourceIdentityType = original.ResourceIdentityType
+
+const (
+ SystemAssigned ResourceIdentityType = original.SystemAssigned
+)
+
+type Status = original.Status
+
+const (
+ Disabled Status = original.Disabled
+ Enabled Status = original.Enabled
+)
+
+type AKS = original.AKS
+type AksComputeSecrets = original.AksComputeSecrets
+type AKSProperties = original.AKSProperties
+type BatchAI = original.BatchAI
+type BatchAIProperties = original.BatchAIProperties
+type BasicCompute = original.BasicCompute
+type Compute = original.Compute
+type ComputeResource = original.ComputeResource
+type BasicComputeSecrets = original.BasicComputeSecrets
+type ComputeSecrets = original.ComputeSecrets
+type ComputeSecretsModel = original.ComputeSecretsModel
+type DataFactory = original.DataFactory
+type ErrorDetail = original.ErrorDetail
+type ErrorResponse = original.ErrorResponse
+type Identity = original.Identity
+type ListWorkspaceKeysResult = original.ListWorkspaceKeysResult
+type MachineLearningComputeCreateOrUpdateFuture = original.MachineLearningComputeCreateOrUpdateFuture
+type MachineLearningComputeDeleteFuture = original.MachineLearningComputeDeleteFuture
+type MachineLearningServiceError = original.MachineLearningServiceError
+type Operation = original.Operation
+type OperationDisplay = original.OperationDisplay
+type OperationListResult = original.OperationListResult
+type PaginatedComputeResourcesList = original.PaginatedComputeResourcesList
+type PaginatedComputeResourcesListIterator = original.PaginatedComputeResourcesListIterator
+type PaginatedComputeResourcesListPage = original.PaginatedComputeResourcesListPage
+type Password = original.Password
+type PrincipalCredentials = original.PrincipalCredentials
+type RegistryListCredentialsResult = original.RegistryListCredentialsResult
+type Resource = original.Resource
+type ScaleSettings = original.ScaleSettings
+type SslConfiguration = original.SslConfiguration
+type SystemService = original.SystemService
+type VirtualMachine = original.VirtualMachine
+type VirtualMachineProperties = original.VirtualMachineProperties
+type VirtualMachineSecrets = original.VirtualMachineSecrets
+type VirtualMachineSSHCredentials = original.VirtualMachineSSHCredentials
+type Workspace = original.Workspace
+type WorkspaceListResult = original.WorkspaceListResult
+type WorkspaceListResultIterator = original.WorkspaceListResultIterator
+type WorkspaceListResultPage = original.WorkspaceListResultPage
+type WorkspaceProperties = original.WorkspaceProperties
+type WorkspacePropertiesUpdateParameters = original.WorkspacePropertiesUpdateParameters
+type WorkspaceUpdateParameters = original.WorkspaceUpdateParameters
+type OperationsClient = original.OperationsClient
+type WorkspacesClient = original.WorkspacesClient
+
+func New(subscriptionID string) BaseClient {
+ return original.New(subscriptionID)
+}
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return original.NewWithBaseURI(baseURI, subscriptionID)
+}
+func NewMachineLearningComputeClient(subscriptionID string) MachineLearningComputeClient {
+ return original.NewMachineLearningComputeClient(subscriptionID)
+}
+func NewMachineLearningComputeClientWithBaseURI(baseURI string, subscriptionID string) MachineLearningComputeClient {
+ return original.NewMachineLearningComputeClientWithBaseURI(baseURI, subscriptionID)
+}
+func PossibleComputeTypeValues() []ComputeType {
+ return original.PossibleComputeTypeValues()
+}
+func PossibleComputeTypeBasicComputeValues() []ComputeTypeBasicCompute {
+ return original.PossibleComputeTypeBasicComputeValues()
+}
+func PossibleComputeTypeBasicComputeSecretsValues() []ComputeTypeBasicComputeSecrets {
+ return original.PossibleComputeTypeBasicComputeSecretsValues()
+}
+func PossibleProvisioningStateValues() []ProvisioningState {
+ return original.PossibleProvisioningStateValues()
+}
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return original.PossibleResourceIdentityTypeValues()
+}
+func PossibleStatusValues() []Status {
+ return original.PossibleStatusValues()
+}
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return original.NewOperationsClient(subscriptionID)
+}
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID)
+}
+func UserAgent() string {
+ return original.UserAgent() + " profiles/preview"
+}
+func Version() string {
+ return original.Version()
+}
+func NewWorkspacesClient(subscriptionID string) WorkspacesClient {
+ return original.NewWorkspacesClient(subscriptionID)
+}
+func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) WorkspacesClient {
+ return original.NewWorkspacesClientWithBaseURI(baseURI, subscriptionID)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/monitor/mgmt/insights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/monitor/mgmt/insights/models.go
index 983fd9234..723d85a01 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/monitor/mgmt/insights/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/monitor/mgmt/insights/models.go
@@ -343,6 +343,7 @@ type ManagementEventAggregationCondition = original.ManagementEventAggregationCo
type ManagementEventRuleCondition = original.ManagementEventRuleCondition
type MetadataValue = original.MetadataValue
type Metric = original.Metric
+type MetricAlertAction = original.MetricAlertAction
type BasicMetricAlertCriteria = original.BasicMetricAlertCriteria
type MetricAlertCriteria = original.MetricAlertCriteria
type MetricAlertProperties = original.MetricAlertProperties
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/resources/mgmt/management/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/resources/mgmt/management/models.go
index dc4f26375..001975dc1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/resources/mgmt/management/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/resources/mgmt/management/models.go
@@ -19,7 +19,7 @@
package managementgroups
-import original "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management"
+import original "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management"
const (
DefaultBaseURI = original.DefaultBaseURI
@@ -28,13 +28,22 @@ const (
type BaseClient = original.BaseClient
type EntitiesClient = original.EntitiesClient
type Client = original.Client
+type InheritedPermissions = original.InheritedPermissions
+
+const (
+ Delete InheritedPermissions = original.Delete
+ Edit InheritedPermissions = original.Edit
+ Noaccess InheritedPermissions = original.Noaccess
+ View InheritedPermissions = original.View
+)
+
type Permissions = original.Permissions
const (
- Delete Permissions = original.Delete
- Edit Permissions = original.Edit
- Noaccess Permissions = original.Noaccess
- View Permissions = original.View
+ PermissionsDelete Permissions = original.PermissionsDelete
+ PermissionsEdit Permissions = original.PermissionsEdit
+ PermissionsNoaccess Permissions = original.PermissionsNoaccess
+ PermissionsView Permissions = original.PermissionsView
)
type Permissions1 = original.Permissions1
@@ -59,17 +68,28 @@ const (
Invalid Reason = original.Invalid
)
+type Status = original.Status
+
+const (
+ Cancelled Status = original.Cancelled
+ Completed Status = original.Completed
+ Failed Status = original.Failed
+ NotStarted Status = original.NotStarted
+ NotStartedButGroupsExist Status = original.NotStartedButGroupsExist
+ Started Status = original.Started
+)
+
type Type = original.Type
const (
- ProvidersMicrosoftManagementmanagementGroup Type = original.ProvidersMicrosoftManagementmanagementGroup
+ ProvidersMicrosoftManagementmanagementGroups Type = original.ProvidersMicrosoftManagementmanagementGroups
)
type Type1 = original.Type1
const (
- ProvidersMicrosoftManagementmanagementGroups Type1 = original.ProvidersMicrosoftManagementmanagementGroups
- Subscriptions Type1 = original.Subscriptions
+ Type1ProvidersMicrosoftManagementmanagementGroups Type1 = original.Type1ProvidersMicrosoftManagementmanagementGroups
+ Type1Subscriptions Type1 = original.Type1Subscriptions
)
type Type2 = original.Type2
@@ -117,26 +137,30 @@ type ParentGroupInfo = original.ParentGroupInfo
type PatchManagementGroupRequest = original.PatchManagementGroupRequest
type Properties = original.Properties
type SetObject = original.SetObject
+type TenantBackfillStatusResult = original.TenantBackfillStatusResult
type OperationsClient = original.OperationsClient
type SubscriptionsClient = original.SubscriptionsClient
-func New(operationResultID string, skiptoken string) BaseClient {
- return original.New(operationResultID, skiptoken)
+func New() BaseClient {
+ return original.New()
}
-func NewWithBaseURI(baseURI string, operationResultID string, skiptoken string) BaseClient {
- return original.NewWithBaseURI(baseURI, operationResultID, skiptoken)
+func NewWithBaseURI(baseURI string) BaseClient {
+ return original.NewWithBaseURI(baseURI)
}
-func NewEntitiesClient(operationResultID string, skiptoken string) EntitiesClient {
- return original.NewEntitiesClient(operationResultID, skiptoken)
+func NewEntitiesClient() EntitiesClient {
+ return original.NewEntitiesClient()
}
-func NewEntitiesClientWithBaseURI(baseURI string, operationResultID string, skiptoken string) EntitiesClient {
- return original.NewEntitiesClientWithBaseURI(baseURI, operationResultID, skiptoken)
+func NewEntitiesClientWithBaseURI(baseURI string) EntitiesClient {
+ return original.NewEntitiesClientWithBaseURI(baseURI)
}
-func NewClient(operationResultID string, skiptoken string) Client {
- return original.NewClient(operationResultID, skiptoken)
+func NewClient() Client {
+ return original.NewClient()
}
-func NewClientWithBaseURI(baseURI string, operationResultID string, skiptoken string) Client {
- return original.NewClientWithBaseURI(baseURI, operationResultID, skiptoken)
+func NewClientWithBaseURI(baseURI string) Client {
+ return original.NewClientWithBaseURI(baseURI)
+}
+func PossibleInheritedPermissionsValues() []InheritedPermissions {
+ return original.PossibleInheritedPermissionsValues()
}
func PossiblePermissionsValues() []Permissions {
return original.PossiblePermissionsValues()
@@ -150,6 +174,9 @@ func PossibleProvisioningStateValues() []ProvisioningState {
func PossibleReasonValues() []Reason {
return original.PossibleReasonValues()
}
+func PossibleStatusValues() []Status {
+ return original.PossibleStatusValues()
+}
func PossibleTypeValues() []Type {
return original.PossibleTypeValues()
}
@@ -159,17 +186,17 @@ func PossibleType1Values() []Type1 {
func PossibleType2Values() []Type2 {
return original.PossibleType2Values()
}
-func NewOperationsClient(operationResultID string, skiptoken string) OperationsClient {
- return original.NewOperationsClient(operationResultID, skiptoken)
+func NewOperationsClient() OperationsClient {
+ return original.NewOperationsClient()
}
-func NewOperationsClientWithBaseURI(baseURI string, operationResultID string, skiptoken string) OperationsClient {
- return original.NewOperationsClientWithBaseURI(baseURI, operationResultID, skiptoken)
+func NewOperationsClientWithBaseURI(baseURI string) OperationsClient {
+ return original.NewOperationsClientWithBaseURI(baseURI)
}
-func NewSubscriptionsClient(operationResultID string, skiptoken string) SubscriptionsClient {
- return original.NewSubscriptionsClient(operationResultID, skiptoken)
+func NewSubscriptionsClient() SubscriptionsClient {
+ return original.NewSubscriptionsClient()
}
-func NewSubscriptionsClientWithBaseURI(baseURI string, operationResultID string, skiptoken string) SubscriptionsClient {
- return original.NewSubscriptionsClientWithBaseURI(baseURI, operationResultID, skiptoken)
+func NewSubscriptionsClientWithBaseURI(baseURI string) SubscriptionsClient {
+ return original.NewSubscriptionsClientWithBaseURI(baseURI)
}
func UserAgent() string {
return original.UserAgent() + " profiles/preview"
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/sql/mgmt/sql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/sql/mgmt/sql/models.go
index abcfe1585..91394b177 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/sql/mgmt/sql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/sql/mgmt/sql/models.go
@@ -21,6 +21,7 @@ package sql
import original "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql"
+type BackupShortTermRetentionPoliciesClient = original.BackupShortTermRetentionPoliciesClient
type CapabilitiesClient = original.CapabilitiesClient
const (
@@ -30,6 +31,7 @@ const (
type BaseClient = original.BaseClient
type DatabaseOperationsClient = original.DatabaseOperationsClient
type DatabasesClient = original.DatabasesClient
+type DatabaseVulnerabilityAssessmentScansClient = original.DatabaseVulnerabilityAssessmentScansClient
type ElasticPoolOperationsClient = original.ElasticPoolOperationsClient
type ElasticPoolsClient = original.ElasticPoolsClient
type InstanceFailoverGroupsClient = original.InstanceFailoverGroupsClient
@@ -190,6 +192,26 @@ const (
WideWorldImportersStd SampleName = original.WideWorldImportersStd
)
+type VulnerabilityAssessmentScanState = original.VulnerabilityAssessmentScanState
+
+const (
+ VulnerabilityAssessmentScanStateFailed VulnerabilityAssessmentScanState = original.VulnerabilityAssessmentScanStateFailed
+ VulnerabilityAssessmentScanStateFailedToRun VulnerabilityAssessmentScanState = original.VulnerabilityAssessmentScanStateFailedToRun
+ VulnerabilityAssessmentScanStateInProgress VulnerabilityAssessmentScanState = original.VulnerabilityAssessmentScanStateInProgress
+ VulnerabilityAssessmentScanStatePassed VulnerabilityAssessmentScanState = original.VulnerabilityAssessmentScanStatePassed
+)
+
+type VulnerabilityAssessmentScanTriggerType = original.VulnerabilityAssessmentScanTriggerType
+
+const (
+ OnDemand VulnerabilityAssessmentScanTriggerType = original.OnDemand
+ Recurring VulnerabilityAssessmentScanTriggerType = original.Recurring
+)
+
+type BackupShortTermRetentionPoliciesCreateOrUpdateFuture = original.BackupShortTermRetentionPoliciesCreateOrUpdateFuture
+type BackupShortTermRetentionPoliciesUpdateFuture = original.BackupShortTermRetentionPoliciesUpdateFuture
+type BackupShortTermRetentionPolicy = original.BackupShortTermRetentionPolicy
+type BackupShortTermRetentionPolicyProperties = original.BackupShortTermRetentionPolicyProperties
type Database = original.Database
type DatabaseListResult = original.DatabaseListResult
type DatabaseListResultIterator = original.DatabaseListResultIterator
@@ -207,6 +229,11 @@ type DatabasesResumeFuture = original.DatabasesResumeFuture
type DatabasesUpdateFuture = original.DatabasesUpdateFuture
type DatabasesUpgradeDataWarehouseFuture = original.DatabasesUpgradeDataWarehouseFuture
type DatabaseUpdate = original.DatabaseUpdate
+type DatabaseVulnerabilityAssessment = original.DatabaseVulnerabilityAssessment
+type DatabaseVulnerabilityAssessmentProperties = original.DatabaseVulnerabilityAssessmentProperties
+type DatabaseVulnerabilityAssessmentScanExportProperties = original.DatabaseVulnerabilityAssessmentScanExportProperties
+type DatabaseVulnerabilityAssessmentScansExport = original.DatabaseVulnerabilityAssessmentScansExport
+type DatabaseVulnerabilityAssessmentScansInitiateScanFuture = original.DatabaseVulnerabilityAssessmentScansInitiateScanFuture
type EditionCapability = original.EditionCapability
type ElasticPool = original.ElasticPool
type ElasticPoolEditionCapability = original.ElasticPoolEditionCapability
@@ -256,14 +283,22 @@ type Resource = original.Resource
type ResourceMoveDefinition = original.ResourceMoveDefinition
type ServerVersionCapability = original.ServerVersionCapability
type ServiceObjectiveCapability = original.ServiceObjectiveCapability
-type ShortTermRetentionPoliciesCreateOrUpdateFuture = original.ShortTermRetentionPoliciesCreateOrUpdateFuture
-type ShortTermRetentionPoliciesUpdateFuture = original.ShortTermRetentionPoliciesUpdateFuture
-type ShortTermRetentionPolicy = original.ShortTermRetentionPolicy
-type ShortTermRetentionPolicyProperties = original.ShortTermRetentionPolicyProperties
type Sku = original.Sku
type TrackedResource = original.TrackedResource
-type ShortTermRetentionPoliciesClient = original.ShortTermRetentionPoliciesClient
+type VulnerabilityAssessmentRecurringScansProperties = original.VulnerabilityAssessmentRecurringScansProperties
+type VulnerabilityAssessmentScanError = original.VulnerabilityAssessmentScanError
+type VulnerabilityAssessmentScanRecord = original.VulnerabilityAssessmentScanRecord
+type VulnerabilityAssessmentScanRecordListResult = original.VulnerabilityAssessmentScanRecordListResult
+type VulnerabilityAssessmentScanRecordListResultIterator = original.VulnerabilityAssessmentScanRecordListResultIterator
+type VulnerabilityAssessmentScanRecordListResultPage = original.VulnerabilityAssessmentScanRecordListResultPage
+type VulnerabilityAssessmentScanRecordProperties = original.VulnerabilityAssessmentScanRecordProperties
+func NewBackupShortTermRetentionPoliciesClient(subscriptionID string) BackupShortTermRetentionPoliciesClient {
+ return original.NewBackupShortTermRetentionPoliciesClient(subscriptionID)
+}
+func NewBackupShortTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupShortTermRetentionPoliciesClient {
+ return original.NewBackupShortTermRetentionPoliciesClientWithBaseURI(baseURI, subscriptionID)
+}
func NewCapabilitiesClient(subscriptionID string) CapabilitiesClient {
return original.NewCapabilitiesClient(subscriptionID)
}
@@ -288,6 +323,12 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient {
func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient {
return original.NewDatabasesClientWithBaseURI(baseURI, subscriptionID)
}
+func NewDatabaseVulnerabilityAssessmentScansClient(subscriptionID string) DatabaseVulnerabilityAssessmentScansClient {
+ return original.NewDatabaseVulnerabilityAssessmentScansClient(subscriptionID)
+}
+func NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI(baseURI string, subscriptionID string) DatabaseVulnerabilityAssessmentScansClient {
+ return original.NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI(baseURI, subscriptionID)
+}
func NewElasticPoolOperationsClient(subscriptionID string) ElasticPoolOperationsClient {
return original.NewElasticPoolOperationsClient(subscriptionID)
}
@@ -357,11 +398,11 @@ func PossibleReadWriteEndpointFailoverPolicyValues() []ReadWriteEndpointFailover
func PossibleSampleNameValues() []SampleName {
return original.PossibleSampleNameValues()
}
-func NewShortTermRetentionPoliciesClient(subscriptionID string) ShortTermRetentionPoliciesClient {
- return original.NewShortTermRetentionPoliciesClient(subscriptionID)
+func PossibleVulnerabilityAssessmentScanStateValues() []VulnerabilityAssessmentScanState {
+ return original.PossibleVulnerabilityAssessmentScanStateValues()
}
-func NewShortTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ShortTermRetentionPoliciesClient {
- return original.NewShortTermRetentionPoliciesClientWithBaseURI(baseURI, subscriptionID)
+func PossibleVulnerabilityAssessmentScanTriggerTypeValues() []VulnerabilityAssessmentScanTriggerType {
+ return original.PossibleVulnerabilityAssessmentScanTriggerTypeValues()
}
func UserAgent() string {
return original.UserAgent() + " profiles/preview"
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/storage/mgmt/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/storage/mgmt/storage/models.go
index 9b868d4a1..c4e18926a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/storage/mgmt/storage/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/preview/storage/mgmt/storage/models.go
@@ -19,15 +19,23 @@
package storage
-import original "github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2015-05-01-preview/storage"
+import original "github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage"
type AccountsClient = original.AccountsClient
+type BlobContainersClient = original.BlobContainersClient
const (
DefaultBaseURI = original.DefaultBaseURI
)
type BaseClient = original.BaseClient
+type AccessTier = original.AccessTier
+
+const (
+ Cool AccessTier = original.Cool
+ Hot AccessTier = original.Hot
+)
+
type AccountStatus = original.AccountStatus
const (
@@ -35,21 +43,107 @@ const (
Unavailable AccountStatus = original.Unavailable
)
-type AccountType = original.AccountType
+type Action = original.Action
const (
- PremiumLRS AccountType = original.PremiumLRS
- StandardGRS AccountType = original.StandardGRS
- StandardLRS AccountType = original.StandardLRS
- StandardRAGRS AccountType = original.StandardRAGRS
- StandardZRS AccountType = original.StandardZRS
+ Allow Action = original.Allow
)
-type KeyName = original.KeyName
+type Bypass = original.Bypass
const (
- Key1 KeyName = original.Key1
- Key2 KeyName = original.Key2
+ AzureServices Bypass = original.AzureServices
+ Logging Bypass = original.Logging
+ Metrics Bypass = original.Metrics
+ None Bypass = original.None
+)
+
+type DefaultAction = original.DefaultAction
+
+const (
+ DefaultActionAllow DefaultAction = original.DefaultActionAllow
+ DefaultActionDeny DefaultAction = original.DefaultActionDeny
+)
+
+type HTTPProtocol = original.HTTPProtocol
+
+const (
+ HTTPS HTTPProtocol = original.HTTPS
+ Httpshttp HTTPProtocol = original.Httpshttp
+)
+
+type ImmutabilityPolicyState = original.ImmutabilityPolicyState
+
+const (
+ Locked ImmutabilityPolicyState = original.Locked
+ Unlocked ImmutabilityPolicyState = original.Unlocked
+)
+
+type ImmutabilityPolicyUpdateType = original.ImmutabilityPolicyUpdateType
+
+const (
+ Extend ImmutabilityPolicyUpdateType = original.Extend
+ Lock ImmutabilityPolicyUpdateType = original.Lock
+ Put ImmutabilityPolicyUpdateType = original.Put
+)
+
+type KeyPermission = original.KeyPermission
+
+const (
+ Full KeyPermission = original.Full
+ Read KeyPermission = original.Read
+)
+
+type KeySource = original.KeySource
+
+const (
+ MicrosoftKeyvault KeySource = original.MicrosoftKeyvault
+ MicrosoftStorage KeySource = original.MicrosoftStorage
+)
+
+type Kind = original.Kind
+
+const (
+ BlobStorage Kind = original.BlobStorage
+ Storage Kind = original.Storage
+ StorageV2 Kind = original.StorageV2
+)
+
+type LeaseDuration = original.LeaseDuration
+
+const (
+ Fixed LeaseDuration = original.Fixed
+ Infinite LeaseDuration = original.Infinite
+)
+
+type LeaseState = original.LeaseState
+
+const (
+ LeaseStateAvailable LeaseState = original.LeaseStateAvailable
+ LeaseStateBreaking LeaseState = original.LeaseStateBreaking
+ LeaseStateBroken LeaseState = original.LeaseStateBroken
+ LeaseStateExpired LeaseState = original.LeaseStateExpired
+ LeaseStateLeased LeaseState = original.LeaseStateLeased
+)
+
+type LeaseStatus = original.LeaseStatus
+
+const (
+ LeaseStatusLocked LeaseStatus = original.LeaseStatusLocked
+ LeaseStatusUnlocked LeaseStatus = original.LeaseStatusUnlocked
+)
+
+type Permissions = original.Permissions
+
+const (
+ A Permissions = original.A
+ C Permissions = original.C
+ D Permissions = original.D
+ L Permissions = original.L
+ P Permissions = original.P
+ R Permissions = original.R
+ U Permissions = original.U
+ W Permissions = original.W
)
type ProvisioningState = original.ProvisioningState
@@ -60,6 +154,14 @@ const (
Succeeded ProvisioningState = original.Succeeded
)
+type PublicAccess = original.PublicAccess
+
+const (
+ PublicAccessBlob PublicAccess = original.PublicAccessBlob
+ PublicAccessContainer PublicAccess = original.PublicAccessContainer
+ PublicAccessNone PublicAccess = original.PublicAccessNone
+)
+
type Reason = original.Reason
const (
@@ -67,6 +169,66 @@ const (
AlreadyExists Reason = original.AlreadyExists
)
+type ReasonCode = original.ReasonCode
+
+const (
+ NotAvailableForSubscription ReasonCode = original.NotAvailableForSubscription
+ QuotaID ReasonCode = original.QuotaID
+)
+
+type Services = original.Services
+
+const (
+ B Services = original.B
+ F Services = original.F
+ Q Services = original.Q
+ T Services = original.T
+)
+
+type SignedResource = original.SignedResource
+
+const (
+ SignedResourceB SignedResource = original.SignedResourceB
+ SignedResourceC SignedResource = original.SignedResourceC
+ SignedResourceF SignedResource = original.SignedResourceF
+ SignedResourceS SignedResource = original.SignedResourceS
+)
+
+type SignedResourceTypes = original.SignedResourceTypes
+
+const (
+ SignedResourceTypesC SignedResourceTypes = original.SignedResourceTypesC
+ SignedResourceTypesO SignedResourceTypes = original.SignedResourceTypesO
+ SignedResourceTypesS SignedResourceTypes = original.SignedResourceTypesS
+)
+
+type SkuName = original.SkuName
+
+const (
+ PremiumLRS SkuName = original.PremiumLRS
+ StandardGRS SkuName = original.StandardGRS
+ StandardLRS SkuName = original.StandardLRS
+ StandardRAGRS SkuName = original.StandardRAGRS
+ StandardZRS SkuName = original.StandardZRS
+)
+
+type SkuTier = original.SkuTier
+
+const (
+ Premium SkuTier = original.Premium
+ Standard SkuTier = original.Standard
+)
+
+type State = original.State
+
+const (
+ StateDeprovisioning State = original.StateDeprovisioning
+ StateFailed State = original.StateFailed
+ StateNetworkSourceDeleted State = original.StateNetworkSourceDeleted
+ StateProvisioning State = original.StateProvisioning
+ StateSucceeded State = original.StateSucceeded
+)
+
type UsageUnit = original.UsageUnit
const (
@@ -81,25 +243,66 @@ const (
type Account = original.Account
type AccountCheckNameAvailabilityParameters = original.AccountCheckNameAvailabilityParameters
type AccountCreateParameters = original.AccountCreateParameters
-type AccountKeys = original.AccountKeys
+type AccountKey = original.AccountKey
+type AccountListKeysResult = original.AccountListKeysResult
type AccountListResult = original.AccountListResult
-type AccountListResultIterator = original.AccountListResultIterator
-type AccountListResultPage = original.AccountListResultPage
+type AccountManagementPolicies = original.AccountManagementPolicies
+type AccountManagementPoliciesRulesProperty = original.AccountManagementPoliciesRulesProperty
type AccountProperties = original.AccountProperties
type AccountPropertiesCreateParameters = original.AccountPropertiesCreateParameters
type AccountPropertiesUpdateParameters = original.AccountPropertiesUpdateParameters
type AccountRegenerateKeyParameters = original.AccountRegenerateKeyParameters
+type AccountSasParameters = original.AccountSasParameters
type AccountsCreateFuture = original.AccountsCreateFuture
type AccountUpdateParameters = original.AccountUpdateParameters
+type AzureEntityResource = original.AzureEntityResource
+type BlobContainer = original.BlobContainer
type CheckNameAvailabilityResult = original.CheckNameAvailabilityResult
+type ContainerProperties = original.ContainerProperties
type CustomDomain = original.CustomDomain
+type Dimension = original.Dimension
+type Encryption = original.Encryption
+type EncryptionService = original.EncryptionService
+type EncryptionServices = original.EncryptionServices
type Endpoints = original.Endpoints
+type Identity = original.Identity
+type ImmutabilityPolicy = original.ImmutabilityPolicy
+type ImmutabilityPolicyProperties = original.ImmutabilityPolicyProperties
+type ImmutabilityPolicyProperty = original.ImmutabilityPolicyProperty
+type IPRule = original.IPRule
+type KeyVaultProperties = original.KeyVaultProperties
+type LegalHold = original.LegalHold
+type LegalHoldProperties = original.LegalHoldProperties
+type ListAccountSasResponse = original.ListAccountSasResponse
+type ListContainerItem = original.ListContainerItem
+type ListContainerItems = original.ListContainerItems
+type ListServiceSasResponse = original.ListServiceSasResponse
+type ManagementPoliciesRules = original.ManagementPoliciesRules
+type ManagementPoliciesRulesSetParameter = original.ManagementPoliciesRulesSetParameter
+type MetricSpecification = original.MetricSpecification
+type NetworkRuleSet = original.NetworkRuleSet
+type Operation = original.Operation
+type OperationDisplay = original.OperationDisplay
+type OperationListResult = original.OperationListResult
+type OperationProperties = original.OperationProperties
+type ProxyResource = original.ProxyResource
type Resource = original.Resource
-type SubResource = original.SubResource
+type Restriction = original.Restriction
+type ServiceSasParameters = original.ServiceSasParameters
+type ServiceSpecification = original.ServiceSpecification
+type Sku = original.Sku
+type SKUCapability = original.SKUCapability
+type SkuListResult = original.SkuListResult
+type TagProperty = original.TagProperty
+type TrackedResource = original.TrackedResource
+type UpdateHistoryProperty = original.UpdateHistoryProperty
type Usage = original.Usage
type UsageListResult = original.UsageListResult
type UsageName = original.UsageName
-type UsageClient = original.UsageClient
+type VirtualNetworkRule = original.VirtualNetworkRule
+type OperationsClient = original.OperationsClient
+type SkusClient = original.SkusClient
+type UsagesClient = original.UsagesClient
func NewAccountsClient(subscriptionID string) AccountsClient {
return original.NewAccountsClient(subscriptionID)
@@ -107,35 +310,113 @@ func NewAccountsClient(subscriptionID string) AccountsClient {
func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient {
return original.NewAccountsClientWithBaseURI(baseURI, subscriptionID)
}
+func NewBlobContainersClient(subscriptionID string) BlobContainersClient {
+ return original.NewBlobContainersClient(subscriptionID)
+}
+func NewBlobContainersClientWithBaseURI(baseURI string, subscriptionID string) BlobContainersClient {
+ return original.NewBlobContainersClientWithBaseURI(baseURI, subscriptionID)
+}
func New(subscriptionID string) BaseClient {
return original.New(subscriptionID)
}
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return original.NewWithBaseURI(baseURI, subscriptionID)
}
+func PossibleAccessTierValues() []AccessTier {
+ return original.PossibleAccessTierValues()
+}
func PossibleAccountStatusValues() []AccountStatus {
return original.PossibleAccountStatusValues()
}
-func PossibleAccountTypeValues() []AccountType {
- return original.PossibleAccountTypeValues()
+func PossibleActionValues() []Action {
+ return original.PossibleActionValues()
}
-func PossibleKeyNameValues() []KeyName {
- return original.PossibleKeyNameValues()
+func PossibleBypassValues() []Bypass {
+ return original.PossibleBypassValues()
+}
+func PossibleDefaultActionValues() []DefaultAction {
+ return original.PossibleDefaultActionValues()
+}
+func PossibleHTTPProtocolValues() []HTTPProtocol {
+ return original.PossibleHTTPProtocolValues()
+}
+func PossibleImmutabilityPolicyStateValues() []ImmutabilityPolicyState {
+ return original.PossibleImmutabilityPolicyStateValues()
+}
+func PossibleImmutabilityPolicyUpdateTypeValues() []ImmutabilityPolicyUpdateType {
+ return original.PossibleImmutabilityPolicyUpdateTypeValues()
+}
+func PossibleKeyPermissionValues() []KeyPermission {
+ return original.PossibleKeyPermissionValues()
+}
+func PossibleKeySourceValues() []KeySource {
+ return original.PossibleKeySourceValues()
+}
+func PossibleKindValues() []Kind {
+ return original.PossibleKindValues()
+}
+func PossibleLeaseDurationValues() []LeaseDuration {
+ return original.PossibleLeaseDurationValues()
+}
+func PossibleLeaseStateValues() []LeaseState {
+ return original.PossibleLeaseStateValues()
+}
+func PossibleLeaseStatusValues() []LeaseStatus {
+ return original.PossibleLeaseStatusValues()
+}
+func PossiblePermissionsValues() []Permissions {
+ return original.PossiblePermissionsValues()
}
func PossibleProvisioningStateValues() []ProvisioningState {
return original.PossibleProvisioningStateValues()
}
+func PossiblePublicAccessValues() []PublicAccess {
+ return original.PossiblePublicAccessValues()
+}
func PossibleReasonValues() []Reason {
return original.PossibleReasonValues()
}
+func PossibleReasonCodeValues() []ReasonCode {
+ return original.PossibleReasonCodeValues()
+}
+func PossibleServicesValues() []Services {
+ return original.PossibleServicesValues()
+}
+func PossibleSignedResourceValues() []SignedResource {
+ return original.PossibleSignedResourceValues()
+}
+func PossibleSignedResourceTypesValues() []SignedResourceTypes {
+ return original.PossibleSignedResourceTypesValues()
+}
+func PossibleSkuNameValues() []SkuName {
+ return original.PossibleSkuNameValues()
+}
+func PossibleSkuTierValues() []SkuTier {
+ return original.PossibleSkuTierValues()
+}
+func PossibleStateValues() []State {
+ return original.PossibleStateValues()
+}
func PossibleUsageUnitValues() []UsageUnit {
return original.PossibleUsageUnitValues()
}
-func NewUsageClient(subscriptionID string) UsageClient {
- return original.NewUsageClient(subscriptionID)
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return original.NewOperationsClient(subscriptionID)
}
-func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClient {
- return original.NewUsageClientWithBaseURI(baseURI, subscriptionID)
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewSkusClient(subscriptionID string) SkusClient {
+ return original.NewSkusClient(subscriptionID)
+}
+func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient {
+ return original.NewSkusClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewUsagesClient(subscriptionID string) UsagesClient {
+ return original.NewUsagesClient(subscriptionID)
+}
+func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient {
+ return original.NewUsagesClientWithBaseURI(baseURI, subscriptionID)
}
func UserAgent() string {
return original.UserAgent() + " profiles/preview"
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/recoveryservices/mgmt/siterecovery/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/recoveryservices/mgmt/siterecovery/models.go
index ea0f52b03..32ce1d82a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/recoveryservices/mgmt/siterecovery/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/recoveryservices/mgmt/siterecovery/models.go
@@ -728,6 +728,7 @@ type ProtectableItemCollection = original.ProtectableItemCollection
type ProtectableItemCollectionIterator = original.ProtectableItemCollectionIterator
type ProtectableItemCollectionPage = original.ProtectableItemCollectionPage
type ProtectableItemProperties = original.ProtectableItemProperties
+type ProtectableItemQueryParameter = original.ProtectableItemQueryParameter
type ProtectedItemsQueryParameter = original.ProtectedItemsQueryParameter
type ProtectionContainer = original.ProtectionContainer
type ProtectionContainerCollection = original.ProtectionContainerCollection
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/reservations/mgmt/reservations/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/reservations/mgmt/reservations/models.go
index 2f4340e04..bf0943228 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/reservations/mgmt/reservations/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/reservations/mgmt/reservations/models.go
@@ -19,7 +19,7 @@
package reservations
-import original "github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2017-11-01/reservations"
+import original "github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations"
const (
DefaultBaseURI = original.DefaultBaseURI
@@ -45,7 +45,6 @@ type Code = original.Code
const (
ActivateQuoteFailed Code = original.ActivateQuoteFailed
AppliedScopesNotAssociatedWithCommerceAccount Code = original.AppliedScopesNotAssociatedWithCommerceAccount
- AppliedScopesSameAsExisting Code = original.AppliedScopesSameAsExisting
AuthorizationFailed Code = original.AuthorizationFailed
BadRequest Code = original.BadRequest
BillingCustomerInputError Code = original.BillingCustomerInputError
@@ -85,6 +84,7 @@ const (
NoValidReservationsToReRate Code = original.NoValidReservationsToReRate
OperationCannotBePerformedInCurrentState Code = original.OperationCannotBePerformedInCurrentState
OperationFailed Code = original.OperationFailed
+ PatchValuesSameAsExisting Code = original.PatchValuesSameAsExisting
PaymentInstrumentNotFound Code = original.PaymentInstrumentNotFound
PurchaseError Code = original.PurchaseError
ReRateOnlyAllowedForEA Code = original.ReRateOnlyAllowedForEA
@@ -100,15 +100,27 @@ const (
UnsupportedReservationTerm Code = original.UnsupportedReservationTerm
)
-type Kind = original.Kind
+type InstanceFlexibility = original.InstanceFlexibility
const (
- MicrosoftCompute Kind = original.MicrosoftCompute
+ NotSupported InstanceFlexibility = original.NotSupported
+ Off InstanceFlexibility = original.Off
+ On InstanceFlexibility = original.On
+)
+
+type InstanceFlexibility1 = original.InstanceFlexibility1
+
+const (
+ InstanceFlexibility1NotSupported InstanceFlexibility1 = original.InstanceFlexibility1NotSupported
+ InstanceFlexibility1Off InstanceFlexibility1 = original.InstanceFlexibility1Off
+ InstanceFlexibility1On InstanceFlexibility1 = original.InstanceFlexibility1On
)
type Location = original.Location
const (
+ Australiac Location = original.Australiac
+ Australiac2 Location = original.Australiac2
Australiaeast Location = original.Australiaeast
Australiasoutheast Location = original.Australiasoutheast
Brazilsouth Location = original.Brazilsouth
@@ -119,6 +131,8 @@ const (
Eastasia Location = original.Eastasia
Eastus Location = original.Eastus
Eastus2 Location = original.Eastus2
+ Francecentral Location = original.Francecentral
+ Francesouth Location = original.Francesouth
Japaneast Location = original.Japaneast
Japanwest Location = original.Japanwest
Northcentralus Location = original.Northcentralus
@@ -171,6 +185,14 @@ const (
ProvisioningState1Succeeded ProvisioningState1 = original.ProvisioningState1Succeeded
)
+type ReservedResourceType = original.ReservedResourceType
+
+const (
+ SQLDatabases ReservedResourceType = original.SQLDatabases
+ SuseLinux ReservedResourceType = original.SuseLinux
+ VirtualMachines ReservedResourceType = original.VirtualMachines
+)
+
type StatusCode = original.StatusCode
const (
@@ -223,8 +245,8 @@ type Properties = original.Properties
type ReservationMergeFuture = original.ReservationMergeFuture
type ReservationUpdateFuture = original.ReservationUpdateFuture
type Response = original.Response
-type SkuCapability = original.SkuCapability
type SkuName = original.SkuName
+type SkuProperty = original.SkuProperty
type SkuRestriction = original.SkuRestriction
type SplitFuture = original.SplitFuture
type SplitProperties = original.SplitProperties
@@ -249,8 +271,11 @@ func PossibleAppliedScopeType1Values() []AppliedScopeType1 {
func PossibleCodeValues() []Code {
return original.PossibleCodeValues()
}
-func PossibleKindValues() []Kind {
- return original.PossibleKindValues()
+func PossibleInstanceFlexibilityValues() []InstanceFlexibility {
+ return original.PossibleInstanceFlexibilityValues()
+}
+func PossibleInstanceFlexibility1Values() []InstanceFlexibility1 {
+ return original.PossibleInstanceFlexibility1Values()
}
func PossibleLocationValues() []Location {
return original.PossibleLocationValues()
@@ -261,6 +286,9 @@ func PossibleProvisioningStateValues() []ProvisioningState {
func PossibleProvisioningState1Values() []ProvisioningState1 {
return original.PossibleProvisioningState1Values()
}
+func PossibleReservedResourceTypeValues() []ReservedResourceType {
+ return original.PossibleReservedResourceTypeValues()
+}
func PossibleStatusCodeValues() []StatusCode {
return original.PossibleStatusCodeValues()
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/resources/mgmt/managedapplications/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/resources/mgmt/managedapplications/models.go
index ed79a6eda..0a71b5633 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/resources/mgmt/managedapplications/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/resources/mgmt/managedapplications/models.go
@@ -19,7 +19,7 @@
package managedapplications
-import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-09-01/managedapplications"
+import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications"
type ApplicationDefinitionsClient = original.ApplicationDefinitionsClient
type ApplicationsClient = original.ApplicationsClient
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/resources/mgmt/policy/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/resources/mgmt/policy/models.go
index 6e1d70344..549ddc82f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/resources/mgmt/policy/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/resources/mgmt/policy/models.go
@@ -19,7 +19,7 @@
package policy
-import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-06-01-preview/policy"
+import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy"
type AssignmentsClient = original.AssignmentsClient
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/resources/mgmt/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/resources/mgmt/resources/models.go
index cbccab17e..4c5c09abf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/resources/mgmt/resources/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/resources/mgmt/resources/models.go
@@ -19,7 +19,7 @@
package resources
-import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources"
+import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources"
const (
DefaultBaseURI = original.DefaultBaseURI
@@ -75,7 +75,9 @@ type DeploymentOperationsListResultIterator = original.DeploymentOperationsListR
type DeploymentOperationsListResultPage = original.DeploymentOperationsListResultPage
type DeploymentProperties = original.DeploymentProperties
type DeploymentPropertiesExtended = original.DeploymentPropertiesExtended
+type DeploymentsCreateOrUpdateAtSubscriptionScopeFuture = original.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture
type DeploymentsCreateOrUpdateFuture = original.DeploymentsCreateOrUpdateFuture
+type DeploymentsDeleteAtSubscriptionScopeFuture = original.DeploymentsDeleteAtSubscriptionScopeFuture
type DeploymentsDeleteFuture = original.DeploymentsDeleteFuture
type DeploymentValidateResult = original.DeploymentValidateResult
type ExportTemplateRequest = original.ExportTemplateRequest
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/servicefabric/mgmt/servicefabric/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/servicefabric/mgmt/servicefabric/models.go
index 9f8818aac..2489ef68f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/servicefabric/mgmt/servicefabric/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/servicefabric/mgmt/servicefabric/models.go
@@ -19,10 +19,11 @@
package servicefabric
-import original "github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2017-07-01-preview/servicefabric"
+import original "github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric"
-type ApplicationClient = original.ApplicationClient
-type ApplicationTypeClient = original.ApplicationTypeClient
+type ApplicationsClient = original.ApplicationsClient
+type ApplicationTypesClient = original.ApplicationTypesClient
+type ApplicationTypeVersionsClient = original.ApplicationTypeVersionsClient
const (
DefaultBaseURI = original.DefaultBaseURI
@@ -46,15 +47,6 @@ const (
WaitingForNodes ClusterState = original.WaitingForNodes
)
-type DefaultMoveCost = original.DefaultMoveCost
-
-const (
- High DefaultMoveCost = original.High
- Low DefaultMoveCost = original.Low
- Medium DefaultMoveCost = original.Medium
- Zero DefaultMoveCost = original.Zero
-)
-
type DurabilityLevel = original.DurabilityLevel
const (
@@ -70,13 +62,31 @@ const (
Windows Environment = original.Windows
)
+type MoveCost = original.MoveCost
+
+const (
+ High MoveCost = original.High
+ Low MoveCost = original.Low
+ Medium MoveCost = original.Medium
+ Zero MoveCost = original.Zero
+)
+
type PartitionScheme = original.PartitionScheme
const (
- PartitionSchemeNamed PartitionScheme = original.PartitionSchemeNamed
- PartitionSchemePartitionSchemeDescription PartitionScheme = original.PartitionSchemePartitionSchemeDescription
- PartitionSchemeSingleton PartitionScheme = original.PartitionSchemeSingleton
- PartitionSchemeUniformInt64Range PartitionScheme = original.PartitionSchemeUniformInt64Range
+ Invalid PartitionScheme = original.Invalid
+ Named PartitionScheme = original.Named
+ Singleton PartitionScheme = original.Singleton
+ UniformInt64Range PartitionScheme = original.UniformInt64Range
+)
+
+type PartitionSchemeBasicPartitionSchemeDescription = original.PartitionSchemeBasicPartitionSchemeDescription
+
+const (
+ PartitionSchemeNamed PartitionSchemeBasicPartitionSchemeDescription = original.PartitionSchemeNamed
+ PartitionSchemePartitionSchemeDescription PartitionSchemeBasicPartitionSchemeDescription = original.PartitionSchemePartitionSchemeDescription
+ PartitionSchemeSingleton PartitionSchemeBasicPartitionSchemeDescription = original.PartitionSchemeSingleton
+ PartitionSchemeUniformInt64Range PartitionSchemeBasicPartitionSchemeDescription = original.PartitionSchemeUniformInt64Range
)
type ProvisioningState = original.ProvisioningState
@@ -101,34 +111,64 @@ const (
type ReliabilityLevel1 = original.ReliabilityLevel1
const (
- ReliabilityLevel1Bronze ReliabilityLevel1 = original.ReliabilityLevel1Bronze
- ReliabilityLevel1Gold ReliabilityLevel1 = original.ReliabilityLevel1Gold
- ReliabilityLevel1Silver ReliabilityLevel1 = original.ReliabilityLevel1Silver
+ ReliabilityLevel1Bronze ReliabilityLevel1 = original.ReliabilityLevel1Bronze
+ ReliabilityLevel1Gold ReliabilityLevel1 = original.ReliabilityLevel1Gold
+ ReliabilityLevel1None ReliabilityLevel1 = original.ReliabilityLevel1None
+ ReliabilityLevel1Platinum ReliabilityLevel1 = original.ReliabilityLevel1Platinum
+ ReliabilityLevel1Silver ReliabilityLevel1 = original.ReliabilityLevel1Silver
)
-type Scheme = original.Scheme
+type ServiceCorrelationScheme = original.ServiceCorrelationScheme
const (
- Affinity Scheme = original.Affinity
- AlignedAffinity Scheme = original.AlignedAffinity
- Invalid Scheme = original.Invalid
- NonAlignedAffinity Scheme = original.NonAlignedAffinity
+ ServiceCorrelationSchemeAffinity ServiceCorrelationScheme = original.ServiceCorrelationSchemeAffinity
+ ServiceCorrelationSchemeAlignedAffinity ServiceCorrelationScheme = original.ServiceCorrelationSchemeAlignedAffinity
+ ServiceCorrelationSchemeInvalid ServiceCorrelationScheme = original.ServiceCorrelationSchemeInvalid
+ ServiceCorrelationSchemeNonAlignedAffinity ServiceCorrelationScheme = original.ServiceCorrelationSchemeNonAlignedAffinity
)
type ServiceKind = original.ServiceKind
const (
- ServiceKindServiceProperties ServiceKind = original.ServiceKindServiceProperties
- ServiceKindStateful ServiceKind = original.ServiceKindStateful
- ServiceKindStateless ServiceKind = original.ServiceKindStateless
+ ServiceKindInvalid ServiceKind = original.ServiceKindInvalid
+ ServiceKindStateful ServiceKind = original.ServiceKindStateful
+ ServiceKindStateless ServiceKind = original.ServiceKindStateless
)
-type ServiceKindBasicServiceUpdateProperties = original.ServiceKindBasicServiceUpdateProperties
+type ServiceKindBasicServiceResourceProperties = original.ServiceKindBasicServiceResourceProperties
const (
- ServiceKindBasicServiceUpdatePropertiesServiceKindServiceUpdateProperties ServiceKindBasicServiceUpdateProperties = original.ServiceKindBasicServiceUpdatePropertiesServiceKindServiceUpdateProperties
- ServiceKindBasicServiceUpdatePropertiesServiceKindStateful ServiceKindBasicServiceUpdateProperties = original.ServiceKindBasicServiceUpdatePropertiesServiceKindStateful
- ServiceKindBasicServiceUpdatePropertiesServiceKindStateless ServiceKindBasicServiceUpdateProperties = original.ServiceKindBasicServiceUpdatePropertiesServiceKindStateless
+ ServiceKindServiceResourceProperties ServiceKindBasicServiceResourceProperties = original.ServiceKindServiceResourceProperties
+ ServiceKindStateful1 ServiceKindBasicServiceResourceProperties = original.ServiceKindStateful1
+ ServiceKindStateless1 ServiceKindBasicServiceResourceProperties = original.ServiceKindStateless1
+)
+
+type ServiceKindBasicServiceResourceUpdateProperties = original.ServiceKindBasicServiceResourceUpdateProperties
+
+const (
+ ServiceKindBasicServiceResourceUpdatePropertiesServiceKindServiceResourceUpdateProperties ServiceKindBasicServiceResourceUpdateProperties = original.ServiceKindBasicServiceResourceUpdatePropertiesServiceKindServiceResourceUpdateProperties
+ ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateful ServiceKindBasicServiceResourceUpdateProperties = original.ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateful
+ ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateless ServiceKindBasicServiceResourceUpdateProperties = original.ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateless
+)
+
+type ServiceLoadMetricWeight = original.ServiceLoadMetricWeight
+
+const (
+ ServiceLoadMetricWeightHigh ServiceLoadMetricWeight = original.ServiceLoadMetricWeightHigh
+ ServiceLoadMetricWeightLow ServiceLoadMetricWeight = original.ServiceLoadMetricWeightLow
+ ServiceLoadMetricWeightMedium ServiceLoadMetricWeight = original.ServiceLoadMetricWeightMedium
+ ServiceLoadMetricWeightZero ServiceLoadMetricWeight = original.ServiceLoadMetricWeightZero
+)
+
+type ServicePlacementPolicyType = original.ServicePlacementPolicyType
+
+const (
+ ServicePlacementPolicyTypeInvalid ServicePlacementPolicyType = original.ServicePlacementPolicyTypeInvalid
+ ServicePlacementPolicyTypeInvalidDomain ServicePlacementPolicyType = original.ServicePlacementPolicyTypeInvalidDomain
+ ServicePlacementPolicyTypeNonPartiallyPlaceService ServicePlacementPolicyType = original.ServicePlacementPolicyTypeNonPartiallyPlaceService
+ ServicePlacementPolicyTypePreferredPrimaryDomain ServicePlacementPolicyType = original.ServicePlacementPolicyTypePreferredPrimaryDomain
+ ServicePlacementPolicyTypeRequiredDomain ServicePlacementPolicyType = original.ServicePlacementPolicyTypeRequiredDomain
+ ServicePlacementPolicyTypeRequiredDomainDistribution ServicePlacementPolicyType = original.ServicePlacementPolicyTypeRequiredDomainDistribution
)
type Type = original.Type
@@ -151,15 +191,6 @@ const (
UpgradeMode1Manual UpgradeMode1 = original.UpgradeMode1Manual
)
-type Weight = original.Weight
-
-const (
- WeightHigh Weight = original.WeightHigh
- WeightLow Weight = original.WeightLow
- WeightMedium Weight = original.WeightMedium
- WeightZero Weight = original.WeightZero
-)
-
type X509StoreName = original.X509StoreName
const (
@@ -173,21 +204,39 @@ const (
TrustedPublisher X509StoreName = original.TrustedPublisher
)
-type ApplicationDeleteFuture = original.ApplicationDeleteFuture
+type X509StoreName1 = original.X509StoreName1
+
+const (
+ X509StoreName1AddressBook X509StoreName1 = original.X509StoreName1AddressBook
+ X509StoreName1AuthRoot X509StoreName1 = original.X509StoreName1AuthRoot
+ X509StoreName1CertificateAuthority X509StoreName1 = original.X509StoreName1CertificateAuthority
+ X509StoreName1Disallowed X509StoreName1 = original.X509StoreName1Disallowed
+ X509StoreName1My X509StoreName1 = original.X509StoreName1My
+ X509StoreName1Root X509StoreName1 = original.X509StoreName1Root
+ X509StoreName1TrustedPeople X509StoreName1 = original.X509StoreName1TrustedPeople
+ X509StoreName1TrustedPublisher X509StoreName1 = original.X509StoreName1TrustedPublisher
+)
+
+type ApplicationDeltaHealthPolicy = original.ApplicationDeltaHealthPolicy
type ApplicationHealthPolicy = original.ApplicationHealthPolicy
type ApplicationMetricDescription = original.ApplicationMetricDescription
-type ApplicationParameter = original.ApplicationParameter
-type ApplicationPatchFuture = original.ApplicationPatchFuture
-type ApplicationProperties = original.ApplicationProperties
-type ApplicationPutFuture = original.ApplicationPutFuture
type ApplicationResource = original.ApplicationResource
type ApplicationResourceList = original.ApplicationResourceList
+type ApplicationResourceProperties = original.ApplicationResourceProperties
type ApplicationResourceUpdate = original.ApplicationResourceUpdate
-type ApplicationTypeDeleteFuture = original.ApplicationTypeDeleteFuture
-type ApplicationTypeProperties = original.ApplicationTypeProperties
+type ApplicationResourceUpdateProperties = original.ApplicationResourceUpdateProperties
+type ApplicationsCreateFuture = original.ApplicationsCreateFuture
+type ApplicationsDeleteFuture = original.ApplicationsDeleteFuture
+type ApplicationsUpdateFuture = original.ApplicationsUpdateFuture
type ApplicationTypeResource = original.ApplicationTypeResource
type ApplicationTypeResourceList = original.ApplicationTypeResourceList
-type ApplicationUpdateProperties = original.ApplicationUpdateProperties
+type ApplicationTypeResourceProperties = original.ApplicationTypeResourceProperties
+type ApplicationTypesDeleteFuture = original.ApplicationTypesDeleteFuture
+type ApplicationTypeVersionResource = original.ApplicationTypeVersionResource
+type ApplicationTypeVersionResourceList = original.ApplicationTypeVersionResourceList
+type ApplicationTypeVersionResourceProperties = original.ApplicationTypeVersionResourceProperties
+type ApplicationTypeVersionsCreateFuture = original.ApplicationTypeVersionsCreateFuture
+type ApplicationTypeVersionsDeleteFuture = original.ApplicationTypeVersionsDeleteFuture
type ApplicationUpgradePolicy = original.ApplicationUpgradePolicy
type AvailableOperationDisplay = original.AvailableOperationDisplay
type AzureActiveDirectory = original.AzureActiveDirectory
@@ -210,6 +259,7 @@ type ClusterVersionDetails = original.ClusterVersionDetails
type DiagnosticsStorageAccountConfig = original.DiagnosticsStorageAccountConfig
type EndpointRangeDescription = original.EndpointRangeDescription
type ErrorModel = original.ErrorModel
+type ErrorModelError = original.ErrorModelError
type NamedPartitionSchemeDescription = original.NamedPartitionSchemeDescription
type NodeTypeDescription = original.NodeTypeDescription
type OperationListResult = original.OperationListResult
@@ -221,24 +271,25 @@ type PartitionSchemeDescription = original.PartitionSchemeDescription
type ProxyResource = original.ProxyResource
type Resource = original.Resource
type RollingUpgradeMonitoringPolicy = original.RollingUpgradeMonitoringPolicy
+type ServerCertificateCommonName = original.ServerCertificateCommonName
+type ServerCertificateCommonNames = original.ServerCertificateCommonNames
type ServiceCorrelationDescription = original.ServiceCorrelationDescription
-type ServiceDeleteFuture = original.ServiceDeleteFuture
type ServiceLoadMetricDescription = original.ServiceLoadMetricDescription
-type ServicePatchFuture = original.ServicePatchFuture
type BasicServicePlacementPolicyDescription = original.BasicServicePlacementPolicyDescription
type ServicePlacementPolicyDescription = original.ServicePlacementPolicyDescription
-type BasicServiceProperties = original.BasicServiceProperties
-type ServiceProperties = original.ServiceProperties
-type ServicePropertiesBase = original.ServicePropertiesBase
-type ServicePutFuture = original.ServicePutFuture
type ServiceResource = original.ServiceResource
type ServiceResourceList = original.ServiceResourceList
+type BasicServiceResourceProperties = original.BasicServiceResourceProperties
+type ServiceResourceProperties = original.ServiceResourceProperties
+type ServiceResourcePropertiesBase = original.ServiceResourcePropertiesBase
type ServiceResourceUpdate = original.ServiceResourceUpdate
+type BasicServiceResourceUpdateProperties = original.BasicServiceResourceUpdateProperties
+type ServiceResourceUpdateProperties = original.ServiceResourceUpdateProperties
+type ServicesCreateFuture = original.ServicesCreateFuture
+type ServicesDeleteFuture = original.ServicesDeleteFuture
+type ServicesUpdateFuture = original.ServicesUpdateFuture
type ServiceTypeDeltaHealthPolicy = original.ServiceTypeDeltaHealthPolicy
type ServiceTypeHealthPolicy = original.ServiceTypeHealthPolicy
-type ServiceTypeHealthPolicyMapItem = original.ServiceTypeHealthPolicyMapItem
-type BasicServiceUpdateProperties = original.BasicServiceUpdateProperties
-type ServiceUpdateProperties = original.ServiceUpdateProperties
type SettingsParameterDescription = original.SettingsParameterDescription
type SettingsSectionDescription = original.SettingsSectionDescription
type SingletonPartitionSchemeDescription = original.SingletonPartitionSchemeDescription
@@ -247,60 +298,63 @@ type StatefulServiceUpdateProperties = original.StatefulServiceUpdateProperties
type StatelessServiceProperties = original.StatelessServiceProperties
type StatelessServiceUpdateProperties = original.StatelessServiceUpdateProperties
type UniformInt64RangePartitionSchemeDescription = original.UniformInt64RangePartitionSchemeDescription
-type VersionDeleteFuture = original.VersionDeleteFuture
-type VersionProperties = original.VersionProperties
-type VersionPutFuture = original.VersionPutFuture
-type VersionResource = original.VersionResource
-type VersionResourceList = original.VersionResourceList
type OperationsClient = original.OperationsClient
-type ServiceClient = original.ServiceClient
-type VersionClient = original.VersionClient
+type ServicesClient = original.ServicesClient
-func NewApplicationClient() ApplicationClient {
- return original.NewApplicationClient()
+func NewApplicationsClient(subscriptionID string) ApplicationsClient {
+ return original.NewApplicationsClient(subscriptionID)
}
-func NewApplicationClientWithBaseURI(baseURI string) ApplicationClient {
- return original.NewApplicationClientWithBaseURI(baseURI)
+func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient {
+ return original.NewApplicationsClientWithBaseURI(baseURI, subscriptionID)
}
-func NewApplicationTypeClient() ApplicationTypeClient {
- return original.NewApplicationTypeClient()
+func NewApplicationTypesClient(subscriptionID string) ApplicationTypesClient {
+ return original.NewApplicationTypesClient(subscriptionID)
}
-func NewApplicationTypeClientWithBaseURI(baseURI string) ApplicationTypeClient {
- return original.NewApplicationTypeClientWithBaseURI(baseURI)
+func NewApplicationTypesClientWithBaseURI(baseURI string, subscriptionID string) ApplicationTypesClient {
+ return original.NewApplicationTypesClientWithBaseURI(baseURI, subscriptionID)
}
-func New() BaseClient {
- return original.New()
+func NewApplicationTypeVersionsClient(subscriptionID string) ApplicationTypeVersionsClient {
+ return original.NewApplicationTypeVersionsClient(subscriptionID)
}
-func NewWithBaseURI(baseURI string) BaseClient {
- return original.NewWithBaseURI(baseURI)
+func NewApplicationTypeVersionsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationTypeVersionsClient {
+ return original.NewApplicationTypeVersionsClientWithBaseURI(baseURI, subscriptionID)
}
-func NewClustersClient() ClustersClient {
- return original.NewClustersClient()
+func New(subscriptionID string) BaseClient {
+ return original.New(subscriptionID)
}
-func NewClustersClientWithBaseURI(baseURI string) ClustersClient {
- return original.NewClustersClientWithBaseURI(baseURI)
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return original.NewWithBaseURI(baseURI, subscriptionID)
}
-func NewClusterVersionsClient() ClusterVersionsClient {
- return original.NewClusterVersionsClient()
+func NewClustersClient(subscriptionID string) ClustersClient {
+ return original.NewClustersClient(subscriptionID)
}
-func NewClusterVersionsClientWithBaseURI(baseURI string) ClusterVersionsClient {
- return original.NewClusterVersionsClientWithBaseURI(baseURI)
+func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient {
+ return original.NewClustersClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewClusterVersionsClient(subscriptionID string) ClusterVersionsClient {
+ return original.NewClusterVersionsClient(subscriptionID)
+}
+func NewClusterVersionsClientWithBaseURI(baseURI string, subscriptionID string) ClusterVersionsClient {
+ return original.NewClusterVersionsClientWithBaseURI(baseURI, subscriptionID)
}
func PossibleClusterStateValues() []ClusterState {
return original.PossibleClusterStateValues()
}
-func PossibleDefaultMoveCostValues() []DefaultMoveCost {
- return original.PossibleDefaultMoveCostValues()
-}
func PossibleDurabilityLevelValues() []DurabilityLevel {
return original.PossibleDurabilityLevelValues()
}
func PossibleEnvironmentValues() []Environment {
return original.PossibleEnvironmentValues()
}
+func PossibleMoveCostValues() []MoveCost {
+ return original.PossibleMoveCostValues()
+}
func PossiblePartitionSchemeValues() []PartitionScheme {
return original.PossiblePartitionSchemeValues()
}
+func PossiblePartitionSchemeBasicPartitionSchemeDescriptionValues() []PartitionSchemeBasicPartitionSchemeDescription {
+ return original.PossiblePartitionSchemeBasicPartitionSchemeDescriptionValues()
+}
func PossibleProvisioningStateValues() []ProvisioningState {
return original.PossibleProvisioningStateValues()
}
@@ -310,14 +364,23 @@ func PossibleReliabilityLevelValues() []ReliabilityLevel {
func PossibleReliabilityLevel1Values() []ReliabilityLevel1 {
return original.PossibleReliabilityLevel1Values()
}
-func PossibleSchemeValues() []Scheme {
- return original.PossibleSchemeValues()
+func PossibleServiceCorrelationSchemeValues() []ServiceCorrelationScheme {
+ return original.PossibleServiceCorrelationSchemeValues()
}
func PossibleServiceKindValues() []ServiceKind {
return original.PossibleServiceKindValues()
}
-func PossibleServiceKindBasicServiceUpdatePropertiesValues() []ServiceKindBasicServiceUpdateProperties {
- return original.PossibleServiceKindBasicServiceUpdatePropertiesValues()
+func PossibleServiceKindBasicServiceResourcePropertiesValues() []ServiceKindBasicServiceResourceProperties {
+ return original.PossibleServiceKindBasicServiceResourcePropertiesValues()
+}
+func PossibleServiceKindBasicServiceResourceUpdatePropertiesValues() []ServiceKindBasicServiceResourceUpdateProperties {
+ return original.PossibleServiceKindBasicServiceResourceUpdatePropertiesValues()
+}
+func PossibleServiceLoadMetricWeightValues() []ServiceLoadMetricWeight {
+ return original.PossibleServiceLoadMetricWeightValues()
+}
+func PossibleServicePlacementPolicyTypeValues() []ServicePlacementPolicyType {
+ return original.PossibleServicePlacementPolicyTypeValues()
}
func PossibleTypeValues() []Type {
return original.PossibleTypeValues()
@@ -328,23 +391,23 @@ func PossibleUpgradeModeValues() []UpgradeMode {
func PossibleUpgradeMode1Values() []UpgradeMode1 {
return original.PossibleUpgradeMode1Values()
}
-func PossibleWeightValues() []Weight {
- return original.PossibleWeightValues()
-}
func PossibleX509StoreNameValues() []X509StoreName {
return original.PossibleX509StoreNameValues()
}
-func NewOperationsClient() OperationsClient {
- return original.NewOperationsClient()
+func PossibleX509StoreName1Values() []X509StoreName1 {
+ return original.PossibleX509StoreName1Values()
}
-func NewOperationsClientWithBaseURI(baseURI string) OperationsClient {
- return original.NewOperationsClientWithBaseURI(baseURI)
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return original.NewOperationsClient(subscriptionID)
}
-func NewServiceClient() ServiceClient {
- return original.NewServiceClient()
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID)
}
-func NewServiceClientWithBaseURI(baseURI string) ServiceClient {
- return original.NewServiceClientWithBaseURI(baseURI)
+func NewServicesClient(subscriptionID string) ServicesClient {
+ return original.NewServicesClient(subscriptionID)
+}
+func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient {
+ return original.NewServicesClientWithBaseURI(baseURI, subscriptionID)
}
func UserAgent() string {
return original.UserAgent() + " profiles/preview"
@@ -352,9 +415,3 @@ func UserAgent() string {
func Version() string {
return original.Version()
}
-func NewVersionClient() VersionClient {
- return original.NewVersionClient()
-}
-func NewVersionClientWithBaseURI(baseURI string) VersionClient {
- return original.NewVersionClientWithBaseURI(baseURI)
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/trafficmanager/mgmt/trafficmanager/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/trafficmanager/mgmt/trafficmanager/models.go
index ebb6a5fbc..dfed46de9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/trafficmanager/mgmt/trafficmanager/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/trafficmanager/mgmt/trafficmanager/models.go
@@ -81,6 +81,13 @@ const (
Weighted TrafficRoutingMethod = original.Weighted
)
+type TrafficViewEnrollmentStatus = original.TrafficViewEnrollmentStatus
+
+const (
+ TrafficViewEnrollmentStatusDisabled TrafficViewEnrollmentStatus = original.TrafficViewEnrollmentStatusDisabled
+ TrafficViewEnrollmentStatusEnabled TrafficViewEnrollmentStatus = original.TrafficViewEnrollmentStatusEnabled
+)
+
type CheckTrafficManagerRelativeDNSNameAvailabilityParameters = original.CheckTrafficManagerRelativeDNSNameAvailabilityParameters
type CloudError = original.CloudError
type CloudErrorBody = original.CloudErrorBody
@@ -151,6 +158,9 @@ func PossibleProfileStatusValues() []ProfileStatus {
func PossibleTrafficRoutingMethodValues() []TrafficRoutingMethod {
return original.PossibleTrafficRoutingMethodValues()
}
+func PossibleTrafficViewEnrollmentStatusValues() []TrafficViewEnrollmentStatus {
+ return original.PossibleTrafficViewEnrollmentStatusValues()
+}
func NewProfilesClient(subscriptionID string) ProfilesClient {
return original.NewProfilesClient(subscriptionID)
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/web/mgmt/web/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/web/mgmt/web/models.go
index 76e0d4712..49e40ea40 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/web/mgmt/web/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/preview/web/mgmt/web/models.go
@@ -282,6 +282,14 @@ const (
Hour FrequencyUnit = original.Hour
)
+type FtpsState = original.FtpsState
+
+const (
+ AllAllowed FtpsState = original.AllAllowed
+ Disabled FtpsState = original.Disabled
+ FtpsOnly FtpsState = original.FtpsOnly
+)
+
type HostingEnvironmentStatus = original.HostingEnvironmentStatus
const (
@@ -533,9 +541,9 @@ const (
type SslState = original.SslState
const (
- Disabled SslState = original.Disabled
- IPBasedEnabled SslState = original.IPBasedEnabled
- SniEnabled SslState = original.SniEnabled
+ SslStateDisabled SslState = original.SslStateDisabled
+ SslStateIPBasedEnabled SslState = original.SslStateIPBasedEnabled
+ SslStateSniEnabled SslState = original.SslStateSniEnabled
)
type StatusOptions = original.StatusOptions
@@ -670,6 +678,8 @@ type AppsMigrateMySQLFuture = original.AppsMigrateMySQLFuture
type AppsMigrateStorageFuture = original.AppsMigrateStorageFuture
type AppsRestoreFromBackupBlobFuture = original.AppsRestoreFromBackupBlobFuture
type AppsRestoreFromBackupBlobSlotFuture = original.AppsRestoreFromBackupBlobSlotFuture
+type AppsRestoreFromDeletedAppFuture = original.AppsRestoreFromDeletedAppFuture
+type AppsRestoreFromDeletedAppSlotFuture = original.AppsRestoreFromDeletedAppSlotFuture
type AppsRestoreFuture = original.AppsRestoreFuture
type AppsRestoreSlotFuture = original.AppsRestoreSlotFuture
type AppsRestoreSnapshotFuture = original.AppsRestoreSnapshotFuture
@@ -740,6 +750,8 @@ type DataSource = original.DataSource
type DefaultErrorResponse = original.DefaultErrorResponse
type DefaultErrorResponseError = original.DefaultErrorResponseError
type DefaultErrorResponseErrorDetailsItem = original.DefaultErrorResponseErrorDetailsItem
+type DeletedAppRestoreRequest = original.DeletedAppRestoreRequest
+type DeletedAppRestoreRequestProperties = original.DeletedAppRestoreRequestProperties
type DeletedSite = original.DeletedSite
type DeletedWebAppCollection = original.DeletedWebAppCollection
type DeletedWebAppCollectionIterator = original.DeletedWebAppCollectionIterator
@@ -1226,6 +1238,9 @@ func PossibleDomainTypeValues() []DomainType {
func PossibleFrequencyUnitValues() []FrequencyUnit {
return original.PossibleFrequencyUnitValues()
}
+func PossibleFtpsStateValues() []FtpsState {
+ return original.PossibleFtpsStateValues()
+}
func PossibleHostingEnvironmentStatusValues() []HostingEnvironmentStatus {
return original.PossibleHostingEnvironmentStatusValues()
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addomainservicemembers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addomainservicemembers.go
new file mode 100644
index 000000000..8737fea57
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addomainservicemembers.go
@@ -0,0 +1,149 @@
+package adhybridhealthservice
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// AdDomainServiceMembersClient is the REST APIs for Azure Active Drectory Connect Health
+type AdDomainServiceMembersClient struct {
+ BaseClient
+}
+
+// NewAdDomainServiceMembersClient creates an instance of the AdDomainServiceMembersClient client.
+func NewAdDomainServiceMembersClient() AdDomainServiceMembersClient {
+ return NewAdDomainServiceMembersClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewAdDomainServiceMembersClientWithBaseURI creates an instance of the AdDomainServiceMembersClient client.
+func NewAdDomainServiceMembersClientWithBaseURI(baseURI string) AdDomainServiceMembersClient {
+ return AdDomainServiceMembersClient{NewWithBaseURI(baseURI)}
+}
+
+// List gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure
+// Active Directory Connect Health.
+// Parameters:
+// serviceName - the name of the service.
+// isGroupbySite - indicates if the result should be grouped by site or not.
+// filter - the server property filter to apply.
+// query - the custom query.
+// takeCount - the take count , which specifies the number of elements that can be returned from a sequence.
+func (client AdDomainServiceMembersClient) List(ctx context.Context, serviceName string, isGroupbySite bool, filter string, query string, takeCount *int32) (result AddsServiceMembersPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, serviceName, isGroupbySite, filter, query, takeCount)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AdDomainServiceMembersClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.asm.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AdDomainServiceMembersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.asm, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AdDomainServiceMembersClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client AdDomainServiceMembersClient) ListPreparer(ctx context.Context, serviceName string, isGroupbySite bool, filter string, query string, takeCount *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "isGroupbySite": autorest.Encode("query", isGroupbySite),
+ "nextPartitionKey": autorest.Encode("query", ""),
+ "nextRowKey": autorest.Encode("query", ""),
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(query) > 0 {
+ queryParameters["query"] = autorest.Encode("query", query)
+ }
+ if takeCount != nil {
+ queryParameters["takeCount"] = autorest.Encode("query", *takeCount)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/addomainservicemembers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client AdDomainServiceMembersClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client AdDomainServiceMembersClient) ListResponder(resp *http.Response) (result AddsServiceMembers, 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 AdDomainServiceMembersClient) listNextResults(lastResults AddsServiceMembers) (result AddsServiceMembers, err error) {
+ req, err := lastResults.addsServiceMembersPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AdDomainServiceMembersClient", "listNextResults", 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, "adhybridhealthservice.AdDomainServiceMembersClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AdDomainServiceMembersClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AdDomainServiceMembersClient) ListComplete(ctx context.Context, serviceName string, isGroupbySite bool, filter string, query string, takeCount *int32) (result AddsServiceMembersIterator, err error) {
+ result.page, err = client.List(ctx, serviceName, isGroupbySite, filter, query, takeCount)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicemembers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicemembers.go
new file mode 100644
index 000000000..e5ed7a9f8
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicemembers.go
@@ -0,0 +1,137 @@
+package adhybridhealthservice
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// AddsServiceMembersClient is the REST APIs for Azure Active Drectory Connect Health
+type AddsServiceMembersClient struct {
+ BaseClient
+}
+
+// NewAddsServiceMembersClient creates an instance of the AddsServiceMembersClient client.
+func NewAddsServiceMembersClient() AddsServiceMembersClient {
+ return NewAddsServiceMembersClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewAddsServiceMembersClientWithBaseURI creates an instance of the AddsServiceMembersClient client.
+func NewAddsServiceMembersClientWithBaseURI(baseURI string) AddsServiceMembersClient {
+ return AddsServiceMembersClient{NewWithBaseURI(baseURI)}
+}
+
+// List gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are
+// onboarded to Azure Active Directory Connect Health.
+// Parameters:
+// serviceName - the name of the service.
+// filter - the server property filter to apply.
+func (client AddsServiceMembersClient) List(ctx context.Context, serviceName string, filter string) (result AddsServiceMembersPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, serviceName, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServiceMembersClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.asm.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServiceMembersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.asm, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServiceMembersClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client AddsServiceMembersClient) ListPreparer(ctx context.Context, serviceName string, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ 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("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/addsservicemembers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServiceMembersClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client AddsServiceMembersClient) ListResponder(resp *http.Response) (result AddsServiceMembers, 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 AddsServiceMembersClient) listNextResults(lastResults AddsServiceMembers) (result AddsServiceMembers, err error) {
+ req, err := lastResults.addsServiceMembersPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServiceMembersClient", "listNextResults", 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, "adhybridhealthservice.AddsServiceMembersClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServiceMembersClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AddsServiceMembersClient) ListComplete(ctx context.Context, serviceName string, filter string) (result AddsServiceMembersIterator, err error) {
+ result.page, err = client.List(ctx, serviceName, filter)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservices.go
new file mode 100644
index 000000000..934b14a4c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservices.go
@@ -0,0 +1,1277 @@
+package adhybridhealthservice
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// AddsServicesClient is the REST APIs for Azure Active Drectory Connect Health
+type AddsServicesClient struct {
+ BaseClient
+}
+
+// NewAddsServicesClient creates an instance of the AddsServicesClient client.
+func NewAddsServicesClient() AddsServicesClient {
+ return NewAddsServicesClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewAddsServicesClientWithBaseURI creates an instance of the AddsServicesClient client.
+func NewAddsServicesClientWithBaseURI(baseURI string) AddsServicesClient {
+ return AddsServicesClient{NewWithBaseURI(baseURI)}
+}
+
+// Add onboards a service for a given tenant in Azure Active Directory Connect Health.
+// Parameters:
+// service - the service object.
+func (client AddsServicesClient) Add(ctx context.Context, service ServiceProperties) (result ServiceProperties, err error) {
+ req, err := client.AddPreparer(ctx, service)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "Add", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "Add", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "Add", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddPreparer prepares the Add request.
+func (client AddsServicesClient) AddPreparer(ctx context.Context, service ServiceProperties) (*http.Request, error) {
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ADHybridHealthService/addsservices"),
+ autorest.WithJSON(service),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddSender sends the Add request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) AddSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddResponder handles the response to the Add request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) AddResponder(resp *http.Response) (result ServiceProperties, 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 Active Directory Domain Service which is onboarded to Azure Active Directory Connect Health.
+// Parameters:
+// serviceName - the name of the service which needs to be deleted.
+// confirm - indicates if the service will be permanently deleted or disabled. True indicates that the service
+// will be permanently deleted and False indicates that the service will be marked disabled and then deleted
+// after 30 days, if it is not re-registered.
+func (client AddsServicesClient) Delete(ctx context.Context, serviceName string, confirm *bool) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, serviceName, confirm)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client AddsServicesClient) DeletePreparer(ctx context.Context, serviceName string, confirm *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if confirm != nil {
+ queryParameters["confirm"] = autorest.Encode("query", *confirm)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) 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 details of an Active Directory Domain Service for a tenant having Azure AD Premium license and is
+// onboarded to Azure Active Directory Connect Health.
+// Parameters:
+// serviceName - the name of the service.
+func (client AddsServicesClient) Get(ctx context.Context, serviceName string) (result ServiceProperties, err error) {
+ req, err := client.GetPreparer(ctx, serviceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client AddsServicesClient) GetPreparer(ctx context.Context, serviceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) GetResponder(resp *http.Response) (result ServiceProperties, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetForestSummary gets the forest summary for a given Active Directory Domain Service, that is onboarded to Azure
+// Active Directory Connect Health.
+// Parameters:
+// serviceName - the name of the service.
+func (client AddsServicesClient) GetForestSummary(ctx context.Context, serviceName string) (result ForestSummary, err error) {
+ req, err := client.GetForestSummaryPreparer(ctx, serviceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "GetForestSummary", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetForestSummarySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "GetForestSummary", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetForestSummaryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "GetForestSummary", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetForestSummaryPreparer prepares the GetForestSummary request.
+func (client AddsServicesClient) GetForestSummaryPreparer(ctx context.Context, serviceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/forestsummary", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetForestSummarySender sends the GetForestSummary request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) GetForestSummarySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetForestSummaryResponder handles the response to the GetForestSummary request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) GetForestSummaryResponder(resp *http.Response) (result ForestSummary, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetMetricMetadata gets the service related metric information.
+// Parameters:
+// serviceName - the name of the service.
+// metricName - the metric name
+func (client AddsServicesClient) GetMetricMetadata(ctx context.Context, serviceName string, metricName string) (result MetricMetadata, err error) {
+ req, err := client.GetMetricMetadataPreparer(ctx, serviceName, metricName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "GetMetricMetadata", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetMetricMetadataSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "GetMetricMetadata", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetMetricMetadataResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "GetMetricMetadata", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetMetricMetadataPreparer prepares the GetMetricMetadata request.
+func (client AddsServicesClient) GetMetricMetadataPreparer(ctx context.Context, serviceName string, metricName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "metricName": autorest.Encode("path", metricName),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metricmetadata/{metricName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetMetricMetadataSender sends the GetMetricMetadata request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) GetMetricMetadataSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetMetricMetadataResponder handles the response to the GetMetricMetadata request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) GetMetricMetadataResponder(resp *http.Response) (result MetricMetadata, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetMetricMetadataForGroup gets the service related metrics for a given metric and group combination.
+// Parameters:
+// serviceName - the name of the service.
+// metricName - the metric name
+// groupName - the group name
+// groupKey - the group key
+// fromDate - the start date.
+// toDate - the end date.
+func (client AddsServicesClient) GetMetricMetadataForGroup(ctx context.Context, serviceName string, metricName string, groupName string, groupKey string, fromDate *date.Time, toDate *date.Time) (result MetricSets, err error) {
+ req, err := client.GetMetricMetadataForGroupPreparer(ctx, serviceName, metricName, groupName, groupKey, fromDate, toDate)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "GetMetricMetadataForGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetMetricMetadataForGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "GetMetricMetadataForGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetMetricMetadataForGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "GetMetricMetadataForGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetMetricMetadataForGroupPreparer prepares the GetMetricMetadataForGroup request.
+func (client AddsServicesClient) GetMetricMetadataForGroupPreparer(ctx context.Context, serviceName string, metricName string, groupName string, groupKey string, fromDate *date.Time, toDate *date.Time) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupName": autorest.Encode("path", groupName),
+ "metricName": autorest.Encode("path", metricName),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(groupKey) > 0 {
+ queryParameters["groupKey"] = autorest.Encode("query", groupKey)
+ }
+ if fromDate != nil {
+ queryParameters["fromDate"] = autorest.Encode("query", *fromDate)
+ }
+ if toDate != nil {
+ queryParameters["toDate"] = autorest.Encode("query", *toDate)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metricmetadata/{metricName}/groups/{groupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetMetricMetadataForGroupSender sends the GetMetricMetadataForGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) GetMetricMetadataForGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetMetricMetadataForGroupResponder handles the response to the GetMetricMetadataForGroup request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) GetMetricMetadataForGroupResponder(resp *http.Response) (result MetricSets, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetReplicationStatus gets Replication status for a given Active Directory Domain Service, that is onboarded to Azure
+// Active Directory Connect Health.
+// Parameters:
+// serviceName - the name of the service.
+func (client AddsServicesClient) GetReplicationStatus(ctx context.Context, serviceName string) (result ReplicationStatus, err error) {
+ req, err := client.GetReplicationStatusPreparer(ctx, serviceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "GetReplicationStatus", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetReplicationStatusSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "GetReplicationStatus", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetReplicationStatusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "GetReplicationStatus", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetReplicationStatusPreparer prepares the GetReplicationStatus request.
+func (client AddsServicesClient) GetReplicationStatusPreparer(ctx context.Context, serviceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/replicationstatus", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetReplicationStatusSender sends the GetReplicationStatus request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) GetReplicationStatusSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetReplicationStatusResponder handles the response to the GetReplicationStatus request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) GetReplicationStatusResponder(resp *http.Response) (result ReplicationStatus, 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 details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory
+// Connect Health.
+// Parameters:
+// filter - the service property filter to apply.
+// serviceType - the service type for the services onboarded to Azure Active Directory Connect Health.
+// Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be
+// AdFederationService or AadSyncService or AdDomainService.
+// skipCount - the skip count, which specifies the number of elements that can be bypassed from a sequence and
+// then return the remaining elements.
+// takeCount - the take count , which specifies the number of elements that can be returned from a sequence.
+func (client AddsServicesClient) List(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result ServicesPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, filter, serviceType, skipCount, takeCount)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.s.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.s, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client AddsServicesClient) ListPreparer(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (*http.Request, error) {
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(serviceType) > 0 {
+ queryParameters["serviceType"] = autorest.Encode("query", serviceType)
+ }
+ if skipCount != nil {
+ queryParameters["skipCount"] = autorest.Encode("query", *skipCount)
+ }
+ if takeCount != nil {
+ queryParameters["takeCount"] = autorest.Encode("query", *takeCount)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ADHybridHealthService/addsservices"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) ListResponder(resp *http.Response) (result Services, 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 AddsServicesClient) listNextResults(lastResults Services) (result Services, err error) {
+ req, err := lastResults.servicesPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listNextResults", 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, "adhybridhealthservice.AddsServicesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AddsServicesClient) ListComplete(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result ServicesIterator, err error) {
+ result.page, err = client.List(ctx, filter, serviceType, skipCount, takeCount)
+ return
+}
+
+// ListMetricMetadata gets the service related metrics information.
+// Parameters:
+// serviceName - the name of the service.
+// filter - the metric metadata property filter to apply.
+// perfCounter - indicates if only performance counter metrics are requested.
+func (client AddsServicesClient) ListMetricMetadata(ctx context.Context, serviceName string, filter string, perfCounter *bool) (result MetricMetadataListPage, err error) {
+ result.fn = client.listMetricMetadataNextResults
+ req, err := client.ListMetricMetadataPreparer(ctx, serviceName, filter, perfCounter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListMetricMetadata", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListMetricMetadataSender(req)
+ if err != nil {
+ result.mml.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListMetricMetadata", resp, "Failure sending request")
+ return
+ }
+
+ result.mml, err = client.ListMetricMetadataResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListMetricMetadata", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListMetricMetadataPreparer prepares the ListMetricMetadata request.
+func (client AddsServicesClient) ListMetricMetadataPreparer(ctx context.Context, serviceName string, filter string, perfCounter *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if perfCounter != nil {
+ queryParameters["perfCounter"] = autorest.Encode("query", *perfCounter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metricmetadata", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListMetricMetadataSender sends the ListMetricMetadata request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) ListMetricMetadataSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListMetricMetadataResponder handles the response to the ListMetricMetadata request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) ListMetricMetadataResponder(resp *http.Response) (result MetricMetadataList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listMetricMetadataNextResults retrieves the next set of results, if any.
+func (client AddsServicesClient) listMetricMetadataNextResults(lastResults MetricMetadataList) (result MetricMetadataList, err error) {
+ req, err := lastResults.metricMetadataListPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listMetricMetadataNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListMetricMetadataSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listMetricMetadataNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListMetricMetadataResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listMetricMetadataNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListMetricMetadataComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AddsServicesClient) ListMetricMetadataComplete(ctx context.Context, serviceName string, filter string, perfCounter *bool) (result MetricMetadataListIterator, err error) {
+ result.page, err = client.ListMetricMetadata(ctx, serviceName, filter, perfCounter)
+ return
+}
+
+// ListMetricsAverage gets the average of the metric values for a given metric and group combination.
+// Parameters:
+// serviceName - the name of the service.
+// metricName - the metric name
+// groupName - the group name
+func (client AddsServicesClient) ListMetricsAverage(ctx context.Context, serviceName string, metricName string, groupName string) (result MetricsPage, err error) {
+ result.fn = client.listMetricsAverageNextResults
+ req, err := client.ListMetricsAveragePreparer(ctx, serviceName, metricName, groupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListMetricsAverage", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListMetricsAverageSender(req)
+ if err != nil {
+ result.mVar.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListMetricsAverage", resp, "Failure sending request")
+ return
+ }
+
+ result.mVar, err = client.ListMetricsAverageResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListMetricsAverage", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListMetricsAveragePreparer prepares the ListMetricsAverage request.
+func (client AddsServicesClient) ListMetricsAveragePreparer(ctx context.Context, serviceName string, metricName string, groupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupName": autorest.Encode("path", groupName),
+ "metricName": autorest.Encode("path", metricName),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metrics/{metricName}/groups/{groupName}/average", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListMetricsAverageSender sends the ListMetricsAverage request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) ListMetricsAverageSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListMetricsAverageResponder handles the response to the ListMetricsAverage request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) ListMetricsAverageResponder(resp *http.Response) (result Metrics, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listMetricsAverageNextResults retrieves the next set of results, if any.
+func (client AddsServicesClient) listMetricsAverageNextResults(lastResults Metrics) (result Metrics, err error) {
+ req, err := lastResults.metricsPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listMetricsAverageNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListMetricsAverageSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listMetricsAverageNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListMetricsAverageResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listMetricsAverageNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListMetricsAverageComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AddsServicesClient) ListMetricsAverageComplete(ctx context.Context, serviceName string, metricName string, groupName string) (result MetricsIterator, err error) {
+ result.page, err = client.ListMetricsAverage(ctx, serviceName, metricName, groupName)
+ return
+}
+
+// ListMetricsSum gets the sum of the metric values for a given metric and group combination.
+// Parameters:
+// serviceName - the name of the service.
+// metricName - the metric name
+// groupName - the group name
+func (client AddsServicesClient) ListMetricsSum(ctx context.Context, serviceName string, metricName string, groupName string) (result MetricsPage, err error) {
+ result.fn = client.listMetricsSumNextResults
+ req, err := client.ListMetricsSumPreparer(ctx, serviceName, metricName, groupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListMetricsSum", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListMetricsSumSender(req)
+ if err != nil {
+ result.mVar.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListMetricsSum", resp, "Failure sending request")
+ return
+ }
+
+ result.mVar, err = client.ListMetricsSumResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListMetricsSum", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListMetricsSumPreparer prepares the ListMetricsSum request.
+func (client AddsServicesClient) ListMetricsSumPreparer(ctx context.Context, serviceName string, metricName string, groupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupName": autorest.Encode("path", groupName),
+ "metricName": autorest.Encode("path", metricName),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metrics/{metricName}/groups/{groupName}/sum", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListMetricsSumSender sends the ListMetricsSum request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) ListMetricsSumSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListMetricsSumResponder handles the response to the ListMetricsSum request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) ListMetricsSumResponder(resp *http.Response) (result Metrics, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listMetricsSumNextResults retrieves the next set of results, if any.
+func (client AddsServicesClient) listMetricsSumNextResults(lastResults Metrics) (result Metrics, err error) {
+ req, err := lastResults.metricsPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listMetricsSumNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListMetricsSumSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listMetricsSumNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListMetricsSumResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listMetricsSumNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListMetricsSumComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AddsServicesClient) ListMetricsSumComplete(ctx context.Context, serviceName string, metricName string, groupName string) (result MetricsIterator, err error) {
+ result.page, err = client.ListMetricsSum(ctx, serviceName, metricName, groupName)
+ return
+}
+
+// ListPremiumServices gets the details of Active Directory Domain Services for a tenant having Azure AD Premium
+// license and is onboarded to Azure Active Directory Connect Health.
+// Parameters:
+// filter - the service property filter to apply.
+// serviceType - the service type for the services onboarded to Azure Active Directory Connect Health.
+// Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be
+// AdFederationService or AadSyncService or AdDomainService.
+// skipCount - the skip count, which specifies the number of elements that can be bypassed from a sequence and
+// then return the remaining elements.
+// takeCount - the take count , which specifies the number of elements that can be returned from a sequence.
+func (client AddsServicesClient) ListPremiumServices(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result ServicesPage, err error) {
+ result.fn = client.listPremiumServicesNextResults
+ req, err := client.ListPremiumServicesPreparer(ctx, filter, serviceType, skipCount, takeCount)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListPremiumServices", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListPremiumServicesSender(req)
+ if err != nil {
+ result.s.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListPremiumServices", resp, "Failure sending request")
+ return
+ }
+
+ result.s, err = client.ListPremiumServicesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListPremiumServices", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPremiumServicesPreparer prepares the ListPremiumServices request.
+func (client AddsServicesClient) ListPremiumServicesPreparer(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (*http.Request, error) {
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(serviceType) > 0 {
+ queryParameters["serviceType"] = autorest.Encode("query", serviceType)
+ }
+ if skipCount != nil {
+ queryParameters["skipCount"] = autorest.Encode("query", *skipCount)
+ }
+ if takeCount != nil {
+ queryParameters["takeCount"] = autorest.Encode("query", *takeCount)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ADHybridHealthService/addsservices/premiumCheck"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListPremiumServicesSender sends the ListPremiumServices request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) ListPremiumServicesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListPremiumServicesResponder handles the response to the ListPremiumServices request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) ListPremiumServicesResponder(resp *http.Response) (result Services, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listPremiumServicesNextResults retrieves the next set of results, if any.
+func (client AddsServicesClient) listPremiumServicesNextResults(lastResults Services) (result Services, err error) {
+ req, err := lastResults.servicesPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listPremiumServicesNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListPremiumServicesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listPremiumServicesNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListPremiumServicesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listPremiumServicesNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListPremiumServicesComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AddsServicesClient) ListPremiumServicesComplete(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result ServicesIterator, err error) {
+ result.page, err = client.ListPremiumServices(ctx, filter, serviceType, skipCount, takeCount)
+ return
+}
+
+// ListReplicationSummary gets complete domain controller list along with replication details for a given Active
+// Directory Domain Service, that is onboarded to Azure Active Directory Connect Health.
+// Parameters:
+// serviceName - the name of the service.
+// isGroupbySite - indicates if the result should be grouped by site or not.
+// query - the custom query.
+// filter - the server property filter to apply.
+// takeCount - the take count , which specifies the number of elements that can be returned from a sequence.
+func (client AddsServicesClient) ListReplicationSummary(ctx context.Context, serviceName string, isGroupbySite bool, query string, filter string, takeCount *int32) (result ReplicationSummaryList, err error) {
+ req, err := client.ListReplicationSummaryPreparer(ctx, serviceName, isGroupbySite, query, filter, takeCount)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListReplicationSummary", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListReplicationSummarySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListReplicationSummary", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListReplicationSummaryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListReplicationSummary", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListReplicationSummaryPreparer prepares the ListReplicationSummary request.
+func (client AddsServicesClient) ListReplicationSummaryPreparer(ctx context.Context, serviceName string, isGroupbySite bool, query string, filter string, takeCount *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "isGroupbySite": autorest.Encode("query", isGroupbySite),
+ "nextPartitionKey": autorest.Encode("query", ""),
+ "nextRowKey": autorest.Encode("query", ""),
+ "query": autorest.Encode("query", query),
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if takeCount != nil {
+ queryParameters["takeCount"] = autorest.Encode("query", *takeCount)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/replicationsummary", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListReplicationSummarySender sends the ListReplicationSummary request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) ListReplicationSummarySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListReplicationSummaryResponder handles the response to the ListReplicationSummary request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) ListReplicationSummaryResponder(resp *http.Response) (result ReplicationSummaryList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListServerAlerts gets the details of an alert for a given Active Directory Domain Controller service and server
+// combination.
+// Parameters:
+// serviceMemberID - the server Id for which the alert details needs to be queried.
+// serviceName - the name of the service.
+// filter - the alert property filter to apply.
+// state - the alert state to query for.
+// from - the start date to query for.
+// toParameter - the end date till when to query for.
+func (client AddsServicesClient) ListServerAlerts(ctx context.Context, serviceMemberID uuid.UUID, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result AlertsPage, err error) {
+ result.fn = client.listServerAlertsNextResults
+ req, err := client.ListServerAlertsPreparer(ctx, serviceMemberID, serviceName, filter, state, from, toParameter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListServerAlerts", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListServerAlertsSender(req)
+ if err != nil {
+ result.a.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListServerAlerts", resp, "Failure sending request")
+ return
+ }
+
+ result.a, err = client.ListServerAlertsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "ListServerAlerts", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListServerAlertsPreparer prepares the ListServerAlerts request.
+func (client AddsServicesClient) ListServerAlertsPreparer(ctx context.Context, serviceMemberID uuid.UUID, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceMemberId": autorest.Encode("path", serviceMemberID),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(state) > 0 {
+ queryParameters["state"] = autorest.Encode("query", state)
+ }
+ if from != nil {
+ queryParameters["from"] = autorest.Encode("query", *from)
+ }
+ if toParameter != nil {
+ queryParameters["to"] = autorest.Encode("query", *toParameter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/servicemembers/{serviceMemberId}/alerts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListServerAlertsSender sends the ListServerAlerts request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) ListServerAlertsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListServerAlertsResponder handles the response to the ListServerAlerts request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) ListServerAlertsResponder(resp *http.Response) (result Alerts, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listServerAlertsNextResults retrieves the next set of results, if any.
+func (client AddsServicesClient) listServerAlertsNextResults(lastResults Alerts) (result Alerts, err error) {
+ req, err := lastResults.alertsPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listServerAlertsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListServerAlertsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listServerAlertsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListServerAlertsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "listServerAlertsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListServerAlertsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AddsServicesClient) ListServerAlertsComplete(ctx context.Context, serviceMemberID uuid.UUID, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result AlertsIterator, err error) {
+ result.page, err = client.ListServerAlerts(ctx, serviceMemberID, serviceName, filter, state, from, toParameter)
+ return
+}
+
+// Update updates an Active Directory Domain Service properties of an onboarded service.
+// Parameters:
+// serviceName - the name of the service which needs to be deleted.
+// service - the service object.
+func (client AddsServicesClient) Update(ctx context.Context, serviceName string, service ServiceProperties) (result ServiceProperties, err error) {
+ req, err := client.UpdatePreparer(ctx, serviceName, service)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AddsServicesClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client AddsServicesClient) UpdatePreparer(ctx context.Context, serviceName string, service ServiceProperties) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}", pathParameters),
+ autorest.WithJSON(service),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client AddsServicesClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client AddsServicesClient) UpdateResponder(resp *http.Response) (result ServiceProperties, 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/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/alerts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/alerts.go
new file mode 100644
index 000000000..0546aed04
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/alerts.go
@@ -0,0 +1,149 @@
+package adhybridhealthservice
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "net/http"
+)
+
+// AlertsClient is the REST APIs for Azure Active Drectory Connect Health
+type AlertsClient struct {
+ BaseClient
+}
+
+// NewAlertsClient creates an instance of the AlertsClient client.
+func NewAlertsClient() AlertsClient {
+ return NewAlertsClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client.
+func NewAlertsClientWithBaseURI(baseURI string) AlertsClient {
+ return AlertsClient{NewWithBaseURI(baseURI)}
+}
+
+// ListAddsAlerts gets the alerts for a given Active Directory Domain Service.
+// Parameters:
+// serviceName - the name of the service.
+// filter - the alert property filter to apply.
+// state - the alert state to query for.
+// from - the start date to query for.
+// toParameter - the end date till when to query for.
+func (client AlertsClient) ListAddsAlerts(ctx context.Context, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result AlertsPage, err error) {
+ result.fn = client.listAddsAlertsNextResults
+ req, err := client.ListAddsAlertsPreparer(ctx, serviceName, filter, state, from, toParameter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AlertsClient", "ListAddsAlerts", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAddsAlertsSender(req)
+ if err != nil {
+ result.a.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AlertsClient", "ListAddsAlerts", resp, "Failure sending request")
+ return
+ }
+
+ result.a, err = client.ListAddsAlertsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AlertsClient", "ListAddsAlerts", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAddsAlertsPreparer prepares the ListAddsAlerts request.
+func (client AlertsClient) ListAddsAlertsPreparer(ctx context.Context, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(state) > 0 {
+ queryParameters["state"] = autorest.Encode("query", state)
+ }
+ if from != nil {
+ queryParameters["from"] = autorest.Encode("query", *from)
+ }
+ if toParameter != nil {
+ queryParameters["to"] = autorest.Encode("query", *toParameter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/alerts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAddsAlertsSender sends the ListAddsAlerts request. The method will close the
+// http.Response Body if it receives an error.
+func (client AlertsClient) ListAddsAlertsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListAddsAlertsResponder handles the response to the ListAddsAlerts request. The method always
+// closes the http.Response Body.
+func (client AlertsClient) ListAddsAlertsResponder(resp *http.Response) (result Alerts, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAddsAlertsNextResults retrieves the next set of results, if any.
+func (client AlertsClient) listAddsAlertsNextResults(lastResults Alerts) (result Alerts, err error) {
+ req, err := lastResults.alertsPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AlertsClient", "listAddsAlertsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAddsAlertsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.AlertsClient", "listAddsAlertsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAddsAlertsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.AlertsClient", "listAddsAlertsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAddsAlertsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AlertsClient) ListAddsAlertsComplete(ctx context.Context, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result AlertsIterator, err error) {
+ result.page, err = client.ListAddsAlerts(ctx, serviceName, filter, state, from, toParameter)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/client.go
new file mode 100644
index 000000000..8499f5978
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/client.go
@@ -0,0 +1,49 @@
+// Package adhybridhealthservice implements the Azure ARM Adhybridhealthservice service API version 2014-01-01.
+//
+// REST APIs for Azure Active Drectory Connect Health
+package adhybridhealthservice
+
+// 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 Adhybridhealthservice
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Adhybridhealthservice.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+}
+
+// New creates an instance of the BaseClient client.
+func New() BaseClient {
+ return NewWithBaseURI(DefaultBaseURI)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/configuration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/configuration.go
new file mode 100644
index 000000000..78e9dccac
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/configuration.go
@@ -0,0 +1,311 @@
+package adhybridhealthservice
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ConfigurationClient is the REST APIs for Azure Active Drectory Connect Health
+type ConfigurationClient struct {
+ BaseClient
+}
+
+// NewConfigurationClient creates an instance of the ConfigurationClient client.
+func NewConfigurationClient() ConfigurationClient {
+ return NewConfigurationClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewConfigurationClientWithBaseURI creates an instance of the ConfigurationClient client.
+func NewConfigurationClientWithBaseURI(baseURI string) ConfigurationClient {
+ return ConfigurationClient{NewWithBaseURI(baseURI)}
+}
+
+// Add onboards a tenant in Azure Active Directory Connect Health.
+func (client ConfigurationClient) Add(ctx context.Context) (result Tenant, err error) {
+ req, err := client.AddPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "Add", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "Add", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "Add", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddPreparer prepares the Add request.
+func (client ConfigurationClient) AddPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ADHybridHealthService/configuration"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddSender sends the Add request. The method will close the
+// http.Response Body if it receives an error.
+func (client ConfigurationClient) AddSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddResponder handles the response to the Add request. The method always
+// closes the http.Response Body.
+func (client ConfigurationClient) AddResponder(resp *http.Response) (result Tenant, 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 details of a tenant onboarded to Azure Active Directory Connect Health.
+func (client ConfigurationClient) Get(ctx context.Context) (result Tenant, err error) {
+ req, err := client.GetPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ConfigurationClient) GetPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ADHybridHealthService/configuration"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ConfigurationClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ConfigurationClient) GetResponder(resp *http.Response) (result Tenant, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListAddsConfigurations gets the service configurations.
+// Parameters:
+// serviceName - the name of the service.
+// grouping - the grouping for configurations.
+func (client ConfigurationClient) ListAddsConfigurations(ctx context.Context, serviceName string, grouping string) (result AddsConfigurationPage, err error) {
+ result.fn = client.listAddsConfigurationsNextResults
+ req, err := client.ListAddsConfigurationsPreparer(ctx, serviceName, grouping)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "ListAddsConfigurations", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAddsConfigurationsSender(req)
+ if err != nil {
+ result.ac.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "ListAddsConfigurations", resp, "Failure sending request")
+ return
+ }
+
+ result.ac, err = client.ListAddsConfigurationsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "ListAddsConfigurations", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAddsConfigurationsPreparer prepares the ListAddsConfigurations request.
+func (client ConfigurationClient) ListAddsConfigurationsPreparer(ctx context.Context, serviceName string, grouping string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if len(grouping) > 0 {
+ queryParameters["grouping"] = autorest.Encode("query", grouping)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/configuration", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAddsConfigurationsSender sends the ListAddsConfigurations request. The method will close the
+// http.Response Body if it receives an error.
+func (client ConfigurationClient) ListAddsConfigurationsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListAddsConfigurationsResponder handles the response to the ListAddsConfigurations request. The method always
+// closes the http.Response Body.
+func (client ConfigurationClient) ListAddsConfigurationsResponder(resp *http.Response) (result AddsConfiguration, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAddsConfigurationsNextResults retrieves the next set of results, if any.
+func (client ConfigurationClient) listAddsConfigurationsNextResults(lastResults AddsConfiguration) (result AddsConfiguration, err error) {
+ req, err := lastResults.addsConfigurationPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "listAddsConfigurationsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAddsConfigurationsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "listAddsConfigurationsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAddsConfigurationsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "listAddsConfigurationsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAddsConfigurationsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ConfigurationClient) ListAddsConfigurationsComplete(ctx context.Context, serviceName string, grouping string) (result AddsConfigurationIterator, err error) {
+ result.page, err = client.ListAddsConfigurations(ctx, serviceName, grouping)
+ return
+}
+
+// Update updates tenant properties for tenants onboarded to Azure Active Directory Connect Health.
+// Parameters:
+// tenant - the tenant object with the properties set to the updated value.
+func (client ConfigurationClient) Update(ctx context.Context, tenant Tenant) (result Tenant, err error) {
+ req, err := client.UpdatePreparer(ctx, tenant)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ConfigurationClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client ConfigurationClient) UpdatePreparer(ctx context.Context, tenant Tenant) (*http.Request, error) {
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ADHybridHealthService/configuration"),
+ autorest.WithJSON(tenant),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client ConfigurationClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client ConfigurationClient) UpdateResponder(resp *http.Response) (result Tenant, 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/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/dimensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/dimensions.go
new file mode 100644
index 000000000..b0608cfee
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/dimensions.go
@@ -0,0 +1,134 @@
+package adhybridhealthservice
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// DimensionsClient is the REST APIs for Azure Active Drectory Connect Health
+type DimensionsClient struct {
+ BaseClient
+}
+
+// NewDimensionsClient creates an instance of the DimensionsClient client.
+func NewDimensionsClient() DimensionsClient {
+ return NewDimensionsClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewDimensionsClientWithBaseURI creates an instance of the DimensionsClient client.
+func NewDimensionsClientWithBaseURI(baseURI string) DimensionsClient {
+ return DimensionsClient{NewWithBaseURI(baseURI)}
+}
+
+// ListAddsDimensions gets the dimensions for a given dimension type in a server.
+// Parameters:
+// serviceName - the name of the service.
+// dimension - the dimension type.
+func (client DimensionsClient) ListAddsDimensions(ctx context.Context, serviceName string, dimension string) (result DimensionsPage, err error) {
+ result.fn = client.listAddsDimensionsNextResults
+ req, err := client.ListAddsDimensionsPreparer(ctx, serviceName, dimension)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.DimensionsClient", "ListAddsDimensions", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAddsDimensionsSender(req)
+ if err != nil {
+ result.d.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.DimensionsClient", "ListAddsDimensions", resp, "Failure sending request")
+ return
+ }
+
+ result.d, err = client.ListAddsDimensionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.DimensionsClient", "ListAddsDimensions", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAddsDimensionsPreparer prepares the ListAddsDimensions request.
+func (client DimensionsClient) ListAddsDimensionsPreparer(ctx context.Context, serviceName string, dimension string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "dimension": autorest.Encode("path", dimension),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/dimensions/{dimension}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAddsDimensionsSender sends the ListAddsDimensions request. The method will close the
+// http.Response Body if it receives an error.
+func (client DimensionsClient) ListAddsDimensionsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListAddsDimensionsResponder handles the response to the ListAddsDimensions request. The method always
+// closes the http.Response Body.
+func (client DimensionsClient) ListAddsDimensionsResponder(resp *http.Response) (result Dimensions, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAddsDimensionsNextResults retrieves the next set of results, if any.
+func (client DimensionsClient) listAddsDimensionsNextResults(lastResults Dimensions) (result Dimensions, err error) {
+ req, err := lastResults.dimensionsPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.DimensionsClient", "listAddsDimensionsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAddsDimensionsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.DimensionsClient", "listAddsDimensionsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAddsDimensionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.DimensionsClient", "listAddsDimensionsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAddsDimensionsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DimensionsClient) ListAddsDimensionsComplete(ctx context.Context, serviceName string, dimension string) (result DimensionsIterator, err error) {
+ result.page, err = client.ListAddsDimensions(ctx, serviceName, dimension)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/models.go
new file mode 100644
index 000000000..beba71acf
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/models.go
@@ -0,0 +1,2622 @@
+package adhybridhealthservice
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// AlgorithmStepType enumerates the values for algorithm step type.
+type AlgorithmStepType string
+
+const (
+ // ConnectorFilter ...
+ ConnectorFilter AlgorithmStepType = "ConnectorFilter"
+ // Deprovisioning ...
+ Deprovisioning AlgorithmStepType = "Deprovisioning"
+ // ExportFlow ...
+ ExportFlow AlgorithmStepType = "ExportFlow"
+ // ImportFlow ...
+ ImportFlow AlgorithmStepType = "ImportFlow"
+ // Join ...
+ Join AlgorithmStepType = "Join"
+ // MvDeletion ...
+ MvDeletion AlgorithmStepType = "MvDeletion"
+ // MvObjectTypeChange ...
+ MvObjectTypeChange AlgorithmStepType = "MvObjectTypeChange"
+ // Projection ...
+ Projection AlgorithmStepType = "Projection"
+ // Provisioning ...
+ Provisioning AlgorithmStepType = "Provisioning"
+ // Recall ...
+ Recall AlgorithmStepType = "Recall"
+ // Staging ...
+ Staging AlgorithmStepType = "Staging"
+ // Undefined ...
+ Undefined AlgorithmStepType = "Undefined"
+ // ValidateConnectorFilter ...
+ ValidateConnectorFilter AlgorithmStepType = "ValidateConnectorFilter"
+)
+
+// PossibleAlgorithmStepTypeValues returns an array of possible values for the AlgorithmStepType const type.
+func PossibleAlgorithmStepTypeValues() []AlgorithmStepType {
+ return []AlgorithmStepType{ConnectorFilter, Deprovisioning, ExportFlow, ImportFlow, Join, MvDeletion, MvObjectTypeChange, Projection, Provisioning, Recall, Staging, Undefined, ValidateConnectorFilter}
+}
+
+// AttributeDeltaOperationType enumerates the values for attribute delta operation type.
+type AttributeDeltaOperationType string
+
+const (
+ // AttributeDeltaOperationTypeAdd ...
+ AttributeDeltaOperationTypeAdd AttributeDeltaOperationType = "Add"
+ // AttributeDeltaOperationTypeDelete ...
+ AttributeDeltaOperationTypeDelete AttributeDeltaOperationType = "Delete"
+ // AttributeDeltaOperationTypeReplace ...
+ AttributeDeltaOperationTypeReplace AttributeDeltaOperationType = "Replace"
+ // AttributeDeltaOperationTypeUndefined ...
+ AttributeDeltaOperationTypeUndefined AttributeDeltaOperationType = "Undefined"
+ // AttributeDeltaOperationTypeUpdate ...
+ AttributeDeltaOperationTypeUpdate AttributeDeltaOperationType = "Update"
+)
+
+// PossibleAttributeDeltaOperationTypeValues returns an array of possible values for the AttributeDeltaOperationType const type.
+func PossibleAttributeDeltaOperationTypeValues() []AttributeDeltaOperationType {
+ return []AttributeDeltaOperationType{AttributeDeltaOperationTypeAdd, AttributeDeltaOperationTypeDelete, AttributeDeltaOperationTypeReplace, AttributeDeltaOperationTypeUndefined, AttributeDeltaOperationTypeUpdate}
+}
+
+// AttributeMappingType enumerates the values for attribute mapping type.
+type AttributeMappingType string
+
+const (
+ // Constant ...
+ Constant AttributeMappingType = "Constant"
+ // Direct ...
+ Direct AttributeMappingType = "Direct"
+ // DnPart ...
+ DnPart AttributeMappingType = "DnPart"
+ // Script ...
+ Script AttributeMappingType = "Script"
+)
+
+// PossibleAttributeMappingTypeValues returns an array of possible values for the AttributeMappingType const type.
+func PossibleAttributeMappingTypeValues() []AttributeMappingType {
+ return []AttributeMappingType{Constant, Direct, DnPart, Script}
+}
+
+// DeltaOperationType enumerates the values for delta operation type.
+type DeltaOperationType string
+
+const (
+ // DeltaOperationTypeAdd ...
+ DeltaOperationTypeAdd DeltaOperationType = "Add"
+ // DeltaOperationTypeDeletAdd ...
+ DeltaOperationTypeDeletAdd DeltaOperationType = "DeletAdd"
+ // DeltaOperationTypeDelete ...
+ DeltaOperationTypeDelete DeltaOperationType = "Delete"
+ // DeltaOperationTypeNone ...
+ DeltaOperationTypeNone DeltaOperationType = "None"
+ // DeltaOperationTypeObsolete ...
+ DeltaOperationTypeObsolete DeltaOperationType = "Obsolete"
+ // DeltaOperationTypeReplace ...
+ DeltaOperationTypeReplace DeltaOperationType = "Replace"
+ // DeltaOperationTypeUndefined ...
+ DeltaOperationTypeUndefined DeltaOperationType = "Undefined"
+ // DeltaOperationTypeUpdate ...
+ DeltaOperationTypeUpdate DeltaOperationType = "Update"
+)
+
+// PossibleDeltaOperationTypeValues returns an array of possible values for the DeltaOperationType const type.
+func PossibleDeltaOperationTypeValues() []DeltaOperationType {
+ return []DeltaOperationType{DeltaOperationTypeAdd, DeltaOperationTypeDeletAdd, DeltaOperationTypeDelete, DeltaOperationTypeNone, DeltaOperationTypeObsolete, DeltaOperationTypeReplace, DeltaOperationTypeUndefined, DeltaOperationTypeUpdate}
+}
+
+// HealthStatus enumerates the values for health status.
+type HealthStatus string
+
+const (
+ // Error ...
+ Error HealthStatus = "Error"
+ // Healthy ...
+ Healthy HealthStatus = "Healthy"
+ // Missing ...
+ Missing HealthStatus = "Missing"
+ // NotMonitored ...
+ NotMonitored HealthStatus = "NotMonitored"
+ // Warning ...
+ Warning HealthStatus = "Warning"
+)
+
+// PossibleHealthStatusValues returns an array of possible values for the HealthStatus const type.
+func PossibleHealthStatusValues() []HealthStatus {
+ return []HealthStatus{Error, Healthy, Missing, NotMonitored, Warning}
+}
+
+// Level enumerates the values for level.
+type Level string
+
+const (
+ // LevelError ...
+ LevelError Level = "Error"
+ // LevelPreWarning ...
+ LevelPreWarning Level = "PreWarning"
+ // LevelWarning ...
+ LevelWarning Level = "Warning"
+)
+
+// PossibleLevelValues returns an array of possible values for the Level const type.
+func PossibleLevelValues() []Level {
+ return []Level{LevelError, LevelPreWarning, LevelWarning}
+}
+
+// MonitoringLevel enumerates the values for monitoring level.
+type MonitoringLevel string
+
+const (
+ // Full ...
+ Full MonitoringLevel = "Full"
+ // Off ...
+ Off MonitoringLevel = "Off"
+ // Partial ...
+ Partial MonitoringLevel = "Partial"
+)
+
+// PossibleMonitoringLevelValues returns an array of possible values for the MonitoringLevel const type.
+func PossibleMonitoringLevelValues() []MonitoringLevel {
+ return []MonitoringLevel{Full, Off, Partial}
+}
+
+// PasswordOperationTypes enumerates the values for password operation types.
+type PasswordOperationTypes string
+
+const (
+ // PasswordOperationTypesChange ...
+ PasswordOperationTypesChange PasswordOperationTypes = "Change"
+ // PasswordOperationTypesSet ...
+ PasswordOperationTypesSet PasswordOperationTypes = "Set"
+ // PasswordOperationTypesUndefined ...
+ PasswordOperationTypesUndefined PasswordOperationTypes = "Undefined"
+)
+
+// PossiblePasswordOperationTypesValues returns an array of possible values for the PasswordOperationTypes const type.
+func PossiblePasswordOperationTypesValues() []PasswordOperationTypes {
+ return []PasswordOperationTypes{PasswordOperationTypesChange, PasswordOperationTypesSet, PasswordOperationTypesUndefined}
+}
+
+// State enumerates the values for state.
+type State string
+
+const (
+ // Active ...
+ Active State = "Active"
+ // ResolvedByPositiveResult ...
+ ResolvedByPositiveResult State = "ResolvedByPositiveResult"
+ // ResolvedByStateChange ...
+ ResolvedByStateChange State = "ResolvedByStateChange"
+ // ResolvedByTimer ...
+ ResolvedByTimer State = "ResolvedByTimer"
+ // ResolvedManually ...
+ ResolvedManually State = "ResolvedManually"
+)
+
+// PossibleStateValues returns an array of possible values for the State const type.
+func PossibleStateValues() []State {
+ return []State{Active, ResolvedByPositiveResult, ResolvedByStateChange, ResolvedByTimer, ResolvedManually}
+}
+
+// ValueDeltaOperationType enumerates the values for value delta operation type.
+type ValueDeltaOperationType string
+
+const (
+ // ValueDeltaOperationTypeAdd ...
+ ValueDeltaOperationTypeAdd ValueDeltaOperationType = "Add"
+ // ValueDeltaOperationTypeDelete ...
+ ValueDeltaOperationTypeDelete ValueDeltaOperationType = "Delete"
+ // ValueDeltaOperationTypeUndefined ...
+ ValueDeltaOperationTypeUndefined ValueDeltaOperationType = "Undefined"
+ // ValueDeltaOperationTypeUpdate ...
+ ValueDeltaOperationTypeUpdate ValueDeltaOperationType = "Update"
+)
+
+// PossibleValueDeltaOperationTypeValues returns an array of possible values for the ValueDeltaOperationType const type.
+func PossibleValueDeltaOperationTypeValues() []ValueDeltaOperationType {
+ return []ValueDeltaOperationType{ValueDeltaOperationTypeAdd, ValueDeltaOperationTypeDelete, ValueDeltaOperationTypeUndefined, ValueDeltaOperationTypeUpdate}
+}
+
+// ValueType enumerates the values for value type.
+type ValueType string
+
+const (
+ // ValueTypeBinary ...
+ ValueTypeBinary ValueType = "Binary"
+ // ValueTypeBoolean ...
+ ValueTypeBoolean ValueType = "Boolean"
+ // ValueTypeDn ...
+ ValueTypeDn ValueType = "Dn"
+ // ValueTypeInteger ...
+ ValueTypeInteger ValueType = "Integer"
+ // ValueTypeString ...
+ ValueTypeString ValueType = "String"
+ // ValueTypeUndefined ...
+ ValueTypeUndefined ValueType = "Undefined"
+)
+
+// PossibleValueTypeValues returns an array of possible values for the ValueType const type.
+func PossibleValueTypeValues() []ValueType {
+ return []ValueType{ValueTypeBinary, ValueTypeBoolean, ValueTypeDn, ValueTypeInteger, ValueTypeString, ValueTypeUndefined}
+}
+
+// AdditionalInformation the addtional information for a property.
+type AdditionalInformation struct {
+ // TitleName - The title name for the property.
+ TitleName *string `json:"titleName,omitempty"`
+ // TitleValue - The title value for the property.
+ TitleValue *string `json:"titleValue,omitempty"`
+ // Properties - The list of properties which are included in the aditional information.
+ Properties interface{} `json:"properties,omitempty"`
+ // HasProperties - Indicates if properties are present or not.
+ HasProperties *bool `json:"hasProperties,omitempty"`
+}
+
+// AddsConfiguration the list of key value properties.
+type AddsConfiguration struct {
+ autorest.Response `json:"-"`
+ // NextLink - The link used to get the next page of operations.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Value - The value returned by the operation.
+ Value *[]Item `json:"value,omitempty"`
+ // TotalCount - The total count of configuration.
+ TotalCount *int32 `json:"totalCount,omitempty"`
+ // ContinuationToken - The continuation token for paginated calls.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+}
+
+// AddsConfigurationIterator provides access to a complete listing of Item values.
+type AddsConfigurationIterator struct {
+ i int
+ page AddsConfigurationPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *AddsConfigurationIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter AddsConfigurationIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter AddsConfigurationIterator) Response() AddsConfiguration {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter AddsConfigurationIterator) Value() Item {
+ if !iter.page.NotDone() {
+ return Item{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ac AddsConfiguration) IsEmpty() bool {
+ return ac.Value == nil || len(*ac.Value) == 0
+}
+
+// addsConfigurationPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ac AddsConfiguration) addsConfigurationPreparer() (*http.Request, error) {
+ if ac.NextLink == nil || len(to.String(ac.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ac.NextLink)))
+}
+
+// AddsConfigurationPage contains a page of Item values.
+type AddsConfigurationPage struct {
+ fn func(AddsConfiguration) (AddsConfiguration, error)
+ ac AddsConfiguration
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *AddsConfigurationPage) Next() error {
+ next, err := page.fn(page.ac)
+ if err != nil {
+ return err
+ }
+ page.ac = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page AddsConfigurationPage) NotDone() bool {
+ return !page.ac.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page AddsConfigurationPage) Response() AddsConfiguration {
+ return page.ac
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page AddsConfigurationPage) Values() []Item {
+ if page.ac.IsEmpty() {
+ return nil
+ }
+ return *page.ac.Value
+}
+
+// AddsServiceMember the server details for ADDS service.
+type AddsServiceMember struct {
+ // DomainName - The domain name.
+ DomainName *string `json:"domainName,omitempty"`
+ // SiteName - The site name.
+ SiteName *string `json:"siteName,omitempty"`
+ // AddsRoles - The list of ADDS roles.
+ AddsRoles *[]string `json:"addsRoles,omitempty"`
+ // GcReachable - Indicates if the global catalog for this domain is reachable or not.
+ GcReachable *bool `json:"gcReachable,omitempty"`
+ // IsAdvertising - Indicates if the Dc is advertising or not.
+ IsAdvertising *bool `json:"isAdvertising,omitempty"`
+ // PdcReachable - Indicates if the primary domain controller is reachable or not.
+ PdcReachable *bool `json:"pdcReachable,omitempty"`
+ // SysvolState - Indicates if the SYSVOL state is healthy or not.
+ SysvolState *bool `json:"sysvolState,omitempty"`
+ // DcTypes - The list of domain controller types.
+ DcTypes *[]string `json:"dcTypes,omitempty"`
+ // ServiceMemberID - The id of the server.
+ ServiceMemberID *string `json:"serviceMemberId,omitempty"`
+ // ServiceID - The service id to whom this server belongs.
+ ServiceID *string `json:"serviceId,omitempty"`
+ // TenantID - The tenant id to whom this server belongs.
+ TenantID *string `json:"tenantId,omitempty"`
+ // ActiveAlerts - The total number of alerts that are currently active for the server.
+ ActiveAlerts *int32 `json:"activeAlerts,omitempty"`
+ // AdditionalInformation - The additional information, if any, for the server.
+ AdditionalInformation *string `json:"additionalInformation,omitempty"`
+ // CreatedDate - The date time , in UTC, when the server was onboaraded to Azure Active Directory Connect Health.
+ CreatedDate *date.Time `json:"createdDate,omitempty"`
+ // Dimensions - The server specific configuration related dimensions.
+ Dimensions *[]Item `json:"dimensions,omitempty"`
+ // Disabled - Indicates if the server is disabled or not.
+ Disabled *bool `json:"disabled,omitempty"`
+ // DisabledReason - The reason for disabling the server.
+ DisabledReason *int32 `json:"disabledReason,omitempty"`
+ // InstalledQfes - The list of installed QFEs for the server.
+ InstalledQfes *[]Hotfix `json:"installedQfes,omitempty"`
+ // LastDisabled - The date and time , in UTC, when the server was last disabled.
+ LastDisabled *date.Time `json:"lastDisabled,omitempty"`
+ // LastReboot - The date and time, in UTC, when the server was last rebooted.
+ LastReboot *date.Time `json:"lastReboot,omitempty"`
+ // LastServerReportedMonitoringLevelChange - The date and time, in UTC, when the server's data monitoring configuration was last changed.
+ LastServerReportedMonitoringLevelChange *date.Time `json:"lastServerReportedMonitoringLevelChange,omitempty"`
+ // LastUpdated - The date and time, in UTC, when the server proeprties were last updated.
+ LastUpdated *date.Time `json:"lastUpdated,omitempty"`
+ // MachineID - The id of the machine.
+ MachineID *string `json:"machineId,omitempty"`
+ // MachineName - The name of the server.
+ MachineName *string `json:"machineName,omitempty"`
+ // MonitoringConfigurationsComputed - The monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health.
+ MonitoringConfigurationsComputed *[]Item `json:"monitoringConfigurationsComputed,omitempty"`
+ // MonitoringConfigurationsCustomized - The customized monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health.
+ MonitoringConfigurationsCustomized *[]Item `json:"monitoringConfigurationsCustomized,omitempty"`
+ // OsName - The name of the operating system installed in the machine.
+ OsName *string `json:"osName,omitempty"`
+ // OsVersion - The version of the operating system installed in the machine.
+ OsVersion *string `json:"osVersion,omitempty"`
+ // Properties - Server specific properties.
+ Properties *[]Item `json:"properties,omitempty"`
+ // RecommendedQfes - The list of recommended hotfixes for the server.
+ RecommendedQfes *[]Hotfix `json:"recommendedQfes,omitempty"`
+ // ResolvedAlerts - The total count of alerts that are resolved for this server.
+ ResolvedAlerts *int32 `json:"resolvedAlerts,omitempty"`
+ // Role - The service role that is being monitored in the server.
+ Role *string `json:"role,omitempty"`
+ // ServerReportedMonitoringLevel - The monitoring level reported by the server. Possible values include: 'Partial', 'Full', 'Off'
+ ServerReportedMonitoringLevel MonitoringLevel `json:"serverReportedMonitoringLevel,omitempty"`
+ // Status - The health status of the server.
+ Status *string `json:"status,omitempty"`
+}
+
+// AddsServiceMembers the list of ADDS service members.
+type AddsServiceMembers struct {
+ autorest.Response `json:"-"`
+ // NextLink - The link used to get the next page of operations.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Value - The value returned by the operation.
+ Value *[]AddsServiceMember `json:"value,omitempty"`
+ // TotalCount - The total count of service members.
+ TotalCount *int32 `json:"totalCount,omitempty"`
+ // ContinuationToken - The continuation token for paginated calls.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+}
+
+// AddsServiceMembersIterator provides access to a complete listing of AddsServiceMember values.
+type AddsServiceMembersIterator struct {
+ i int
+ page AddsServiceMembersPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *AddsServiceMembersIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter AddsServiceMembersIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter AddsServiceMembersIterator) Response() AddsServiceMembers {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter AddsServiceMembersIterator) Value() AddsServiceMember {
+ if !iter.page.NotDone() {
+ return AddsServiceMember{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (asm AddsServiceMembers) IsEmpty() bool {
+ return asm.Value == nil || len(*asm.Value) == 0
+}
+
+// addsServiceMembersPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (asm AddsServiceMembers) addsServiceMembersPreparer() (*http.Request, error) {
+ if asm.NextLink == nil || len(to.String(asm.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(asm.NextLink)))
+}
+
+// AddsServiceMembersPage contains a page of AddsServiceMember values.
+type AddsServiceMembersPage struct {
+ fn func(AddsServiceMembers) (AddsServiceMembers, error)
+ asm AddsServiceMembers
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *AddsServiceMembersPage) Next() error {
+ next, err := page.fn(page.asm)
+ if err != nil {
+ return err
+ }
+ page.asm = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page AddsServiceMembersPage) NotDone() bool {
+ return !page.asm.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page AddsServiceMembersPage) Response() AddsServiceMembers {
+ return page.asm
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page AddsServiceMembersPage) Values() []AddsServiceMember {
+ if page.asm.IsEmpty() {
+ return nil
+ }
+ return *page.asm.Value
+}
+
+// Agent the agent details.
+type Agent struct {
+ // TenantID - The tenant Id.
+ TenantID *string `json:"tenantId,omitempty"`
+ // MachineID - The machine Id.
+ MachineID *string `json:"machineId,omitempty"`
+ // Credential - The agent credential details.
+ Credential interface{} `json:"credential,omitempty"`
+ // MachineName - The machine name.
+ MachineName *string `json:"machineName,omitempty"`
+ // AgentVersion - The agent version.
+ AgentVersion *string `json:"agentVersion,omitempty"`
+ // CreatedDate - The date and time, in UTC, when the agent was created.
+ CreatedDate *date.Time `json:"createdDate,omitempty"`
+ // Key - The connector hash key.
+ Key *string `json:"key,omitempty"`
+}
+
+// Alert the alert details indicating an issue with service or server.
+type Alert struct {
+ // AlertID - The alert Id.
+ AlertID *uuid.UUID `json:"alertId,omitempty"`
+ // Level - The alert level which indicates the severity of the alert. Possible values include: 'LevelWarning', 'LevelError', 'LevelPreWarning'
+ Level Level `json:"level,omitempty"`
+ // State - The alert state which can be either active or resolved with multile resolution types. Possible values include: 'Active', 'ResolvedByPositiveResult', 'ResolvedManually', 'ResolvedByTimer', 'ResolvedByStateChange'
+ State State `json:"state,omitempty"`
+ // ShortName - The alert short name.
+ ShortName *string `json:"shortName,omitempty"`
+ // DisplayName - The display name for the alert.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Description - The alert description.
+ Description *string `json:"description,omitempty"`
+ // Remediation - The alert remediation.
+ Remediation *string `json:"remediation,omitempty"`
+ // RelatedLinks - The help links to get more information related to the alert.
+ RelatedLinks *[]HelpLink `json:"relatedLinks,omitempty"`
+ // Scope - The scope of the alert. Indicates if it is a service or a server related alert.
+ Scope *string `json:"scope,omitempty"`
+ // AdditionalInformation - Additional information related to the alert.
+ AdditionalInformation *[]AdditionalInformation `json:"additionalInformation,omitempty"`
+ // CreatedDate - The date and time,in UTC,when the alert was created.
+ CreatedDate *date.Time `json:"createdDate,omitempty"`
+ // ResolvedDate - The date and time, in UTC, when the alert was resolved.
+ ResolvedDate *date.Time `json:"resolvedDate,omitempty"`
+ // LastUpdated - The date and time, in UTC, when the alert was last updated.
+ LastUpdated *date.Time `json:"lastUpdated,omitempty"`
+ // MonitorRoleType - The monitoring role type for which the alert was raised.
+ MonitorRoleType *string `json:"monitorRoleType,omitempty"`
+ // ActiveAlertProperties - The active alert properties.
+ ActiveAlertProperties *[]Item `json:"activeAlertProperties,omitempty"`
+ // ResolvedAlertProperties - The resolved alert properties.
+ ResolvedAlertProperties *[]Item `json:"resolvedAlertProperties,omitempty"`
+ // TenantID - The tenant Id.
+ TenantID *uuid.UUID `json:"tenantId,omitempty"`
+ // ServiceID - The service Id.
+ ServiceID *uuid.UUID `json:"serviceId,omitempty"`
+ // ServiceMemberID - The server Id.
+ ServiceMemberID *uuid.UUID `json:"serviceMemberId,omitempty"`
+}
+
+// AlertFeedback the alert feedback details.
+type AlertFeedback struct {
+ autorest.Response `json:"-"`
+ // Level - The alert level which indicates the severity of the alert.
+ Level *string `json:"level,omitempty"`
+ // State - The alert state which can be either active or resolved with multile resolution types.
+ State *string `json:"state,omitempty"`
+ // ShortName - The alert short name.
+ ShortName *string `json:"shortName,omitempty"`
+ // Feedback - The feedback for the alert which indicates if the customer likes or dislikes the alert.
+ Feedback *string `json:"feedback,omitempty"`
+ // Comment - Additional comments related to the alert.
+ Comment *string `json:"comment,omitempty"`
+ // ConsentedToShare - Indicates if the alert feedback can be shared from product team.
+ ConsentedToShare *bool `json:"consentedToShare,omitempty"`
+ // ServiceMemberID - The server Id of the alert.
+ ServiceMemberID *string `json:"serviceMemberId,omitempty"`
+ // CreatedDate - The date and time,in UTC,when the alert was created.
+ CreatedDate *date.Time `json:"createdDate,omitempty"`
+}
+
+// AlertFeedbacks the list of alert feedback.
+type AlertFeedbacks struct {
+ autorest.Response `json:"-"`
+ // Value - The value returned by the operation.
+ Value *[]AlertFeedback `json:"value,omitempty"`
+}
+
+// Alerts the list of alerts for a service.
+type Alerts struct {
+ autorest.Response `json:"-"`
+ // Value - The value returned by the operation.
+ Value *[]Alert `json:"value,omitempty"`
+ // NextLink - The link used to get the next page of operations.
+ NextLink *string `json:"nextLink,omitempty"`
+ // TotalCount - The total count of alert elements.
+ TotalCount *int32 `json:"totalCount,omitempty"`
+ // ContinuationToken - The continuation token for paginated calls.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+}
+
+// AlertsIterator provides access to a complete listing of Alert values.
+type AlertsIterator struct {
+ i int
+ page AlertsPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *AlertsIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter AlertsIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter AlertsIterator) Response() Alerts {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter AlertsIterator) Value() Alert {
+ if !iter.page.NotDone() {
+ return Alert{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (a Alerts) IsEmpty() bool {
+ return a.Value == nil || len(*a.Value) == 0
+}
+
+// alertsPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (a Alerts) alertsPreparer() (*http.Request, error) {
+ if a.NextLink == nil || len(to.String(a.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(a.NextLink)))
+}
+
+// AlertsPage contains a page of Alert values.
+type AlertsPage struct {
+ fn func(Alerts) (Alerts, error)
+ a Alerts
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *AlertsPage) Next() error {
+ next, err := page.fn(page.a)
+ if err != nil {
+ return err
+ }
+ page.a = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page AlertsPage) NotDone() bool {
+ return !page.a.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page AlertsPage) Response() Alerts {
+ return page.a
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page AlertsPage) Values() []Alert {
+ if page.a.IsEmpty() {
+ return nil
+ }
+ return *page.a.Value
+}
+
+// AssociatedObject object that hold sync object details.
+type AssociatedObject struct {
+ // DisplayName - The display name of the object.
+ DisplayName *string `json:"displayName,omitempty"`
+ // DistinguishedName - The distinguished name of the object.
+ DistinguishedName *string `json:"distinguishedName,omitempty"`
+ // LastDirSyncTime - The last dirSync time.
+ LastDirSyncTime *date.Time `json:"lastDirSyncTime,omitempty"`
+ // Mail - The email of the object.
+ Mail *string `json:"mail,omitempty"`
+ // ObjectGUID - The object guid.
+ ObjectGUID *string `json:"objectGuid,omitempty"`
+ // ObjectType - The object type.
+ ObjectType *string `json:"objectType,omitempty"`
+ // OnpremisesUserPrincipalName - The On-premises UPN.
+ OnpremisesUserPrincipalName *string `json:"onpremisesUserPrincipalName,omitempty"`
+ // ProxyAddresses - The proxy addresses.
+ ProxyAddresses *string `json:"proxyAddresses,omitempty"`
+ // SourceAnchor - The source anchor.
+ SourceAnchor *string `json:"sourceAnchor,omitempty"`
+ // SourceOfAuthority - The source of authority.
+ SourceOfAuthority *string `json:"sourceOfAuthority,omitempty"`
+ // TimeOccurred - The time of the error.
+ TimeOccurred *date.Time `json:"timeOccurred,omitempty"`
+ // UserPrincipalName - The UPN.
+ UserPrincipalName *string `json:"userPrincipalName,omitempty"`
+}
+
+// AttributeDelta the delta attributes.
+type AttributeDelta struct {
+ // Values - The delta values.
+ Values *[]ValueDelta `json:"values,omitempty"`
+ // Name - The name of the attribute delta.
+ Name *string `json:"name,omitempty"`
+ // OperationType - The attribute delta operation type. Possible values include: 'AttributeDeltaOperationTypeUndefined', 'AttributeDeltaOperationTypeAdd', 'AttributeDeltaOperationTypeReplace', 'AttributeDeltaOperationTypeUpdate', 'AttributeDeltaOperationTypeDelete'
+ OperationType AttributeDeltaOperationType `json:"operationType,omitempty"`
+ // ValueType - The value type. Possible values include: 'ValueTypeUndefined', 'ValueTypeDn', 'ValueTypeBinary', 'ValueTypeString', 'ValueTypeInteger', 'ValueTypeBoolean'
+ ValueType ValueType `json:"valueType,omitempty"`
+ // MultiValued - Indicates if the attribute delta is multivalued or not.
+ MultiValued *bool `json:"multiValued,omitempty"`
+}
+
+// AttributeMapping the attribute mapping details.
+type AttributeMapping struct {
+ // MappingSource - The mapping source.
+ MappingSource *AttributeMppingSource `json:"mappingSource,omitempty"`
+ // Type - The attribute mapping type. Possible values include: 'Constant', 'Direct', 'DnPart', 'Script'
+ Type AttributeMappingType `json:"type,omitempty"`
+ // DestinationAttribute - The destination attribute.
+ DestinationAttribute *string `json:"destinationAttribute,omitempty"`
+ // ContextID - The context Id.
+ ContextID *string `json:"contextId,omitempty"`
+}
+
+// AttributeMppingSource the attribute mapping source.
+type AttributeMppingSource struct {
+ // SourceAttribute - The source attribute.
+ SourceAttribute *[]string `json:"sourceAttribute,omitempty"`
+ // DnPart - The value for dn part.
+ DnPart *int32 `json:"dnPart,omitempty"`
+ // ScriptContext - The script context.
+ ScriptContext *string `json:"scriptContext,omitempty"`
+ // ConstantValue - The constant value.
+ ConstantValue *string `json:"constantValue,omitempty"`
+}
+
+// ChangeNotReimported the changes which are not re-imported.
+type ChangeNotReimported struct {
+ // Delta - The delta changes that is not re-imported.
+ Delta *ChangeNotReimportedDelta `json:"delta,omitempty"`
+ // Entry - The object entry in a change that is not re-imported.
+ Entry *ChangeNotReimportedEntry `json:"entry,omitempty"`
+}
+
+// ChangeNotReimportedDelta the delta in a change that is not re-imported.
+type ChangeNotReimportedDelta struct {
+ // Anchor - The anchor.
+ Anchor *string `json:"anchor,omitempty"`
+ // DnAttributes - The delta attributes for distinguished names.
+ DnAttributes *[]AttributeDelta `json:"dnAttributes,omitempty"`
+ // Attributes - The attributes.
+ Attributes *[]AttributeDelta `json:"attributes,omitempty"`
+ // OperationType - The operation type. Possible values include: 'DeltaOperationTypeUndefined', 'DeltaOperationTypeNone', 'DeltaOperationTypeAdd', 'DeltaOperationTypeReplace', 'DeltaOperationTypeUpdate', 'DeltaOperationTypeDelete', 'DeltaOperationTypeObsolete', 'DeltaOperationTypeDeletAdd'
+ OperationType DeltaOperationType `json:"operationType,omitempty"`
+}
+
+// ChangeNotReimportedEntry the object entry in a change that is not re-imported.
+type ChangeNotReimportedEntry struct {
+ // Anchor - The anchor.
+ Anchor *string `json:"anchor,omitempty"`
+ // ParentAnchor - The parent anchor.
+ ParentAnchor *string `json:"parentAnchor,omitempty"`
+ // PrimaryObjectClass - The primary object class.
+ PrimaryObjectClass *string `json:"primaryObjectClass,omitempty"`
+ // ObjectClasses - The olist of object classes.
+ ObjectClasses *[]string `json:"objectClasses,omitempty"`
+ // DnAttributes - The delta attributes for distinguished names.
+ DnAttributes *[]AttributeDelta `json:"dnAttributes,omitempty"`
+ // Attributes - The attributes.
+ Attributes *[]AttributeDelta `json:"attributes,omitempty"`
+ // Dn - The distinguished name.
+ Dn *string `json:"dn,omitempty"`
+}
+
+// Connector the connect details.
+type Connector struct {
+ // ConnectorID - The connector Id.
+ ConnectorID *string `json:"connectorId,omitempty"`
+ // ID - The connector Id.
+ ID *string `json:"id,omitempty"`
+ // Name - The connector name.
+ Name *string `json:"name,omitempty"`
+ // Version - The connector version
+ Version *int32 `json:"version,omitempty"`
+ // Type - The connector type.
+ Type *string `json:"type,omitempty"`
+ // Description - The connector description.
+ Description *string `json:"description,omitempty"`
+ // SchemaXML - The schema xml for the connector.
+ SchemaXML *string `json:"schemaXml,omitempty"`
+ // PasswordManagementSettings - The password management settings of the connector.
+ PasswordManagementSettings interface{} `json:"passwordManagementSettings,omitempty"`
+ // PasswordHashSyncConfiguration - The password hash synchronization configuration of the connector.
+ PasswordHashSyncConfiguration interface{} `json:"passwordHashSyncConfiguration,omitempty"`
+ // TimeCreated - The date and time when this connector was created.
+ TimeCreated *date.Time `json:"timeCreated,omitempty"`
+ // TimeLastModified - The date and time when this connector was last modified.
+ TimeLastModified *date.Time `json:"timeLastModified,omitempty"`
+ // Partitions - The partitions of the connector.
+ Partitions *[]Partition `json:"partitions,omitempty"`
+ // RunProfiles - The run profiles of the connector.
+ RunProfiles *[]RunProfile `json:"runProfiles,omitempty"`
+ // ClassesIncluded - The class inclusion list of the connector.
+ ClassesIncluded *[]string `json:"classesIncluded,omitempty"`
+ // AttributesIncluded - The attribute inclusion list of the connector.
+ AttributesIncluded *[]string `json:"attributesIncluded,omitempty"`
+}
+
+// ConnectorConnectionError the connector connection error.
+type ConnectorConnectionError struct {
+ // ID - The error Id.
+ ID *string `json:"id,omitempty"`
+ // RunStepResultID - The run step result Id.
+ RunStepResultID *string `json:"runStepResultId,omitempty"`
+ // ConnectorID - The connector Id.
+ ConnectorID *string `json:"connectorId,omitempty"`
+ // Type - The type of error.
+ Type *string `json:"type,omitempty"`
+ // ErrorCode - The error code.
+ ErrorCode *string `json:"errorCode,omitempty"`
+ // Message - The message for the connection error.
+ Message *string `json:"message,omitempty"`
+ // TimeOccured - The time when the connection error occured.
+ TimeOccured *date.Time `json:"timeOccured,omitempty"`
+ // Server - The server where the connection error happened.
+ Server *string `json:"server,omitempty"`
+}
+
+// ConnectorConnectionErrors the list of connector connection errors.
+type ConnectorConnectionErrors struct {
+ // Value - The value returned by the operation.
+ Value *[]ConnectorConnectionError `json:"value,omitempty"`
+}
+
+// ConnectorObjectError the connector object error.
+type ConnectorObjectError struct {
+ // ID - The error Id.
+ ID *string `json:"id,omitempty"`
+ // RunStepResultID - The run step result Id.
+ RunStepResultID *string `json:"runStepResultId,omitempty"`
+ // ConnectorID - The connector Id.
+ ConnectorID *string `json:"connectorId,omitempty"`
+ // Type - The type of error.
+ Type *string `json:"type,omitempty"`
+ // ErrorCode - The error code.
+ ErrorCode *string `json:"errorCode,omitempty"`
+ // Message - The message for the object error.
+ Message *string `json:"message,omitempty"`
+ // EntryNumber - The entry number for object error occured.
+ EntryNumber *int32 `json:"entryNumber,omitempty"`
+ // LineNumber - The line number for the object error.
+ LineNumber *int32 `json:"lineNumber,omitempty"`
+ // ColumnNumber - The column number for the object error.
+ ColumnNumber *int32 `json:"columnNumber,omitempty"`
+ // Dn - The distingished name of the object.
+ Dn *string `json:"dn,omitempty"`
+ // Anchor - The name for the anchor of the object.
+ Anchor *string `json:"anchor,omitempty"`
+ // AttributeName - The attribute name of the object.
+ AttributeName *string `json:"attributeName,omitempty"`
+ // ServerErrorDetail - The server side error details.
+ ServerErrorDetail *string `json:"serverErrorDetail,omitempty"`
+ // Values - The value corresponding to attribute name.
+ Values *[]string `json:"values,omitempty"`
+}
+
+// ConnectorObjectErrors the list of connector object errors.
+type ConnectorObjectErrors struct {
+ // Value - The value returned by the operation.
+ Value *[]ConnectorObjectError `json:"value,omitempty"`
+}
+
+// Connectors the list of connects for a service.
+type Connectors struct {
+ autorest.Response `json:"-"`
+ // Value - The value returned by the operation.
+ Value *[]Connector `json:"value,omitempty"`
+}
+
+// Credential the credential for a given server.
+type Credential struct {
+ // Identifier - The credential identifier.
+ Identifier *string `json:"identifier,omitempty"`
+ // Type - The type of credential.
+ Type *string `json:"type,omitempty"`
+ // CredentialData - The credential data.
+ CredentialData *[]string `json:"credentialData,omitempty"`
+}
+
+// Credentials the list of agent credentials.
+type Credentials struct {
+ autorest.Response `json:"-"`
+ // Value - The value returned by the operation.
+ Value *[]Credential `json:"value,omitempty"`
+}
+
+// DataFreshnessDetails the data freshness details for the server.
+type DataFreshnessDetails struct {
+ autorest.Response `json:"-"`
+ // Value - The value returned by the operation.
+ Value *[]Item `json:"value,omitempty"`
+}
+
+// Dimension the connector object error.
+type Dimension struct {
+ // Health - The health status for the domain controller. Possible values include: 'Healthy', 'Warning', 'Error', 'NotMonitored', 'Missing'
+ Health HealthStatus `json:"health,omitempty"`
+ // SimpleProperties - List of service specific configuration properties.
+ SimpleProperties interface{} `json:"simpleProperties,omitempty"`
+ // ActiveAlerts - The count of alerts that are currently active for the service.
+ ActiveAlerts *int32 `json:"activeAlerts,omitempty"`
+ // AdditionalInformation - The additional information related to the service.
+ AdditionalInformation *string `json:"additionalInformation,omitempty"`
+ // LastUpdated - The date or time , in UTC, when the service properties were last updated.
+ LastUpdated *date.Time `json:"lastUpdated,omitempty"`
+ // DisplayName - The display name of the service.
+ DisplayName *string `json:"displayName,omitempty"`
+ // ResolvedAlerts - The total count of alerts that has been resolved for the service.
+ ResolvedAlerts *int32 `json:"resolvedAlerts,omitempty"`
+ // Signature - The signature of the service.
+ Signature *string `json:"signature,omitempty"`
+ // Type - The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService.
+ Type *string `json:"type,omitempty"`
+}
+
+// Dimensions the list of dimensions.
+type Dimensions struct {
+ autorest.Response `json:"-"`
+ // NextLink - The link used to get the next page of operations.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Value - The value returned by the operation.
+ Value *[]Dimension `json:"value,omitempty"`
+ // TotalCount - The total count of dimensions.
+ TotalCount *int32 `json:"totalCount,omitempty"`
+ // ContinuationToken - The continuation token for paginated calls.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+}
+
+// DimensionsIterator provides access to a complete listing of Dimension values.
+type DimensionsIterator struct {
+ i int
+ page DimensionsPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DimensionsIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DimensionsIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DimensionsIterator) Response() Dimensions {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DimensionsIterator) Value() Dimension {
+ if !iter.page.NotDone() {
+ return Dimension{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (d Dimensions) IsEmpty() bool {
+ return d.Value == nil || len(*d.Value) == 0
+}
+
+// dimensionsPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (d Dimensions) dimensionsPreparer() (*http.Request, error) {
+ if d.NextLink == nil || len(to.String(d.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(d.NextLink)))
+}
+
+// DimensionsPage contains a page of Dimension values.
+type DimensionsPage struct {
+ fn func(Dimensions) (Dimensions, error)
+ d Dimensions
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DimensionsPage) Next() error {
+ next, err := page.fn(page.d)
+ if err != nil {
+ return err
+ }
+ page.d = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DimensionsPage) NotDone() bool {
+ return !page.d.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DimensionsPage) Response() Dimensions {
+ return page.d
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DimensionsPage) Values() []Dimension {
+ if page.d.IsEmpty() {
+ return nil
+ }
+ return *page.d.Value
+}
+
+// Display displays the details related to operations supported by Azure Active Directory Connect Health.
+type Display struct {
+ // Description - The description for the operation.
+ Description *string `json:"description,omitempty"`
+ // Operation - The details of the operation.
+ Operation *string `json:"operation,omitempty"`
+ // Provider - The provider name.
+ Provider *string `json:"provider,omitempty"`
+}
+
+// ErrorCount the error count details.
+type ErrorCount struct {
+ // ErrorBucket - The error bucket.
+ ErrorBucket *string `json:"errorBucket,omitempty"`
+ // Count - The error count.
+ Count *int32 `json:"count,omitempty"`
+ // Truncated - Indicates if the error count is truncated or not.
+ Truncated *bool `json:"truncated,omitempty"`
+}
+
+// ErrorCounts the list of error counts.
+type ErrorCounts struct {
+ autorest.Response `json:"-"`
+ // Value - The value returned by the operation.
+ Value *[]ErrorCount `json:"value,omitempty"`
+}
+
+// ErrorDetail the error details.
+type ErrorDetail struct {
+ // Description - The error description.
+ Description *string `json:"description,omitempty"`
+ // KbURL - The knowledge base article url which contains more information about the error.
+ KbURL *string `json:"kbUrl,omitempty"`
+ // Detail - Additional details related to the error.
+ Detail *string `json:"detail,omitempty"`
+ // ObjectsWithSyncError - The list of objects with sync errors.
+ ObjectsWithSyncError *ObjectWithSyncError `json:"objectsWithSyncError,omitempty"`
+ // ObjectWithSyncError - The object with sync error.
+ ObjectWithSyncError *MergedExportError `json:"objectWithSyncError,omitempty"`
+}
+
+// ErrorReportUsersEntries the list of bad password log in attempt entries.
+type ErrorReportUsersEntries struct {
+ autorest.Response `json:"-"`
+ // Value - The value returned by the operation.
+ Value *[]ErrorReportUsersEntry `json:"value,omitempty"`
+}
+
+// ErrorReportUsersEntry the bad password login attempt details.
+type ErrorReportUsersEntry struct {
+ // UserID - The user ID value.
+ UserID *string `json:"userId,omitempty"`
+ // IPAddress - The Ip address corresponding to the last error event.
+ IPAddress *string `json:"ipAddress,omitempty"`
+ // LastUpdated - The date and time when the last error event was logged.
+ LastUpdated *date.Time `json:"lastUpdated,omitempty"`
+ // UniqueIPAddresses - The list of unique IP addresses.
+ UniqueIPAddresses *string `json:"uniqueIpAddresses,omitempty"`
+ // TotalErrorAttempts - The total count of specific error events.
+ TotalErrorAttempts *int32 `json:"totalErrorAttempts,omitempty"`
+}
+
+// ExportError the export error details.
+type ExportError struct {
+ // ID - The error Id.
+ ID *string `json:"id,omitempty"`
+ // RunStepResultID - The run step result Id.
+ RunStepResultID *string `json:"runStepResultId,omitempty"`
+ // ConnectorID - The connector Id.
+ ConnectorID *string `json:"connectorId,omitempty"`
+ // Type - The type of error.
+ Type *string `json:"type,omitempty"`
+ // ErrorCode - The error code.
+ ErrorCode *string `json:"errorCode,omitempty"`
+ // Message - The export error message.
+ Message *string `json:"message,omitempty"`
+ // ServerErrorDetail - The server error detail.
+ ServerErrorDetail *string `json:"serverErrorDetail,omitempty"`
+ // TimeFirstOccured - The date and time when the export error first occured.
+ TimeFirstOccured *date.Time `json:"timeFirstOccured,omitempty"`
+ // RetryCount - The retry count.
+ RetryCount *int32 `json:"retryCount,omitempty"`
+ // CsObjectID - The cloud object Id.
+ CsObjectID *string `json:"csObjectId,omitempty"`
+ // Dn - The distinguished name.
+ Dn *string `json:"dn,omitempty"`
+ // MinLimit - The minimum limit.
+ MinLimit *string `json:"minLimit,omitempty"`
+ // MaxLimit - The maximum limit.
+ MaxLimit *string `json:"maxLimit,omitempty"`
+ // CloudAnchor - The name of the cloud anchor.
+ CloudAnchor *string `json:"cloudAnchor,omitempty"`
+ // AttributeName - The attribute name.
+ AttributeName *string `json:"attributeName,omitempty"`
+ // AttributeValue - The attribute value.
+ AttributeValue *string `json:"attributeValue,omitempty"`
+ // AttributeMultiValue - Indicates if the attribute is multi valued or not.
+ AttributeMultiValue *bool `json:"attributeMultiValue,omitempty"`
+ // ObjectIDConflict - The object Id with which there was an attribute conflict.
+ ObjectIDConflict *string `json:"objectIdConflict,omitempty"`
+ // SamAccountName - The SAM account name.
+ SamAccountName *string `json:"samAccountName,omitempty"`
+ // AdObjectType - The AD object type
+ AdObjectType *string `json:"adObjectType,omitempty"`
+ // AdObjectGUID - The AD object guid.
+ AdObjectGUID *string `json:"adObjectGuid,omitempty"`
+ // AdDisplayName - The display name for the AD object.
+ AdDisplayName *string `json:"adDisplayName,omitempty"`
+ // AdSourceOfAuthority - The source of authority for the AD object.
+ AdSourceOfAuthority *string `json:"adSourceOfAuthority,omitempty"`
+ // AdSourceAnchor - The AD source anchor.
+ AdSourceAnchor *string `json:"adSourceAnchor,omitempty"`
+ // AdUserPrincipalName - The user principal name for the AD object.
+ AdUserPrincipalName *string `json:"adUserPrincipalName,omitempty"`
+ // AdDistinguishedName - The distinguished name for the AD object.
+ AdDistinguishedName *string `json:"adDistinguishedName,omitempty"`
+ // AdMail - The email for the AD object.
+ AdMail *string `json:"adMail,omitempty"`
+ // TimeOccured - The date and time of occurance.
+ TimeOccured *date.Time `json:"timeOccured,omitempty"`
+ // AadObjectType - The AAD side object type.
+ AadObjectType *string `json:"aadObjectType,omitempty"`
+ // AadObjectGUID - The AAD side object guid.
+ AadObjectGUID *string `json:"aadObjectGuid,omitempty"`
+ // AadDisplayName - The AAD side display name
+ AadDisplayName *string `json:"aadDisplayName,omitempty"`
+ // AadSourceOfAuthority - The AAD side source of authority for the object.
+ AadSourceOfAuthority *string `json:"aadSourceOfAuthority,omitempty"`
+ // AadUserPrincipalName - The AAD side user principal name.
+ AadUserPrincipalName *string `json:"aadUserPrincipalName,omitempty"`
+ // AadDistringuishedName - The AAD side distinguished name for the object.
+ AadDistringuishedName *string `json:"aadDistringuishedName,omitempty"`
+ // AadMail - The AAD side email for the object.
+ AadMail *string `json:"aadMail,omitempty"`
+ // LastDirSyncTime - The date and time of last sync run.
+ LastDirSyncTime *date.Time `json:"lastDirSyncTime,omitempty"`
+ // ModifiedAttributeValue - The modified atttribute value.
+ ModifiedAttributeValue *string `json:"modifiedAttributeValue,omitempty"`
+}
+
+// ExportErrors the list of export errors.
+type ExportErrors struct {
+ // Value - The value returned by the operation.
+ Value *[]ExportError `json:"value,omitempty"`
+}
+
+// ExportStatus the details of the export status.
+type ExportStatus struct {
+ // ServiceID - The id of the service for whom the export status is being reported.
+ ServiceID *uuid.UUID `json:"serviceId,omitempty"`
+ // ServiceMemberID - The server Id for whom the export status is being reported.
+ ServiceMemberID *uuid.UUID `json:"serviceMemberId,omitempty"`
+ // EndTime - The date and time when the export ended.
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // RunStepResultID - The run step result Id.
+ RunStepResultID *string `json:"runStepResultId,omitempty"`
+}
+
+// ExportStatuses the list of export statuses.
+type ExportStatuses struct {
+ autorest.Response `json:"-"`
+ // NextLink - The link used to get the next page of operations.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Value - The value returned by the operation.
+ Value *[]ExportStatus `json:"value,omitempty"`
+ // TotalCount - The total count of service elements.
+ TotalCount *int32 `json:"totalCount,omitempty"`
+ // ContinuationToken - The continuation token for paginated calls.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+}
+
+// ExportStatusesIterator provides access to a complete listing of ExportStatus values.
+type ExportStatusesIterator struct {
+ i int
+ page ExportStatusesPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ExportStatusesIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ExportStatusesIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ExportStatusesIterator) Response() ExportStatuses {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ExportStatusesIterator) Value() ExportStatus {
+ if !iter.page.NotDone() {
+ return ExportStatus{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (es ExportStatuses) IsEmpty() bool {
+ return es.Value == nil || len(*es.Value) == 0
+}
+
+// exportStatusesPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (es ExportStatuses) exportStatusesPreparer() (*http.Request, error) {
+ if es.NextLink == nil || len(to.String(es.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(es.NextLink)))
+}
+
+// ExportStatusesPage contains a page of ExportStatus values.
+type ExportStatusesPage struct {
+ fn func(ExportStatuses) (ExportStatuses, error)
+ es ExportStatuses
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ExportStatusesPage) Next() error {
+ next, err := page.fn(page.es)
+ if err != nil {
+ return err
+ }
+ page.es = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ExportStatusesPage) NotDone() bool {
+ return !page.es.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ExportStatusesPage) Response() ExportStatuses {
+ return page.es
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ExportStatusesPage) Values() []ExportStatus {
+ if page.es.IsEmpty() {
+ return nil
+ }
+ return *page.es.Value
+}
+
+// ExtensionErrorInfo the extension error details.
+type ExtensionErrorInfo struct {
+ // ExtensionName - The extension name.
+ ExtensionName *string `json:"extensionName,omitempty"`
+ // ExtensionContext - The extension context.
+ ExtensionContext *string `json:"extensionContext,omitempty"`
+ // CallStack - The call stack for the error.
+ CallStack *string `json:"callStack,omitempty"`
+}
+
+// ForestSummary the forest summary for an ADDS domain.
+type ForestSummary struct {
+ autorest.Response `json:"-"`
+ // ForestName - The forest name.
+ ForestName *string `json:"forestName,omitempty"`
+ // DomainCount - The domain count.
+ DomainCount *int32 `json:"domainCount,omitempty"`
+ // SiteCount - The site count.
+ SiteCount *int32 `json:"siteCount,omitempty"`
+ // MonitoredDcCount - The number of domain controllers that are monitored by Azure Active Directory Connect Health.
+ MonitoredDcCount *int32 `json:"monitoredDcCount,omitempty"`
+ // TotalDcCount - The total domain controllers.
+ TotalDcCount *int32 `json:"totalDcCount,omitempty"`
+ // Domains - The list of domain controller names.
+ Domains *[]string `json:"domains,omitempty"`
+ // Sites - The list of site names.
+ Sites *[]string `json:"sites,omitempty"`
+}
+
+// GlobalConfiguration the global configuration settings.
+type GlobalConfiguration struct {
+ // Version - The version for the global configuration.
+ Version *int32 `json:"version,omitempty"`
+ // SchemaXML - The schema for the configuration.
+ SchemaXML *string `json:"schemaXml,omitempty"`
+ // PasswordSyncEnabled - Indicates if password sync is enabled or not.
+ PasswordSyncEnabled *bool `json:"passwordSyncEnabled,omitempty"`
+ // NumSavedPwdEvent - The number of saved password events.
+ NumSavedPwdEvent *int32 `json:"numSavedPwdEvent,omitempty"`
+ // FeatureSet - The list of additional feature sets.
+ FeatureSet *[]Item `json:"featureSet,omitempty"`
+}
+
+// GlobalConfigurations the list of global configurations.
+type GlobalConfigurations struct {
+ autorest.Response `json:"-"`
+ // Value - The value returned by the operation.
+ Value *[]GlobalConfiguration `json:"value,omitempty"`
+}
+
+// HelpLink the help link which contains more information related to an alert.
+type HelpLink struct {
+ // Title - The title for the link.
+ Title *string `json:"title,omitempty"`
+ // URL - The url for the help document.
+ URL *string `json:"url,omitempty"`
+}
+
+// Hotfix the details of the hotfix installed in the server.
+type Hotfix struct {
+ // KbName - The name of the hotfix KB.
+ KbName *string `json:"kbName,omitempty"`
+ // Link - The link to the KB Article.
+ Link *string `json:"link,omitempty"`
+ // InstalledDate - The date and time, in UTC, when the KB was installed in the server.
+ InstalledDate *date.Time `json:"installedDate,omitempty"`
+}
+
+// Hotfixes the list of hotfixes installed in the server.
+type Hotfixes struct {
+ // Value - The value returned by the operation.
+ Value *[]Hotfix `json:"value,omitempty"`
+}
+
+// ImportError the import error details.
+type ImportError struct {
+ // ID - The error Id.
+ ID *string `json:"id,omitempty"`
+ // RunStepResultID - The run step result Id.
+ RunStepResultID *string `json:"runStepResultId,omitempty"`
+ // ConnectorID - The connector Id.
+ ConnectorID *string `json:"connectorId,omitempty"`
+ // Type - The type of error.
+ Type *string `json:"type,omitempty"`
+ // TimeOccurred - The time when the import error occurred.
+ TimeOccurred *date.Time `json:"timeOccurred,omitempty"`
+ // TimeFirstOccurred - The time when the import error first occurred.
+ TimeFirstOccurred *date.Time `json:"timeFirstOccurred,omitempty"`
+ // RetryCount - The retry count.
+ RetryCount *int32 `json:"retryCount,omitempty"`
+ // AlgorithmStepType - The operation type specific to error reporting. Possible values include: 'Undefined', 'Staging', 'ConnectorFilter', 'Join', 'Projection', 'ImportFlow', 'Provisioning', 'ValidateConnectorFilter', 'Deprovisioning', 'ExportFlow', 'MvDeletion', 'Recall', 'MvObjectTypeChange'
+ AlgorithmStepType AlgorithmStepType `json:"algorithmStepType,omitempty"`
+ // ChangeNotReimported - The change details that is not re-imported.
+ ChangeNotReimported *ChangeNotReimported `json:"changeNotReimported,omitempty"`
+ // ExtensionErrorInfo - The extension error information.
+ ExtensionErrorInfo *ExtensionErrorInfo `json:"extensionErrorInfo,omitempty"`
+ // RuleErrorInfo - The error details in legacy rule processing.
+ RuleErrorInfo *RuleErrorInfo `json:"ruleErrorInfo,omitempty"`
+ // CsObjectID - The object Id.
+ CsObjectID *string `json:"csObjectId,omitempty"`
+ // Dn - The distinguished name.
+ Dn *string `json:"dn,omitempty"`
+}
+
+// ImportErrors the list of import errors.
+type ImportErrors struct {
+ // Value - The value returned by the operation.
+ Value *[]ImportError `json:"value,omitempty"`
+}
+
+// InboundReplicationNeighbor the replication summary for the domain controller inbound neighbor.
+type InboundReplicationNeighbor struct {
+ // SourceDomainController - The name of the source domain controller.
+ SourceDomainController *string `json:"sourceDomainController,omitempty"`
+ // ConsecutiveFailureCount - The number of consecutive faulire counts.
+ ConsecutiveFailureCount *int32 `json:"consecutiveFailureCount,omitempty"`
+ // NamingContext - The naming context.
+ NamingContext *string `json:"namingContext,omitempty"`
+ // Status - The health status for the domain controller
+ Status *int32 `json:"status,omitempty"`
+ // LastAttemptedSync - The last time a sync was attempted on the domain controller.
+ LastAttemptedSync *date.Time `json:"lastAttemptedSync,omitempty"`
+ // LastSuccessfulSync - The last time when a successful sync happened.
+ LastSuccessfulSync *date.Time `json:"lastSuccessfulSync,omitempty"`
+ // LastErrorCode - The last error code.
+ LastErrorCode *int32 `json:"lastErrorCode,omitempty"`
+ // LastErrorMessage - The error message of the last error.
+ LastErrorMessage *string `json:"lastErrorMessage,omitempty"`
+ // ErrorTitle - The error title.
+ ErrorTitle *string `json:"errorTitle,omitempty"`
+ // ErrorDescription - The error description.
+ ErrorDescription *string `json:"errorDescription,omitempty"`
+ // FixLink - The link for the fix of the error.
+ FixLink *string `json:"fixLink,omitempty"`
+ // FixDetails - The details of the fix.
+ FixDetails *string `json:"fixDetails,omitempty"`
+ // AdditionalInfo - The additional details.
+ AdditionalInfo *string `json:"additionalInfo,omitempty"`
+}
+
+// InboundReplicationNeighbors the list of replication summary for the domain controller inbound neighbor.
+type InboundReplicationNeighbors struct {
+ // Value - The details of inbound replication neighbors.
+ Value *[]InboundReplicationNeighbor `json:"value,omitempty"`
+}
+
+// Item the key value pair for properties.
+type Item struct {
+ // Key - The key for the property.
+ Key *string `json:"key,omitempty"`
+ // Value - The value for the key.
+ Value *string `json:"value,omitempty"`
+}
+
+// Items the list of key value properties.
+type Items struct {
+ autorest.Response `json:"-"`
+ // Value - The value returned by the operation.
+ Value *[]Item `json:"value,omitempty"`
+}
+
+// MergedExportError the merged export error.
+type MergedExportError struct {
+ // ID - The error Id.
+ ID *string `json:"id,omitempty"`
+ // IncomingObjectDisplayName - The incoming object display name.
+ IncomingObjectDisplayName *string `json:"incomingObjectDisplayName,omitempty"`
+ // IncomingObjectType - The incoming object type.
+ IncomingObjectType *string `json:"incomingObjectType,omitempty"`
+ // UserPrincipalName - The user principal name
+ UserPrincipalName *string `json:"userPrincipalName,omitempty"`
+ // Type - The type of the error.
+ Type *string `json:"type,omitempty"`
+ // AttributeName - The attribute name.
+ AttributeName *string `json:"attributeName,omitempty"`
+ // AttributeValue - The attribute value.
+ AttributeValue *string `json:"attributeValue,omitempty"`
+ // TimeOccurred - The date and time when the error occurred.
+ TimeOccurred *date.Time `json:"timeOccurred,omitempty"`
+ // TimeFirstOccurred - The time when the error first occurred.
+ TimeFirstOccurred *date.Time `json:"timeFirstOccurred,omitempty"`
+ // CsObjectID - the cs object Id.
+ CsObjectID *string `json:"csObjectId,omitempty"`
+ // Dn - the DN of the object.
+ Dn *string `json:"dn,omitempty"`
+ // IncomingObject - The incoming object details.
+ IncomingObject *AssociatedObject `json:"incomingObject,omitempty"`
+ // ExistingObject - The existing object
+ ExistingObject *AssociatedObject `json:"existingObject,omitempty"`
+ // ModifiedOrRemovedAttributeValue - The modified or removed attribute vlaue.
+ ModifiedOrRemovedAttributeValue *string `json:"modifiedOrRemovedAttributeValue,omitempty"`
+ // RunStepResultID - The run step result Id.
+ RunStepResultID *uuid.UUID `json:"runStepResultId,omitempty"`
+ // SamAccountName - The sam account name.
+ SamAccountName *string `json:"samAccountName,omitempty"`
+ // ServerErrorDetail - The server error details.
+ ServerErrorDetail *string `json:"serverErrorDetail,omitempty"`
+ // ServiceID - The service Id.
+ ServiceID *uuid.UUID `json:"serviceId,omitempty"`
+ // ServiceMemberID - The server Id.
+ ServiceMemberID *uuid.UUID `json:"serviceMemberId,omitempty"`
+ // MergedEntityID - The merged entity Id.
+ MergedEntityID *uuid.UUID `json:"mergedEntityId,omitempty"`
+ // CreatedDate - The date and time, in UTC, when the error was created.
+ CreatedDate *date.Time `json:"createdDate,omitempty"`
+ // ExportErrorStatus - The export error status.
+ ExportErrorStatus *int32 `json:"exportErrorStatus,omitempty"`
+}
+
+// MergedExportErrors the list of export errors.
+type MergedExportErrors struct {
+ autorest.Response `json:"-"`
+ // Value - The value returned by the operation.
+ Value *[]MergedExportError `json:"value,omitempty"`
+}
+
+// MetricGroup the metric group details.
+type MetricGroup struct {
+ // Key - The key for the group.
+ Key *string `json:"key,omitempty"`
+ // DisplayName - The display name for the group.
+ DisplayName *string `json:"displayName,omitempty"`
+ // InvisibleForUI - indicates if the metric group is displayed in Azure Active Directory Connect Health UI.
+ InvisibleForUI *bool `json:"invisibleForUi,omitempty"`
+}
+
+// MetricMetadata the metric meta data
+type MetricMetadata struct {
+ autorest.Response `json:"-"`
+ // MetricsProcessorClassName - The name of the class which retrieve and process the metric.
+ MetricsProcessorClassName *string `json:"metricsProcessorClassName,omitempty"`
+ // MetricName - The metric name
+ MetricName *string `json:"metricName,omitempty"`
+ // Groupings - The groupings for the metrics.
+ Groupings *[]MetricGroup `json:"groupings,omitempty"`
+ // DisplayName - The display name for the metric.
+ DisplayName *string `json:"displayName,omitempty"`
+ // ValueKind - Indicates if the metrics is a rate,value, percent or duration type.
+ ValueKind *string `json:"valueKind,omitempty"`
+ // MinValue - The minimun value.
+ MinValue *int32 `json:"minValue,omitempty"`
+ // MaxValue - The maximum value.
+ MaxValue *int32 `json:"maxValue,omitempty"`
+ // Kind - Indicates whether the dashboard to represent the metric is a line, bar,pie, area or donut chart.
+ Kind *string `json:"kind,omitempty"`
+ // IsDefault - Indicates if the metric is a default metric or not.
+ IsDefault *bool `json:"isDefault,omitempty"`
+ // IsPerfCounter - Indicates if the metric is a performance counter metric or not.
+ IsPerfCounter *bool `json:"isPerfCounter,omitempty"`
+ // IsDevOps - Indicates if the metric is visible to DevOps or not.
+ IsDevOps *bool `json:"isDevOps,omitempty"`
+}
+
+// MetricMetadataList the list of metric metadata.
+type MetricMetadataList struct {
+ autorest.Response `json:"-"`
+ // NextLink - The link used to get the next page of operations.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Value - The value returned by the operation.
+ Value *[]MetricMetadata `json:"value,omitempty"`
+ // TotalCount - The total count of service elements.
+ TotalCount *int32 `json:"totalCount,omitempty"`
+ // ContinuationToken - The continuation token for paginated calls.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+}
+
+// MetricMetadataListIterator provides access to a complete listing of MetricMetadata values.
+type MetricMetadataListIterator struct {
+ i int
+ page MetricMetadataListPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *MetricMetadataListIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter MetricMetadataListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter MetricMetadataListIterator) Response() MetricMetadataList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter MetricMetadataListIterator) Value() MetricMetadata {
+ if !iter.page.NotDone() {
+ return MetricMetadata{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (mml MetricMetadataList) IsEmpty() bool {
+ return mml.Value == nil || len(*mml.Value) == 0
+}
+
+// metricMetadataListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (mml MetricMetadataList) metricMetadataListPreparer() (*http.Request, error) {
+ if mml.NextLink == nil || len(to.String(mml.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(mml.NextLink)))
+}
+
+// MetricMetadataListPage contains a page of MetricMetadata values.
+type MetricMetadataListPage struct {
+ fn func(MetricMetadataList) (MetricMetadataList, error)
+ mml MetricMetadataList
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *MetricMetadataListPage) Next() error {
+ next, err := page.fn(page.mml)
+ if err != nil {
+ return err
+ }
+ page.mml = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page MetricMetadataListPage) NotDone() bool {
+ return !page.mml.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page MetricMetadataListPage) Response() MetricMetadataList {
+ return page.mml
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page MetricMetadataListPage) Values() []MetricMetadata {
+ if page.mml.IsEmpty() {
+ return nil
+ }
+ return *page.mml.Value
+}
+
+// Metrics the list of metric items.
+type Metrics struct {
+ autorest.Response `json:"-"`
+ // NextLink - The link used to get the next page of operations.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Value - The value returned by the operation.
+ Value *[]Item `json:"value,omitempty"`
+ // TotalCount - The total count of metrics.
+ TotalCount *int32 `json:"totalCount,omitempty"`
+ // ContinuationToken - The continuation token for paginated calls.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+}
+
+// MetricSet the set of metric values. Example of a MetricSet are Values of token requests for a Server1 or
+// RelyingParty1.
+type MetricSet struct {
+ // SetName - The name of the set.
+ SetName *string `json:"setName,omitempty"`
+ // Values - The list of the metric values.
+ Values *[]int32 `json:"values,omitempty"`
+}
+
+// MetricSets the metrics data represented set.
+type MetricSets struct {
+ autorest.Response `json:"-"`
+ // Sets - The list of metric set.
+ Sets *[]MetricSet `json:"sets,omitempty"`
+ // TimeStamps - The list of timestamps for each metric in the metric set.
+ TimeStamps *[]date.Time `json:"timeStamps,omitempty"`
+}
+
+// MetricsIterator provides access to a complete listing of Item values.
+type MetricsIterator struct {
+ i int
+ page MetricsPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *MetricsIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter MetricsIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter MetricsIterator) Response() Metrics {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter MetricsIterator) Value() Item {
+ if !iter.page.NotDone() {
+ return Item{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (mVar Metrics) IsEmpty() bool {
+ return mVar.Value == nil || len(*mVar.Value) == 0
+}
+
+// metricsPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (mVar Metrics) metricsPreparer() (*http.Request, error) {
+ if mVar.NextLink == nil || len(to.String(mVar.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(mVar.NextLink)))
+}
+
+// MetricsPage contains a page of Item values.
+type MetricsPage struct {
+ fn func(Metrics) (Metrics, error)
+ mVar Metrics
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *MetricsPage) Next() error {
+ next, err := page.fn(page.mVar)
+ if err != nil {
+ return err
+ }
+ page.mVar = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page MetricsPage) NotDone() bool {
+ return !page.mVar.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page MetricsPage) Response() Metrics {
+ return page.mVar
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page MetricsPage) Values() []Item {
+ if page.mVar.IsEmpty() {
+ return nil
+ }
+ return *page.mVar.Value
+}
+
+// ModuleConfiguration the module configuration as required by the Agent service.
+type ModuleConfiguration struct {
+ // AgentService - The name of agent service.
+ AgentService *string `json:"agentService,omitempty"`
+ // ModuleName - The name of the module for which the configuration is applicable.
+ ModuleName *string `json:"moduleName,omitempty"`
+ // Properties - The key value pairs of properties required for configuration.
+ Properties map[string]*string `json:"properties"`
+}
+
+// MarshalJSON is the custom marshaler for ModuleConfiguration.
+func (mc ModuleConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mc.AgentService != nil {
+ objectMap["agentService"] = mc.AgentService
+ }
+ if mc.ModuleName != nil {
+ objectMap["moduleName"] = mc.ModuleName
+ }
+ if mc.Properties != nil {
+ objectMap["properties"] = mc.Properties
+ }
+ return json.Marshal(objectMap)
+}
+
+// ModuleConfigurations the list of module configurations.
+type ModuleConfigurations struct {
+ // Value - The value returned by the operation.
+ Value *[]ModuleConfiguration `json:"value,omitempty"`
+}
+
+// ObjectWithSyncError the objects withg sync errors.
+type ObjectWithSyncError struct {
+ // SourceOfAuthority - The source of authority.
+ SourceOfAuthority *string `json:"sourceOfAuthority,omitempty"`
+ // DisplayName - The display name.
+ DisplayName *string `json:"displayName,omitempty"`
+ // ObjectType - The object type.
+ ObjectType *string `json:"objectType,omitempty"`
+ // AttributeName - The attribute name.
+ AttributeName *string `json:"attributeName,omitempty"`
+ // AttributeValue - The attribute value.
+ AttributeValue *string `json:"attributeValue,omitempty"`
+ // ModififedValue - The modified value.
+ ModififedValue *string `json:"modififedValue,omitempty"`
+ // UserPrincipalName - The user principal name.
+ UserPrincipalName *string `json:"userPrincipalName,omitempty"`
+ // ObjectGUID - The object guid.
+ ObjectGUID *string `json:"objectGuid,omitempty"`
+ // AttributeMultiValues - Indicates if the atttibute is multi-valued or not.
+ AttributeMultiValues *bool `json:"attributeMultiValues,omitempty"`
+ // MinLimit - The minimum limit.
+ MinLimit *string `json:"minLimit,omitempty"`
+ // MaxLimit - The maximum limit.
+ MaxLimit *string `json:"maxLimit,omitempty"`
+ // DistinguishedName - The distinguished name.
+ DistinguishedName *string `json:"distinguishedName,omitempty"`
+ // Mail - The email.
+ Mail *string `json:"mail,omitempty"`
+ // TimeOccured - The date and time of occurance.
+ TimeOccured *date.Time `json:"timeOccured,omitempty"`
+ // ErrorType - The error type.
+ ErrorType *string `json:"errorType,omitempty"`
+ // SourceAnchor - The source anchor.
+ SourceAnchor *string `json:"sourceAnchor,omitempty"`
+}
+
+// Operation the details of the operation.
+type Operation struct {
+ // Name - The name of the operation.
+ Name *string `json:"name,omitempty"`
+ // Display - The display details for the operation.
+ Display interface{} `json:"display,omitempty"`
+}
+
+// OperationListResponse lists all of the available REST API operations for Azure Active Directory Connect Health.
+type OperationListResponse struct {
+ autorest.Response `json:"-"`
+ // NextLink - URL to get the next set of operation list results if there are any.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Value - List of operations supported by the Microsoft.ADHybridhHealthService resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+ // TotalCount - The total count of opertaions.
+ TotalCount *int32 `json:"totalCount,omitempty"`
+ // ContinuationToken - The continuation token to get next set of operations.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+}
+
+// OperationListResponseIterator provides access to a complete listing of Operation values.
+type OperationListResponseIterator struct {
+ i int
+ page OperationListResponsePage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OperationListResponseIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OperationListResponseIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OperationListResponseIterator) Response() OperationListResponse {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OperationListResponseIterator) Value() Operation {
+ if !iter.page.NotDone() {
+ return Operation{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (olr OperationListResponse) IsEmpty() bool {
+ return olr.Value == nil || len(*olr.Value) == 0
+}
+
+// operationListResponsePreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (olr OperationListResponse) operationListResponsePreparer() (*http.Request, error) {
+ if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(olr.NextLink)))
+}
+
+// OperationListResponsePage contains a page of Operation values.
+type OperationListResponsePage struct {
+ fn func(OperationListResponse) (OperationListResponse, error)
+ olr OperationListResponse
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OperationListResponsePage) Next() error {
+ next, err := page.fn(page.olr)
+ if err != nil {
+ return err
+ }
+ page.olr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OperationListResponsePage) NotDone() bool {
+ return !page.olr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OperationListResponsePage) Response() OperationListResponse {
+ return page.olr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OperationListResponsePage) Values() []Operation {
+ if page.olr.IsEmpty() {
+ return nil
+ }
+ return *page.olr.Value
+}
+
+// Partition describes the partition in Synchronization service.
+type Partition struct {
+ // ID - The partition Id.
+ ID *string `json:"id,omitempty"`
+ // Dn - The distinguished name for the partition.
+ Dn *string `json:"dn,omitempty"`
+ // Enabled - Indicates if the partition object is selected or not.
+ Enabled *bool `json:"enabled,omitempty"`
+ // TimeCreated - The date and time when the partition is created.
+ TimeCreated *date.Time `json:"timeCreated,omitempty"`
+ // TimeLastModified - The time and date when the partition was last modified.
+ TimeLastModified *date.Time `json:"timeLastModified,omitempty"`
+ // PartitionScope - The scope of the partition.
+ PartitionScope *PartitionScope `json:"partitionScope,omitempty"`
+ // Name - The name of the partition.
+ Name *string `json:"name,omitempty"`
+ // IsDomain - Indicates if the partition is a domain or not.
+ IsDomain *bool `json:"isDomain,omitempty"`
+ // Type - The partition type.
+ Type *string `json:"type,omitempty"`
+}
+
+// PartitionScope the connector partition scope.
+type PartitionScope struct {
+ // IsDefault - Indicates if the partition scope is default or not.
+ IsDefault *bool `json:"isDefault,omitempty"`
+ // ObjectClasses - The in-scope object classes.
+ ObjectClasses *[]string `json:"objectClasses,omitempty"`
+ // ContainersIncluded - The list of containers included.
+ ContainersIncluded *[]string `json:"containersIncluded,omitempty"`
+ // ContainersExcluded - The list of containers excluded.
+ ContainersExcluded *[]string `json:"containersExcluded,omitempty"`
+}
+
+// PasswordHashSyncConfiguration the password has synchronization configuration settings.
+type PasswordHashSyncConfiguration struct {
+ // Enabled - Indicates if the password hash synchronization configuration settings is enabled.
+ Enabled *bool `json:"enabled,omitempty"`
+ // Target - The target.
+ Target *string `json:"target,omitempty"`
+}
+
+// PasswordManagementSettings the password management settings.
+type PasswordManagementSettings struct {
+ // Enabled - Indicates if the password extension is enabled.
+ Enabled *bool `json:"enabled,omitempty"`
+ // ExtensionFilePath - The file path of the password management extension.
+ ExtensionFilePath *string `json:"extensionFilePath,omitempty"`
+ // ConnectTo - Connection point of password management.
+ ConnectTo *string `json:"connectTo,omitempty"`
+ // ConnectionTimeout - Connection timeoit for password extension.
+ ConnectionTimeout *int32 `json:"connectionTimeout,omitempty"`
+ // User - User to execute password extension.
+ User *string `json:"user,omitempty"`
+ // SupportedPasswordOperations - The supported password operations. Possible values include: 'PasswordOperationTypesUndefined', 'PasswordOperationTypesSet', 'PasswordOperationTypesChange'
+ SupportedPasswordOperations PasswordOperationTypes `json:"supportedPasswordOperations,omitempty"`
+ // MaximumRetryCount - The maximum number of retries.
+ MaximumRetryCount *int32 `json:"maximumRetryCount,omitempty"`
+ // RetryIntervalInSeconds - The time between retries.
+ RetryIntervalInSeconds *int32 `json:"retryIntervalInSeconds,omitempty"`
+ // RequiresSecureConnection - Indicates if a secure connection is required for password management.
+ RequiresSecureConnection *bool `json:"requiresSecureConnection,omitempty"`
+ // UnlockAccount - Indicates if accounts should be unloacked when resetting password.
+ UnlockAccount *bool `json:"unlockAccount,omitempty"`
+}
+
+// ReplicationStatus replication summary for a domain controller.
+type ReplicationStatus struct {
+ autorest.Response `json:"-"`
+ // ForestName - The forest name.
+ ForestName *string `json:"forestName,omitempty"`
+ // TotalDcCount - The total numbe of domain controllers for a given forest.
+ TotalDcCount *int32 `json:"totalDcCount,omitempty"`
+ // ErrorDcCount - The total number of domain controllers with error in a given forest.
+ ErrorDcCount *int32 `json:"errorDcCount,omitempty"`
+}
+
+// ReplicationSummary the replication summary for a domain controller.
+type ReplicationSummary struct {
+ // TargetServer - The domain controller name.
+ TargetServer *string `json:"targetServer,omitempty"`
+ // Site - The site name for a given domain controller.
+ Site *string `json:"site,omitempty"`
+ // Domain - The domain name for a given domain controller.
+ Domain *string `json:"domain,omitempty"`
+ // Status - The health status for a domain controller.
+ Status *int32 `json:"status,omitempty"`
+ // LastAttemptedSync - The last time when a sync was attempted for a given domain controller.
+ LastAttemptedSync *date.Time `json:"lastAttemptedSync,omitempty"`
+ // LastSuccessfulSync - The time when the last successful sync happened for a given domain controller.
+ LastSuccessfulSync *date.Time `json:"lastSuccessfulSync,omitempty"`
+ // InboundNeighborCollection - List of individual domain controller neighbor's inbound replication status.
+ InboundNeighborCollection *[]InboundReplicationNeighbor `json:"inboundNeighborCollection,omitempty"`
+}
+
+// ReplicationSummaryList the list of replication summary details.
+type ReplicationSummaryList struct {
+ autorest.Response `json:"-"`
+ // Value - The value returned by the operation.
+ Value *[]ReplicationSummary `json:"value,omitempty"`
+}
+
+// Result the result for an operation.
+type Result struct {
+ autorest.Response `json:"-"`
+ // Value - The value.
+ Value *bool `json:"value,omitempty"`
+}
+
+// RuleErrorInfo the error details in legacy rule processing.
+type RuleErrorInfo struct {
+ // AttributeMapping - The attribute mapping details.
+ AttributeMapping *AttributeMapping `json:"attributeMapping,omitempty"`
+ // ConnectorID - The connector Id.
+ ConnectorID *string `json:"connectorId,omitempty"`
+ // ConnectorName - The connector name.
+ ConnectorName *string `json:"connectorName,omitempty"`
+ // CsObjectID - The object Id.
+ CsObjectID *string `json:"csObjectId,omitempty"`
+ // Dn - The distinguished name.
+ Dn *string `json:"dn,omitempty"`
+}
+
+// RunProfile describes the run profile.
+type RunProfile struct {
+ // ID - The run profile Id.
+ ID *string `json:"id,omitempty"`
+ // Name - The run profile name
+ Name *string `json:"name,omitempty"`
+ // RunSteps - The run steps of the run profile.
+ RunSteps *[]RunStep `json:"runSteps,omitempty"`
+}
+
+// RunProfiles the list of run profiles.
+type RunProfiles struct {
+ // Value - The value returned by the operation.
+ Value *[]RunProfile `json:"value,omitempty"`
+}
+
+// RunStep the run step for a run profile.
+type RunStep struct {
+ // BatchSize - The batch size used by the run step.
+ BatchSize *int32 `json:"batchSize,omitempty"`
+ // ObjectProcessLimit - The obect processing limit.
+ ObjectProcessLimit *int32 `json:"objectProcessLimit,omitempty"`
+ // ObjectDeleteLimit - The object deletion limit.
+ ObjectDeleteLimit *int32 `json:"objectDeleteLimit,omitempty"`
+ // PageSize - The page size of the run step.
+ PageSize *int32 `json:"pageSize,omitempty"`
+ // PartitionID - The Id of the partition that a current run setp operation is executing.
+ PartitionID *string `json:"partitionId,omitempty"`
+ // OperationType - The run step operation types.
+ OperationType *int32 `json:"operationType,omitempty"`
+ // Timeout - The operation timeout.
+ Timeout *int32 `json:"timeout,omitempty"`
+}
+
+// ServiceConfiguration the service configuration
+type ServiceConfiguration struct {
+ autorest.Response `json:"-"`
+ // Version - The version of the sync service.
+ Version *string `json:"version,omitempty"`
+ // ServiceType - The service type of the server.
+ ServiceType *int32 `json:"serviceType,omitempty"`
+ // ServiceAccount - The service account.
+ ServiceAccount *string `json:"serviceAccount,omitempty"`
+ // SQLServer - The SQL server information.
+ SQLServer *string `json:"sqlServer,omitempty"`
+ // SQLVersion - The SQL version.
+ SQLVersion *string `json:"sqlVersion,omitempty"`
+ // SQLEdition - The SQL edition
+ SQLEdition *string `json:"sqlEdition,omitempty"`
+ // SQLInstance - The SQL instance details.
+ SQLInstance *string `json:"sqlInstance,omitempty"`
+ // SQLDatabaseName - The SQL database.
+ SQLDatabaseName *string `json:"sqlDatabaseName,omitempty"`
+ // SQLDatabaseSize - The SQL database size.
+ SQLDatabaseSize *int32 `json:"sqlDatabaseSize,omitempty"`
+}
+
+// ServiceMember the server properties for a given service.
+type ServiceMember struct {
+ autorest.Response `json:"-"`
+ // ServiceMemberID - The id of the server.
+ ServiceMemberID *string `json:"serviceMemberId,omitempty"`
+ // ServiceID - The service id to whom this server belongs.
+ ServiceID *string `json:"serviceId,omitempty"`
+ // TenantID - The tenant id to whom this server belongs.
+ TenantID *string `json:"tenantId,omitempty"`
+ // ActiveAlerts - The total number of alerts that are currently active for the server.
+ ActiveAlerts *int32 `json:"activeAlerts,omitempty"`
+ // AdditionalInformation - The additional information, if any, for the server.
+ AdditionalInformation *string `json:"additionalInformation,omitempty"`
+ // CreatedDate - The date time , in UTC, when the server was onboaraded to Azure Active Directory Connect Health.
+ CreatedDate *date.Time `json:"createdDate,omitempty"`
+ // Dimensions - The server specific configuration related dimensions.
+ Dimensions interface{} `json:"dimensions,omitempty"`
+ // Disabled - Indicates if the server is disabled or not.
+ Disabled *bool `json:"disabled,omitempty"`
+ // DisabledReason - The reason for disabling the server.
+ DisabledReason *int32 `json:"disabledReason,omitempty"`
+ // InstalledQfes - The list of installed QFEs for the server.
+ InstalledQfes interface{} `json:"installedQfes,omitempty"`
+ // LastDisabled - The date and time , in UTC, when the server was last disabled.
+ LastDisabled *date.Time `json:"lastDisabled,omitempty"`
+ // LastReboot - The date and time, in UTC, when the server was last rebooted.
+ LastReboot *date.Time `json:"lastReboot,omitempty"`
+ // LastServerReportedMonitoringLevelChange - The date and time, in UTC, when the server's data monitoring configuration was last changed.
+ LastServerReportedMonitoringLevelChange *date.Time `json:"lastServerReportedMonitoringLevelChange,omitempty"`
+ // LastUpdated - The date and time, in UTC, when the server proeprties were last updated.
+ LastUpdated *date.Time `json:"lastUpdated,omitempty"`
+ // MachineID - The id of the machine.
+ MachineID *string `json:"machineId,omitempty"`
+ // MachineName - The name of the server.
+ MachineName *string `json:"machineName,omitempty"`
+ // MonitoringConfigurationsComputed - The monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health.
+ MonitoringConfigurationsComputed interface{} `json:"monitoringConfigurationsComputed,omitempty"`
+ // MonitoringConfigurationsCustomized - The customized monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health.
+ MonitoringConfigurationsCustomized interface{} `json:"monitoringConfigurationsCustomized,omitempty"`
+ // OsName - The name of the operating system installed in the machine.
+ OsName *string `json:"osName,omitempty"`
+ // OsVersion - The version of the operating system installed in the machine.
+ OsVersion *string `json:"osVersion,omitempty"`
+ // Properties - Server specific properties.
+ Properties interface{} `json:"properties,omitempty"`
+ // RecommendedQfes - The list of recommended hotfixes for the server.
+ RecommendedQfes interface{} `json:"recommendedQfes,omitempty"`
+ // ResolvedAlerts - The total count of alerts that are resolved for this server.
+ ResolvedAlerts *int32 `json:"resolvedAlerts,omitempty"`
+ // Role - The service role that is being monitored in the server.
+ Role *string `json:"role,omitempty"`
+ // ServerReportedMonitoringLevel - The monitoring level reported by the server. Possible values include: 'Partial', 'Full', 'Off'
+ ServerReportedMonitoringLevel MonitoringLevel `json:"serverReportedMonitoringLevel,omitempty"`
+ // Status - The health status of the server.
+ Status *string `json:"status,omitempty"`
+}
+
+// ServiceMembers the list of servers that are onboarded for a given service.
+type ServiceMembers struct {
+ autorest.Response `json:"-"`
+ // NextLink - The link used to get the next page of operations.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Value - The value returned by the operation.
+ Value *[]ServiceMember `json:"value,omitempty"`
+ // TotalCount - The total count of service elements.
+ TotalCount *int32 `json:"totalCount,omitempty"`
+ // ContinuationToken - The continuation token for paginated calls.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+}
+
+// ServiceMembersIterator provides access to a complete listing of ServiceMember values.
+type ServiceMembersIterator struct {
+ i int
+ page ServiceMembersPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ServiceMembersIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ServiceMembersIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ServiceMembersIterator) Response() ServiceMembers {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ServiceMembersIterator) Value() ServiceMember {
+ if !iter.page.NotDone() {
+ return ServiceMember{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (sm ServiceMembers) IsEmpty() bool {
+ return sm.Value == nil || len(*sm.Value) == 0
+}
+
+// serviceMembersPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (sm ServiceMembers) serviceMembersPreparer() (*http.Request, error) {
+ if sm.NextLink == nil || len(to.String(sm.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(sm.NextLink)))
+}
+
+// ServiceMembersPage contains a page of ServiceMember values.
+type ServiceMembersPage struct {
+ fn func(ServiceMembers) (ServiceMembers, error)
+ sm ServiceMembers
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ServiceMembersPage) Next() error {
+ next, err := page.fn(page.sm)
+ if err != nil {
+ return err
+ }
+ page.sm = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ServiceMembersPage) NotDone() bool {
+ return !page.sm.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ServiceMembersPage) Response() ServiceMembers {
+ return page.sm
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ServiceMembersPage) Values() []ServiceMember {
+ if page.sm.IsEmpty() {
+ return nil
+ }
+ return *page.sm.Value
+}
+
+// ServiceProperties the service properties for a given service.
+type ServiceProperties struct {
+ autorest.Response `json:"-"`
+ // ID - The id of the service.
+ ID *string `json:"id,omitempty"`
+ // ActiveAlerts - The count of alerts that are currently active for the service.
+ ActiveAlerts *int32 `json:"activeAlerts,omitempty"`
+ // AdditionalInformation - The additional information related to the service.
+ AdditionalInformation *string `json:"additionalInformation,omitempty"`
+ // CreatedDate - The date and time, in UTC, when the service was onboarded to Azure Active Directory Connect Health.
+ CreatedDate *date.Time `json:"createdDate,omitempty"`
+ // CustomNotificationEmails - The list of additional emails that are configured to recieve notifications about the service.
+ CustomNotificationEmails *[]string `json:"customNotificationEmails,omitempty"`
+ // Disabled - Indicates if the service is disabled or not.
+ Disabled *bool `json:"disabled,omitempty"`
+ // DisplayName - The display name of the service.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Health - The health of the service.
+ Health *string `json:"health,omitempty"`
+ // LastDisabled - The date and time, in UTC, when the service was last disabled.
+ LastDisabled *date.Time `json:"lastDisabled,omitempty"`
+ // LastUpdated - The date or time , in UTC, when the service properties were last updated.
+ LastUpdated *date.Time `json:"lastUpdated,omitempty"`
+ // MonitoringConfigurationsComputed - The monitoring configuration of the service which determines what activities are monitored by Azure Active Directory Connect Health.
+ MonitoringConfigurationsComputed interface{} `json:"monitoringConfigurationsComputed,omitempty"`
+ // MonitoringConfigurationsCustomized - The customized monitoring configuration of the service which determines what activities are monitored by Azure Active Directory Connect Health.
+ MonitoringConfigurationsCustomized interface{} `json:"monitoringConfigurationsCustomized,omitempty"`
+ // NotificationEmailEnabled - Indicates if email notification is enabled or not.
+ NotificationEmailEnabled *bool `json:"notificationEmailEnabled,omitempty"`
+ // NotificationEmailEnabledForGlobalAdmins - Indicates if email notification is enabled for global administrators of the tenant.
+ NotificationEmailEnabledForGlobalAdmins *bool `json:"notificationEmailEnabledForGlobalAdmins,omitempty"`
+ // NotificationEmailsEnabledForGlobalAdmins - Indicates if email notification is enabled for global administrators of the tenant.
+ NotificationEmailsEnabledForGlobalAdmins *bool `json:"notificationEmailsEnabledForGlobalAdmins,omitempty"`
+ // NotificationEmails - The list of emails to whom service notifications will be sent.
+ NotificationEmails *[]string `json:"notificationEmails,omitempty"`
+ // OriginalDisabledState - Gets the original disable state.
+ OriginalDisabledState *bool `json:"originalDisabledState,omitempty"`
+ // ResolvedAlerts - The total count of alerts that has been resolved for the service.
+ ResolvedAlerts *int32 `json:"resolvedAlerts,omitempty"`
+ // ServiceID - The id of the service.
+ ServiceID *string `json:"serviceId,omitempty"`
+ // ServiceName - The name of the service.
+ ServiceName *string `json:"serviceName,omitempty"`
+ // Signature - The signature of the service.
+ Signature *string `json:"signature,omitempty"`
+ // SimpleProperties - List of service specific configuration properties.
+ SimpleProperties interface{} `json:"simpleProperties,omitempty"`
+ // TenantID - The id of the tenant to which the service is registered to.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService.
+ Type *string `json:"type,omitempty"`
+}
+
+// Services the list of services for a given onboarded tenant.
+type Services struct {
+ autorest.Response `json:"-"`
+ // NextLink - The link used to get the next page of operations.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Value - The value returned by the operation.
+ Value *[]ServiceProperties `json:"value,omitempty"`
+ // TotalCount - The total count of service elements.
+ TotalCount *int32 `json:"totalCount,omitempty"`
+ // ContinuationToken - The continuation token for paginated calls.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+}
+
+// ServicesIterator provides access to a complete listing of ServiceProperties values.
+type ServicesIterator struct {
+ i int
+ page ServicesPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ServicesIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ServicesIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ServicesIterator) Response() Services {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ServicesIterator) Value() ServiceProperties {
+ if !iter.page.NotDone() {
+ return ServiceProperties{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (s Services) IsEmpty() bool {
+ return s.Value == nil || len(*s.Value) == 0
+}
+
+// servicesPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (s Services) servicesPreparer() (*http.Request, error) {
+ if s.NextLink == nil || len(to.String(s.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(s.NextLink)))
+}
+
+// ServicesPage contains a page of ServiceProperties values.
+type ServicesPage struct {
+ fn func(Services) (Services, error)
+ s Services
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ServicesPage) Next() error {
+ next, err := page.fn(page.s)
+ if err != nil {
+ return err
+ }
+ page.s = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ServicesPage) NotDone() bool {
+ return !page.s.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ServicesPage) Response() Services {
+ return page.s
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ServicesPage) Values() []ServiceProperties {
+ if page.s.IsEmpty() {
+ return nil
+ }
+ return *page.s.Value
+}
+
+// TabularExportError the details for export error.
+type TabularExportError struct {
+ // ServiceID - The service Id.
+ ServiceID *uuid.UUID `json:"serviceId,omitempty"`
+ // ServiceMemberID - The server Id.
+ ServiceMemberID *uuid.UUID `json:"serviceMemberId,omitempty"`
+ // MergedEntityID - The merged entity Id.
+ MergedEntityID *uuid.UUID `json:"mergedEntityId,omitempty"`
+ // TabularExportErrorData - The export error data.
+ TabularExportErrorData *string `json:"tabularExportErrorData,omitempty"`
+}
+
+// Tenant the details of the onboarded tenant.
+type Tenant struct {
+ autorest.Response `json:"-"`
+ // TenantID - The Id of the tenant.
+ TenantID *string `json:"tenantId,omitempty"`
+ // AadLicense - The Azure Active Directory license of the tenant.
+ AadLicense *string `json:"aadLicense,omitempty"`
+ // AadPremium - Indicate if the tenant has Azure Active Directory Premium license or not.
+ AadPremium *bool `json:"aadPremium,omitempty"`
+ // AgentAutoUpdate - Indicates if the tenant is configured to automatically receive updates for Azure Active Directory Connect Health client side features.
+ AgentAutoUpdate *bool `json:"agentAutoUpdate,omitempty"`
+ // AlertSuppressionTimeInMins - The time in minutues after which an alert will be autosupressed.
+ AlertSuppressionTimeInMins *int32 `json:"alertSuppressionTimeInMins,omitempty"`
+ // ConsentedToMicrosoftDevOps - Indicates if the tenant data can be seen by Microsoft through Azure portal.
+ ConsentedToMicrosoftDevOps *bool `json:"consentedToMicrosoftDevOps,omitempty"`
+ // CountryLetterCode - The country letter code of the tenant.
+ CountryLetterCode *string `json:"countryLetterCode,omitempty"`
+ // CreatedDate - The date, in UTC, when the tenant was onboarded to Azure Active Directory Connect Health.
+ CreatedDate *date.Time `json:"createdDate,omitempty"`
+ // DevOpsTTL - The date and time, in UTC, till when the tenant data can be seen by Microsoft through Azure portal.
+ DevOpsTTL *date.Time `json:"devOpsTtl,omitempty"`
+ // Disabled - Indicates if the tenant is disabled in Azure Active Directory Connect Health.
+ Disabled *bool `json:"disabled,omitempty"`
+ // DisabledReason - The reason due to which the tenant was disabled in Azure Active Directory Connect Health.
+ DisabledReason *int32 `json:"disabledReason,omitempty"`
+ // GlobalAdminsEmail - The list of golbal administrators for the tenant.
+ GlobalAdminsEmail interface{} `json:"globalAdminsEmail,omitempty"`
+ // InitialDomain - The initial domain of the tenant.
+ InitialDomain *string `json:"initialDomain,omitempty"`
+ // LastDisabled - The date and time, in UTC, when the tenant was last disabled in Azure Active Directory Connect Health.
+ LastDisabled *date.Time `json:"lastDisabled,omitempty"`
+ // LastVerified - The date and time, in UTC, when the tenant onboarding status in Azure Active Directory Connect Health was last verified.
+ LastVerified *date.Time `json:"lastVerified,omitempty"`
+ // OnboardingAllowed - Indicates if the tenant is allowed to onboard to Azure Active Directory Connect Health.
+ OnboardingAllowed *bool `json:"onboardingAllowed,omitempty"`
+ // Onboarded - Indicates if the tenant is already onboarded to Azure Active Directory Connect Health.
+ Onboarded *bool `json:"onboarded,omitempty"`
+ // PksCertificate - The certificate associated with the tenant to onboard data to Azure Active Directory Connect Health.
+ PksCertificate interface{} `json:"pksCertificate,omitempty"`
+ // PrivatePreviewTenant - Indicates if the tenant has signed up for private preview of Azure Active Directory Connect Health features.
+ PrivatePreviewTenant *bool `json:"privatePreviewTenant,omitempty"`
+ // TenantInQuarantine - Indicates if data collection for this tenant is disabled or not.
+ TenantInQuarantine *bool `json:"tenantInQuarantine,omitempty"`
+ // TenantName - The name of the tenant.
+ TenantName *string `json:"tenantName,omitempty"`
+}
+
+// TenantOnboardingDetails the tenant onboarding details.
+type TenantOnboardingDetails struct {
+ // TenantOnboarded - Indicates if the tenant is onboarded to Azure Active Directory Connect Health or not.
+ TenantOnboarded *bool `json:"tenantOnboarded,omitempty"`
+ // OnboardingDisplayURL - The display url, to help tenant navigate or onboard to Azure Active Directory Connect Health blade, based on tenant onboarding status.
+ OnboardingDisplayURL *string `json:"onboardingDisplayUrl,omitempty"`
+}
+
+// ValueDelta the value of the delta.
+type ValueDelta struct {
+ // OperationType - The operation type. Possible values include: 'ValueDeltaOperationTypeUndefined', 'ValueDeltaOperationTypeAdd', 'ValueDeltaOperationTypeUpdate', 'ValueDeltaOperationTypeDelete'
+ OperationType ValueDeltaOperationType `json:"operationType,omitempty"`
+ // Value - The value of the delta.
+ Value *string `json:"value,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/operations.go
new file mode 100644
index 000000000..8d1b7d520
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/operations.go
@@ -0,0 +1,126 @@
+package adhybridhealthservice
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// OperationsClient is the REST APIs for Azure Active Drectory Connect Health
+type OperationsClient struct {
+ BaseClient
+}
+
+// NewOperationsClient creates an instance of the OperationsClient client.
+func NewOperationsClient() OperationsClient {
+ return NewOperationsClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
+func NewOperationsClientWithBaseURI(baseURI string) OperationsClient {
+ return OperationsClient{NewWithBaseURI(baseURI)}
+}
+
+// List lists the available Azure Data Factory API operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResponsePage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.olr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.olr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ADHybridHealthService/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResponse, 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 OperationListResponse) (result OperationListResponse, err error) {
+ req, err := lastResults.operationListResponsePreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.OperationsClient", "listNextResults", 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, "adhybridhealthservice.OperationsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.OperationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResponseIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/servicemembers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/servicemembers.go
new file mode 100644
index 000000000..5ab001dac
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/servicemembers.go
@@ -0,0 +1,1038 @@
+package adhybridhealthservice
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// ServiceMembersClient is the REST APIs for Azure Active Drectory Connect Health
+type ServiceMembersClient struct {
+ BaseClient
+}
+
+// NewServiceMembersClient creates an instance of the ServiceMembersClient client.
+func NewServiceMembersClient() ServiceMembersClient {
+ return NewServiceMembersClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewServiceMembersClientWithBaseURI creates an instance of the ServiceMembersClient client.
+func NewServiceMembersClientWithBaseURI(baseURI string) ServiceMembersClient {
+ return ServiceMembersClient{NewWithBaseURI(baseURI)}
+}
+
+// Add onboards a server, for a given service, to Azure Active Directory Connect Health Service.
+// Parameters:
+// serviceName - the name of the service under which the server is to be onboarded.
+// serviceMember - the server object.
+func (client ServiceMembersClient) Add(ctx context.Context, serviceName string, serviceMember ServiceMember) (result ServiceMember, err error) {
+ req, err := client.AddPreparer(ctx, serviceName, serviceMember)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "Add", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "Add", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "Add", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddPreparer prepares the Add request.
+func (client ServiceMembersClient) AddPreparer(ctx context.Context, serviceName string, serviceMember ServiceMember) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers", pathParameters),
+ autorest.WithJSON(serviceMember),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddSender sends the Add request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceMembersClient) AddSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddResponder handles the response to the Add request. The method always
+// closes the http.Response Body.
+func (client ServiceMembersClient) AddResponder(resp *http.Response) (result ServiceMember, 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 a server that has been onboarded to Azure Active Directory Connect Health Service.
+// Parameters:
+// serviceName - the name of the service.
+// serviceMemberID - the server Id.
+// confirm - indicates if the server will be permanently deleted or disabled. True indicates that the server
+// will be permanently deleted and False indicates that the server will be marked disabled and then deleted
+// after 30 days, if it is not re-registered.
+func (client ServiceMembersClient) Delete(ctx context.Context, serviceName string, serviceMemberID uuid.UUID, confirm *bool) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, serviceName, serviceMemberID, confirm)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ServiceMembersClient) DeletePreparer(ctx context.Context, serviceName string, serviceMemberID uuid.UUID, confirm *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceMemberId": autorest.Encode("path", serviceMemberID),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if confirm != nil {
+ queryParameters["confirm"] = autorest.Encode("query", *confirm)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceMembersClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ServiceMembersClient) 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
+}
+
+// DeleteData deletes the data uploaded by the server to Azure Active Directory Connect Health Service.
+// Parameters:
+// serviceName - the name of the service.
+// serviceMemberID - the server Id.
+func (client ServiceMembersClient) DeleteData(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (result autorest.Response, err error) {
+ req, err := client.DeleteDataPreparer(ctx, serviceName, serviceMemberID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "DeleteData", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteDataSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "DeleteData", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteDataResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "DeleteData", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteDataPreparer prepares the DeleteData request.
+func (client ServiceMembersClient) DeleteDataPreparer(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceMemberId": autorest.Encode("path", serviceMemberID),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/data", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteDataSender sends the DeleteData request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceMembersClient) DeleteDataSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteDataResponder handles the response to the DeleteData request. The method always
+// closes the http.Response Body.
+func (client ServiceMembersClient) DeleteDataResponder(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 a server, for a given service, that are onboarded to Azure Active Directory Connect Health
+// Service.
+// Parameters:
+// serviceName - the name of the service.
+// serviceMemberID - the server Id.
+func (client ServiceMembersClient) Get(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (result ServiceMember, err error) {
+ req, err := client.GetPreparer(ctx, serviceName, serviceMemberID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ServiceMembersClient) GetPreparer(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceMemberId": autorest.Encode("path", serviceMemberID),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceMembersClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ServiceMembersClient) GetResponder(resp *http.Response) (result ServiceMember, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetServiceConfiguration gets the service configuration.
+// Parameters:
+// serviceName - the name of the service.
+// serviceMemberID - the server Id.
+func (client ServiceMembersClient) GetServiceConfiguration(ctx context.Context, serviceName string, serviceMemberID string) (result ServiceConfiguration, err error) {
+ req, err := client.GetServiceConfigurationPreparer(ctx, serviceName, serviceMemberID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "GetServiceConfiguration", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetServiceConfigurationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "GetServiceConfiguration", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetServiceConfigurationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "GetServiceConfiguration", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetServiceConfigurationPreparer prepares the GetServiceConfiguration request.
+func (client ServiceMembersClient) GetServiceConfigurationPreparer(ctx context.Context, serviceName string, serviceMemberID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceMemberId": autorest.Encode("path", serviceMemberID),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/serviceconfiguration", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetServiceConfigurationSender sends the GetServiceConfiguration request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceMembersClient) GetServiceConfigurationSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetServiceConfigurationResponder handles the response to the GetServiceConfiguration request. The method always
+// closes the http.Response Body.
+func (client ServiceMembersClient) GetServiceConfigurationResponder(resp *http.Response) (result ServiceConfiguration, 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 details of the servers, for a given service, that are onboarded to Azure Active Directory Connect
+// Health Service.
+// Parameters:
+// serviceName - the name of the service.
+// filter - the server property filter to apply.
+// dimensionType - the server specific dimension.
+// dimensionSignature - the value of the dimension.
+func (client ServiceMembersClient) List(ctx context.Context, serviceName string, filter string, dimensionType string, dimensionSignature string) (result ServiceMembersPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, serviceName, filter, dimensionType, dimensionSignature)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.sm.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.sm, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ServiceMembersClient) ListPreparer(ctx context.Context, serviceName string, filter string, dimensionType string, dimensionSignature string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(dimensionType) > 0 {
+ queryParameters["dimensionType"] = autorest.Encode("query", dimensionType)
+ }
+ if len(dimensionSignature) > 0 {
+ queryParameters["dimensionSignature"] = autorest.Encode("query", dimensionSignature)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceMembersClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ServiceMembersClient) ListResponder(resp *http.Response) (result ServiceMembers, 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 ServiceMembersClient) listNextResults(lastResults ServiceMembers) (result ServiceMembers, err error) {
+ req, err := lastResults.serviceMembersPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "listNextResults", 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, "adhybridhealthservice.ServiceMembersClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ServiceMembersClient) ListComplete(ctx context.Context, serviceName string, filter string, dimensionType string, dimensionSignature string) (result ServiceMembersIterator, err error) {
+ result.page, err = client.List(ctx, serviceName, filter, dimensionType, dimensionSignature)
+ return
+}
+
+// ListAlerts gets the details of an alert for a given service and server combination.
+// Parameters:
+// serviceMemberID - the server Id for which the laert details needs to be queried.
+// serviceName - the name of the service.
+// filter - the alert property filter to apply.
+// state - the alert state to query for.
+// from - the start date to query for.
+// toParameter - the end date till when to query for.
+func (client ServiceMembersClient) ListAlerts(ctx context.Context, serviceMemberID uuid.UUID, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result AlertsPage, err error) {
+ result.fn = client.listAlertsNextResults
+ req, err := client.ListAlertsPreparer(ctx, serviceMemberID, serviceName, filter, state, from, toParameter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListAlerts", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAlertsSender(req)
+ if err != nil {
+ result.a.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListAlerts", resp, "Failure sending request")
+ return
+ }
+
+ result.a, err = client.ListAlertsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListAlerts", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAlertsPreparer prepares the ListAlerts request.
+func (client ServiceMembersClient) ListAlertsPreparer(ctx context.Context, serviceMemberID uuid.UUID, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceMemberId": autorest.Encode("path", serviceMemberID),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(state) > 0 {
+ queryParameters["state"] = autorest.Encode("query", state)
+ }
+ if from != nil {
+ queryParameters["from"] = autorest.Encode("query", *from)
+ }
+ if toParameter != nil {
+ queryParameters["to"] = autorest.Encode("query", *toParameter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/alerts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAlertsSender sends the ListAlerts request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceMembersClient) ListAlertsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListAlertsResponder handles the response to the ListAlerts request. The method always
+// closes the http.Response Body.
+func (client ServiceMembersClient) ListAlertsResponder(resp *http.Response) (result Alerts, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAlertsNextResults retrieves the next set of results, if any.
+func (client ServiceMembersClient) listAlertsNextResults(lastResults Alerts) (result Alerts, err error) {
+ req, err := lastResults.alertsPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "listAlertsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAlertsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "listAlertsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAlertsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "listAlertsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAlertsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ServiceMembersClient) ListAlertsComplete(ctx context.Context, serviceMemberID uuid.UUID, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result AlertsIterator, err error) {
+ result.page, err = client.ListAlerts(ctx, serviceMemberID, serviceName, filter, state, from, toParameter)
+ return
+}
+
+// ListConnectors gets the connector details for a service.
+// Parameters:
+// serviceName - the name of the service.
+// serviceMemberID - the server Id.
+func (client ServiceMembersClient) ListConnectors(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (result Connectors, err error) {
+ req, err := client.ListConnectorsPreparer(ctx, serviceName, serviceMemberID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListConnectors", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListConnectorsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListConnectors", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListConnectorsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListConnectors", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListConnectorsPreparer prepares the ListConnectors request.
+func (client ServiceMembersClient) ListConnectorsPreparer(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceMemberId": autorest.Encode("path", serviceMemberID),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/service/{serviceName}/servicemembers/{serviceMemberId}/connectors", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListConnectorsSender sends the ListConnectors request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceMembersClient) ListConnectorsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListConnectorsResponder handles the response to the ListConnectors request. The method always
+// closes the http.Response Body.
+func (client ServiceMembersClient) ListConnectorsResponder(resp *http.Response) (result Connectors, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListCredentials gets the credentials of the server which is needed by the agent to connect to Azure Active Directory
+// Connect Health Service.
+// Parameters:
+// serviceName - the name of the service.
+// serviceMemberID - the server Id.
+// filter - the property filter to apply.
+func (client ServiceMembersClient) ListCredentials(ctx context.Context, serviceName string, serviceMemberID uuid.UUID, filter string) (result Credentials, err error) {
+ req, err := client.ListCredentialsPreparer(ctx, serviceName, serviceMemberID, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListCredentials", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListCredentialsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListCredentials", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListCredentialsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListCredentials", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListCredentialsPreparer prepares the ListCredentials request.
+func (client ServiceMembersClient) ListCredentialsPreparer(ctx context.Context, serviceName string, serviceMemberID uuid.UUID, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceMemberId": autorest.Encode("path", serviceMemberID),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ 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("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/credentials", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListCredentialsSender sends the ListCredentials request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceMembersClient) ListCredentialsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListCredentialsResponder handles the response to the ListCredentials request. The method always
+// closes the http.Response Body.
+func (client ServiceMembersClient) ListCredentialsResponder(resp *http.Response) (result Credentials, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListDataFreshness gets the last time when the server uploaded data to Azure Active Directory Connect Health Service.
+// Parameters:
+// serviceName - the name of the service.
+// serviceMemberID - the server Id.
+func (client ServiceMembersClient) ListDataFreshness(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (result DataFreshnessDetails, err error) {
+ req, err := client.ListDataFreshnessPreparer(ctx, serviceName, serviceMemberID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListDataFreshness", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListDataFreshnessSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListDataFreshness", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListDataFreshnessResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListDataFreshness", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListDataFreshnessPreparer prepares the ListDataFreshness request.
+func (client ServiceMembersClient) ListDataFreshnessPreparer(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceMemberId": autorest.Encode("path", serviceMemberID),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/datafreshness", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListDataFreshnessSender sends the ListDataFreshness request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceMembersClient) ListDataFreshnessSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListDataFreshnessResponder handles the response to the ListDataFreshness request. The method always
+// closes the http.Response Body.
+func (client ServiceMembersClient) ListDataFreshnessResponder(resp *http.Response) (result DataFreshnessDetails, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListExportStatus gets the export status.
+// Parameters:
+// serviceName - the name of the service.
+// serviceMemberID - the server Id.
+func (client ServiceMembersClient) ListExportStatus(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (result ExportStatusesPage, err error) {
+ result.fn = client.listExportStatusNextResults
+ req, err := client.ListExportStatusPreparer(ctx, serviceName, serviceMemberID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListExportStatus", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListExportStatusSender(req)
+ if err != nil {
+ result.es.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListExportStatus", resp, "Failure sending request")
+ return
+ }
+
+ result.es, err = client.ListExportStatusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListExportStatus", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListExportStatusPreparer prepares the ListExportStatus request.
+func (client ServiceMembersClient) ListExportStatusPreparer(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceMemberId": autorest.Encode("path", serviceMemberID),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/exportstatus", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListExportStatusSender sends the ListExportStatus request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceMembersClient) ListExportStatusSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListExportStatusResponder handles the response to the ListExportStatus request. The method always
+// closes the http.Response Body.
+func (client ServiceMembersClient) ListExportStatusResponder(resp *http.Response) (result ExportStatuses, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listExportStatusNextResults retrieves the next set of results, if any.
+func (client ServiceMembersClient) listExportStatusNextResults(lastResults ExportStatuses) (result ExportStatuses, err error) {
+ req, err := lastResults.exportStatusesPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "listExportStatusNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListExportStatusSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "listExportStatusNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListExportStatusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "listExportStatusNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListExportStatusComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ServiceMembersClient) ListExportStatusComplete(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (result ExportStatusesIterator, err error) {
+ result.page, err = client.ListExportStatus(ctx, serviceName, serviceMemberID)
+ return
+}
+
+// ListGlobalConfiguration gets the global configuration.
+// Parameters:
+// serviceName - the name of the service.
+// serviceMemberID - the server id.
+func (client ServiceMembersClient) ListGlobalConfiguration(ctx context.Context, serviceName string, serviceMemberID string) (result GlobalConfigurations, err error) {
+ req, err := client.ListGlobalConfigurationPreparer(ctx, serviceName, serviceMemberID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListGlobalConfiguration", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListGlobalConfigurationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListGlobalConfiguration", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListGlobalConfigurationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListGlobalConfiguration", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListGlobalConfigurationPreparer prepares the ListGlobalConfiguration request.
+func (client ServiceMembersClient) ListGlobalConfigurationPreparer(ctx context.Context, serviceName string, serviceMemberID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceMemberId": autorest.Encode("path", serviceMemberID),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/globalconfiguration", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListGlobalConfigurationSender sends the ListGlobalConfiguration request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceMembersClient) ListGlobalConfigurationSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListGlobalConfigurationResponder handles the response to the ListGlobalConfiguration request. The method always
+// closes the http.Response Body.
+func (client ServiceMembersClient) ListGlobalConfigurationResponder(resp *http.Response) (result GlobalConfigurations, 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 gets the server related metrics for a given metric and group combination.
+// Parameters:
+// serviceName - the name of the service.
+// metricName - the metric name
+// groupName - the group name
+// serviceMemberID - the server id.
+// groupKey - the group key
+// fromDate - the start date.
+// toDate - the end date.
+func (client ServiceMembersClient) ListMetrics(ctx context.Context, serviceName string, metricName string, groupName string, serviceMemberID uuid.UUID, groupKey string, fromDate *date.Time, toDate *date.Time) (result MetricSets, err error) {
+ req, err := client.ListMetricsPreparer(ctx, serviceName, metricName, groupName, serviceMemberID, groupKey, fromDate, toDate)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListMetrics", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListMetricsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListMetrics", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListMetricsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServiceMembersClient", "ListMetrics", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListMetricsPreparer prepares the ListMetrics request.
+func (client ServiceMembersClient) ListMetricsPreparer(ctx context.Context, serviceName string, metricName string, groupName string, serviceMemberID uuid.UUID, groupKey string, fromDate *date.Time, toDate *date.Time) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupName": autorest.Encode("path", groupName),
+ "metricName": autorest.Encode("path", metricName),
+ "serviceMemberId": autorest.Encode("path", serviceMemberID),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(groupKey) > 0 {
+ queryParameters["groupKey"] = autorest.Encode("query", groupKey)
+ }
+ if fromDate != nil {
+ queryParameters["fromDate"] = autorest.Encode("query", *fromDate)
+ }
+ if toDate != nil {
+ queryParameters["toDate"] = autorest.Encode("query", *toDate)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/metrics/{metricName}/groups/{groupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListMetricsSender sends the ListMetrics request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceMembersClient) ListMetricsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListMetricsResponder handles the response to the ListMetrics request. The method always
+// closes the http.Response Body.
+func (client ServiceMembersClient) ListMetricsResponder(resp *http.Response) (result MetricSets, 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/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/services.go b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/services.go
new file mode 100644
index 000000000..aaeb53f75
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/services.go
@@ -0,0 +1,1748 @@
+package adhybridhealthservice
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "net/http"
+)
+
+// ServicesClient is the REST APIs for Azure Active Drectory Connect Health
+type ServicesClient struct {
+ BaseClient
+}
+
+// NewServicesClient creates an instance of the ServicesClient client.
+func NewServicesClient() ServicesClient {
+ return NewServicesClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewServicesClientWithBaseURI creates an instance of the ServicesClient client.
+func NewServicesClientWithBaseURI(baseURI string) ServicesClient {
+ return ServicesClient{NewWithBaseURI(baseURI)}
+}
+
+// Add onboards a service for a given tenant in Azure Active Directory Connect Health.
+// Parameters:
+// service - the service object.
+func (client ServicesClient) Add(ctx context.Context, service ServiceProperties) (result ServiceProperties, err error) {
+ req, err := client.AddPreparer(ctx, service)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "Add", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "Add", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "Add", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddPreparer prepares the Add request.
+func (client ServicesClient) AddPreparer(ctx context.Context, service ServiceProperties) (*http.Request, error) {
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ADHybridHealthService/services"),
+ autorest.WithJSON(service),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddSender sends the Add request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) AddSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddResponder handles the response to the Add request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) AddResponder(resp *http.Response) (result ServiceProperties, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddAlertFeedback adds an alert feedback submitted by customer.
+// Parameters:
+// serviceName - the name of the service.
+// alertFeedback - the alert feedback.
+func (client ServicesClient) AddAlertFeedback(ctx context.Context, serviceName string, alertFeedback AlertFeedback) (result AlertFeedback, err error) {
+ req, err := client.AddAlertFeedbackPreparer(ctx, serviceName, alertFeedback)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "AddAlertFeedback", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddAlertFeedbackSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "AddAlertFeedback", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddAlertFeedbackResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "AddAlertFeedback", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddAlertFeedbackPreparer prepares the AddAlertFeedback request.
+func (client ServicesClient) AddAlertFeedbackPreparer(ctx context.Context, serviceName string, alertFeedback AlertFeedback) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/feedbacktype/alerts/feedback", pathParameters),
+ autorest.WithJSON(alertFeedback),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddAlertFeedbackSender sends the AddAlertFeedback request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) AddAlertFeedbackSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddAlertFeedbackResponder handles the response to the AddAlertFeedback request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) AddAlertFeedbackResponder(resp *http.Response) (result AlertFeedback, 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 a service which is onboarded to Azure Active Directory Connect Health.
+// Parameters:
+// serviceName - the name of the service which needs to be deleted.
+// confirm - indicates if the service will be permanently deleted or disabled. True indicates that the service
+// will be permanently deleted and False indicates that the service will be marked disabled and then deleted
+// after 30 days, if it is not re-registered.
+func (client ServicesClient) Delete(ctx context.Context, serviceName string, confirm *bool) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, serviceName, confirm)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ServicesClient) DeletePreparer(ctx context.Context, serviceName string, confirm *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if confirm != nil {
+ queryParameters["confirm"] = autorest.Encode("query", *confirm)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) 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 details of a service for a tenant having Azure AD Premium license and is onboarded to Azure Active
+// Directory Connect Health.
+// Parameters:
+// serviceName - the name of the service.
+func (client ServicesClient) Get(ctx context.Context, serviceName string) (result ServiceProperties, err error) {
+ req, err := client.GetPreparer(ctx, serviceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ServicesClient) GetPreparer(ctx context.Context, serviceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) GetResponder(resp *http.Response) (result ServiceProperties, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetFeatureAvailibility checks if the service has all the pre-requisites met to use a feature.
+// Parameters:
+// serviceName - the name of the service.
+// featureName - the name of the feature.
+func (client ServicesClient) GetFeatureAvailibility(ctx context.Context, serviceName string, featureName string) (result Result, err error) {
+ req, err := client.GetFeatureAvailibilityPreparer(ctx, serviceName, featureName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "GetFeatureAvailibility", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetFeatureAvailibilitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "GetFeatureAvailibility", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetFeatureAvailibilityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "GetFeatureAvailibility", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetFeatureAvailibilityPreparer prepares the GetFeatureAvailibility request.
+func (client ServicesClient) GetFeatureAvailibilityPreparer(ctx context.Context, serviceName string, featureName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "featureName": autorest.Encode("path", featureName),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/checkServiceFeatureAvailibility/{featureName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetFeatureAvailibilitySender sends the GetFeatureAvailibility request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) GetFeatureAvailibilitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetFeatureAvailibilityResponder handles the response to the GetFeatureAvailibility request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) GetFeatureAvailibilityResponder(resp *http.Response) (result Result, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetMetricMetadata gets the service related metrics information.
+// Parameters:
+// serviceName - the name of the service.
+// metricName - the metric name
+func (client ServicesClient) GetMetricMetadata(ctx context.Context, serviceName string, metricName string) (result MetricMetadata, err error) {
+ req, err := client.GetMetricMetadataPreparer(ctx, serviceName, metricName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "GetMetricMetadata", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetMetricMetadataSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "GetMetricMetadata", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetMetricMetadataResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "GetMetricMetadata", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetMetricMetadataPreparer prepares the GetMetricMetadata request.
+func (client ServicesClient) GetMetricMetadataPreparer(ctx context.Context, serviceName string, metricName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "metricName": autorest.Encode("path", metricName),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metricmetadata/{metricName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetMetricMetadataSender sends the GetMetricMetadata request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) GetMetricMetadataSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetMetricMetadataResponder handles the response to the GetMetricMetadata request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) GetMetricMetadataResponder(resp *http.Response) (result MetricMetadata, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetMetricMetadataForGroup gets the service related metrics for a given metric and group combination.
+// Parameters:
+// serviceName - the name of the service.
+// metricName - the metric name
+// groupName - the group name
+// groupKey - the group key
+// fromDate - the start date.
+// toDate - the end date.
+func (client ServicesClient) GetMetricMetadataForGroup(ctx context.Context, serviceName string, metricName string, groupName string, groupKey string, fromDate *date.Time, toDate *date.Time) (result MetricSets, err error) {
+ req, err := client.GetMetricMetadataForGroupPreparer(ctx, serviceName, metricName, groupName, groupKey, fromDate, toDate)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "GetMetricMetadataForGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetMetricMetadataForGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "GetMetricMetadataForGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetMetricMetadataForGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "GetMetricMetadataForGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetMetricMetadataForGroupPreparer prepares the GetMetricMetadataForGroup request.
+func (client ServicesClient) GetMetricMetadataForGroupPreparer(ctx context.Context, serviceName string, metricName string, groupName string, groupKey string, fromDate *date.Time, toDate *date.Time) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupName": autorest.Encode("path", groupName),
+ "metricName": autorest.Encode("path", metricName),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(groupKey) > 0 {
+ queryParameters["groupKey"] = autorest.Encode("query", groupKey)
+ }
+ if fromDate != nil {
+ queryParameters["fromDate"] = autorest.Encode("query", *fromDate)
+ }
+ if toDate != nil {
+ queryParameters["toDate"] = autorest.Encode("query", *toDate)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metricmetadata/{metricName}/groups/{groupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetMetricMetadataForGroupSender sends the GetMetricMetadataForGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) GetMetricMetadataForGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetMetricMetadataForGroupResponder handles the response to the GetMetricMetadataForGroup request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) GetMetricMetadataForGroupResponder(resp *http.Response) (result MetricSets, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetTenantWhitelisting checks if the tenant, to which a service is registered, is whitelisted to use a feature.
+// Parameters:
+// serviceName - the name of the service.
+// featureName - the name of the feature.
+func (client ServicesClient) GetTenantWhitelisting(ctx context.Context, serviceName string, featureName string) (result Result, err error) {
+ req, err := client.GetTenantWhitelistingPreparer(ctx, serviceName, featureName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "GetTenantWhitelisting", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetTenantWhitelistingSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "GetTenantWhitelisting", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetTenantWhitelistingResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "GetTenantWhitelisting", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetTenantWhitelistingPreparer prepares the GetTenantWhitelisting request.
+func (client ServicesClient) GetTenantWhitelistingPreparer(ctx context.Context, serviceName string, featureName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "featureName": autorest.Encode("path", featureName),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/TenantWhitelisting/{featureName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetTenantWhitelistingSender sends the GetTenantWhitelisting request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) GetTenantWhitelistingSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetTenantWhitelistingResponder handles the response to the GetTenantWhitelisting request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) GetTenantWhitelistingResponder(resp *http.Response) (result Result, 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 details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health.
+// Parameters:
+// filter - the service property filter to apply.
+// serviceType - the service type for the services onboarded to Azure Active Directory Connect Health.
+// Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be
+// AdFederationService or AadSyncService or AdDomainService.
+// skipCount - the skip count, which specifies the number of elements that can be bypassed from a sequence and
+// then return the remaining elements.
+// takeCount - the take count , which specifies the number of elements that can be returned from a sequence.
+func (client ServicesClient) List(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result ServicesPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, filter, serviceType, skipCount, takeCount)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.s.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.s, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ServicesClient) ListPreparer(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (*http.Request, error) {
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(serviceType) > 0 {
+ queryParameters["serviceType"] = autorest.Encode("query", serviceType)
+ }
+ if skipCount != nil {
+ queryParameters["skipCount"] = autorest.Encode("query", *skipCount)
+ }
+ if takeCount != nil {
+ queryParameters["takeCount"] = autorest.Encode("query", *takeCount)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ADHybridHealthService/services"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) ListResponder(resp *http.Response) (result Services, 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 ServicesClient) listNextResults(lastResults Services) (result Services, err error) {
+ req, err := lastResults.servicesPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listNextResults", 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, "adhybridhealthservice.ServicesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ServicesClient) ListComplete(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result ServicesIterator, err error) {
+ result.page, err = client.List(ctx, filter, serviceType, skipCount, takeCount)
+ return
+}
+
+// ListAlertFeedback gets a list of all alert feedback for a given tenant and alert type.
+// Parameters:
+// serviceName - the name of the service.
+// shortName - the name of the alert.
+func (client ServicesClient) ListAlertFeedback(ctx context.Context, serviceName string, shortName string) (result AlertFeedbacks, err error) {
+ req, err := client.ListAlertFeedbackPreparer(ctx, serviceName, shortName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListAlertFeedback", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAlertFeedbackSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListAlertFeedback", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListAlertFeedbackResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListAlertFeedback", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAlertFeedbackPreparer prepares the ListAlertFeedback request.
+func (client ServicesClient) ListAlertFeedbackPreparer(ctx context.Context, serviceName string, shortName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ "shortName": autorest.Encode("path", shortName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/feedbacktype/alerts/{shortName}/alertfeedback", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAlertFeedbackSender sends the ListAlertFeedback request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) ListAlertFeedbackSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListAlertFeedbackResponder handles the response to the ListAlertFeedback request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) ListAlertFeedbackResponder(resp *http.Response) (result AlertFeedbacks, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListAlerts gets the alerts for a given service.
+// Parameters:
+// serviceName - the name of the service.
+// filter - the alert property filter to apply.
+// state - the alert state to query for.
+// from - the start date to query for.
+// toParameter - the end date till when to query for.
+func (client ServicesClient) ListAlerts(ctx context.Context, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result AlertsPage, err error) {
+ result.fn = client.listAlertsNextResults
+ req, err := client.ListAlertsPreparer(ctx, serviceName, filter, state, from, toParameter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListAlerts", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAlertsSender(req)
+ if err != nil {
+ result.a.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListAlerts", resp, "Failure sending request")
+ return
+ }
+
+ result.a, err = client.ListAlertsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListAlerts", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAlertsPreparer prepares the ListAlerts request.
+func (client ServicesClient) ListAlertsPreparer(ctx context.Context, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(state) > 0 {
+ queryParameters["state"] = autorest.Encode("query", state)
+ }
+ if from != nil {
+ queryParameters["from"] = autorest.Encode("query", *from)
+ }
+ if toParameter != nil {
+ queryParameters["to"] = autorest.Encode("query", *toParameter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/alerts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAlertsSender sends the ListAlerts request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) ListAlertsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListAlertsResponder handles the response to the ListAlerts request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) ListAlertsResponder(resp *http.Response) (result Alerts, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAlertsNextResults retrieves the next set of results, if any.
+func (client ServicesClient) listAlertsNextResults(lastResults Alerts) (result Alerts, err error) {
+ req, err := lastResults.alertsPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listAlertsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAlertsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listAlertsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAlertsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listAlertsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAlertsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ServicesClient) ListAlertsComplete(ctx context.Context, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result AlertsIterator, err error) {
+ result.page, err = client.ListAlerts(ctx, serviceName, filter, state, from, toParameter)
+ return
+}
+
+// ListExportErrors gets the count of latest AAD export errors.
+// Parameters:
+// serviceName - the name of the service.
+func (client ServicesClient) ListExportErrors(ctx context.Context, serviceName string) (result ErrorCounts, err error) {
+ req, err := client.ListExportErrorsPreparer(ctx, serviceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListExportErrors", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListExportErrorsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListExportErrors", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListExportErrorsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListExportErrors", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListExportErrorsPreparer prepares the ListExportErrors request.
+func (client ServicesClient) ListExportErrorsPreparer(ctx context.Context, serviceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/exporterrors/counts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListExportErrorsSender sends the ListExportErrors request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) ListExportErrorsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListExportErrorsResponder handles the response to the ListExportErrors request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) ListExportErrorsResponder(resp *http.Response) (result ErrorCounts, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListExportErrorsV2 gets the categorized export errors.
+// Parameters:
+// serviceName - the name of the service.
+// errorBucket - the error category to query for.
+func (client ServicesClient) ListExportErrorsV2(ctx context.Context, serviceName string, errorBucket string) (result MergedExportErrors, err error) {
+ req, err := client.ListExportErrorsV2Preparer(ctx, serviceName, errorBucket)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListExportErrorsV2", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListExportErrorsV2Sender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListExportErrorsV2", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListExportErrorsV2Responder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListExportErrorsV2", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListExportErrorsV2Preparer prepares the ListExportErrorsV2 request.
+func (client ServicesClient) ListExportErrorsV2Preparer(ctx context.Context, serviceName string, errorBucket string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "errorBucket": autorest.Encode("query", errorBucket),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/exporterrors/listV2", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListExportErrorsV2Sender sends the ListExportErrorsV2 request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) ListExportErrorsV2Sender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListExportErrorsV2Responder handles the response to the ListExportErrorsV2 request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) ListExportErrorsV2Responder(resp *http.Response) (result MergedExportErrors, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListExportStatus gets the export status.
+// Parameters:
+// serviceName - the name of the service.
+func (client ServicesClient) ListExportStatus(ctx context.Context, serviceName string) (result ExportStatusesPage, err error) {
+ result.fn = client.listExportStatusNextResults
+ req, err := client.ListExportStatusPreparer(ctx, serviceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListExportStatus", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListExportStatusSender(req)
+ if err != nil {
+ result.es.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListExportStatus", resp, "Failure sending request")
+ return
+ }
+
+ result.es, err = client.ListExportStatusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListExportStatus", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListExportStatusPreparer prepares the ListExportStatus request.
+func (client ServicesClient) ListExportStatusPreparer(ctx context.Context, serviceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/exportstatus", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListExportStatusSender sends the ListExportStatus request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) ListExportStatusSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListExportStatusResponder handles the response to the ListExportStatus request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) ListExportStatusResponder(resp *http.Response) (result ExportStatuses, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listExportStatusNextResults retrieves the next set of results, if any.
+func (client ServicesClient) listExportStatusNextResults(lastResults ExportStatuses) (result ExportStatuses, err error) {
+ req, err := lastResults.exportStatusesPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listExportStatusNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListExportStatusSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listExportStatusNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListExportStatusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listExportStatusNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListExportStatusComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ServicesClient) ListExportStatusComplete(ctx context.Context, serviceName string) (result ExportStatusesIterator, err error) {
+ result.page, err = client.ListExportStatus(ctx, serviceName)
+ return
+}
+
+// ListMetricMetadata gets the service related metrics information.
+// Parameters:
+// serviceName - the name of the service.
+// filter - the metric metadata property filter to apply.
+// perfCounter - indicates if only performance counter metrics are requested.
+func (client ServicesClient) ListMetricMetadata(ctx context.Context, serviceName string, filter string, perfCounter *bool) (result MetricMetadataListPage, err error) {
+ result.fn = client.listMetricMetadataNextResults
+ req, err := client.ListMetricMetadataPreparer(ctx, serviceName, filter, perfCounter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListMetricMetadata", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListMetricMetadataSender(req)
+ if err != nil {
+ result.mml.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListMetricMetadata", resp, "Failure sending request")
+ return
+ }
+
+ result.mml, err = client.ListMetricMetadataResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListMetricMetadata", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListMetricMetadataPreparer prepares the ListMetricMetadata request.
+func (client ServicesClient) ListMetricMetadataPreparer(ctx context.Context, serviceName string, filter string, perfCounter *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if perfCounter != nil {
+ queryParameters["perfCounter"] = autorest.Encode("query", *perfCounter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metricmetadata", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListMetricMetadataSender sends the ListMetricMetadata request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) ListMetricMetadataSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListMetricMetadataResponder handles the response to the ListMetricMetadata request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) ListMetricMetadataResponder(resp *http.Response) (result MetricMetadataList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listMetricMetadataNextResults retrieves the next set of results, if any.
+func (client ServicesClient) listMetricMetadataNextResults(lastResults MetricMetadataList) (result MetricMetadataList, err error) {
+ req, err := lastResults.metricMetadataListPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listMetricMetadataNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListMetricMetadataSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listMetricMetadataNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListMetricMetadataResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listMetricMetadataNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListMetricMetadataComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ServicesClient) ListMetricMetadataComplete(ctx context.Context, serviceName string, filter string, perfCounter *bool) (result MetricMetadataListIterator, err error) {
+ result.page, err = client.ListMetricMetadata(ctx, serviceName, filter, perfCounter)
+ return
+}
+
+// ListMetricsAverage gets the average of the metric values for a given metric and group combination.
+// Parameters:
+// serviceName - the name of the service.
+// metricName - the metric name
+// groupName - the group name
+func (client ServicesClient) ListMetricsAverage(ctx context.Context, serviceName string, metricName string, groupName string) (result MetricsPage, err error) {
+ result.fn = client.listMetricsAverageNextResults
+ req, err := client.ListMetricsAveragePreparer(ctx, serviceName, metricName, groupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListMetricsAverage", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListMetricsAverageSender(req)
+ if err != nil {
+ result.mVar.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListMetricsAverage", resp, "Failure sending request")
+ return
+ }
+
+ result.mVar, err = client.ListMetricsAverageResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListMetricsAverage", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListMetricsAveragePreparer prepares the ListMetricsAverage request.
+func (client ServicesClient) ListMetricsAveragePreparer(ctx context.Context, serviceName string, metricName string, groupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupName": autorest.Encode("path", groupName),
+ "metricName": autorest.Encode("path", metricName),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metrics/{metricName}/groups/{groupName}/average", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListMetricsAverageSender sends the ListMetricsAverage request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) ListMetricsAverageSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListMetricsAverageResponder handles the response to the ListMetricsAverage request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) ListMetricsAverageResponder(resp *http.Response) (result Metrics, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listMetricsAverageNextResults retrieves the next set of results, if any.
+func (client ServicesClient) listMetricsAverageNextResults(lastResults Metrics) (result Metrics, err error) {
+ req, err := lastResults.metricsPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listMetricsAverageNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListMetricsAverageSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listMetricsAverageNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListMetricsAverageResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listMetricsAverageNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListMetricsAverageComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ServicesClient) ListMetricsAverageComplete(ctx context.Context, serviceName string, metricName string, groupName string) (result MetricsIterator, err error) {
+ result.page, err = client.ListMetricsAverage(ctx, serviceName, metricName, groupName)
+ return
+}
+
+// ListMetricsSum gets the sum of the metric values for a given metric and group combination.
+// Parameters:
+// serviceName - the name of the service.
+// metricName - the metric name
+// groupName - the group name
+func (client ServicesClient) ListMetricsSum(ctx context.Context, serviceName string, metricName string, groupName string) (result MetricsPage, err error) {
+ result.fn = client.listMetricsSumNextResults
+ req, err := client.ListMetricsSumPreparer(ctx, serviceName, metricName, groupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListMetricsSum", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListMetricsSumSender(req)
+ if err != nil {
+ result.mVar.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListMetricsSum", resp, "Failure sending request")
+ return
+ }
+
+ result.mVar, err = client.ListMetricsSumResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListMetricsSum", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListMetricsSumPreparer prepares the ListMetricsSum request.
+func (client ServicesClient) ListMetricsSumPreparer(ctx context.Context, serviceName string, metricName string, groupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupName": autorest.Encode("path", groupName),
+ "metricName": autorest.Encode("path", metricName),
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metrics/{metricName}/groups/{groupName}/sum", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListMetricsSumSender sends the ListMetricsSum request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) ListMetricsSumSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListMetricsSumResponder handles the response to the ListMetricsSum request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) ListMetricsSumResponder(resp *http.Response) (result Metrics, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listMetricsSumNextResults retrieves the next set of results, if any.
+func (client ServicesClient) listMetricsSumNextResults(lastResults Metrics) (result Metrics, err error) {
+ req, err := lastResults.metricsPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listMetricsSumNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListMetricsSumSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listMetricsSumNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListMetricsSumResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listMetricsSumNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListMetricsSumComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ServicesClient) ListMetricsSumComplete(ctx context.Context, serviceName string, metricName string, groupName string) (result MetricsIterator, err error) {
+ result.page, err = client.ListMetricsSum(ctx, serviceName, metricName, groupName)
+ return
+}
+
+// ListMonitoringConfigurations gets the service level monitoring configurations.
+// Parameters:
+// serviceName - the name of the service.
+func (client ServicesClient) ListMonitoringConfigurations(ctx context.Context, serviceName string) (result Items, err error) {
+ req, err := client.ListMonitoringConfigurationsPreparer(ctx, serviceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListMonitoringConfigurations", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListMonitoringConfigurationsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListMonitoringConfigurations", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListMonitoringConfigurationsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListMonitoringConfigurations", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListMonitoringConfigurationsPreparer prepares the ListMonitoringConfigurations request.
+func (client ServicesClient) ListMonitoringConfigurationsPreparer(ctx context.Context, serviceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/monitoringconfigurations", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListMonitoringConfigurationsSender sends the ListMonitoringConfigurations request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) ListMonitoringConfigurationsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListMonitoringConfigurationsResponder handles the response to the ListMonitoringConfigurations request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) ListMonitoringConfigurationsResponder(resp *http.Response) (result Items, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListPremium gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure
+// Active Directory Connect Health.
+// Parameters:
+// filter - the service property filter to apply.
+// serviceType - the service type for the services onboarded to Azure Active Directory Connect Health.
+// Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be
+// AdFederationService or AadSyncService or AdDomainService.
+// skipCount - the skip count, which specifies the number of elements that can be bypassed from a sequence and
+// then return the remaining elements.
+// takeCount - the take count , which specifies the number of elements that can be returned from a sequence.
+func (client ServicesClient) ListPremium(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result ServicesPage, err error) {
+ result.fn = client.listPremiumNextResults
+ req, err := client.ListPremiumPreparer(ctx, filter, serviceType, skipCount, takeCount)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListPremium", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListPremiumSender(req)
+ if err != nil {
+ result.s.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListPremium", resp, "Failure sending request")
+ return
+ }
+
+ result.s, err = client.ListPremiumResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListPremium", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPremiumPreparer prepares the ListPremium request.
+func (client ServicesClient) ListPremiumPreparer(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (*http.Request, error) {
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(serviceType) > 0 {
+ queryParameters["serviceType"] = autorest.Encode("query", serviceType)
+ }
+ if skipCount != nil {
+ queryParameters["skipCount"] = autorest.Encode("query", *skipCount)
+ }
+ if takeCount != nil {
+ queryParameters["takeCount"] = autorest.Encode("query", *takeCount)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ADHybridHealthService/services/premiumCheck"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListPremiumSender sends the ListPremium request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) ListPremiumSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListPremiumResponder handles the response to the ListPremium request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) ListPremiumResponder(resp *http.Response) (result Services, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listPremiumNextResults retrieves the next set of results, if any.
+func (client ServicesClient) listPremiumNextResults(lastResults Services) (result Services, err error) {
+ req, err := lastResults.servicesPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listPremiumNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListPremiumSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listPremiumNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListPremiumResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "listPremiumNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListPremiumComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ServicesClient) ListPremiumComplete(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result ServicesIterator, err error) {
+ result.page, err = client.ListPremium(ctx, filter, serviceType, skipCount, takeCount)
+ return
+}
+
+// ListUserBadPasswordReport gets the bad password login attempt report for an user
+// Parameters:
+// serviceName - the name of the service.
+// dataSource - the source of data, if its test data or customer data.
+func (client ServicesClient) ListUserBadPasswordReport(ctx context.Context, serviceName string, dataSource string) (result ErrorReportUsersEntries, err error) {
+ req, err := client.ListUserBadPasswordReportPreparer(ctx, serviceName, dataSource)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListUserBadPasswordReport", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListUserBadPasswordReportSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListUserBadPasswordReport", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListUserBadPasswordReportResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "ListUserBadPasswordReport", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListUserBadPasswordReportPreparer prepares the ListUserBadPasswordReport request.
+func (client ServicesClient) ListUserBadPasswordReportPreparer(ctx context.Context, serviceName string, dataSource string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(dataSource) > 0 {
+ queryParameters["dataSource"] = autorest.Encode("query", dataSource)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/reports/badpassword/details/user", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListUserBadPasswordReportSender sends the ListUserBadPasswordReport request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) ListUserBadPasswordReportSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListUserBadPasswordReportResponder handles the response to the ListUserBadPasswordReport request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) ListUserBadPasswordReportResponder(resp *http.Response) (result ErrorReportUsersEntries, 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 service properties of an onboarded service.
+// Parameters:
+// serviceName - the name of the service which needs to be deleted.
+// service - the service object.
+func (client ServicesClient) Update(ctx context.Context, serviceName string, service ServiceProperties) (result ServiceProperties, err error) {
+ req, err := client.UpdatePreparer(ctx, serviceName, service)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client ServicesClient) UpdatePreparer(ctx context.Context, serviceName string, service ServiceProperties) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}", pathParameters),
+ autorest.WithJSON(service),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) UpdateResponder(resp *http.Response) (result ServiceProperties, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateMonitoringConfiguration updates the service level monitoring configuration.
+// Parameters:
+// serviceName - the name of the service.
+// configurationSetting - the monitoring configuration to update
+func (client ServicesClient) UpdateMonitoringConfiguration(ctx context.Context, serviceName string, configurationSetting Item) (result autorest.Response, err error) {
+ req, err := client.UpdateMonitoringConfigurationPreparer(ctx, serviceName, configurationSetting)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "UpdateMonitoringConfiguration", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateMonitoringConfigurationSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "UpdateMonitoringConfiguration", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateMonitoringConfigurationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "adhybridhealthservice.ServicesClient", "UpdateMonitoringConfiguration", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateMonitoringConfigurationPreparer prepares the UpdateMonitoringConfiguration request.
+func (client ServicesClient) UpdateMonitoringConfigurationPreparer(ctx context.Context, serviceName string, configurationSetting Item) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "serviceName": autorest.Encode("path", serviceName),
+ }
+
+ const APIVersion = "2014-01-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.ADHybridHealthService/services/{serviceName}/monitoringconfiguration", pathParameters),
+ autorest.WithJSON(configurationSetting),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateMonitoringConfigurationSender sends the UpdateMonitoringConfiguration request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) UpdateMonitoringConfigurationSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateMonitoringConfigurationResponder handles the response to the UpdateMonitoringConfiguration request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) UpdateMonitoringConfigurationResponder(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/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/version.go
new file mode 100644
index 000000000..66686c73c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/version.go
@@ -0,0 +1,30 @@
+package adhybridhealthservice
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " adhybridhealthservice/2014-01-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/advisor/mgmt/2017-04-19/advisor/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/advisor/mgmt/2017-04-19/advisor/models.go
index 2527fc84a..43a997f0f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/advisor/mgmt/2017-04-19/advisor/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/advisor/mgmt/2017-04-19/advisor/models.go
@@ -414,12 +414,11 @@ func (rp RecommendationProperties) MarshalJSON() ([]byte, error) {
// long-running operation.
type RecommendationsGetGenerateStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RecommendationsGetGenerateStatusFuture) Result(client RecommendationsClient) (ar autorest.Response, err error) {
+func (future *RecommendationsGetGenerateStatusFuture) Result(client RecommendationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -427,35 +426,10 @@ func (future RecommendationsGetGenerateStatusFuture) Result(client Recommendatio
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("advisor.RecommendationsGetGenerateStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.GetGenerateStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "advisor.RecommendationsGetGenerateStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("advisor.RecommendationsGetGenerateStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "advisor.RecommendationsGetGenerateStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.GetGenerateStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "advisor.RecommendationsGetGenerateStatusFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/advisor/mgmt/2017-04-19/advisor/recommendations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/advisor/mgmt/2017-04-19/advisor/recommendations.go
index d6835ec93..3b0396e03 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/advisor/mgmt/2017-04-19/advisor/recommendations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/advisor/mgmt/2017-04-19/advisor/recommendations.go
@@ -214,15 +214,17 @@ func (client RecommendationsClient) GetGenerateStatusPreparer(ctx context.Contex
// GetGenerateStatusSender sends the GetGenerateStatus request. The method will close the
// http.Response Body if it receives an error.
func (client RecommendationsClient) GetGenerateStatusSender(req *http.Request) (future RecommendationsGetGenerateStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2016-05-16/analysisservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2016-05-16/analysisservices/models.go
index 552932c54..8986aeebf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2016-05-16/analysisservices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2016-05-16/analysisservices/models.go
@@ -365,12 +365,11 @@ type Servers struct {
// ServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersCreateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersCreateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -378,34 +377,15 @@ func (future ServersCreateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("analysisservices.ServersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -413,12 +393,11 @@ func (future ServersCreateFuture) Result(client ServersClient) (s Server, err er
// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -426,47 +405,21 @@ func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("analysisservices.ServersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersResumeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersResumeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersResumeFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersResumeFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -474,47 +427,21 @@ func (future ServersResumeFuture) Result(client ServersClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("analysisservices.ServersResumeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersResumeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersResumeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersResumeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersResumeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersSuspendFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersSuspendFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersSuspendFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersSuspendFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -522,47 +449,21 @@ func (future ServersSuspendFuture) Result(client ServersClient) (ar autorest.Res
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("analysisservices.ServersSuspendFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.SuspendResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersSuspendFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersSuspendFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersSuspendFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.SuspendResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersSuspendFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -570,34 +471,15 @@ func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("analysisservices.ServersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2016-05-16/analysisservices/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2016-05-16/analysisservices/servers.go
index 02a2d3c49..c9bbea197 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2016-05-16/analysisservices/servers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2016-05-16/analysisservices/servers.go
@@ -180,15 +180,17 @@ func (client ServersClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) CreateSender(req *http.Request) (future ServersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -263,15 +265,17 @@ func (client ServersClient) DeletePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -838,15 +842,17 @@ func (client ServersClient) ResumePreparer(ctx context.Context, resourceGroupNam
// ResumeSender sends the Resume request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) ResumeSender(req *http.Request) (future ServersResumeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -920,15 +926,17 @@ func (client ServersClient) SuspendPreparer(ctx context.Context, resourceGroupNa
// SuspendSender sends the Suspend request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) SuspendSender(req *http.Request) (future ServersSuspendFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1005,15 +1013,17 @@ func (client ServersClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-07-14/analysisservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-07-14/analysisservices/models.go
index 27e65b014..2b5c500d4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-07-14/analysisservices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-07-14/analysisservices/models.go
@@ -413,12 +413,11 @@ type Servers struct {
// ServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersCreateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersCreateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -426,34 +425,15 @@ func (future ServersCreateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("analysisservices.ServersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -461,12 +441,11 @@ func (future ServersCreateFuture) Result(client ServersClient) (s Server, err er
// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -474,47 +453,21 @@ func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("analysisservices.ServersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersResumeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersResumeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersResumeFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersResumeFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -522,47 +475,21 @@ func (future ServersResumeFuture) Result(client ServersClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("analysisservices.ServersResumeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersResumeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersResumeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersResumeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersResumeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersSuspendFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersSuspendFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersSuspendFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersSuspendFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -570,47 +497,21 @@ func (future ServersSuspendFuture) Result(client ServersClient) (ar autorest.Res
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("analysisservices.ServersSuspendFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.SuspendResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersSuspendFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersSuspendFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersSuspendFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.SuspendResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersSuspendFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -618,34 +519,15 @@ func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("analysisservices.ServersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-07-14/analysisservices/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-07-14/analysisservices/servers.go
index a9ef355e0..7cc421997 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-07-14/analysisservices/servers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-07-14/analysisservices/servers.go
@@ -180,15 +180,17 @@ func (client ServersClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) CreateSender(req *http.Request) (future ServersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -263,15 +265,17 @@ func (client ServersClient) DeletePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -999,15 +1003,17 @@ func (client ServersClient) ResumePreparer(ctx context.Context, resourceGroupNam
// ResumeSender sends the Resume request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) ResumeSender(req *http.Request) (future ServersResumeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1081,15 +1087,17 @@ func (client ServersClient) SuspendPreparer(ctx context.Context, resourceGroupNa
// SuspendSender sends the Suspend request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) SuspendSender(req *http.Request) (future ServersSuspendFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1166,15 +1174,17 @@ func (client ServersClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-08-01/analysisservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-08-01/analysisservices/models.go
index 4029924cc..efb9fd6f6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-08-01/analysisservices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-08-01/analysisservices/models.go
@@ -578,12 +578,11 @@ type Servers struct {
// ServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersCreateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersCreateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -591,34 +590,15 @@ func (future ServersCreateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("analysisservices.ServersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -626,12 +606,11 @@ func (future ServersCreateFuture) Result(client ServersClient) (s Server, err er
// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -639,47 +618,21 @@ func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("analysisservices.ServersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersResumeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersResumeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersResumeFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersResumeFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -687,47 +640,21 @@ func (future ServersResumeFuture) Result(client ServersClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("analysisservices.ServersResumeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersResumeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersResumeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersResumeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersResumeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersSuspendFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersSuspendFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersSuspendFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersSuspendFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -735,47 +662,21 @@ func (future ServersSuspendFuture) Result(client ServersClient) (ar autorest.Res
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("analysisservices.ServersSuspendFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.SuspendResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersSuspendFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersSuspendFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersSuspendFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.SuspendResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersSuspendFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -783,34 +684,15 @@ func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("analysisservices.ServersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-08-01/analysisservices/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-08-01/analysisservices/servers.go
index f16a6cd79..db3bb4491 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-08-01/analysisservices/servers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-08-01/analysisservices/servers.go
@@ -180,15 +180,17 @@ func (client ServersClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) CreateSender(req *http.Request) (future ServersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -263,15 +265,17 @@ func (client ServersClient) DeletePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -998,15 +1002,17 @@ func (client ServersClient) ResumePreparer(ctx context.Context, resourceGroupNam
// ResumeSender sends the Resume request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) ResumeSender(req *http.Request) (future ServersResumeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1080,15 +1086,17 @@ func (client ServersClient) SuspendPreparer(ctx context.Context, resourceGroupNa
// SuspendSender sends the Suspend request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) SuspendSender(req *http.Request) (future ServersSuspendFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1165,15 +1173,17 @@ func (client ServersClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-07-07/apimanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-07-07/apimanagement/models.go
index 8098b742d..1a48a3a42 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-07-07/apimanagement/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-07-07/apimanagement/models.go
@@ -2699,12 +2699,11 @@ func (sr ServiceResource) MarshalJSON() ([]byte, error) {
// ServicesBackupFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesBackupFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesBackupFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
+func (future *ServicesBackupFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2712,34 +2711,15 @@ func (future ServicesBackupFuture) Result(client ServicesClient) (sr ServiceReso
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServicesBackupFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.BackupResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesBackupFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServicesBackupFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.BackupResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServicesBackupFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesBackupFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.BackupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesBackupFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2756,12 +2736,11 @@ type ServiceSkuProperties struct {
// operation.
type ServicesManageDeploymentsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesManageDeploymentsFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
+func (future *ServicesManageDeploymentsFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2769,34 +2748,15 @@ func (future ServicesManageDeploymentsFuture) Result(client ServicesClient) (sr
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServicesManageDeploymentsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.ManageDeploymentsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesManageDeploymentsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServicesManageDeploymentsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.ManageDeploymentsResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServicesManageDeploymentsFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesManageDeploymentsFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.ManageDeploymentsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesManageDeploymentsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2804,12 +2764,11 @@ func (future ServicesManageDeploymentsFuture) Result(client ServicesClient) (sr
// ServicesRestoreFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesRestoreFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesRestoreFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
+func (future *ServicesRestoreFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2817,34 +2776,15 @@ func (future ServicesRestoreFuture) Result(client ServicesClient) (sr ServiceRes
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServicesRestoreFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.RestoreResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesRestoreFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServicesRestoreFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.RestoreResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServicesRestoreFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesRestoreFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.RestoreResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesRestoreFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2852,12 +2792,11 @@ func (future ServicesRestoreFuture) Result(client ServicesClient) (sr ServiceRes
// ServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesUpdateFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
+func (future *ServicesUpdateFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2865,34 +2804,15 @@ func (future ServicesUpdateFuture) Result(client ServicesClient) (sr ServiceReso
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServicesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServicesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.UpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2901,12 +2821,11 @@ func (future ServicesUpdateFuture) Result(client ServicesClient) (sr ServiceReso
// operation.
type ServicesUpdateHostnameFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesUpdateHostnameFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
+func (future *ServicesUpdateHostnameFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2914,34 +2833,15 @@ func (future ServicesUpdateHostnameFuture) Result(client ServicesClient) (sr Ser
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServicesUpdateHostnameFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.UpdateHostnameResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateHostnameFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServicesUpdateHostnameFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.UpdateHostnameResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateHostnameFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateHostnameFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.UpdateHostnameResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateHostnameFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3154,12 +3054,11 @@ type SubscriptionUpdateParameters struct {
// operation.
type TenantConfigurationDeployFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3167,34 +3066,15 @@ func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationC
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.DeployResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.DeployResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.DeployResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3203,12 +3083,11 @@ func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationC
// operation.
type TenantConfigurationSaveFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3216,34 +3095,15 @@ func (future TenantConfigurationSaveFuture) Result(client TenantConfigurationCli
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.SaveResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.SaveResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.SaveResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3271,12 +3131,11 @@ type TenantConfigurationSyncStateContract struct {
// operation.
type TenantConfigurationValidateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3284,34 +3143,15 @@ func (future TenantConfigurationValidateFuture) Result(client TenantConfiguratio
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.ValidateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.ValidateResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.ValidateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-07-07/apimanagement/services.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-07-07/apimanagement/services.go
index e5accfc94..ff5a3d62c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-07-07/apimanagement/services.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-07-07/apimanagement/services.go
@@ -101,15 +101,17 @@ func (client ServicesClient) BackupPreparer(ctx context.Context, resourceGroupNa
// BackupSender sends the Backup request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) BackupSender(req *http.Request) (future ServicesBackupFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -746,15 +748,17 @@ func (client ServicesClient) ManageDeploymentsPreparer(ctx context.Context, reso
// ManageDeploymentsSender sends the ManageDeployments request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) ManageDeploymentsSender(req *http.Request) (future ServicesManageDeploymentsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -832,15 +836,17 @@ func (client ServicesClient) RestorePreparer(ctx context.Context, resourceGroupN
// RestoreSender sends the Restore request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) RestoreSender(req *http.Request) (future ServicesRestoreFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -912,15 +918,17 @@ func (client ServicesClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) UpdateSender(req *http.Request) (future ServicesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -994,15 +1002,17 @@ func (client ServicesClient) UpdateHostnamePreparer(ctx context.Context, resourc
// UpdateHostnameSender sends the UpdateHostname request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) UpdateHostnameSender(req *http.Request) (future ServicesUpdateHostnameFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantconfiguration.go
index 5e324e626..c1a702d21 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantconfiguration.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantconfiguration.go
@@ -98,15 +98,17 @@ func (client TenantConfigurationClient) DeployPreparer(ctx context.Context, reso
// DeploySender sends the Deploy request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) DeploySender(req *http.Request) (future TenantConfigurationDeployFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -181,15 +183,17 @@ func (client TenantConfigurationClient) SavePreparer(ctx context.Context, resour
// SaveSender sends the Save request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) SaveSender(req *http.Request) (future TenantConfigurationSaveFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -264,15 +268,17 @@ func (client TenantConfigurationClient) ValidatePreparer(ctx context.Context, re
// ValidateSender sends the Validate request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) ValidateSender(req *http.Request) (future TenantConfigurationValidateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-10-10/apimanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-10-10/apimanagement/models.go
index 44a678f0a..1fe2671d4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-10-10/apimanagement/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-10-10/apimanagement/models.go
@@ -3395,12 +3395,11 @@ func (sr *ServiceResource) UnmarshalJSON(body []byte) error {
// long-running operation.
type ServicesApplyNetworkConfigurationUpdatesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesApplyNetworkConfigurationUpdatesFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
+func (future *ServicesApplyNetworkConfigurationUpdatesFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3408,34 +3407,15 @@ func (future ServicesApplyNetworkConfigurationUpdatesFuture) Result(client Servi
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServicesApplyNetworkConfigurationUpdatesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.ApplyNetworkConfigurationUpdatesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesApplyNetworkConfigurationUpdatesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServicesApplyNetworkConfigurationUpdatesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.ApplyNetworkConfigurationUpdatesResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServicesApplyNetworkConfigurationUpdatesFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesApplyNetworkConfigurationUpdatesFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.ApplyNetworkConfigurationUpdatesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesApplyNetworkConfigurationUpdatesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3443,12 +3423,11 @@ func (future ServicesApplyNetworkConfigurationUpdatesFuture) Result(client Servi
// ServicesBackupFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesBackupFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesBackupFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
+func (future *ServicesBackupFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3456,34 +3435,15 @@ func (future ServicesBackupFuture) Result(client ServicesClient) (sr ServiceReso
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServicesBackupFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.BackupResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesBackupFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServicesBackupFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.BackupResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServicesBackupFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesBackupFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.BackupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesBackupFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3500,12 +3460,11 @@ type ServiceSkuProperties struct {
// operation.
type ServicesManageDeploymentsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesManageDeploymentsFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
+func (future *ServicesManageDeploymentsFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3513,34 +3472,15 @@ func (future ServicesManageDeploymentsFuture) Result(client ServicesClient) (sr
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServicesManageDeploymentsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.ManageDeploymentsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesManageDeploymentsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServicesManageDeploymentsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.ManageDeploymentsResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServicesManageDeploymentsFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesManageDeploymentsFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.ManageDeploymentsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesManageDeploymentsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3548,12 +3488,11 @@ func (future ServicesManageDeploymentsFuture) Result(client ServicesClient) (sr
// ServicesRestoreFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesRestoreFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesRestoreFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
+func (future *ServicesRestoreFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3561,34 +3500,15 @@ func (future ServicesRestoreFuture) Result(client ServicesClient) (sr ServiceRes
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServicesRestoreFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.RestoreResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesRestoreFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServicesRestoreFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.RestoreResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServicesRestoreFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesRestoreFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.RestoreResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesRestoreFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3596,12 +3516,11 @@ func (future ServicesRestoreFuture) Result(client ServicesClient) (sr ServiceRes
// ServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesUpdateFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
+func (future *ServicesUpdateFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3609,34 +3528,15 @@ func (future ServicesUpdateFuture) Result(client ServicesClient) (sr ServiceReso
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServicesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServicesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.UpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3645,12 +3545,11 @@ func (future ServicesUpdateFuture) Result(client ServicesClient) (sr ServiceReso
// operation.
type ServicesUpdateHostnameFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesUpdateHostnameFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
+func (future *ServicesUpdateHostnameFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3658,34 +3557,15 @@ func (future ServicesUpdateHostnameFuture) Result(client ServicesClient) (sr Ser
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServicesUpdateHostnameFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.UpdateHostnameResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateHostnameFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServicesUpdateHostnameFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.UpdateHostnameResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateHostnameFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateHostnameFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.UpdateHostnameResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServicesUpdateHostnameFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3959,12 +3839,11 @@ type SubscriptionUpdateParameters struct {
// operation.
type TenantConfigurationDeployFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3972,34 +3851,15 @@ func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationC
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.DeployResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.DeployResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.DeployResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4008,12 +3868,11 @@ func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationC
// operation.
type TenantConfigurationSaveFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4021,34 +3880,15 @@ func (future TenantConfigurationSaveFuture) Result(client TenantConfigurationCli
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.SaveResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.SaveResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.SaveResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4076,12 +3916,11 @@ type TenantConfigurationSyncStateContract struct {
// operation.
type TenantConfigurationValidateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4089,34 +3928,15 @@ func (future TenantConfigurationValidateFuture) Result(client TenantConfiguratio
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.ValidateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.ValidateResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.ValidateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-10-10/apimanagement/services.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-10-10/apimanagement/services.go
index 83e5c872d..fe8de981d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-10-10/apimanagement/services.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-10-10/apimanagement/services.go
@@ -93,15 +93,17 @@ func (client ServicesClient) ApplyNetworkConfigurationUpdatesPreparer(ctx contex
// ApplyNetworkConfigurationUpdatesSender sends the ApplyNetworkConfigurationUpdates request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) ApplyNetworkConfigurationUpdatesSender(req *http.Request) (future ServicesApplyNetworkConfigurationUpdatesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -179,15 +181,17 @@ func (client ServicesClient) BackupPreparer(ctx context.Context, resourceGroupNa
// BackupSender sends the Backup request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) BackupSender(req *http.Request) (future ServicesBackupFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -836,15 +840,17 @@ func (client ServicesClient) ManageDeploymentsPreparer(ctx context.Context, reso
// ManageDeploymentsSender sends the ManageDeployments request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) ManageDeploymentsSender(req *http.Request) (future ServicesManageDeploymentsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -922,15 +928,17 @@ func (client ServicesClient) RestorePreparer(ctx context.Context, resourceGroupN
// RestoreSender sends the Restore request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) RestoreSender(req *http.Request) (future ServicesRestoreFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1002,15 +1010,17 @@ func (client ServicesClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) UpdateSender(req *http.Request) (future ServicesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1084,15 +1094,17 @@ func (client ServicesClient) UpdateHostnamePreparer(ctx context.Context, resourc
// UpdateHostnameSender sends the UpdateHostname request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) UpdateHostnameSender(req *http.Request) (future ServicesUpdateHostnameFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantconfiguration.go
index abb67853e..bec31308d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantconfiguration.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantconfiguration.go
@@ -98,15 +98,17 @@ func (client TenantConfigurationClient) DeployPreparer(ctx context.Context, reso
// DeploySender sends the Deploy request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) DeploySender(req *http.Request) (future TenantConfigurationDeployFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -181,15 +183,17 @@ func (client TenantConfigurationClient) SavePreparer(ctx context.Context, resour
// SaveSender sends the Save request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) SaveSender(req *http.Request) (future TenantConfigurationSaveFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -264,15 +268,17 @@ func (client TenantConfigurationClient) ValidatePreparer(ctx context.Context, re
// ValidateSender sends the Validate request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) ValidateSender(req *http.Request) (future TenantConfigurationValidateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement/models.go
index 365541cdc..603829deb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement/models.go
@@ -7513,12 +7513,11 @@ type ServiceApplyNetworkConfigurationParameters struct {
// long-running operation.
type ServiceApplyNetworkConfigurationUpdatesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServiceApplyNetworkConfigurationUpdatesFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
+func (future *ServiceApplyNetworkConfigurationUpdatesFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7526,34 +7525,15 @@ func (future ServiceApplyNetworkConfigurationUpdatesFuture) Result(client Servic
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.ApplyNetworkConfigurationUpdatesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.ApplyNetworkConfigurationUpdatesResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.ApplyNetworkConfigurationUpdatesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7561,12 +7541,11 @@ func (future ServiceApplyNetworkConfigurationUpdatesFuture) Result(client Servic
// ServiceBackupFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServiceBackupFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServiceBackupFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
+func (future *ServiceBackupFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7574,34 +7553,15 @@ func (future ServiceBackupFuture) Result(client ServiceClient) (sr ServiceResour
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServiceBackupFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.BackupResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceBackupFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.BackupResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.BackupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7718,12 +7678,11 @@ type ServiceCheckNameAvailabilityParameters struct {
// operation.
type ServiceCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServiceCreateOrUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
+func (future *ServiceCreateOrUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7731,34 +7690,15 @@ func (future ServiceCreateOrUpdateFuture) Result(client ServiceClient) (sr Servi
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServiceCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8148,12 +8088,11 @@ func (sr *ServiceResource) UnmarshalJSON(body []byte) error {
// ServiceRestoreFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServiceRestoreFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServiceRestoreFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
+func (future *ServiceRestoreFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8161,34 +8100,15 @@ func (future ServiceRestoreFuture) Result(client ServiceClient) (sr ServiceResou
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServiceRestoreFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.RestoreResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceRestoreFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.RestoreResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.RestoreResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8204,12 +8124,11 @@ type ServiceSkuProperties struct {
// ServiceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServiceUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServiceUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
+func (future *ServiceUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8217,34 +8136,15 @@ func (future ServiceUpdateFuture) Result(client ServiceClient) (sr ServiceResour
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServiceUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.UpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8253,12 +8153,11 @@ func (future ServiceUpdateFuture) Result(client ServiceClient) (sr ServiceResour
// operation.
type ServiceUpdateHostnameFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServiceUpdateHostnameFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
+func (future *ServiceUpdateHostnameFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8266,34 +8165,15 @@ func (future ServiceUpdateHostnameFuture) Result(client ServiceClient) (sr Servi
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServiceUpdateHostnameFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.UpdateHostnameResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateHostnameFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceUpdateHostnameFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.UpdateHostnameResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateHostnameFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateHostnameFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.UpdateHostnameResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateHostnameFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9567,12 +9447,11 @@ type TagResourceContractProperties struct {
// operation.
type TenantConfigurationDeployFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9580,34 +9459,15 @@ func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationC
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.DeployResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.DeployResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.DeployResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9616,12 +9476,11 @@ func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationC
// operation.
type TenantConfigurationSaveFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9629,34 +9488,15 @@ func (future TenantConfigurationSaveFuture) Result(client TenantConfigurationCli
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.SaveResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.SaveResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.SaveResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9684,12 +9524,11 @@ type TenantConfigurationSyncStateContract struct {
// operation.
type TenantConfigurationValidateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9697,34 +9536,15 @@ func (future TenantConfigurationValidateFuture) Result(client TenantConfiguratio
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.ValidateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.ValidateResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.ValidateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement/service.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement/service.go
index 3f964357b..dd146e13f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement/service.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement/service.go
@@ -101,15 +101,17 @@ func (client ServiceClient) ApplyNetworkConfigurationUpdatesPreparer(ctx context
// ApplyNetworkConfigurationUpdatesSender sends the ApplyNetworkConfigurationUpdates request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) ApplyNetworkConfigurationUpdatesSender(req *http.Request) (future ServiceApplyNetworkConfigurationUpdatesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -187,15 +189,17 @@ func (client ServiceClient) BackupPreparer(ctx context.Context, resourceGroupNam
// BackupSender sends the Backup request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) BackupSender(req *http.Request) (future ServiceBackupFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -351,15 +355,17 @@ func (client ServiceClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) CreateOrUpdateSender(req *http.Request) (future ServiceCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -844,15 +850,17 @@ func (client ServiceClient) RestorePreparer(ctx context.Context, resourceGroupNa
// RestoreSender sends the Restore request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) RestoreSender(req *http.Request) (future ServiceRestoreFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -924,15 +932,17 @@ func (client ServiceClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) UpdateSender(req *http.Request) (future ServiceUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1006,15 +1016,17 @@ func (client ServiceClient) UpdateHostnamePreparer(ctx context.Context, resource
// UpdateHostnameSender sends the UpdateHostname request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) UpdateHostnameSender(req *http.Request) (future ServiceUpdateHostnameFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantconfiguration.go
index 56b99cef9..0a7bd9002 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantconfiguration.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantconfiguration.go
@@ -99,15 +99,17 @@ func (client TenantConfigurationClient) DeployPreparer(ctx context.Context, reso
// DeploySender sends the Deploy request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) DeploySender(req *http.Request) (future TenantConfigurationDeployFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -260,15 +262,17 @@ func (client TenantConfigurationClient) SavePreparer(ctx context.Context, resour
// SaveSender sends the Save request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) SaveSender(req *http.Request) (future TenantConfigurationSaveFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -344,15 +348,17 @@ func (client TenantConfigurationClient) ValidatePreparer(ctx context.Context, re
// ValidateSender sends the Validate request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) ValidateSender(req *http.Request) (future TenantConfigurationValidateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/components.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/components.go
index 90d532fdf..556529872 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/components.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/components.go
@@ -487,15 +487,17 @@ func (client ComponentsClient) PurgePreparer(ctx context.Context, resourceGroupN
// PurgeSender sends the Purge request. The method will close the
// http.Response Body if it receives an error.
func (client ComponentsClient) PurgeSender(req *http.Request) (future ComponentsPurgeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/models.go
index 993b4276d..827ee3305 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/models.go
@@ -889,12 +889,11 @@ type ComponentPurgeStatusResponse struct {
// ComponentsPurgeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ComponentsPurgeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ComponentsPurgeFuture) Result(client ComponentsClient) (so SetObject, err error) {
+func (future *ComponentsPurgeFuture) Result(client ComponentsClient) (so SetObject, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -902,34 +901,15 @@ func (future ComponentsPurgeFuture) Result(client ComponentsClient) (so SetObjec
return
}
if !done {
- return so, azure.NewAsyncOpIncompleteError("insights.ComponentsPurgeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- so, err = client.PurgeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "insights.ComponentsPurgeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("insights.ComponentsPurgeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.PurgeResponder(so.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "insights.ComponentsPurgeFuture", "Result", so.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "insights.ComponentsPurgeFuture", "Result", resp, "Failure sending request")
- return
- }
- so, err = client.PurgeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "insights.ComponentsPurgeFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/webtests.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/webtests.go
index 7ac7ab23d..464479765 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/webtests.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/webtests.go
@@ -344,6 +344,101 @@ func (client WebTestsClient) ListComplete(ctx context.Context) (result WebTestLi
return
}
+// ListByComponent get all Application Insights web tests defined for the specified component.
+// Parameters:
+// componentName - the name of the Application Insights component resource.
+// resourceGroupName - the name of the resource group.
+func (client WebTestsClient) ListByComponent(ctx context.Context, componentName string, resourceGroupName string) (result WebTestListResultPage, err error) {
+ result.fn = client.listByComponentNextResults
+ req, err := client.ListByComponentPreparer(ctx, componentName, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "insights.WebTestsClient", "ListByComponent", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByComponentSender(req)
+ if err != nil {
+ result.wtlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "insights.WebTestsClient", "ListByComponent", resp, "Failure sending request")
+ return
+ }
+
+ result.wtlr, err = client.ListByComponentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "insights.WebTestsClient", "ListByComponent", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByComponentPreparer prepares the ListByComponent request.
+func (client WebTestsClient) ListByComponentPreparer(ctx context.Context, componentName string, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "componentName": autorest.Encode("path", componentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2015-05-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/components/{componentName}/webtests", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByComponentSender sends the ListByComponent request. The method will close the
+// http.Response Body if it receives an error.
+func (client WebTestsClient) ListByComponentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByComponentResponder handles the response to the ListByComponent request. The method always
+// closes the http.Response Body.
+func (client WebTestsClient) ListByComponentResponder(resp *http.Response) (result WebTestListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByComponentNextResults retrieves the next set of results, if any.
+func (client WebTestsClient) listByComponentNextResults(lastResults WebTestListResult) (result WebTestListResult, err error) {
+ req, err := lastResults.webTestListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "insights.WebTestsClient", "listByComponentNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByComponentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "insights.WebTestsClient", "listByComponentNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByComponentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "insights.WebTestsClient", "listByComponentNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByComponentComplete enumerates all values, automatically crossing page boundaries as required.
+func (client WebTestsClient) ListByComponentComplete(ctx context.Context, componentName string, resourceGroupName string) (result WebTestListResultIterator, err error) {
+ result.page, err = client.ListByComponent(ctx, componentName, resourceGroupName)
+ return
+}
+
// ListByResourceGroup get all Application Insights web tests defined within a specified resource group.
// Parameters:
// resourceGroupName - the name of the resource group.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2015-12-01/batch/account.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2015-12-01/batch/account.go
index c4c3c925b..24f3b1182 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2015-12-01/batch/account.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2015-12-01/batch/account.go
@@ -107,15 +107,17 @@ func (client AccountClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountClient) CreateSender(req *http.Request) (future AccountCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -186,15 +188,17 @@ func (client AccountClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client AccountClient) DeleteSender(req *http.Request) (future AccountDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2015-12-01/batch/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2015-12-01/batch/models.go
index 3088aee6e..2121dba2b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2015-12-01/batch/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2015-12-01/batch/models.go
@@ -200,12 +200,11 @@ type AccountBaseProperties struct {
// AccountCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountCreateFuture) Result(client AccountClient) (a Account, err error) {
+func (future *AccountCreateFuture) Result(client AccountClient) (a Account, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -213,34 +212,15 @@ func (future AccountCreateFuture) Result(client AccountClient) (a Account, err e
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("batch.AccountCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batch.AccountCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -315,12 +295,11 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error {
// AccountDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountDeleteFuture) Result(client AccountClient) (ar autorest.Response, err error) {
+func (future *AccountDeleteFuture) Result(client AccountClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -328,35 +307,10 @@ func (future AccountDeleteFuture) Result(client AccountClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batch.AccountDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batch.AccountDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-01-01/batch/account.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-01-01/batch/account.go
index 6e99c572d..46d4e1747 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-01-01/batch/account.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-01-01/batch/account.go
@@ -111,15 +111,17 @@ func (client AccountClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountClient) CreateSender(req *http.Request) (future AccountCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -190,15 +192,17 @@ func (client AccountClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client AccountClient) DeleteSender(req *http.Request) (future AccountDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-01-01/batch/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-01-01/batch/models.go
index 6192acd6c..3c2cf57fe 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-01-01/batch/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-01-01/batch/models.go
@@ -219,12 +219,11 @@ type AccountBaseProperties struct {
// AccountCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountCreateFuture) Result(client AccountClient) (a Account, err error) {
+func (future *AccountCreateFuture) Result(client AccountClient) (a Account, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -232,34 +231,15 @@ func (future AccountCreateFuture) Result(client AccountClient) (a Account, err e
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("batch.AccountCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batch.AccountCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -334,12 +314,11 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error {
// AccountDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountDeleteFuture) Result(client AccountClient) (ar autorest.Response, err error) {
+func (future *AccountDeleteFuture) Result(client AccountClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -347,35 +326,10 @@ func (future AccountDeleteFuture) Result(client AccountClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batch.AccountDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batch.AccountDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-05-01/batch/account.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-05-01/batch/account.go
index bcf213ba4..197bb7e33 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-05-01/batch/account.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-05-01/batch/account.go
@@ -111,15 +111,17 @@ func (client AccountClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountClient) CreateSender(req *http.Request) (future AccountCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -190,15 +192,17 @@ func (client AccountClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client AccountClient) DeleteSender(req *http.Request) (future AccountDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-05-01/batch/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-05-01/batch/models.go
index 1aa126da4..90079cf46 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-05-01/batch/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-05-01/batch/models.go
@@ -224,12 +224,11 @@ func (a *Account) UnmarshalJSON(body []byte) error {
// AccountCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountCreateFuture) Result(client AccountClient) (a Account, err error) {
+func (future *AccountCreateFuture) Result(client AccountClient) (a Account, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -237,34 +236,15 @@ func (future AccountCreateFuture) Result(client AccountClient) (a Account, err e
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("batch.AccountCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batch.AccountCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -349,12 +329,11 @@ type AccountCreateProperties struct {
// AccountDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountDeleteFuture) Result(client AccountClient) (ar autorest.Response, err error) {
+func (future *AccountDeleteFuture) Result(client AccountClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -362,35 +341,10 @@ func (future AccountDeleteFuture) Result(client AccountClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batch.AccountDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batch.AccountDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/account.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/account.go
index 320b46a28..ebc60a387 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/account.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/account.go
@@ -109,15 +109,17 @@ func (client AccountClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountClient) CreateSender(req *http.Request) (future AccountCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -186,15 +188,17 @@ func (client AccountClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client AccountClient) DeleteSender(req *http.Request) (future AccountDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/certificate.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/certificate.go
index 5e557d94b..c9ee6f1a5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/certificate.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/certificate.go
@@ -203,15 +203,17 @@ func (client CertificateClient) CreatePreparer(ctx context.Context, resourceGrou
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client CertificateClient) CreateSender(req *http.Request) (future CertificateCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -287,15 +289,17 @@ func (client CertificateClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client CertificateClient) DeleteSender(req *http.Request) (future CertificateDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/models.go
index 054e5ce76..b55c52c59 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/models.go
@@ -461,12 +461,11 @@ func (a *Account) UnmarshalJSON(body []byte) error {
// AccountCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountCreateFuture) Result(client AccountClient) (a Account, err error) {
+func (future *AccountCreateFuture) Result(client AccountClient) (a Account, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -474,34 +473,15 @@ func (future AccountCreateFuture) Result(client AccountClient) (a Account, err e
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("batch.AccountCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batch.AccountCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -586,12 +566,11 @@ type AccountCreateProperties struct {
// AccountDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountDeleteFuture) Result(client AccountClient) (ar autorest.Response, err error) {
+func (future *AccountDeleteFuture) Result(client AccountClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -599,35 +578,10 @@ func (future AccountDeleteFuture) Result(client AccountClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batch.AccountDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batch.AccountDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.AccountDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1045,12 +999,11 @@ type CertificateBaseProperties struct {
// CertificateCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CertificateCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CertificateCreateFuture) Result(client CertificateClient) (c Certificate, err error) {
+func (future *CertificateCreateFuture) Result(client CertificateClient) (c Certificate, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1058,34 +1011,15 @@ func (future CertificateCreateFuture) Result(client CertificateClient) (c Certif
return
}
if !done {
- return c, azure.NewAsyncOpIncompleteError("batch.CertificateCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- c, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.CertificateCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batch.CertificateCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.CreateResponder(c.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batch.CertificateCreateFuture", "Result", c.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.CertificateCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- c, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.CertificateCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1202,12 +1136,11 @@ type CertificateCreateOrUpdateProperties struct {
// CertificateDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CertificateDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CertificateDeleteFuture) Result(client CertificateClient) (ar autorest.Response, err error) {
+func (future *CertificateDeleteFuture) Result(client CertificateClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1215,35 +1148,10 @@ func (future CertificateDeleteFuture) Result(client CertificateClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batch.CertificateDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.CertificateDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batch.CertificateDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.CertificateDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.CertificateDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1995,12 +1903,11 @@ func (p *Pool) UnmarshalJSON(body []byte) error {
// PoolCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PoolCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PoolCreateFuture) Result(client PoolClient) (p Pool, err error) {
+func (future *PoolCreateFuture) Result(client PoolClient) (p Pool, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2008,34 +1915,15 @@ func (future PoolCreateFuture) Result(client PoolClient) (p Pool, err error) {
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("batch.PoolCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.PoolCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batch.PoolCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.CreateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batch.PoolCreateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.PoolCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.PoolCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2043,12 +1931,11 @@ func (future PoolCreateFuture) Result(client PoolClient) (p Pool, err error) {
// PoolDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PoolDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PoolDeleteFuture) Result(client PoolClient) (ar autorest.Response, err error) {
+func (future *PoolDeleteFuture) Result(client PoolClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2056,35 +1943,10 @@ func (future PoolDeleteFuture) Result(client PoolClient) (ar autorest.Response,
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batch.PoolDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.PoolDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batch.PoolDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.PoolDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batch.PoolDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/pool.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/pool.go
index 7c09dcd36..472fc28eb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/pool.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/pool.go
@@ -139,15 +139,17 @@ func (client PoolClient) CreatePreparer(ctx context.Context, resourceGroupName s
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client PoolClient) CreateSender(req *http.Request) (future PoolCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -222,15 +224,17 @@ func (client PoolClient) DeletePreparer(ctx context.Context, resourceGroupName s
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PoolClient) DeleteSender(req *http.Request) (future PoolDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/clusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/clusters.go
index 5eaac1c78..11af19d83 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/clusters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/clusters.go
@@ -140,15 +140,17 @@ func (client ClustersClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) CreateSender(req *http.Request) (future ClustersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -221,15 +223,17 @@ func (client ClustersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) DeleteSender(req *http.Request) (future ClustersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/fileservers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/fileservers.go
index 297be2ca4..5708ac8d1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/fileservers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/fileservers.go
@@ -114,15 +114,17 @@ func (client FileServersClient) CreatePreparer(ctx context.Context, resourceGrou
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client FileServersClient) CreateSender(req *http.Request) (future FileServersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -195,15 +197,17 @@ func (client FileServersClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client FileServersClient) DeleteSender(req *http.Request) (future FileServersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/jobs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/jobs.go
index 29ee8a4ec..e17a20c02 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/jobs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/jobs.go
@@ -130,15 +130,17 @@ func (client JobsClient) CreatePreparer(ctx context.Context, resourceGroupName s
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client JobsClient) CreateSender(req *http.Request) (future JobsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -211,15 +213,17 @@ func (client JobsClient) DeletePreparer(ctx context.Context, resourceGroupName s
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client JobsClient) DeleteSender(req *http.Request) (future JobsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -849,15 +853,17 @@ func (client JobsClient) TerminatePreparer(ctx context.Context, resourceGroupNam
// TerminateSender sends the Terminate request. The method will close the
// http.Response Body if it receives an error.
func (client JobsClient) TerminateSender(req *http.Request) (future JobsTerminateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/models.go
index 3e87b8ce3..a681ce82e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-03-01/batchai/models.go
@@ -639,12 +639,11 @@ type ClusterProperties struct {
// ClustersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err error) {
+func (future *ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -652,34 +651,15 @@ func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err
return
}
if !done {
- return c, azure.NewAsyncOpIncompleteError("batchai.ClustersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- c, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.ClustersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.CreateResponder(c.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batchai.ClustersCreateFuture", "Result", c.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- c, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -687,12 +667,11 @@ func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err
// ClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Response, err error) {
+func (future *ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -700,35 +679,10 @@ func (future ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.ClustersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.ClustersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1355,12 +1309,11 @@ type FileServerReference struct {
// FileServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type FileServersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FileServersCreateFuture) Result(client FileServersClient) (fs FileServer, err error) {
+func (future *FileServersCreateFuture) Result(client FileServersClient) (fs FileServer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1368,34 +1321,15 @@ func (future FileServersCreateFuture) Result(client FileServersClient) (fs FileS
return
}
if !done {
- return fs, azure.NewAsyncOpIncompleteError("batchai.FileServersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fs, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.FileServersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fs.Response.Response, err = future.GetResult(sender); err == nil && fs.Response.Response.StatusCode != http.StatusNoContent {
+ fs, err = client.CreateResponder(fs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batchai.FileServersCreateFuture", "Result", fs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- fs, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1403,12 +1337,11 @@ func (future FileServersCreateFuture) Result(client FileServersClient) (fs FileS
// FileServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type FileServersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FileServersDeleteFuture) Result(client FileServersClient) (ar autorest.Response, err error) {
+func (future *FileServersDeleteFuture) Result(client FileServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1416,35 +1349,10 @@ func (future FileServersDeleteFuture) Result(client FileServersClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.FileServersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.FileServersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1866,12 +1774,11 @@ type JobPropertiesExecutionInfo struct {
// JobsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobsCreateFuture) Result(client JobsClient) (j Job, err error) {
+func (future *JobsCreateFuture) Result(client JobsClient) (j Job, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1879,34 +1786,15 @@ func (future JobsCreateFuture) Result(client JobsClient) (j Job, err error) {
return
}
if !done {
- return j, azure.NewAsyncOpIncompleteError("batchai.JobsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- j, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.JobsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
+ j, err = client.CreateResponder(j.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batchai.JobsCreateFuture", "Result", j.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- j, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1914,12 +1802,11 @@ func (future JobsCreateFuture) Result(client JobsClient) (j Job, err error) {
// JobsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobsDeleteFuture) Result(client JobsClient) (ar autorest.Response, err error) {
+func (future *JobsDeleteFuture) Result(client JobsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1927,47 +1814,21 @@ func (future JobsDeleteFuture) Result(client JobsClient) (ar autorest.Response,
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.JobsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.JobsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// JobsTerminateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobsTerminateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobsTerminateFuture) Result(client JobsClient) (ar autorest.Response, err error) {
+func (future *JobsTerminateFuture) Result(client JobsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1975,35 +1836,10 @@ func (future JobsTerminateFuture) Result(client JobsClient) (ar autorest.Respons
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.JobsTerminateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.TerminateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsTerminateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.JobsTerminateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsTerminateFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.TerminateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsTerminateFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/clusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/clusters.go
index bc0458aa0..979f0edb2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/clusters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/clusters.go
@@ -147,15 +147,17 @@ func (client ClustersClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) CreateSender(req *http.Request) (future ClustersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -235,15 +237,17 @@ func (client ClustersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) DeleteSender(req *http.Request) (future ClustersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/experiments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/experiments.go
index 5eb923fc7..6e0d9db41 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/experiments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/experiments.go
@@ -47,8 +47,7 @@ func NewExperimentsClientWithBaseURI(baseURI string, subscriptionID string) Expe
// characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
// experimentName - the name of the experiment. Experiment names can only contain a combination of alphanumeric
// characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
-// parameters - the parameters to provide for the experiment creation.
-func (client ExperimentsClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string, parameters interface{}) (result ExperimentsCreateFuture, err error) {
+func (client ExperimentsClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string) (result ExperimentsCreateFuture, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}},
@@ -63,7 +62,7 @@ func (client ExperimentsClient) Create(ctx context.Context, resourceGroupName st
return result, validation.NewError("batchai.ExperimentsClient", "Create", err.Error())
}
- req, err := client.CreatePreparer(ctx, resourceGroupName, workspaceName, experimentName, parameters)
+ req, err := client.CreatePreparer(ctx, resourceGroupName, workspaceName, experimentName)
if err != nil {
err = autorest.NewErrorWithError(err, "batchai.ExperimentsClient", "Create", nil, "Failure preparing request")
return
@@ -79,7 +78,7 @@ func (client ExperimentsClient) Create(ctx context.Context, resourceGroupName st
}
// CreatePreparer prepares the Create request.
-func (client ExperimentsClient) CreatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string, parameters interface{}) (*http.Request, error) {
+func (client ExperimentsClient) CreatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"experimentName": autorest.Encode("path", experimentName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
@@ -93,11 +92,9 @@ func (client ExperimentsClient) CreatePreparer(ctx context.Context, resourceGrou
}
preparer := autorest.CreatePreparer(
- autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/experiments/{experimentName}", pathParameters),
- autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -105,15 +102,17 @@ func (client ExperimentsClient) CreatePreparer(ctx context.Context, resourceGrou
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ExperimentsClient) CreateSender(req *http.Request) (future ExperimentsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -192,15 +191,17 @@ func (client ExperimentsClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExperimentsClient) DeleteSender(req *http.Request) (future ExperimentsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/fileservers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/fileservers.go
index 63c7b2356..acd98cab8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/fileservers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/fileservers.go
@@ -121,15 +121,17 @@ func (client FileServersClient) CreatePreparer(ctx context.Context, resourceGrou
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client FileServersClient) CreateSender(req *http.Request) (future FileServersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -209,15 +211,17 @@ func (client FileServersClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client FileServersClient) DeleteSender(req *http.Request) (future FileServersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/jobs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/jobs.go
index 7df34572b..f45f79669 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/jobs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/jobs.go
@@ -147,15 +147,17 @@ func (client JobsClient) CreatePreparer(ctx context.Context, resourceGroupName s
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client JobsClient) CreateSender(req *http.Request) (future JobsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -242,15 +244,17 @@ func (client JobsClient) DeletePreparer(ctx context.Context, resourceGroupName s
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client JobsClient) DeleteSender(req *http.Request) (future JobsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -828,15 +832,17 @@ func (client JobsClient) TerminatePreparer(ctx context.Context, resourceGroupNam
// TerminateSender sends the Terminate request. The method will close the
// http.Response Body if it receives an error.
func (client JobsClient) TerminateSender(req *http.Request) (future JobsTerminateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/models.go
index 7a385ff47..92dc799ef 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/models.go
@@ -652,12 +652,11 @@ type ClusterProperties struct {
// ClustersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err error) {
+func (future *ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -665,34 +664,15 @@ func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err
return
}
if !done {
- return c, azure.NewAsyncOpIncompleteError("batchai.ClustersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- c, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.ClustersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.CreateResponder(c.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batchai.ClustersCreateFuture", "Result", c.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- c, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -700,12 +680,11 @@ func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err
// ClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Response, err error) {
+func (future *ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -713,35 +692,10 @@ func (future ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.ClustersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.ClustersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1065,12 +1019,11 @@ type ExperimentProperties struct {
// ExperimentsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ExperimentsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExperimentsCreateFuture) Result(client ExperimentsClient) (e Experiment, err error) {
+func (future *ExperimentsCreateFuture) Result(client ExperimentsClient) (e Experiment, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1078,34 +1031,15 @@ func (future ExperimentsCreateFuture) Result(client ExperimentsClient) (e Experi
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("batchai.ExperimentsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ExperimentsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.ExperimentsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.CreateResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batchai.ExperimentsCreateFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ExperimentsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ExperimentsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1113,12 +1047,11 @@ func (future ExperimentsCreateFuture) Result(client ExperimentsClient) (e Experi
// ExperimentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ExperimentsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExperimentsDeleteFuture) Result(client ExperimentsClient) (ar autorest.Response, err error) {
+func (future *ExperimentsDeleteFuture) Result(client ExperimentsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1126,35 +1059,10 @@ func (future ExperimentsDeleteFuture) Result(client ExperimentsClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.ExperimentsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ExperimentsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.ExperimentsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ExperimentsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ExperimentsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1664,12 +1572,11 @@ type FileServerReference struct {
// FileServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type FileServersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FileServersCreateFuture) Result(client FileServersClient) (fs FileServer, err error) {
+func (future *FileServersCreateFuture) Result(client FileServersClient) (fs FileServer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1677,34 +1584,15 @@ func (future FileServersCreateFuture) Result(client FileServersClient) (fs FileS
return
}
if !done {
- return fs, azure.NewAsyncOpIncompleteError("batchai.FileServersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fs, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.FileServersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fs.Response.Response, err = future.GetResult(sender); err == nil && fs.Response.Response.StatusCode != http.StatusNoContent {
+ fs, err = client.CreateResponder(fs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batchai.FileServersCreateFuture", "Result", fs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- fs, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1712,12 +1600,11 @@ func (future FileServersCreateFuture) Result(client FileServersClient) (fs FileS
// FileServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type FileServersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FileServersDeleteFuture) Result(client FileServersClient) (ar autorest.Response, err error) {
+func (future *FileServersDeleteFuture) Result(client FileServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1725,35 +1612,10 @@ func (future FileServersDeleteFuture) Result(client FileServersClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.FileServersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.FileServersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1874,7 +1736,7 @@ func (j *Job) UnmarshalJSON(body []byte) error {
// JobBaseProperties the properties of a Batch AI Job.
type JobBaseProperties struct {
- // SchedulingPriority - Scheduling priority associated with the job. Possible values include: 'Low', 'Normal', 'High'
+ // SchedulingPriority - Scheduling priority associated with the job. Possible values include: 'Low', 'Normal', 'High'
SchedulingPriority JobPriority `json:"schedulingPriority,omitempty"`
Cluster *ResourceID `json:"cluster,omitempty"`
// MountVolumes - These volumes will be mounted before the job execution and will be unmouted after the job completion. The volumes will be mounted at location specified by $AZ_BATCHAI_JOB_MOUNT_ROOT environment variable.
@@ -2128,12 +1990,11 @@ type JobPropertiesExecutionInfo struct {
// JobsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobsCreateFuture) Result(client JobsClient) (j Job, err error) {
+func (future *JobsCreateFuture) Result(client JobsClient) (j Job, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2141,34 +2002,15 @@ func (future JobsCreateFuture) Result(client JobsClient) (j Job, err error) {
return
}
if !done {
- return j, azure.NewAsyncOpIncompleteError("batchai.JobsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- j, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.JobsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
+ j, err = client.CreateResponder(j.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batchai.JobsCreateFuture", "Result", j.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- j, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2176,12 +2018,11 @@ func (future JobsCreateFuture) Result(client JobsClient) (j Job, err error) {
// JobsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobsDeleteFuture) Result(client JobsClient) (ar autorest.Response, err error) {
+func (future *JobsDeleteFuture) Result(client JobsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2189,47 +2030,21 @@ func (future JobsDeleteFuture) Result(client JobsClient) (ar autorest.Response,
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.JobsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.JobsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// JobsTerminateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobsTerminateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobsTerminateFuture) Result(client JobsClient) (ar autorest.Response, err error) {
+func (future *JobsTerminateFuture) Result(client JobsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2237,35 +2052,10 @@ func (future JobsTerminateFuture) Result(client JobsClient) (ar autorest.Respons
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.JobsTerminateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.TerminateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsTerminateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.JobsTerminateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsTerminateFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.TerminateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsTerminateFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3069,12 +2859,11 @@ type WorkspaceProperties struct {
// WorkspacesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WorkspacesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WorkspacesCreateFuture) Result(client WorkspacesClient) (w Workspace, err error) {
+func (future *WorkspacesCreateFuture) Result(client WorkspacesClient) (w Workspace, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3082,34 +2871,15 @@ func (future WorkspacesCreateFuture) Result(client WorkspacesClient) (w Workspac
return
}
if !done {
- return w, azure.NewAsyncOpIncompleteError("batchai.WorkspacesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- w, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.WorkspacesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.WorkspacesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent {
+ w, err = client.CreateResponder(w.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batchai.WorkspacesCreateFuture", "Result", w.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.WorkspacesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- w, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.WorkspacesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3117,12 +2887,11 @@ func (future WorkspacesCreateFuture) Result(client WorkspacesClient) (w Workspac
// WorkspacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WorkspacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WorkspacesDeleteFuture) Result(client WorkspacesClient) (ar autorest.Response, err error) {
+func (future *WorkspacesDeleteFuture) Result(client WorkspacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3130,34 +2899,9 @@ func (future WorkspacesDeleteFuture) Result(client WorkspacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.WorkspacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.WorkspacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.WorkspacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.WorkspacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.WorkspacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/workspaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/workspaces.go
index c0e35066e..ea641b51a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/workspaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batchai/mgmt/2018-05-01/batchai/workspaces.go
@@ -100,15 +100,17 @@ func (client WorkspacesClient) CreatePreparer(ctx context.Context, resourceGroup
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client WorkspacesClient) CreateSender(req *http.Request) (future WorkspacesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -180,15 +182,17 @@ func (client WorkspacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WorkspacesClient) DeleteSender(req *http.Request) (future WorkspacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/customdomains.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/customdomains.go
index 08b3f58fb..6b3cc4b10 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/customdomains.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/customdomains.go
@@ -100,15 +100,17 @@ func (client CustomDomainsClient) CreatePreparer(ctx context.Context, customDoma
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client CustomDomainsClient) CreateSender(req *http.Request) (future CustomDomainsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -173,15 +175,17 @@ func (client CustomDomainsClient) DeleteIfExistsPreparer(ctx context.Context, cu
// DeleteIfExistsSender sends the DeleteIfExists request. The method will close the
// http.Response Body if it receives an error.
func (client CustomDomainsClient) DeleteIfExistsSender(req *http.Request) (future CustomDomainsDeleteIfExistsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/endpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/endpoints.go
index a2e307058..b7e745b5d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/endpoints.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/endpoints.go
@@ -99,15 +99,17 @@ func (client EndpointsClient) CreatePreparer(ctx context.Context, endpointName s
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) CreateSender(req *http.Request) (future EndpointsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client EndpointsClient) DeleteIfExistsPreparer(ctx context.Context, endpoi
// DeleteIfExistsSender sends the DeleteIfExists request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) DeleteIfExistsSender(req *http.Request) (future EndpointsDeleteIfExistsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -385,15 +389,17 @@ func (client EndpointsClient) LoadContentPreparer(ctx context.Context, endpointN
// LoadContentSender sends the LoadContent request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) LoadContentSender(req *http.Request) (future EndpointsLoadContentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -464,15 +470,17 @@ func (client EndpointsClient) PurgeContentPreparer(ctx context.Context, endpoint
// PurgeContentSender sends the PurgeContent request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) PurgeContentSender(req *http.Request) (future EndpointsPurgeContentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -534,15 +542,17 @@ func (client EndpointsClient) StartPreparer(ctx context.Context, endpointName st
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) StartSender(req *http.Request) (future EndpointsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -605,15 +615,17 @@ func (client EndpointsClient) StopPreparer(ctx context.Context, endpointName str
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) StopSender(req *http.Request) (future EndpointsStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -679,15 +691,17 @@ func (client EndpointsClient) UpdatePreparer(ctx context.Context, endpointName s
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) UpdateSender(req *http.Request) (future EndpointsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/models.go
index f0031c755..4ff7eb16c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/models.go
@@ -329,12 +329,11 @@ type CustomDomainPropertiesParameters struct {
// CustomDomainsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CustomDomainsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
+func (future *CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -342,34 +341,15 @@ func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd C
return
}
if !done {
- return cd, azure.NewAsyncOpIncompleteError("cdn.CustomDomainsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cd, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
+ cd, err = client.CreateResponder(cd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", cd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- cd, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -378,12 +358,11 @@ func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd C
// operation.
type CustomDomainsDeleteIfExistsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomDomainsDeleteIfExistsFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
+func (future *CustomDomainsDeleteIfExistsFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -391,34 +370,15 @@ func (future CustomDomainsDeleteIfExistsFuture) Result(client CustomDomainsClien
return
}
if !done {
- return cd, azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDeleteIfExistsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cd, err = client.DeleteIfExistsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteIfExistsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDeleteIfExistsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
+ cd, err = client.DeleteIfExistsResponder(cd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteIfExistsFuture", "Result", cd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteIfExistsFuture", "Result", resp, "Failure sending request")
- return
- }
- cd, err = client.DeleteIfExistsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteIfExistsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -736,12 +696,11 @@ type EndpointPropertiesUpdateParameters struct {
// EndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -749,34 +708,15 @@ func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint,
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.CreateResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -785,12 +725,11 @@ func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint,
// operation.
type EndpointsDeleteIfExistsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsDeleteIfExistsFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsDeleteIfExistsFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -798,47 +737,21 @@ func (future EndpointsDeleteIfExistsFuture) Result(client EndpointsClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsDeleteIfExistsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteIfExistsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteIfExistsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsDeleteIfExistsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteIfExistsFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteIfExistsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteIfExistsFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// EndpointsLoadContentFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsLoadContentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsLoadContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -846,35 +759,10 @@ func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar auto
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsLoadContentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.LoadContentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsLoadContentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.LoadContentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -882,12 +770,11 @@ func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar auto
// operation.
type EndpointsPurgeContentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -895,47 +782,21 @@ func (future EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsPurgeContentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeContentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsPurgeContentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeContentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// EndpointsStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -943,34 +804,15 @@ func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, e
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.StartResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -978,12 +820,11 @@ func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, e
// EndpointsStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -991,34 +832,15 @@ func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, er
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.StopResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1026,12 +848,11 @@ func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, er
// EndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1039,34 +860,15 @@ func (future EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint,
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.UpdateResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1317,12 +1119,11 @@ type OriginPropertiesParameters struct {
// OriginsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type OriginsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future OriginsCreateFuture) Result(client OriginsClient) (o Origin, err error) {
+func (future *OriginsCreateFuture) Result(client OriginsClient) (o Origin, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1330,34 +1131,15 @@ func (future OriginsCreateFuture) Result(client OriginsClient) (o Origin, err er
return
}
if !done {
- return o, azure.NewAsyncOpIncompleteError("cdn.OriginsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- o, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.OriginsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
+ o, err = client.CreateResponder(o.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.OriginsCreateFuture", "Result", o.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- o, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1366,12 +1148,11 @@ func (future OriginsCreateFuture) Result(client OriginsClient) (o Origin, err er
// operation.
type OriginsDeleteIfExistsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future OriginsDeleteIfExistsFuture) Result(client OriginsClient) (o Origin, err error) {
+func (future *OriginsDeleteIfExistsFuture) Result(client OriginsClient) (o Origin, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1379,34 +1160,15 @@ func (future OriginsDeleteIfExistsFuture) Result(client OriginsClient) (o Origin
return
}
if !done {
- return o, azure.NewAsyncOpIncompleteError("cdn.OriginsDeleteIfExistsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- o, err = client.DeleteIfExistsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsDeleteIfExistsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.OriginsDeleteIfExistsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
+ o, err = client.DeleteIfExistsResponder(o.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.OriginsDeleteIfExistsFuture", "Result", o.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsDeleteIfExistsFuture", "Result", resp, "Failure sending request")
- return
- }
- o, err = client.DeleteIfExistsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsDeleteIfExistsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1414,12 +1176,11 @@ func (future OriginsDeleteIfExistsFuture) Result(client OriginsClient) (o Origin
// OriginsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type OriginsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err error) {
+func (future *OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1427,34 +1188,15 @@ func (future OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err er
return
}
if !done {
- return o, azure.NewAsyncOpIncompleteError("cdn.OriginsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- o, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.OriginsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
+ o, err = client.UpdateResponder(o.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", o.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- o, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1662,12 +1404,11 @@ type ProfilePropertiesCreateParameters struct {
// ProfilesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err error) {
+func (future *ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1675,34 +1416,15 @@ func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("cdn.ProfilesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.CreateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1711,12 +1433,11 @@ func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err
// operation.
type ProfilesDeleteIfExistsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesDeleteIfExistsFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
+func (future *ProfilesDeleteIfExistsFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1724,47 +1445,21 @@ func (future ProfilesDeleteIfExistsFuture) Result(client ProfilesClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.ProfilesDeleteIfExistsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteIfExistsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteIfExistsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesDeleteIfExistsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteIfExistsFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteIfExistsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteIfExistsFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ProfilesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err error) {
+func (future *ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1772,34 +1467,15 @@ func (future ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("cdn.ProfilesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.UpdateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/origins.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/origins.go
index 666c2cc12..4ac2de8f9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/origins.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/origins.go
@@ -100,15 +100,17 @@ func (client OriginsClient) CreatePreparer(ctx context.Context, originName strin
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client OriginsClient) CreateSender(req *http.Request) (future OriginsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -173,15 +175,17 @@ func (client OriginsClient) DeleteIfExistsPreparer(ctx context.Context, originNa
// DeleteIfExistsSender sends the DeleteIfExists request. The method will close the
// http.Response Body if it receives an error.
func (client OriginsClient) DeleteIfExistsSender(req *http.Request) (future OriginsDeleteIfExistsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -389,15 +393,17 @@ func (client OriginsClient) UpdatePreparer(ctx context.Context, originName strin
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client OriginsClient) UpdateSender(req *http.Request) (future OriginsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/profiles.go
index e6d688205..921aa71e7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/profiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2015-06-01/cdn/profiles.go
@@ -97,15 +97,17 @@ func (client ProfilesClient) CreatePreparer(ctx context.Context, profileName str
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) CreateSender(req *http.Request) (future ProfilesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -166,15 +168,17 @@ func (client ProfilesClient) DeleteIfExistsPreparer(ctx context.Context, profile
// DeleteIfExistsSender sends the DeleteIfExists request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) DeleteIfExistsSender(req *http.Request) (future ProfilesDeleteIfExistsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -498,15 +502,17 @@ func (client ProfilesClient) UpdatePreparer(ctx context.Context, profileName str
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) UpdateSender(req *http.Request) (future ProfilesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/customdomains.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/customdomains.go
index b12a5b0bf..9cb0fe85c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/customdomains.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/customdomains.go
@@ -100,15 +100,17 @@ func (client CustomDomainsClient) CreatePreparer(ctx context.Context, customDoma
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client CustomDomainsClient) CreateSender(req *http.Request) (future CustomDomainsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -173,15 +175,17 @@ func (client CustomDomainsClient) DeleteIfExistsPreparer(ctx context.Context, cu
// DeleteIfExistsSender sends the DeleteIfExists request. The method will close the
// http.Response Body if it receives an error.
func (client CustomDomainsClient) DeleteIfExistsSender(req *http.Request) (future CustomDomainsDeleteIfExistsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/endpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/endpoints.go
index 6cbfadd53..793ad1abf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/endpoints.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/endpoints.go
@@ -99,15 +99,17 @@ func (client EndpointsClient) CreatePreparer(ctx context.Context, endpointName s
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) CreateSender(req *http.Request) (future EndpointsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client EndpointsClient) DeleteIfExistsPreparer(ctx context.Context, endpoi
// DeleteIfExistsSender sends the DeleteIfExists request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) DeleteIfExistsSender(req *http.Request) (future EndpointsDeleteIfExistsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -385,15 +389,17 @@ func (client EndpointsClient) LoadContentPreparer(ctx context.Context, endpointN
// LoadContentSender sends the LoadContent request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) LoadContentSender(req *http.Request) (future EndpointsLoadContentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -464,15 +470,17 @@ func (client EndpointsClient) PurgeContentPreparer(ctx context.Context, endpoint
// PurgeContentSender sends the PurgeContent request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) PurgeContentSender(req *http.Request) (future EndpointsPurgeContentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -534,15 +542,17 @@ func (client EndpointsClient) StartPreparer(ctx context.Context, endpointName st
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) StartSender(req *http.Request) (future EndpointsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -605,15 +615,17 @@ func (client EndpointsClient) StopPreparer(ctx context.Context, endpointName str
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) StopSender(req *http.Request) (future EndpointsStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -679,15 +691,17 @@ func (client EndpointsClient) UpdatePreparer(ctx context.Context, endpointName s
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) UpdateSender(req *http.Request) (future EndpointsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/models.go
index 605afeff4..e95e24e28 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/models.go
@@ -333,12 +333,11 @@ type CustomDomainPropertiesParameters struct {
// CustomDomainsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CustomDomainsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
+func (future *CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -346,34 +345,15 @@ func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd C
return
}
if !done {
- return cd, azure.NewAsyncOpIncompleteError("cdn.CustomDomainsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cd, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
+ cd, err = client.CreateResponder(cd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", cd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- cd, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -382,12 +362,11 @@ func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd C
// operation.
type CustomDomainsDeleteIfExistsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomDomainsDeleteIfExistsFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
+func (future *CustomDomainsDeleteIfExistsFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -395,34 +374,15 @@ func (future CustomDomainsDeleteIfExistsFuture) Result(client CustomDomainsClien
return
}
if !done {
- return cd, azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDeleteIfExistsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cd, err = client.DeleteIfExistsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteIfExistsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDeleteIfExistsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
+ cd, err = client.DeleteIfExistsResponder(cd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteIfExistsFuture", "Result", cd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteIfExistsFuture", "Result", resp, "Failure sending request")
- return
- }
- cd, err = client.DeleteIfExistsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteIfExistsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -740,12 +700,11 @@ type EndpointPropertiesUpdateParameters struct {
// EndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -753,34 +712,15 @@ func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint,
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.CreateResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -789,12 +729,11 @@ func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint,
// operation.
type EndpointsDeleteIfExistsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsDeleteIfExistsFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsDeleteIfExistsFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -802,47 +741,21 @@ func (future EndpointsDeleteIfExistsFuture) Result(client EndpointsClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsDeleteIfExistsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteIfExistsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteIfExistsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsDeleteIfExistsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteIfExistsFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteIfExistsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteIfExistsFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// EndpointsLoadContentFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsLoadContentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsLoadContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -850,35 +763,10 @@ func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar auto
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsLoadContentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.LoadContentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsLoadContentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.LoadContentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -886,12 +774,11 @@ func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar auto
// operation.
type EndpointsPurgeContentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -899,47 +786,21 @@ func (future EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsPurgeContentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeContentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsPurgeContentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeContentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// EndpointsStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -947,34 +808,15 @@ func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, e
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.StartResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -982,12 +824,11 @@ func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, e
// EndpointsStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -995,34 +836,15 @@ func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, er
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.StopResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1030,12 +852,11 @@ func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, er
// EndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1043,34 +864,15 @@ func (future EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint,
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.UpdateResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1321,12 +1123,11 @@ type OriginPropertiesParameters struct {
// OriginsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type OriginsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future OriginsCreateFuture) Result(client OriginsClient) (o Origin, err error) {
+func (future *OriginsCreateFuture) Result(client OriginsClient) (o Origin, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1334,34 +1135,15 @@ func (future OriginsCreateFuture) Result(client OriginsClient) (o Origin, err er
return
}
if !done {
- return o, azure.NewAsyncOpIncompleteError("cdn.OriginsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- o, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.OriginsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
+ o, err = client.CreateResponder(o.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.OriginsCreateFuture", "Result", o.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- o, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1370,12 +1152,11 @@ func (future OriginsCreateFuture) Result(client OriginsClient) (o Origin, err er
// operation.
type OriginsDeleteIfExistsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future OriginsDeleteIfExistsFuture) Result(client OriginsClient) (o Origin, err error) {
+func (future *OriginsDeleteIfExistsFuture) Result(client OriginsClient) (o Origin, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1383,34 +1164,15 @@ func (future OriginsDeleteIfExistsFuture) Result(client OriginsClient) (o Origin
return
}
if !done {
- return o, azure.NewAsyncOpIncompleteError("cdn.OriginsDeleteIfExistsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- o, err = client.DeleteIfExistsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsDeleteIfExistsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.OriginsDeleteIfExistsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
+ o, err = client.DeleteIfExistsResponder(o.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.OriginsDeleteIfExistsFuture", "Result", o.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsDeleteIfExistsFuture", "Result", resp, "Failure sending request")
- return
- }
- o, err = client.DeleteIfExistsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsDeleteIfExistsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1418,12 +1180,11 @@ func (future OriginsDeleteIfExistsFuture) Result(client OriginsClient) (o Origin
// OriginsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type OriginsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err error) {
+func (future *OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1431,34 +1192,15 @@ func (future OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err er
return
}
if !done {
- return o, azure.NewAsyncOpIncompleteError("cdn.OriginsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- o, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.OriginsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
+ o, err = client.UpdateResponder(o.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", o.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- o, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1631,12 +1373,11 @@ type ProfileProperties struct {
// ProfilesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err error) {
+func (future *ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1644,34 +1385,15 @@ func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("cdn.ProfilesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.CreateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1680,12 +1402,11 @@ func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err
// operation.
type ProfilesDeleteIfExistsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesDeleteIfExistsFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
+func (future *ProfilesDeleteIfExistsFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1693,47 +1414,21 @@ func (future ProfilesDeleteIfExistsFuture) Result(client ProfilesClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.ProfilesDeleteIfExistsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteIfExistsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteIfExistsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesDeleteIfExistsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteIfExistsFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteIfExistsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteIfExistsFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ProfilesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err error) {
+func (future *ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1741,34 +1436,15 @@ func (future ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("cdn.ProfilesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.UpdateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/origins.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/origins.go
index 45434cd57..831d3e268 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/origins.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/origins.go
@@ -100,15 +100,17 @@ func (client OriginsClient) CreatePreparer(ctx context.Context, originName strin
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client OriginsClient) CreateSender(req *http.Request) (future OriginsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -173,15 +175,17 @@ func (client OriginsClient) DeleteIfExistsPreparer(ctx context.Context, originNa
// DeleteIfExistsSender sends the DeleteIfExists request. The method will close the
// http.Response Body if it receives an error.
func (client OriginsClient) DeleteIfExistsSender(req *http.Request) (future OriginsDeleteIfExistsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -389,15 +393,17 @@ func (client OriginsClient) UpdatePreparer(ctx context.Context, originName strin
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client OriginsClient) UpdateSender(req *http.Request) (future OriginsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/profiles.go
index 49465e156..60463e128 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/profiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-04-02/cdn/profiles.go
@@ -96,15 +96,17 @@ func (client ProfilesClient) CreatePreparer(ctx context.Context, profileName str
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) CreateSender(req *http.Request) (future ProfilesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -165,15 +167,17 @@ func (client ProfilesClient) DeleteIfExistsPreparer(ctx context.Context, profile
// DeleteIfExistsSender sends the DeleteIfExists request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) DeleteIfExistsSender(req *http.Request) (future ProfilesDeleteIfExistsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -497,15 +501,17 @@ func (client ProfilesClient) UpdatePreparer(ctx context.Context, profileName str
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) UpdateSender(req *http.Request) (future ProfilesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/customdomains.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/customdomains.go
index fa7c92bbd..04f935799 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/customdomains.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/customdomains.go
@@ -103,15 +103,17 @@ func (client CustomDomainsClient) CreatePreparer(ctx context.Context, resourceGr
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client CustomDomainsClient) CreateSender(req *http.Request) (future CustomDomainsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -184,15 +186,17 @@ func (client CustomDomainsClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client CustomDomainsClient) DeleteSender(req *http.Request) (future CustomDomainsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/endpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/endpoints.go
index b48e0401e..9f812d7ba 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/endpoints.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/endpoints.go
@@ -102,15 +102,17 @@ func (client EndpointsClient) CreatePreparer(ctx context.Context, resourceGroupN
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) CreateSender(req *http.Request) (future EndpointsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -182,15 +184,17 @@ func (client EndpointsClient) DeletePreparer(ctx context.Context, resourceGroupN
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) DeleteSender(req *http.Request) (future EndpointsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -552,15 +556,17 @@ func (client EndpointsClient) LoadContentPreparer(ctx context.Context, resourceG
// LoadContentSender sends the LoadContent request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) LoadContentSender(req *http.Request) (future EndpointsLoadContentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -637,15 +643,17 @@ func (client EndpointsClient) PurgeContentPreparer(ctx context.Context, resource
// PurgeContentSender sends the PurgeContent request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) PurgeContentSender(req *http.Request) (future EndpointsPurgeContentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -715,15 +723,17 @@ func (client EndpointsClient) StartPreparer(ctx context.Context, resourceGroupNa
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) StartSender(req *http.Request) (future EndpointsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -794,15 +804,17 @@ func (client EndpointsClient) StopPreparer(ctx context.Context, resourceGroupNam
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) StopSender(req *http.Request) (future EndpointsStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -878,15 +890,17 @@ func (client EndpointsClient) UpdatePreparer(ctx context.Context, resourceGroupN
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) UpdateSender(req *http.Request) (future EndpointsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/models.go
index f04fd8d57..e70448f14 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/models.go
@@ -511,12 +511,11 @@ type CustomDomainPropertiesParameters struct {
// CustomDomainsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CustomDomainsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
+func (future *CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -524,34 +523,15 @@ func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd C
return
}
if !done {
- return cd, azure.NewAsyncOpIncompleteError("cdn.CustomDomainsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cd, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
+ cd, err = client.CreateResponder(cd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", cd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- cd, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -559,12 +539,11 @@ func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd C
// CustomDomainsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CustomDomainsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomDomainsDeleteFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
+func (future *CustomDomainsDeleteFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -572,34 +551,15 @@ func (future CustomDomainsDeleteFuture) Result(client CustomDomainsClient) (cd C
return
}
if !done {
- return cd, azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cd, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
+ cd, err = client.DeleteResponder(cd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", cd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- cd, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1153,12 +1113,11 @@ type EndpointPropertiesUpdateParameters struct {
// EndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1166,34 +1125,15 @@ func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint,
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.CreateResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1201,12 +1141,11 @@ func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint,
// EndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsDeleteFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsDeleteFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1214,47 +1153,21 @@ func (future EndpointsDeleteFuture) Result(client EndpointsClient) (ar autorest.
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// EndpointsLoadContentFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsLoadContentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsLoadContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1262,35 +1175,10 @@ func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar auto
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsLoadContentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.LoadContentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsLoadContentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.LoadContentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1298,12 +1186,11 @@ func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar auto
// operation.
type EndpointsPurgeContentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1311,47 +1198,21 @@ func (future EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsPurgeContentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeContentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsPurgeContentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeContentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// EndpointsStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1359,34 +1220,15 @@ func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, e
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.StartResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1394,12 +1236,11 @@ func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, e
// EndpointsStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1407,34 +1248,15 @@ func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, er
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.StopResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1442,12 +1264,11 @@ func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, er
// EndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1455,34 +1276,15 @@ func (future EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint,
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.UpdateResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1936,12 +1738,11 @@ type OriginPropertiesParameters struct {
// OriginsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type OriginsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err error) {
+func (future *OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1949,34 +1750,15 @@ func (future OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err er
return
}
if !done {
- return o, azure.NewAsyncOpIncompleteError("cdn.OriginsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- o, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.OriginsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
+ o, err = client.UpdateResponder(o.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", o.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- o, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2258,12 +2040,11 @@ type ProfileProperties struct {
// ProfilesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err error) {
+func (future *ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2271,34 +2052,15 @@ func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("cdn.ProfilesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.CreateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2306,12 +2068,11 @@ func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err
// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
+func (future *ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2319,47 +2080,21 @@ func (future ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.ProfilesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ProfilesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err error) {
+func (future *ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2367,34 +2102,15 @@ func (future ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("cdn.ProfilesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.UpdateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/origins.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/origins.go
index 0ab2e166a..506c477ac 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/origins.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/origins.go
@@ -284,15 +284,17 @@ func (client OriginsClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client OriginsClient) UpdateSender(req *http.Request) (future OriginsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/profiles.go
index 4e62f0f02..5b2e1adc1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/profiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2016-10-02/cdn/profiles.go
@@ -98,15 +98,17 @@ func (client ProfilesClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) CreateSender(req *http.Request) (future ProfilesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -779,15 +783,17 @@ func (client ProfilesClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) UpdateSender(req *http.Request) (future ProfilesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/customdomains.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/customdomains.go
index 2ac10acc2..945381d7e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/customdomains.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/customdomains.go
@@ -103,15 +103,17 @@ func (client CustomDomainsClient) CreatePreparer(ctx context.Context, resourceGr
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client CustomDomainsClient) CreateSender(req *http.Request) (future CustomDomainsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -184,15 +186,17 @@ func (client CustomDomainsClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client CustomDomainsClient) DeleteSender(req *http.Request) (future CustomDomainsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/endpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/endpoints.go
index d47ac81a7..5bf5c05f2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/endpoints.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/endpoints.go
@@ -102,15 +102,17 @@ func (client EndpointsClient) CreatePreparer(ctx context.Context, resourceGroupN
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) CreateSender(req *http.Request) (future EndpointsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -182,15 +184,17 @@ func (client EndpointsClient) DeletePreparer(ctx context.Context, resourceGroupN
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) DeleteSender(req *http.Request) (future EndpointsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -552,15 +556,17 @@ func (client EndpointsClient) LoadContentPreparer(ctx context.Context, resourceG
// LoadContentSender sends the LoadContent request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) LoadContentSender(req *http.Request) (future EndpointsLoadContentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -637,15 +643,17 @@ func (client EndpointsClient) PurgeContentPreparer(ctx context.Context, resource
// PurgeContentSender sends the PurgeContent request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) PurgeContentSender(req *http.Request) (future EndpointsPurgeContentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -715,15 +723,17 @@ func (client EndpointsClient) StartPreparer(ctx context.Context, resourceGroupNa
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) StartSender(req *http.Request) (future EndpointsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -794,15 +804,17 @@ func (client EndpointsClient) StopPreparer(ctx context.Context, resourceGroupNam
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) StopSender(req *http.Request) (future EndpointsStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -878,15 +890,17 @@ func (client EndpointsClient) UpdatePreparer(ctx context.Context, resourceGroupN
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) UpdateSender(req *http.Request) (future EndpointsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/models.go
index 6c98c918c..9a1c731dc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/models.go
@@ -517,12 +517,11 @@ type CustomDomainPropertiesParameters struct {
// CustomDomainsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CustomDomainsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
+func (future *CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -530,34 +529,15 @@ func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd C
return
}
if !done {
- return cd, azure.NewAsyncOpIncompleteError("cdn.CustomDomainsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cd, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
+ cd, err = client.CreateResponder(cd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", cd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- cd, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -565,12 +545,11 @@ func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd C
// CustomDomainsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CustomDomainsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomDomainsDeleteFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
+func (future *CustomDomainsDeleteFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -578,34 +557,15 @@ func (future CustomDomainsDeleteFuture) Result(client CustomDomainsClient) (cd C
return
}
if !done {
- return cd, azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cd, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
+ cd, err = client.DeleteResponder(cd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", cd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- cd, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1134,12 +1094,11 @@ type EndpointPropertiesUpdateParameters struct {
// EndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1147,34 +1106,15 @@ func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint,
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.CreateResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1182,12 +1122,11 @@ func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint,
// EndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsDeleteFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsDeleteFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1195,47 +1134,21 @@ func (future EndpointsDeleteFuture) Result(client EndpointsClient) (ar autorest.
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// EndpointsLoadContentFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsLoadContentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsLoadContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1243,35 +1156,10 @@ func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar auto
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsLoadContentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.LoadContentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsLoadContentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.LoadContentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1279,12 +1167,11 @@ func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar auto
// operation.
type EndpointsPurgeContentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1292,47 +1179,21 @@ func (future EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsPurgeContentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeContentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsPurgeContentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeContentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// EndpointsStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1340,34 +1201,15 @@ func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, e
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.StartResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1375,12 +1217,11 @@ func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, e
// EndpointsStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1388,34 +1229,15 @@ func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, er
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.StopResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1423,12 +1245,11 @@ func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, er
// EndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1436,34 +1257,15 @@ func (future EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint,
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.UpdateResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1917,12 +1719,11 @@ type OriginPropertiesParameters struct {
// OriginsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type OriginsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err error) {
+func (future *OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1930,34 +1731,15 @@ func (future OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err er
return
}
if !done {
- return o, azure.NewAsyncOpIncompleteError("cdn.OriginsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- o, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.OriginsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
+ o, err = client.UpdateResponder(o.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", o.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- o, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2238,12 +2020,11 @@ type ProfileProperties struct {
// ProfilesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err error) {
+func (future *ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2251,34 +2032,15 @@ func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("cdn.ProfilesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.CreateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2286,12 +2048,11 @@ func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err
// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
+func (future *ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2299,47 +2060,21 @@ func (future ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.ProfilesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ProfilesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err error) {
+func (future *ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2347,34 +2082,15 @@ func (future ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("cdn.ProfilesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.UpdateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/origins.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/origins.go
index 4cc1fd9c0..ee373054a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/origins.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/origins.go
@@ -284,15 +284,17 @@ func (client OriginsClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client OriginsClient) UpdateSender(req *http.Request) (future OriginsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/profiles.go
index 6bd158764..b81e2f858 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/profiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn/profiles.go
@@ -98,15 +98,17 @@ func (client ProfilesClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) CreateSender(req *http.Request) (future ProfilesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -779,15 +783,17 @@ func (client ProfilesClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) UpdateSender(req *http.Request) (future ProfilesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/customdomains.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/customdomains.go
index a359666a2..54ca91f3e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/customdomains.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/customdomains.go
@@ -103,15 +103,17 @@ func (client CustomDomainsClient) CreatePreparer(ctx context.Context, resourceGr
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client CustomDomainsClient) CreateSender(req *http.Request) (future CustomDomainsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -184,15 +186,17 @@ func (client CustomDomainsClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client CustomDomainsClient) DeleteSender(req *http.Request) (future CustomDomainsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/endpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/endpoints.go
index 31c93c211..7e1586e57 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/endpoints.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/endpoints.go
@@ -102,15 +102,17 @@ func (client EndpointsClient) CreatePreparer(ctx context.Context, resourceGroupN
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) CreateSender(req *http.Request) (future EndpointsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -182,15 +184,17 @@ func (client EndpointsClient) DeletePreparer(ctx context.Context, resourceGroupN
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) DeleteSender(req *http.Request) (future EndpointsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -552,15 +556,17 @@ func (client EndpointsClient) LoadContentPreparer(ctx context.Context, resourceG
// LoadContentSender sends the LoadContent request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) LoadContentSender(req *http.Request) (future EndpointsLoadContentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -637,15 +643,17 @@ func (client EndpointsClient) PurgeContentPreparer(ctx context.Context, resource
// PurgeContentSender sends the PurgeContent request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) PurgeContentSender(req *http.Request) (future EndpointsPurgeContentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -715,15 +723,17 @@ func (client EndpointsClient) StartPreparer(ctx context.Context, resourceGroupNa
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) StartSender(req *http.Request) (future EndpointsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -794,15 +804,17 @@ func (client EndpointsClient) StopPreparer(ctx context.Context, resourceGroupNam
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) StopSender(req *http.Request) (future EndpointsStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -878,15 +890,17 @@ func (client EndpointsClient) UpdatePreparer(ctx context.Context, resourceGroupN
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client EndpointsClient) UpdateSender(req *http.Request) (future EndpointsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/models.go
index c5094e02f..e9420e933 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/models.go
@@ -592,12 +592,11 @@ type CustomDomainPropertiesParameters struct {
// CustomDomainsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CustomDomainsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
+func (future *CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -605,34 +604,15 @@ func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd C
return
}
if !done {
- return cd, azure.NewAsyncOpIncompleteError("cdn.CustomDomainsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cd, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
+ cd, err = client.CreateResponder(cd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", cd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- cd, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -640,12 +620,11 @@ func (future CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd C
// CustomDomainsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CustomDomainsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomDomainsDeleteFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
+func (future *CustomDomainsDeleteFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -653,34 +632,15 @@ func (future CustomDomainsDeleteFuture) Result(client CustomDomainsClient) (cd C
return
}
if !done {
- return cd, azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cd, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
+ cd, err = client.DeleteResponder(cd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", cd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- cd, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1548,12 +1508,11 @@ type EndpointPropertiesUpdateParametersDeliveryPolicy struct {
// EndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1561,34 +1520,15 @@ func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint,
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.CreateResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1596,12 +1536,11 @@ func (future EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint,
// EndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsDeleteFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsDeleteFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1609,47 +1548,21 @@ func (future EndpointsDeleteFuture) Result(client EndpointsClient) (ar autorest.
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// EndpointsLoadContentFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsLoadContentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsLoadContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1657,35 +1570,10 @@ func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar auto
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsLoadContentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.LoadContentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsLoadContentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.LoadContentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1693,12 +1581,11 @@ func (future EndpointsLoadContentFuture) Result(client EndpointsClient) (ar auto
// operation.
type EndpointsPurgeContentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
+func (future *EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1706,47 +1593,21 @@ func (future EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.EndpointsPurgeContentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeContentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsPurgeContentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeContentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// EndpointsStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1754,34 +1615,15 @@ func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, e
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.StartResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1789,12 +1631,11 @@ func (future EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, e
// EndpointsStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1802,34 +1643,15 @@ func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, er
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.StopResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1837,12 +1659,11 @@ func (future EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, er
// EndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EndpointsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
+func (future *EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1850,34 +1671,15 @@ func (future EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint,
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("cdn.EndpointsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.EndpointsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.UpdateResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2331,12 +2133,11 @@ type OriginPropertiesParameters struct {
// OriginsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type OriginsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err error) {
+func (future *OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2344,34 +2145,15 @@ func (future OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err er
return
}
if !done {
- return o, azure.NewAsyncOpIncompleteError("cdn.OriginsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- o, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.OriginsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
+ o, err = client.UpdateResponder(o.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", o.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- o, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2652,12 +2434,11 @@ type ProfileProperties struct {
// ProfilesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err error) {
+func (future *ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2665,34 +2446,15 @@ func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("cdn.ProfilesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.CreateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2700,12 +2462,11 @@ func (future ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err
// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
+func (future *ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2713,47 +2474,21 @@ func (future ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("cdn.ProfilesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ProfilesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err error) {
+func (future *ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2761,34 +2496,15 @@ func (future ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("cdn.ProfilesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("cdn.ProfilesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.UpdateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/origins.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/origins.go
index 9be742946..cd5121b4f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/origins.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/origins.go
@@ -284,15 +284,17 @@ func (client OriginsClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client OriginsClient) UpdateSender(req *http.Request) (future OriginsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/profiles.go
index 63a00ab70..dc17f0226 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/profiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/profiles.go
@@ -98,15 +98,17 @@ func (client ProfilesClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) CreateSender(req *http.Request) (future ProfilesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -779,15 +783,17 @@ func (client ProfilesClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) UpdateSender(req *http.Request) (future ProfilesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/classic/management/networksecuritygroup/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/classic/management/networksecuritygroup/client.go
index b402079a5..6c7f9ce9c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/classic/management/networksecuritygroup/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/classic/management/networksecuritygroup/client.go
@@ -109,15 +109,20 @@ func (sg SecurityGroupClient) GetNetworkSecurityGroup(name string) (SecurityGrou
//
// https://msdn.microsoft.com/en-us/library/azure/dn913815.aspx
func (sg SecurityGroupClient) ListNetworkSecurityGroups() (SecurityGroupList, error) {
- var securityGroups SecurityGroupList
+ // the list of NetworkSecurityGroup items is wrapped in a NetworkSecurityGroups
+ // element so we need an outer struct representing this element.
+ type NetworkSecurityGroups struct {
+ SecurityGroupList SecurityGroupList `xml:"http://schemas.microsoft.com/windowsazure NetworkSecurityGroup"`
+ }
+ var securityGroups NetworkSecurityGroups
response, err := sg.client.SendAzureGetRequest(listSecurityGroupsURL)
if err != nil {
- return securityGroups, err
+ return securityGroups.SecurityGroupList, err
}
err = xml.Unmarshal(response, &securityGroups)
- return securityGroups, err
+ return securityGroups.SecurityGroupList, err
}
// AddNetworkSecurityToSubnet associates the network security group with
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/computervision/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/computervision/client.go
index 909ab3ae2..5c695f7e7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/computervision/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/computervision/client.go
@@ -69,10 +69,10 @@ func NewWithoutDefaults(azureRegion AzureRegions) BaseClient {
// details - a string indicating which domain-specific details to return. Multiple values should be
// comma-separated. Valid visual feature types include:Celebrities - identifies celebrities if detected in the
// image.
-// language - a string indicating which language to return. The service will return recognition results in
-// specified language. If this parameter is not specified, the default value is "en".Supported
-// languages:en - English, Default.zh - Simplified Chinese.
-func (client BaseClient) AnalyzeImage(ctx context.Context, imageURL ImageURL, visualFeatures []VisualFeatureTypes, details []Details, language Language1) (result ImageAnalysis, err error) {
+// language - the desired language for output generation. If this parameter is not specified, the default value
+// is "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh - Simplified
+// Chinese.
+func (client BaseClient) AnalyzeImage(ctx context.Context, imageURL ImageURL, visualFeatures []VisualFeatureTypes, details []Details, language string) (result ImageAnalysis, 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 {
@@ -101,7 +101,7 @@ func (client BaseClient) AnalyzeImage(ctx context.Context, imageURL ImageURL, vi
}
// AnalyzeImagePreparer prepares the AnalyzeImage request.
-func (client BaseClient) AnalyzeImagePreparer(ctx context.Context, imageURL ImageURL, visualFeatures []VisualFeatureTypes, details []Details, language Language1) (*http.Request, error) {
+func (client BaseClient) AnalyzeImagePreparer(ctx context.Context, imageURL ImageURL, visualFeatures []VisualFeatureTypes, details []Details, language string) (*http.Request, error) {
urlParameters := map[string]interface{}{
"AzureRegion": client.AzureRegion,
}
@@ -307,9 +307,9 @@ func (client BaseClient) AnalyzeImageByDomainInStreamResponder(resp *http.Respon
// details - a string indicating which domain-specific details to return. Multiple values should be
// comma-separated. Valid visual feature types include:Celebrities - identifies celebrities if detected in the
// image.
-// language - a string indicating which language to return. The service will return recognition results in
-// specified language. If this parameter is not specified, the default value is "en".Supported
-// languages:en - English, Default.zh - Simplified Chinese.
+// language - the desired language for output generation. If this parameter is not specified, the default value
+// is "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh - Simplified
+// Chinese.
func (client BaseClient) AnalyzeImageInStream(ctx context.Context, imageParameter io.ReadCloser, visualFeatures []VisualFeatureTypes, details string, language string) (result ImageAnalysis, err error) {
req, err := client.AnalyzeImageInStreamPreparer(ctx, imageParameter, visualFeatures, details, language)
if err != nil {
@@ -390,14 +390,17 @@ func (client BaseClient) AnalyzeImageInStreamResponder(resp *http.Response) (res
// Parameters:
// imageURL - a JSON document with a URL pointing to the image that is to be analyzed.
// maxCandidates - maximum number of candidate descriptions to be returned. The default is 1.
-func (client BaseClient) DescribeImage(ctx context.Context, imageURL ImageURL, maxCandidates string) (result ImageDescription, err error) {
+// language - the desired language for output generation. If this parameter is not specified, the default value
+// is "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh - Simplified
+// Chinese.
+func (client BaseClient) DescribeImage(ctx context.Context, imageURL ImageURL, maxCandidates string, language string) (result ImageDescription, 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.NewError("computervision.BaseClient", "DescribeImage", err.Error())
}
- req, err := client.DescribeImagePreparer(ctx, imageURL, maxCandidates)
+ req, err := client.DescribeImagePreparer(ctx, imageURL, maxCandidates, language)
if err != nil {
err = autorest.NewErrorWithError(err, "computervision.BaseClient", "DescribeImage", nil, "Failure preparing request")
return
@@ -419,7 +422,7 @@ func (client BaseClient) DescribeImage(ctx context.Context, imageURL ImageURL, m
}
// DescribeImagePreparer prepares the DescribeImage request.
-func (client BaseClient) DescribeImagePreparer(ctx context.Context, imageURL ImageURL, maxCandidates string) (*http.Request, error) {
+func (client BaseClient) DescribeImagePreparer(ctx context.Context, imageURL ImageURL, maxCandidates string, language string) (*http.Request, error) {
urlParameters := map[string]interface{}{
"AzureRegion": client.AzureRegion,
}
@@ -430,6 +433,11 @@ func (client BaseClient) DescribeImagePreparer(ctx context.Context, imageURL Ima
} else {
queryParameters["maxCandidates"] = autorest.Encode("query", "1")
}
+ if len(string(language)) > 0 {
+ queryParameters["language"] = autorest.Encode("query", language)
+ } else {
+ queryParameters["language"] = autorest.Encode("query", "en")
+ }
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
@@ -470,8 +478,11 @@ func (client BaseClient) DescribeImageResponder(resp *http.Response) (result Ima
// Parameters:
// imageParameter - an image stream.
// maxCandidates - maximum number of candidate descriptions to be returned. The default is 1.
-func (client BaseClient) DescribeImageInStream(ctx context.Context, imageParameter io.ReadCloser, maxCandidates string) (result ImageDescription, err error) {
- req, err := client.DescribeImageInStreamPreparer(ctx, imageParameter, maxCandidates)
+// language - the desired language for output generation. If this parameter is not specified, the default value
+// is "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh - Simplified
+// Chinese.
+func (client BaseClient) DescribeImageInStream(ctx context.Context, imageParameter io.ReadCloser, maxCandidates string, language string) (result ImageDescription, err error) {
+ req, err := client.DescribeImageInStreamPreparer(ctx, imageParameter, maxCandidates, language)
if err != nil {
err = autorest.NewErrorWithError(err, "computervision.BaseClient", "DescribeImageInStream", nil, "Failure preparing request")
return
@@ -493,7 +504,7 @@ func (client BaseClient) DescribeImageInStream(ctx context.Context, imageParamet
}
// DescribeImageInStreamPreparer prepares the DescribeImageInStream request.
-func (client BaseClient) DescribeImageInStreamPreparer(ctx context.Context, imageParameter io.ReadCloser, maxCandidates string) (*http.Request, error) {
+func (client BaseClient) DescribeImageInStreamPreparer(ctx context.Context, imageParameter io.ReadCloser, maxCandidates string, language string) (*http.Request, error) {
urlParameters := map[string]interface{}{
"AzureRegion": client.AzureRegion,
}
@@ -504,6 +515,11 @@ func (client BaseClient) DescribeImageInStreamPreparer(ctx context.Context, imag
} else {
queryParameters["maxCandidates"] = autorest.Encode("query", "1")
}
+ if len(string(language)) > 0 {
+ queryParameters["language"] = autorest.Encode("query", language)
+ } else {
+ queryParameters["language"] = autorest.Encode("query", "en")
+ }
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/octet-stream"),
@@ -996,12 +1012,12 @@ func (client BaseClient) RecognizePrintedTextInStreamResponder(resp *http.Respon
}
// RecognizeText recognize Text operation. When you use the Recognize Text interface, the response contains a field
-// called “Operation-Location”. The “Operation-Location” field contains the URL that you must use for your Get
+// called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get
// Handwritten Text Operation Result operation.
// Parameters:
// imageURL - a JSON document with a URL pointing to the image that is to be analyzed.
-// detectHandwriting - if “true” is specified, handwriting recognition is performed. If this parameter is set
-// to “false” or is not specified, printed text recognition is performed.
+// detectHandwriting - if 'true' is specified, handwriting recognition is performed. If this parameter is set
+// to 'false' or is not specified, printed text recognition is performed.
func (client BaseClient) RecognizeText(ctx context.Context, imageURL ImageURL, detectHandwriting *bool) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: imageURL,
@@ -1073,12 +1089,12 @@ func (client BaseClient) RecognizeTextResponder(resp *http.Response) (result aut
}
// RecognizeTextInStream recognize Text operation. When you use the Recognize Text interface, the response contains a
-// field called “Operation-Location”. The “Operation-Location” field contains the URL that you must use for your Get
+// field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get
// Handwritten Text Operation Result operation.
// Parameters:
// imageParameter - an image stream.
-// detectHandwriting - if “true” is specified, handwriting recognition is performed. If this parameter is set
-// to “false” or is not specified, printed text recognition is performed.
+// detectHandwriting - if 'true' is specified, handwriting recognition is performed. If this parameter is set
+// to 'false' or is not specified, printed text recognition is performed.
func (client BaseClient) RecognizeTextInStream(ctx context.Context, imageParameter io.ReadCloser, detectHandwriting *bool) (result autorest.Response, err error) {
req, err := client.RecognizeTextInStreamPreparer(ctx, imageParameter, detectHandwriting)
if err != nil {
@@ -1146,18 +1162,21 @@ func (client BaseClient) RecognizeTextInStreamResponder(resp *http.Response) (re
// TagImage this operation generates a list of words, or tags, that are relevant to the content of the supplied image.
// The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike
// categories, tags are not organized according to a hierarchical classification system, but correspond to image
-// content. Tags may contain hints to avoid ambiguity or provide context, for example the tag “cello” may be
-// accompanied by the hint “musical instrument”. All tags are in English.
+// content. Tags may contain hints to avoid ambiguity or provide context, for example the tag 'cello' may be
+// accompanied by the hint 'musical instrument'. All tags are in English.
// Parameters:
// imageURL - a JSON document with a URL pointing to the image that is to be analyzed.
-func (client BaseClient) TagImage(ctx context.Context, imageURL ImageURL) (result TagResult, err error) {
+// language - the desired language for output generation. If this parameter is not specified, the default value
+// is "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh - Simplified
+// Chinese.
+func (client BaseClient) TagImage(ctx context.Context, imageURL ImageURL, language string) (result TagResult, 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.NewError("computervision.BaseClient", "TagImage", err.Error())
}
- req, err := client.TagImagePreparer(ctx, imageURL)
+ req, err := client.TagImagePreparer(ctx, imageURL, language)
if err != nil {
err = autorest.NewErrorWithError(err, "computervision.BaseClient", "TagImage", nil, "Failure preparing request")
return
@@ -1179,17 +1198,25 @@ func (client BaseClient) TagImage(ctx context.Context, imageURL ImageURL) (resul
}
// TagImagePreparer prepares the TagImage request.
-func (client BaseClient) TagImagePreparer(ctx context.Context, imageURL ImageURL) (*http.Request, error) {
+func (client BaseClient) TagImagePreparer(ctx context.Context, imageURL ImageURL, language string) (*http.Request, error) {
urlParameters := map[string]interface{}{
"AzureRegion": client.AzureRegion,
}
+ queryParameters := map[string]interface{}{}
+ if len(string(language)) > 0 {
+ queryParameters["language"] = autorest.Encode("query", language)
+ } else {
+ queryParameters["language"] = autorest.Encode("query", "en")
+ }
+
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/vision/v1.0", urlParameters),
autorest.WithPath("/tag"),
- autorest.WithJSON(imageURL))
+ autorest.WithJSON(imageURL),
+ autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -1216,8 +1243,8 @@ func (client BaseClient) TagImageResponder(resp *http.Response) (result TagResul
// TagImageInStream this operation generates a list of words, or tags, that are relevant to the content of the supplied
// image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images.
// Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image
-// content. Tags may contain hints to avoid ambiguity or provide context, for example the tag “cello” may be
-// accompanied by the hint “musical instrument”. All tags are in English.
+// content. Tags may contain hints to avoid ambiguity or provide context, for example the tag 'cello' may be
+// accompanied by the hint 'musical instrument'. All tags are in English.
// Parameters:
// imageParameter - an image stream.
func (client BaseClient) TagImageInStream(ctx context.Context, imageParameter io.ReadCloser) (result TagResult, err error) {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/computervision/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/computervision/models.go
index 31ec4091b..d342a5268 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/computervision/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/computervision/models.go
@@ -140,84 +140,69 @@ func PossibleGenderValues() []Gender {
return []Gender{Female, Male}
}
-// Language1 enumerates the values for language 1.
-type Language1 string
-
-const (
- // En ...
- En Language1 = "en"
- // Zh ...
- Zh Language1 = "zh"
-)
-
-// PossibleLanguage1Values returns an array of possible values for the Language1 const type.
-func PossibleLanguage1Values() []Language1 {
- return []Language1{En, Zh}
-}
-
// OcrLanguages enumerates the values for ocr languages.
type OcrLanguages string
const (
- // OcrLanguagesAr ...
- OcrLanguagesAr OcrLanguages = "ar"
- // OcrLanguagesCs ...
- OcrLanguagesCs OcrLanguages = "cs"
- // OcrLanguagesDa ...
- OcrLanguagesDa OcrLanguages = "da"
- // OcrLanguagesDe ...
- OcrLanguagesDe OcrLanguages = "de"
- // OcrLanguagesEl ...
- OcrLanguagesEl OcrLanguages = "el"
- // OcrLanguagesEn ...
- OcrLanguagesEn OcrLanguages = "en"
- // OcrLanguagesEs ...
- OcrLanguagesEs OcrLanguages = "es"
- // OcrLanguagesFi ...
- OcrLanguagesFi OcrLanguages = "fi"
- // OcrLanguagesFr ...
- OcrLanguagesFr OcrLanguages = "fr"
- // OcrLanguagesHu ...
- OcrLanguagesHu OcrLanguages = "hu"
- // OcrLanguagesIt ...
- OcrLanguagesIt OcrLanguages = "it"
- // OcrLanguagesJa ...
- OcrLanguagesJa OcrLanguages = "ja"
- // OcrLanguagesKo ...
- OcrLanguagesKo OcrLanguages = "ko"
- // OcrLanguagesNb ...
- OcrLanguagesNb OcrLanguages = "nb"
- // OcrLanguagesNl ...
- OcrLanguagesNl OcrLanguages = "nl"
- // OcrLanguagesPl ...
- OcrLanguagesPl OcrLanguages = "pl"
- // OcrLanguagesPt ...
- OcrLanguagesPt OcrLanguages = "pt"
- // OcrLanguagesRo ...
- OcrLanguagesRo OcrLanguages = "ro"
- // OcrLanguagesRu ...
- OcrLanguagesRu OcrLanguages = "ru"
- // OcrLanguagesSk ...
- OcrLanguagesSk OcrLanguages = "sk"
- // OcrLanguagesSrCyrl ...
- OcrLanguagesSrCyrl OcrLanguages = "sr-Cyrl"
- // OcrLanguagesSrLatn ...
- OcrLanguagesSrLatn OcrLanguages = "sr-Latn"
- // OcrLanguagesSv ...
- OcrLanguagesSv OcrLanguages = "sv"
- // OcrLanguagesTr ...
- OcrLanguagesTr OcrLanguages = "tr"
- // OcrLanguagesUnk ...
- OcrLanguagesUnk OcrLanguages = "unk"
- // OcrLanguagesZhHans ...
- OcrLanguagesZhHans OcrLanguages = "zh-Hans"
- // OcrLanguagesZhHant ...
- OcrLanguagesZhHant OcrLanguages = "zh-Hant"
+ // Ar ...
+ Ar OcrLanguages = "ar"
+ // Cs ...
+ Cs OcrLanguages = "cs"
+ // Da ...
+ Da OcrLanguages = "da"
+ // De ...
+ De OcrLanguages = "de"
+ // El ...
+ El OcrLanguages = "el"
+ // En ...
+ En OcrLanguages = "en"
+ // Es ...
+ Es OcrLanguages = "es"
+ // Fi ...
+ Fi OcrLanguages = "fi"
+ // Fr ...
+ Fr OcrLanguages = "fr"
+ // Hu ...
+ Hu OcrLanguages = "hu"
+ // It ...
+ It OcrLanguages = "it"
+ // Ja ...
+ Ja OcrLanguages = "ja"
+ // Ko ...
+ Ko OcrLanguages = "ko"
+ // Nb ...
+ Nb OcrLanguages = "nb"
+ // Nl ...
+ Nl OcrLanguages = "nl"
+ // Pl ...
+ Pl OcrLanguages = "pl"
+ // Pt ...
+ Pt OcrLanguages = "pt"
+ // Ro ...
+ Ro OcrLanguages = "ro"
+ // Ru ...
+ Ru OcrLanguages = "ru"
+ // Sk ...
+ Sk OcrLanguages = "sk"
+ // SrCyrl ...
+ SrCyrl OcrLanguages = "sr-Cyrl"
+ // SrLatn ...
+ SrLatn OcrLanguages = "sr-Latn"
+ // Sv ...
+ Sv OcrLanguages = "sv"
+ // Tr ...
+ Tr OcrLanguages = "tr"
+ // Unk ...
+ Unk OcrLanguages = "unk"
+ // ZhHans ...
+ ZhHans OcrLanguages = "zh-Hans"
+ // ZhHant ...
+ ZhHant OcrLanguages = "zh-Hant"
)
// PossibleOcrLanguagesValues returns an array of possible values for the OcrLanguages const type.
func PossibleOcrLanguagesValues() []OcrLanguages {
- return []OcrLanguages{OcrLanguagesAr, OcrLanguagesCs, OcrLanguagesDa, OcrLanguagesDe, OcrLanguagesEl, OcrLanguagesEn, OcrLanguagesEs, OcrLanguagesFi, OcrLanguagesFr, OcrLanguagesHu, OcrLanguagesIt, OcrLanguagesJa, OcrLanguagesKo, OcrLanguagesNb, OcrLanguagesNl, OcrLanguagesPl, OcrLanguagesPt, OcrLanguagesRo, OcrLanguagesRu, OcrLanguagesSk, OcrLanguagesSrCyrl, OcrLanguagesSrLatn, OcrLanguagesSv, OcrLanguagesTr, OcrLanguagesUnk, OcrLanguagesZhHans, OcrLanguagesZhHant}
+ return []OcrLanguages{Ar, Cs, Da, De, El, En, Es, Fi, Fr, Hu, It, Ja, Ko, Nb, Nl, Pl, Pt, Ro, Ru, Sk, SrCyrl, SrLatn, Sv, Tr, Unk, ZhHans, ZhHant}
}
// TextOperationStatusCodes enumerates the values for text operation status codes.
@@ -281,8 +266,7 @@ type Category struct {
// Name - Name of the category.
Name *string `json:"name,omitempty"`
// Score - Scoring of the category.
- Score *float64 `json:"score,omitempty"`
- // Detail - Additional category detail if available.
+ Score *float64 `json:"score,omitempty"`
Detail *CategoryDetail `json:"detail,omitempty"`
}
@@ -323,13 +307,11 @@ type DomainModelResult struct {
// DomainModelResults result of image analysis using a specific domain model including additional metadata.
type DomainModelResults struct {
- autorest.Response `json:"-"`
- // DomainModelResult - Result of the image analysis.
+ autorest.Response `json:"-"`
*DomainModelResult `json:"result,omitempty"`
// RequestID - Id of the REST API request.
- RequestID *string `json:"requestId,omitempty"`
- // Metadata - Additional image metadata
- Metadata *ImageMetadata `json:"metadata,omitempty"`
+ RequestID *string `json:"requestId,omitempty"`
+ Metadata *ImageMetadata `json:"metadata,omitempty"`
}
// MarshalJSON is the custom marshaler for DomainModelResults.
@@ -425,22 +407,17 @@ type ImageAnalysis struct {
autorest.Response `json:"-"`
// Categories - An array indicating identified categories.
Categories *[]Category `json:"categories,omitempty"`
- // Adult - A property scoring on whether the image is adult-oriented and/or racy.
- Adult *AdultInfo `json:"adult,omitempty"`
- // Color - A property scoring on color spectrums.
- Color *ColorInfo `json:"color,omitempty"`
- // ImageType - A property indicating type of image (whether it's clipart or line drawing)
- ImageType *ImageType `json:"imageType,omitempty"`
+ Adult *AdultInfo `json:"adult,omitempty"`
+ Color *ColorInfo `json:"color,omitempty"`
+ ImageType *ImageType `json:"imageType,omitempty"`
// Tags - A list of tags with confidence level.
- Tags *[]ImageTag `json:"tags,omitempty"`
- // Description - Description of the image.
+ Tags *[]ImageTag `json:"tags,omitempty"`
Description *ImageDescriptionDetails `json:"description,omitempty"`
// Faces - An array of possible faces within the image.
Faces *[]FaceDescription `json:"faces,omitempty"`
// RequestID - Id of the request for tracking purposes.
- RequestID *string `json:"requestId,omitempty"`
- // Metadata - Image metadata
- Metadata *ImageMetadata `json:"metadata,omitempty"`
+ RequestID *string `json:"requestId,omitempty"`
+ Metadata *ImageMetadata `json:"metadata,omitempty"`
}
// ImageCaption an image caption, i.e. a brief description of what the image depicts.
@@ -499,9 +476,8 @@ type ImageDescriptionDetails struct {
// Captions - A list of captions, sorted by confidence level.
Captions *[]ImageCaption `json:"captions,omitempty"`
// RequestID - Id of the REST API request.
- RequestID *string `json:"requestId,omitempty"`
- // Metadata - Image metadata
- Metadata *ImageMetadata `json:"metadata,omitempty"`
+ RequestID *string `json:"requestId,omitempty"`
+ Metadata *ImageMetadata `json:"metadata,omitempty"`
}
// ImageMetadata image metadata
@@ -532,6 +508,7 @@ type ImageType struct {
// ImageURL ...
type ImageURL struct {
+ // URL - Publicly reachable URL of an image
URL *string `json:"url,omitempty"`
}
@@ -607,9 +584,8 @@ type TagResult struct {
// Tags - A list of tags with confidence level.
Tags *[]ImageTag `json:"tags,omitempty"`
// RequestID - Id of the REST API request.
- RequestID *string `json:"requestId,omitempty"`
- // Metadata - Image metadata
- Metadata *ImageMetadata `json:"metadata,omitempty"`
+ RequestID *string `json:"requestId,omitempty"`
+ Metadata *ImageMetadata `json:"metadata,omitempty"`
}
// TextOperationResult ...
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/customimagesearch/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/customimagesearch/client.go
new file mode 100644
index 000000000..77532ef4b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/customimagesearch/client.go
@@ -0,0 +1,50 @@
+// Package customimagesearch implements the Azure ARM Customimagesearch service API version 1.0.
+//
+// The Bing Custom Image Search API lets you send an image search query to Bing and get back image search results
+// customized to meet your custom search definition.
+package customimagesearch
+
+// 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 Customimagesearch
+ DefaultBaseURI = "https://api.cognitive.microsoft.com/bingcustomsearch/v7.0"
+)
+
+// BaseClient is the base client for Customimagesearch.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+}
+
+// New creates an instance of the BaseClient client.
+func New() BaseClient {
+ return NewWithBaseURI(DefaultBaseURI)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/customimagesearch/custominstance.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/customimagesearch/custominstance.go
new file mode 100644
index 000000000..852084113
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/customimagesearch/custominstance.go
@@ -0,0 +1,403 @@
+package customimagesearch
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// CustomInstanceClient is the the Bing Custom Image Search API lets you send an image search query to Bing and get
+// back image search results customized to meet your custom search definition.
+type CustomInstanceClient struct {
+ BaseClient
+}
+
+// NewCustomInstanceClient creates an instance of the CustomInstanceClient client.
+func NewCustomInstanceClient() CustomInstanceClient {
+ return NewCustomInstanceClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewCustomInstanceClientWithBaseURI creates an instance of the CustomInstanceClient client.
+func NewCustomInstanceClientWithBaseURI(baseURI string) CustomInstanceClient {
+ return CustomInstanceClient{NewWithBaseURI(baseURI)}
+}
+
+// ImageSearch sends the image search request.
+// Parameters:
+// customConfig - the identifier for the custom search configuration
+// query - the user's search query term. The term cannot be empty. The term may contain [Bing Advanced
+// Operators](http://msdn.microsoft.com/library/ff795620.aspx). For example, to limit images to a specific
+// domain, use the [site:](http://msdn.microsoft.com/library/ff795613.aspx) operator. To help improve relevance
+// of an insights query (see
+// [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken)),
+// you should always include the user's query term. Use this parameter only with the Image Search API.Do not
+// specify this parameter when calling the Trending Images API.
+// acceptLanguage - a comma-delimited list of one or more languages to use for user interface strings. The list
+// is in decreasing order of preference. For additional information, including expected format, see
+// [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This header and the
+// [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#setlang)
+// query parameter are mutually exclusive; do not specify both. If you set this header, you must also specify
+// the [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#cc) query
+// parameter. To determine the market to return results for, Bing uses the first supported language it finds
+// from the list and combines it with the cc parameter value. If the list does not include a supported
+// language, Bing finds the closest language and market that supports the request or it uses an aggregated or
+// default market for the results. To determine the market that Bing used, see the BingAPIs-Market header. Use
+// this header and the cc query parameter only if you specify multiple languages. Otherwise, use the
+// [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#mkt) and
+// [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#setlang)
+// query parameters. A user interface string is a string that's used as a label in a user interface. There are
+// few user interface strings in the JSON response objects. Any links to Bing.com properties in the response
+// objects apply the specified language.
+// userAgent - the user agent originating the request. Bing uses the user agent to provide mobile users with an
+// optimized experience. Although optional, you are encouraged to always specify this header. The user-agent
+// should be the same string that any commonly used browser sends. For information about user agents, see [RFC
+// 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). The following are examples of user-agent
+// strings. Windows Phone: Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0;
+// ARM; Touch; NOKIA; Lumia 822). Android: Mozilla / 5.0 (Linux; U; Android 2.3.5; en - us; SCH - I500 Build /
+// GINGERBREAD) AppleWebKit / 533.1 (KHTML; like Gecko) Version / 4.0 Mobile Safari / 533.1. iPhone: Mozilla /
+// 5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit / 536.26 (KHTML; like Gecko) Mobile / 10B142
+// iPhone4; 1 BingWeb / 3.03.1428.20120423. PC: Mozilla / 5.0 (Windows NT 6.3; WOW64; Trident / 7.0; Touch;
+// rv:11.0) like Gecko. iPad: Mozilla / 5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit / 537.51.1 (KHTML,
+// like Gecko) Version / 7.0 Mobile / 11A465 Safari / 9537.53
+// clientID - bing uses this header to provide users with consistent behavior across Bing API calls. Bing often
+// flights new features and improvements, and it uses the client ID as a key for assigning traffic on different
+// flights. If you do not use the same client ID for a user across multiple requests, then Bing may assign the
+// user to multiple conflicting flights. Being assigned to multiple conflicting flights can lead to an
+// inconsistent user experience. For example, if the second request has a different flight assignment than the
+// first, the experience may be unexpected. Also, Bing can use the client ID to tailor web results to that
+// client ID’s search history, providing a richer experience for the user. Bing also uses this header to help
+// improve result rankings by analyzing the activity generated by a client ID. The relevance improvements help
+// with better quality of results delivered by Bing APIs and in turn enables higher click-through rates for the
+// API consumer. IMPORTANT: Although optional, you should consider this header required. Persisting the client
+// ID across multiple requests for the same end user and device combination enables 1) the API consumer to
+// receive a consistent user experience, and 2) higher click-through rates via better quality of results from
+// the Bing APIs. Each user that uses your application on the device must have a unique, Bing generated client
+// ID. If you do not include this header in the request, Bing generates an ID and returns it in the
+// X-MSEdge-ClientID response header. The only time that you should NOT include this header in a request is the
+// first time the user uses your app on that device. Use the client ID for each Bing API request that your app
+// makes for this user on the device. Persist the client ID. To persist the ID in a browser app, use a
+// persistent HTTP cookie to ensure the ID is used across all sessions. Do not use a session cookie. For other
+// apps such as mobile apps, use the device's persistent storage to persist the ID. The next time the user uses
+// your app on that device, get the client ID that you persisted. Bing responses may or may not include this
+// header. If the response includes this header, capture the client ID and use it for all subsequent Bing
+// requests for the user on that device. If you include the X-MSEdge-ClientID, you must not include cookies in
+// the request.
+// clientIP - the IPv4 or IPv6 address of the client device. The IP address is used to discover the user's
+// location. Bing uses the location information to determine safe search behavior. Although optional, you are
+// encouraged to always specify this header and the X-Search-Location header. Do not obfuscate the address (for
+// example, by changing the last octet to 0). Obfuscating the address results in the location not being
+// anywhere near the device's actual location, which may result in Bing serving erroneous results.
+// location - a semicolon-delimited list of key/value pairs that describe the client's geographical location.
+// Bing uses the location information to determine safe search behavior and to return relevant local content.
+// Specify the key/value pair as :. The following are the keys that you use to specify the user's
+// location. lat (required): The latitude of the client's location, in degrees. The latitude must be greater
+// than or equal to -90.0 and less than or equal to +90.0. Negative values indicate southern latitudes and
+// positive values indicate northern latitudes. long (required): The longitude of the client's location, in
+// degrees. The longitude must be greater than or equal to -180.0 and less than or equal to +180.0. Negative
+// values indicate western longitudes and positive values indicate eastern longitudes. re (required): The
+// radius, in meters, which specifies the horizontal accuracy of the coordinates. Pass the value returned by
+// the device's location service. Typical values might be 22m for GPS/Wi-Fi, 380m for cell tower triangulation,
+// and 18,000m for reverse IP lookup. ts (optional): The UTC UNIX timestamp of when the client was at the
+// location. (The UNIX timestamp is the number of seconds since January 1, 1970.) head (optional): The client's
+// relative heading or direction of travel. Specify the direction of travel as degrees from 0 through 360,
+// counting clockwise relative to true north. Specify this key only if the sp key is nonzero. sp (optional):
+// The horizontal velocity (speed), in meters per second, that the client device is traveling. alt (optional):
+// The altitude of the client device, in meters. are (optional): The radius, in meters, that specifies the
+// vertical accuracy of the coordinates. Specify this key only if you specify the alt key. Although many of the
+// keys are optional, the more information that you provide, the more accurate the location results are.
+// Although optional, you are encouraged to always specify the user's geographical location. Providing the
+// location is especially important if the client's IP address does not accurately reflect the user's physical
+// location (for example, if the client uses VPN). For optimal results, you should include this header and the
+// X-MSEdge-ClientIP header, but at a minimum, you should include this header.
+// aspect - filter images by the following aspect ratios. All: Do not filter by aspect.Specifying this value is
+// the same as not specifying the aspect parameter. Square: Return images with standard aspect ratio. Wide:
+// Return images with wide screen aspect ratio. Tall: Return images with tall aspect ratio.
+// colorParameter - filter images by the following color options. ColorOnly: Return color images. Monochrome:
+// Return black and white images. Return images with one of the following dominant colors: Black, Blue, Brown,
+// Gray, Green, Orange, Pink, Purple, Red, Teal, White, Yellow
+// countryCode - a 2-character country code of the country where the results come from. For a list of possible
+// values, see [Market
+// Codes](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#market-codes).
+// If you set this parameter, you must also specify the
+// [Accept-Language](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#acceptlanguage)
+// header. Bing uses the first supported language it finds from the languages list, and combine that language
+// with the country code that you specify to determine the market to return results for. If the languages list
+// does not include a supported language, Bing finds the closest language and market that supports the request,
+// or it may use an aggregated or default market for the results instead of a specified one. You should use
+// this query parameter and the Accept-Language query parameter only if you specify multiple languages;
+// otherwise, you should use the mkt and setLang query parameters. This parameter and the
+// [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#mkt) query
+// parameter are mutually exclusive—do not specify both.
+// count - the number of images to return in the response. The actual number delivered may be less than
+// requested. The default is 35. The maximum value is 150. You use this parameter along with the offset
+// parameter to page results.For example, if your user interface displays 20 images per page, set count to 20
+// and offset to 0 to get the first page of results.For each subsequent page, increment offset by 20 (for
+// example, 0, 20, 40). Use this parameter only with the Image Search API.Do not specify this parameter when
+// calling the Insights, Trending Images, or Web Search APIs.
+// freshness - filter images by the following discovery options. Day: Return images discovered by Bing within
+// the last 24 hours. Week: Return images discovered by Bing within the last 7 days. Month: Return images
+// discovered by Bing within the last 30 days.
+// height - filter images that have the specified height, in pixels. You may use this filter with the size
+// filter to return small images that have a height of 150 pixels.
+// ID - an ID that uniquely identifies an image. Use this parameter to ensure that the specified image is the
+// first image in the list of images that Bing returns. The
+// [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image)
+// object's imageId field contains the ID that you set this parameter to.
+// imageContent - filter images by the following content types. Face: Return images that show only a person's
+// face. Portrait: Return images that show only a person's head and shoulders.
+// imageType - filter images by the following image types. AnimatedGif: Return only animated GIFs. Clipart:
+// Return only clip art images. Line: Return only line drawings. Photo: Return only photographs(excluding line
+// drawings, animated Gifs, and clip art). Shopping: Return only images that contain items where Bing knows of
+// a merchant that is selling the items. This option is valid in the en - US market only.Transparent: Return
+// only images with a transparent background.
+// license - filter images by the following license types. All: Do not filter by license type.Specifying this
+// value is the same as not specifying the license parameter. Any: Return images that are under any license
+// type. The response doesn't include images that do not specify a license or the license is unknown. Public:
+// Return images where the creator has waived their exclusive rights, to the fullest extent allowed by law.
+// Share: Return images that may be shared with others. Changing or editing the image might not be allowed.
+// Also, modifying, sharing, and using the image for commercial purposes might not be allowed. Typically, this
+// option returns the most images. ShareCommercially: Return images that may be shared with others for personal
+// or commercial purposes. Changing or editing the image might not be allowed. Modify: Return images that may
+// be modified, shared, and used. Changing or editing the image might not be allowed. Modifying, sharing, and
+// using the image for commercial purposes might not be allowed. ModifyCommercially: Return images that may be
+// modified, shared, and used for personal or commercial purposes. Typically, this option returns the fewest
+// images. For more information about these license types, see [Filter Images By License
+// Type](http://go.microsoft.com/fwlink/?LinkId=309768).
+// market - the market where the results come from. Typically, mkt is the country where the user is making the
+// request from. However, it could be a different country if the user is not located in a country where Bing
+// delivers results. The market must be in the form -. For example, en-US. The
+// string is case insensitive. For a list of possible market values, see [Market
+// Codes](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#market-codes).
+// NOTE: If known, you are encouraged to always specify the market. Specifying the market helps Bing route the
+// request and return an appropriate and optimal response. If you specify a market that is not listed in
+// [Market
+// Codes](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#market-codes),
+// Bing uses a best fit market code based on an internal mapping that is subject to change. This parameter and
+// the [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#cc) query
+// parameter are mutually exclusive—do not specify both.
+// maxFileSize - filter images that are less than or equal to the specified file size. The maximum file size
+// that you may specify is 520,192 bytes. If you specify a larger value, the API uses 520,192. It is possible
+// that the response may include images that are slightly larger than the specified maximum. You may specify
+// this filter and minFileSize to filter images within a range of file sizes.
+// maxHeight - filter images that have a height that is less than or equal to the specified height. Specify the
+// height in pixels. You may specify this filter and minHeight to filter images within a range of heights. This
+// filter and the height filter are mutually exclusive.
+// maxWidth - filter images that have a width that is less than or equal to the specified width. Specify the
+// width in pixels. You may specify this filter and maxWidth to filter images within a range of widths. This
+// filter and the width filter are mutually exclusive.
+// minFileSize - filter images that are greater than or equal to the specified file size. The maximum file size
+// that you may specify is 520,192 bytes. If you specify a larger value, the API uses 520,192. It is possible
+// that the response may include images that are slightly smaller than the specified minimum. You may specify
+// this filter and maxFileSize to filter images within a range of file sizes.
+// minHeight - filter images that have a height that is greater than or equal to the specified height. Specify
+// the height in pixels. You may specify this filter and maxHeight to filter images within a range of heights.
+// This filter and the height filter are mutually exclusive.
+// minWidth - filter images that have a width that is greater than or equal to the specified width. Specify the
+// width in pixels. You may specify this filter and maxWidth to filter images within a range of widths. This
+// filter and the width filter are mutually exclusive.
+// offset - the zero-based offset that indicates the number of images to skip before returning images. The
+// default is 0. The offset should be less than
+// ([totalEstimatedMatches](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#totalestimatedmatches)
+// - count). Use this parameter along with the count parameter to page results. For example, if your user
+// interface displays 20 images per page, set count to 20 and offset to 0 to get the first page of results. For
+// each subsequent page, increment offset by 20 (for example, 0, 20, 40). It is possible for multiple pages to
+// include some overlap in results. To prevent duplicates, see
+// [nextOffset](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#nextoffset).
+// Use this parameter only with the Image API. Do not specify this parameter when calling the Trending Images
+// API or the Web Search API.
+// safeSearch - filter images for adult content. The following are the possible filter values. Off: May return
+// images with adult content. If the request is through the Image Search API, the response includes thumbnail
+// images that are clear (non-fuzzy). However, if the request is through the Web Search API, the response
+// includes thumbnail images that are pixelated (fuzzy). Moderate: If the request is through the Image Search
+// API, the response doesn't include images with adult content. If the request is through the Web Search API,
+// the response may include images with adult content (the thumbnail images are pixelated (fuzzy)). Strict: Do
+// not return images with adult content. The default is Moderate. If the request comes from a market that
+// Bing's adult policy requires that safeSearch is set to Strict, Bing ignores the safeSearch value and uses
+// Strict. If you use the site: query operator, there is the chance that the response may contain adult content
+// regardless of what the safeSearch query parameter is set to. Use site: only if you are aware of the content
+// on the site and your scenario supports the possibility of adult content.
+// size - filter images by the following sizes. All: Do not filter by size. Specifying this value is the same
+// as not specifying the size parameter. Small: Return images that are less than 200x200 pixels. Medium: Return
+// images that are greater than or equal to 200x200 pixels but less than 500x500 pixels. Large: Return images
+// that are 500x500 pixels or larger. Wallpaper: Return wallpaper images. You may use this parameter along with
+// the height or width parameters. For example, you may use height and size to request small images that are
+// 150 pixels tall.
+// setLang - the language to use for user interface strings. Specify the language using the ISO 639-1 2-letter
+// language code. For example, the language code for English is EN. The default is EN (English). Although
+// optional, you should always specify the language. Typically, you set setLang to the same language specified
+// by mkt unless the user wants the user interface strings displayed in a different language. This parameter
+// and the
+// [Accept-Language](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#acceptlanguage)
+// header are mutually exclusive; do not specify both. A user interface string is a string that's used as a
+// label in a user interface. There are few user interface strings in the JSON response objects. Also, any
+// links to Bing.com properties in the response objects apply the specified language.
+// width - filter images that have the specified width, in pixels. You may use this filter with the size filter
+// to return small images that have a width of 150 pixels.
+func (client CustomInstanceClient) ImageSearch(ctx context.Context, customConfig int64, query string, acceptLanguage string, userAgent string, clientID string, clientIP string, location string, aspect ImageAspect, colorParameter ImageColor, countryCode string, count *int32, freshness Freshness, height *int32, ID string, imageContent ImageContent, imageType ImageType, license ImageLicense, market string, maxFileSize *int64, maxHeight *int64, maxWidth *int64, minFileSize *int64, minHeight *int64, minWidth *int64, offset *int64, safeSearch SafeSearch, size ImageSize, setLang string, width *int32) (result Images, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: customConfig,
+ Constraints: []validation.Constraint{{Target: "customConfig", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("customimagesearch.CustomInstanceClient", "ImageSearch", err.Error())
+ }
+
+ req, err := client.ImageSearchPreparer(ctx, customConfig, query, acceptLanguage, userAgent, clientID, clientIP, location, aspect, colorParameter, countryCode, count, freshness, height, ID, imageContent, imageType, license, market, maxFileSize, maxHeight, maxWidth, minFileSize, minHeight, minWidth, offset, safeSearch, size, setLang, width)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "customimagesearch.CustomInstanceClient", "ImageSearch", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ImageSearchSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "customimagesearch.CustomInstanceClient", "ImageSearch", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ImageSearchResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "customimagesearch.CustomInstanceClient", "ImageSearch", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ImageSearchPreparer prepares the ImageSearch request.
+func (client CustomInstanceClient) ImageSearchPreparer(ctx context.Context, customConfig int64, query string, acceptLanguage string, userAgent string, clientID string, clientIP string, location string, aspect ImageAspect, colorParameter ImageColor, countryCode string, count *int32, freshness Freshness, height *int32, ID string, imageContent ImageContent, imageType ImageType, license ImageLicense, market string, maxFileSize *int64, maxHeight *int64, maxWidth *int64, minFileSize *int64, minHeight *int64, minWidth *int64, offset *int64, safeSearch SafeSearch, size ImageSize, setLang string, width *int32) (*http.Request, error) {
+ queryParameters := map[string]interface{}{
+ "customConfig": autorest.Encode("query", customConfig),
+ "q": autorest.Encode("query", query),
+ }
+ if len(string(aspect)) > 0 {
+ queryParameters["aspect"] = autorest.Encode("query", aspect)
+ }
+ if len(string(colorParameter)) > 0 {
+ queryParameters["color"] = autorest.Encode("query", colorParameter)
+ }
+ if len(countryCode) > 0 {
+ queryParameters["cc"] = autorest.Encode("query", countryCode)
+ }
+ if count != nil {
+ queryParameters["count"] = autorest.Encode("query", *count)
+ }
+ if len(string(freshness)) > 0 {
+ queryParameters["freshness"] = autorest.Encode("query", freshness)
+ }
+ if height != nil {
+ queryParameters["height"] = autorest.Encode("query", *height)
+ }
+ if len(ID) > 0 {
+ queryParameters["id"] = autorest.Encode("query", ID)
+ }
+ if len(string(imageContent)) > 0 {
+ queryParameters["imageContent"] = autorest.Encode("query", imageContent)
+ }
+ if len(string(imageType)) > 0 {
+ queryParameters["imageType"] = autorest.Encode("query", imageType)
+ }
+ if len(string(license)) > 0 {
+ queryParameters["license"] = autorest.Encode("query", license)
+ }
+ if len(market) > 0 {
+ queryParameters["mkt"] = autorest.Encode("query", market)
+ }
+ if maxFileSize != nil {
+ queryParameters["maxFileSize"] = autorest.Encode("query", *maxFileSize)
+ }
+ if maxHeight != nil {
+ queryParameters["maxHeight"] = autorest.Encode("query", *maxHeight)
+ }
+ if maxWidth != nil {
+ queryParameters["maxWidth"] = autorest.Encode("query", *maxWidth)
+ }
+ if minFileSize != nil {
+ queryParameters["minFileSize"] = autorest.Encode("query", *minFileSize)
+ }
+ if minHeight != nil {
+ queryParameters["minHeight"] = autorest.Encode("query", *minHeight)
+ }
+ if minWidth != nil {
+ queryParameters["minWidth"] = autorest.Encode("query", *minWidth)
+ }
+ if offset != nil {
+ queryParameters["offset"] = autorest.Encode("query", *offset)
+ }
+ if len(string(safeSearch)) > 0 {
+ queryParameters["safeSearch"] = autorest.Encode("query", safeSearch)
+ }
+ if len(string(size)) > 0 {
+ queryParameters["size"] = autorest.Encode("query", size)
+ }
+ if len(setLang) > 0 {
+ queryParameters["setLang"] = autorest.Encode("query", setLang)
+ }
+ if width != nil {
+ queryParameters["width"] = autorest.Encode("query", *width)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/images/search"),
+ autorest.WithQueryParameters(queryParameters),
+ autorest.WithHeader("X-BingApis-SDK", "true"))
+ if len(acceptLanguage) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Accept-Language", autorest.String(acceptLanguage)))
+ }
+ if len(userAgent) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("User-Agent", autorest.String(userAgent)))
+ }
+ if len(clientID) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("X-MSEdge-ClientID", autorest.String(clientID)))
+ }
+ if len(clientIP) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("X-MSEdge-ClientIP", autorest.String(clientIP)))
+ }
+ if len(location) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("X-Search-Location", autorest.String(location)))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ImageSearchSender sends the ImageSearch request. The method will close the
+// http.Response Body if it receives an error.
+func (client CustomInstanceClient) ImageSearchSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ImageSearchResponder handles the response to the ImageSearch request. The method always
+// closes the http.Response Body.
+func (client CustomInstanceClient) ImageSearchResponder(resp *http.Response) (result Images, 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/services/cognitiveservices/v1.0/customimagesearch/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/customimagesearch/models.go
new file mode 100644
index 000000000..b758c2240
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/customimagesearch/models.go
@@ -0,0 +1,3428 @@
+package customimagesearch
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+)
+
+// ErrorCode enumerates the values for error code.
+type ErrorCode string
+
+const (
+ // InsufficientAuthorization ...
+ InsufficientAuthorization ErrorCode = "InsufficientAuthorization"
+ // InvalidAuthorization ...
+ InvalidAuthorization ErrorCode = "InvalidAuthorization"
+ // InvalidRequest ...
+ InvalidRequest ErrorCode = "InvalidRequest"
+ // None ...
+ None ErrorCode = "None"
+ // RateLimitExceeded ...
+ RateLimitExceeded ErrorCode = "RateLimitExceeded"
+ // ServerError ...
+ ServerError ErrorCode = "ServerError"
+)
+
+// PossibleErrorCodeValues returns an array of possible values for the ErrorCode const type.
+func PossibleErrorCodeValues() []ErrorCode {
+ return []ErrorCode{InsufficientAuthorization, InvalidAuthorization, InvalidRequest, None, RateLimitExceeded, ServerError}
+}
+
+// ErrorSubCode enumerates the values for error sub code.
+type ErrorSubCode string
+
+const (
+ // AuthorizationDisabled ...
+ AuthorizationDisabled ErrorSubCode = "AuthorizationDisabled"
+ // AuthorizationExpired ...
+ AuthorizationExpired ErrorSubCode = "AuthorizationExpired"
+ // AuthorizationMissing ...
+ AuthorizationMissing ErrorSubCode = "AuthorizationMissing"
+ // AuthorizationRedundancy ...
+ AuthorizationRedundancy ErrorSubCode = "AuthorizationRedundancy"
+ // Blocked ...
+ Blocked ErrorSubCode = "Blocked"
+ // HTTPNotAllowed ...
+ HTTPNotAllowed ErrorSubCode = "HttpNotAllowed"
+ // NotImplemented ...
+ NotImplemented ErrorSubCode = "NotImplemented"
+ // ParameterInvalidValue ...
+ ParameterInvalidValue ErrorSubCode = "ParameterInvalidValue"
+ // ParameterMissing ...
+ ParameterMissing ErrorSubCode = "ParameterMissing"
+ // ResourceError ...
+ ResourceError ErrorSubCode = "ResourceError"
+ // UnexpectedError ...
+ UnexpectedError ErrorSubCode = "UnexpectedError"
+)
+
+// PossibleErrorSubCodeValues returns an array of possible values for the ErrorSubCode const type.
+func PossibleErrorSubCodeValues() []ErrorSubCode {
+ return []ErrorSubCode{AuthorizationDisabled, AuthorizationExpired, AuthorizationMissing, AuthorizationRedundancy, Blocked, HTTPNotAllowed, NotImplemented, ParameterInvalidValue, ParameterMissing, ResourceError, UnexpectedError}
+}
+
+// Freshness enumerates the values for freshness.
+type Freshness string
+
+const (
+ // Day ...
+ Day Freshness = "Day"
+ // Month ...
+ Month Freshness = "Month"
+ // Week ...
+ Week Freshness = "Week"
+)
+
+// PossibleFreshnessValues returns an array of possible values for the Freshness const type.
+func PossibleFreshnessValues() []Freshness {
+ return []Freshness{Day, Month, Week}
+}
+
+// ImageAspect enumerates the values for image aspect.
+type ImageAspect string
+
+const (
+ // All ...
+ All ImageAspect = "All"
+ // Square ...
+ Square ImageAspect = "Square"
+ // Tall ...
+ Tall ImageAspect = "Tall"
+ // Wide ...
+ Wide ImageAspect = "Wide"
+)
+
+// PossibleImageAspectValues returns an array of possible values for the ImageAspect const type.
+func PossibleImageAspectValues() []ImageAspect {
+ return []ImageAspect{All, Square, Tall, Wide}
+}
+
+// ImageColor enumerates the values for image color.
+type ImageColor string
+
+const (
+ // Black ...
+ Black ImageColor = "Black"
+ // Blue ...
+ Blue ImageColor = "Blue"
+ // Brown ...
+ Brown ImageColor = "Brown"
+ // ColorOnly ...
+ ColorOnly ImageColor = "ColorOnly"
+ // Gray ...
+ Gray ImageColor = "Gray"
+ // Green ...
+ Green ImageColor = "Green"
+ // Monochrome ...
+ Monochrome ImageColor = "Monochrome"
+ // Orange ...
+ Orange ImageColor = "Orange"
+ // Pink ...
+ Pink ImageColor = "Pink"
+ // Purple ...
+ Purple ImageColor = "Purple"
+ // Red ...
+ Red ImageColor = "Red"
+ // Teal ...
+ Teal ImageColor = "Teal"
+ // White ...
+ White ImageColor = "White"
+ // Yellow ...
+ Yellow ImageColor = "Yellow"
+)
+
+// PossibleImageColorValues returns an array of possible values for the ImageColor const type.
+func PossibleImageColorValues() []ImageColor {
+ return []ImageColor{Black, Blue, Brown, ColorOnly, Gray, Green, Monochrome, Orange, Pink, Purple, Red, Teal, White, Yellow}
+}
+
+// ImageContent enumerates the values for image content.
+type ImageContent string
+
+const (
+ // Face ...
+ Face ImageContent = "Face"
+ // Portrait ...
+ Portrait ImageContent = "Portrait"
+)
+
+// PossibleImageContentValues returns an array of possible values for the ImageContent const type.
+func PossibleImageContentValues() []ImageContent {
+ return []ImageContent{Face, Portrait}
+}
+
+// ImageLicense enumerates the values for image license.
+type ImageLicense string
+
+const (
+ // ImageLicenseAll ...
+ ImageLicenseAll ImageLicense = "All"
+ // ImageLicenseAny ...
+ ImageLicenseAny ImageLicense = "Any"
+ // ImageLicenseModify ...
+ ImageLicenseModify ImageLicense = "Modify"
+ // ImageLicenseModifyCommercially ...
+ ImageLicenseModifyCommercially ImageLicense = "ModifyCommercially"
+ // ImageLicensePublic ...
+ ImageLicensePublic ImageLicense = "Public"
+ // ImageLicenseShare ...
+ ImageLicenseShare ImageLicense = "Share"
+ // ImageLicenseShareCommercially ...
+ ImageLicenseShareCommercially ImageLicense = "ShareCommercially"
+)
+
+// PossibleImageLicenseValues returns an array of possible values for the ImageLicense const type.
+func PossibleImageLicenseValues() []ImageLicense {
+ return []ImageLicense{ImageLicenseAll, ImageLicenseAny, ImageLicenseModify, ImageLicenseModifyCommercially, ImageLicensePublic, ImageLicenseShare, ImageLicenseShareCommercially}
+}
+
+// ImageSize enumerates the values for image size.
+type ImageSize string
+
+const (
+ // ImageSizeAll ...
+ ImageSizeAll ImageSize = "All"
+ // ImageSizeLarge ...
+ ImageSizeLarge ImageSize = "Large"
+ // ImageSizeMedium ...
+ ImageSizeMedium ImageSize = "Medium"
+ // ImageSizeSmall ...
+ ImageSizeSmall ImageSize = "Small"
+ // ImageSizeWallpaper ...
+ ImageSizeWallpaper ImageSize = "Wallpaper"
+)
+
+// PossibleImageSizeValues returns an array of possible values for the ImageSize const type.
+func PossibleImageSizeValues() []ImageSize {
+ return []ImageSize{ImageSizeAll, ImageSizeLarge, ImageSizeMedium, ImageSizeSmall, ImageSizeWallpaper}
+}
+
+// ImageType enumerates the values for image type.
+type ImageType string
+
+const (
+ // AnimatedGif ...
+ AnimatedGif ImageType = "AnimatedGif"
+ // Clipart ...
+ Clipart ImageType = "Clipart"
+ // Line ...
+ Line ImageType = "Line"
+ // Photo ...
+ Photo ImageType = "Photo"
+ // Shopping ...
+ Shopping ImageType = "Shopping"
+ // Transparent ...
+ Transparent ImageType = "Transparent"
+)
+
+// PossibleImageTypeValues returns an array of possible values for the ImageType const type.
+func PossibleImageTypeValues() []ImageType {
+ return []ImageType{AnimatedGif, Clipart, Line, Photo, Shopping, Transparent}
+}
+
+// SafeSearch enumerates the values for safe search.
+type SafeSearch string
+
+const (
+ // Moderate ...
+ Moderate SafeSearch = "Moderate"
+ // Off ...
+ Off SafeSearch = "Off"
+ // Strict ...
+ Strict SafeSearch = "Strict"
+)
+
+// PossibleSafeSearchValues returns an array of possible values for the SafeSearch const type.
+func PossibleSafeSearchValues() []SafeSearch {
+ return []SafeSearch{Moderate, Off, Strict}
+}
+
+// Type enumerates the values for type.
+type Type string
+
+const (
+ // TypeAnswer ...
+ TypeAnswer Type = "Answer"
+ // TypeCreativeWork ...
+ TypeCreativeWork Type = "CreativeWork"
+ // TypeErrorResponse ...
+ TypeErrorResponse Type = "ErrorResponse"
+ // TypeIdentifiable ...
+ TypeIdentifiable Type = "Identifiable"
+ // TypeImageObject ...
+ TypeImageObject Type = "ImageObject"
+ // TypeImages ...
+ TypeImages Type = "Images"
+ // TypeMediaObject ...
+ TypeMediaObject Type = "MediaObject"
+ // TypeResponse ...
+ TypeResponse Type = "Response"
+ // TypeResponseBase ...
+ TypeResponseBase Type = "ResponseBase"
+ // TypeSearchResultsAnswer ...
+ TypeSearchResultsAnswer Type = "SearchResultsAnswer"
+ // TypeThing ...
+ TypeThing Type = "Thing"
+ // TypeWebPage ...
+ TypeWebPage Type = "WebPage"
+)
+
+// PossibleTypeValues returns an array of possible values for the Type const type.
+func PossibleTypeValues() []Type {
+ return []Type{TypeAnswer, TypeCreativeWork, TypeErrorResponse, TypeIdentifiable, TypeImageObject, TypeImages, TypeMediaObject, TypeResponse, TypeResponseBase, TypeSearchResultsAnswer, TypeThing, TypeWebPage}
+}
+
+// BasicAnswer defines an answer.
+type BasicAnswer interface {
+ AsImages() (*Images, bool)
+ AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
+ AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)
+ AsAnswer() (*Answer, bool)
+}
+
+// Answer defines an answer.
+type Answer struct {
+ // ReadLink - The URL that returns this resource.
+ ReadLink *string `json:"readLink,omitempty"`
+ // WebSearchURL - The URL To Bing's search result for this item.
+ WebSearchURL *string `json:"webSearchUrl,omitempty"`
+ // ID - A String identifier.
+ ID *string `json:"id,omitempty"`
+ // Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeImages', 'TypeSearchResultsAnswer', 'TypeAnswer', 'TypeMediaObject', 'TypeResponse', 'TypeThing', 'TypeCreativeWork', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeWebPage'
+ Type Type `json:"_type,omitempty"`
+}
+
+func unmarshalBasicAnswer(body []byte) (BasicAnswer, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["_type"] {
+ case string(TypeImages):
+ var i Images
+ err := json.Unmarshal(body, &i)
+ return i, err
+ case string(TypeSearchResultsAnswer):
+ var sra SearchResultsAnswer
+ err := json.Unmarshal(body, &sra)
+ return sra, err
+ default:
+ var a Answer
+ err := json.Unmarshal(body, &a)
+ return a, err
+ }
+}
+func unmarshalBasicAnswerArray(body []byte) ([]BasicAnswer, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ aArray := make([]BasicAnswer, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ a, err := unmarshalBasicAnswer(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ aArray[index] = a
+ }
+ return aArray, nil
+}
+
+// MarshalJSON is the custom marshaler for Answer.
+func (a Answer) MarshalJSON() ([]byte, error) {
+ a.Type = TypeAnswer
+ objectMap := make(map[string]interface{})
+ if a.ReadLink != nil {
+ objectMap["readLink"] = a.ReadLink
+ }
+ if a.WebSearchURL != nil {
+ objectMap["webSearchUrl"] = a.WebSearchURL
+ }
+ if a.ID != nil {
+ objectMap["id"] = a.ID
+ }
+ if a.Type != "" {
+ objectMap["_type"] = a.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsImageObject is the BasicResponseBase implementation for Answer.
+func (a Answer) AsImageObject() (*ImageObject, bool) {
+ return nil, false
+}
+
+// AsImages is the BasicResponseBase implementation for Answer.
+func (a Answer) AsImages() (*Images, bool) {
+ return nil, false
+}
+
+// AsSearchResultsAnswer is the BasicResponseBase implementation for Answer.
+func (a Answer) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Answer.
+func (a Answer) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsAnswer is the BasicResponseBase implementation for Answer.
+func (a Answer) AsAnswer() (*Answer, bool) {
+ return &a, true
+}
+
+// AsBasicAnswer is the BasicResponseBase implementation for Answer.
+func (a Answer) AsBasicAnswer() (BasicAnswer, bool) {
+ return &a, true
+}
+
+// AsMediaObject is the BasicResponseBase implementation for Answer.
+func (a Answer) AsMediaObject() (*MediaObject, bool) {
+ return nil, false
+}
+
+// AsBasicMediaObject is the BasicResponseBase implementation for Answer.
+func (a Answer) AsBasicMediaObject() (BasicMediaObject, bool) {
+ return nil, false
+}
+
+// AsResponse is the BasicResponseBase implementation for Answer.
+func (a Answer) AsResponse() (*Response, bool) {
+ return nil, false
+}
+
+// AsBasicResponse is the BasicResponseBase implementation for Answer.
+func (a Answer) AsBasicResponse() (BasicResponse, bool) {
+ return &a, true
+}
+
+// AsThing is the BasicResponseBase implementation for Answer.
+func (a Answer) AsThing() (*Thing, bool) {
+ return nil, false
+}
+
+// AsBasicThing is the BasicResponseBase implementation for Answer.
+func (a Answer) AsBasicThing() (BasicThing, bool) {
+ return nil, false
+}
+
+// AsCreativeWork is the BasicResponseBase implementation for Answer.
+func (a Answer) AsCreativeWork() (*CreativeWork, bool) {
+ return nil, false
+}
+
+// AsBasicCreativeWork is the BasicResponseBase implementation for Answer.
+func (a Answer) AsBasicCreativeWork() (BasicCreativeWork, bool) {
+ return nil, false
+}
+
+// AsIdentifiable is the BasicResponseBase implementation for Answer.
+func (a Answer) AsIdentifiable() (*Identifiable, bool) {
+ return nil, false
+}
+
+// AsBasicIdentifiable is the BasicResponseBase implementation for Answer.
+func (a Answer) AsBasicIdentifiable() (BasicIdentifiable, bool) {
+ return &a, true
+}
+
+// AsErrorResponse is the BasicResponseBase implementation for Answer.
+func (a Answer) AsErrorResponse() (*ErrorResponse, bool) {
+ return nil, false
+}
+
+// AsWebPage is the BasicResponseBase implementation for Answer.
+func (a Answer) AsWebPage() (*WebPage, bool) {
+ return nil, false
+}
+
+// AsResponseBase is the BasicResponseBase implementation for Answer.
+func (a Answer) AsResponseBase() (*ResponseBase, bool) {
+ return nil, false
+}
+
+// AsBasicResponseBase is the BasicResponseBase implementation for Answer.
+func (a Answer) AsBasicResponseBase() (BasicResponseBase, bool) {
+ return &a, true
+}
+
+// BasicCreativeWork the most generic kind of creative work, including books, movies, photographs, software programs,
+// etc.
+type BasicCreativeWork interface {
+ AsImageObject() (*ImageObject, bool)
+ AsMediaObject() (*MediaObject, bool)
+ AsBasicMediaObject() (BasicMediaObject, bool)
+ AsWebPage() (*WebPage, bool)
+ AsCreativeWork() (*CreativeWork, bool)
+}
+
+// CreativeWork the most generic kind of creative work, including books, movies, photographs, software programs,
+// etc.
+type CreativeWork struct {
+ // ThumbnailURL - The URL to a thumbnail of the item.
+ ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
+ // Provider - The source of the creative work.
+ Provider *[]BasicThing `json:"provider,omitempty"`
+ // Text - Text content of this creative work
+ Text *string `json:"text,omitempty"`
+ // Name - The name of the thing represented by this object.
+ Name *string `json:"name,omitempty"`
+ // URL - The URL to get more information about the thing represented by this object.
+ URL *string `json:"url,omitempty"`
+ // Image - An image of the item.
+ Image *ImageObject `json:"image,omitempty"`
+ // Description - A short description of the item.
+ Description *string `json:"description,omitempty"`
+ // AlternateName - An alias for the item
+ AlternateName *string `json:"alternateName,omitempty"`
+ // BingID - An ID that uniquely identifies this item.
+ BingID *string `json:"bingId,omitempty"`
+ // ReadLink - The URL that returns this resource.
+ ReadLink *string `json:"readLink,omitempty"`
+ // WebSearchURL - The URL To Bing's search result for this item.
+ WebSearchURL *string `json:"webSearchUrl,omitempty"`
+ // ID - A String identifier.
+ ID *string `json:"id,omitempty"`
+ // Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeImages', 'TypeSearchResultsAnswer', 'TypeAnswer', 'TypeMediaObject', 'TypeResponse', 'TypeThing', 'TypeCreativeWork', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeWebPage'
+ Type Type `json:"_type,omitempty"`
+}
+
+func unmarshalBasicCreativeWork(body []byte) (BasicCreativeWork, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["_type"] {
+ case string(TypeImageObject):
+ var ioVar ImageObject
+ err := json.Unmarshal(body, &ioVar)
+ return ioVar, err
+ case string(TypeMediaObject):
+ var mo MediaObject
+ err := json.Unmarshal(body, &mo)
+ return mo, err
+ case string(TypeWebPage):
+ var wp WebPage
+ err := json.Unmarshal(body, &wp)
+ return wp, err
+ default:
+ var cw CreativeWork
+ err := json.Unmarshal(body, &cw)
+ return cw, err
+ }
+}
+func unmarshalBasicCreativeWorkArray(body []byte) ([]BasicCreativeWork, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ cwArray := make([]BasicCreativeWork, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ cw, err := unmarshalBasicCreativeWork(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ cwArray[index] = cw
+ }
+ return cwArray, nil
+}
+
+// MarshalJSON is the custom marshaler for CreativeWork.
+func (cw CreativeWork) MarshalJSON() ([]byte, error) {
+ cw.Type = TypeCreativeWork
+ objectMap := make(map[string]interface{})
+ if cw.ThumbnailURL != nil {
+ objectMap["thumbnailUrl"] = cw.ThumbnailURL
+ }
+ if cw.Provider != nil {
+ objectMap["provider"] = cw.Provider
+ }
+ if cw.Text != nil {
+ objectMap["text"] = cw.Text
+ }
+ if cw.Name != nil {
+ objectMap["name"] = cw.Name
+ }
+ if cw.URL != nil {
+ objectMap["url"] = cw.URL
+ }
+ if cw.Image != nil {
+ objectMap["image"] = cw.Image
+ }
+ if cw.Description != nil {
+ objectMap["description"] = cw.Description
+ }
+ if cw.AlternateName != nil {
+ objectMap["alternateName"] = cw.AlternateName
+ }
+ if cw.BingID != nil {
+ objectMap["bingId"] = cw.BingID
+ }
+ if cw.ReadLink != nil {
+ objectMap["readLink"] = cw.ReadLink
+ }
+ if cw.WebSearchURL != nil {
+ objectMap["webSearchUrl"] = cw.WebSearchURL
+ }
+ if cw.ID != nil {
+ objectMap["id"] = cw.ID
+ }
+ if cw.Type != "" {
+ objectMap["_type"] = cw.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsImageObject is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsImageObject() (*ImageObject, bool) {
+ return nil, false
+}
+
+// AsImages is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsImages() (*Images, bool) {
+ return nil, false
+}
+
+// AsSearchResultsAnswer is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsAnswer is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsAnswer() (*Answer, bool) {
+ return nil, false
+}
+
+// AsBasicAnswer is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsBasicAnswer() (BasicAnswer, bool) {
+ return nil, false
+}
+
+// AsMediaObject is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsMediaObject() (*MediaObject, bool) {
+ return nil, false
+}
+
+// AsBasicMediaObject is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsBasicMediaObject() (BasicMediaObject, bool) {
+ return nil, false
+}
+
+// AsResponse is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsResponse() (*Response, bool) {
+ return nil, false
+}
+
+// AsBasicResponse is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsBasicResponse() (BasicResponse, bool) {
+ return &cw, true
+}
+
+// AsThing is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsThing() (*Thing, bool) {
+ return nil, false
+}
+
+// AsBasicThing is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsBasicThing() (BasicThing, bool) {
+ return &cw, true
+}
+
+// AsCreativeWork is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsCreativeWork() (*CreativeWork, bool) {
+ return &cw, true
+}
+
+// AsBasicCreativeWork is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsBasicCreativeWork() (BasicCreativeWork, bool) {
+ return &cw, true
+}
+
+// AsIdentifiable is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsIdentifiable() (*Identifiable, bool) {
+ return nil, false
+}
+
+// AsBasicIdentifiable is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsBasicIdentifiable() (BasicIdentifiable, bool) {
+ return &cw, true
+}
+
+// AsErrorResponse is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsErrorResponse() (*ErrorResponse, bool) {
+ return nil, false
+}
+
+// AsWebPage is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsWebPage() (*WebPage, bool) {
+ return nil, false
+}
+
+// AsResponseBase is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsResponseBase() (*ResponseBase, bool) {
+ return nil, false
+}
+
+// AsBasicResponseBase is the BasicResponseBase implementation for CreativeWork.
+func (cw CreativeWork) AsBasicResponseBase() (BasicResponseBase, bool) {
+ return &cw, true
+}
+
+// UnmarshalJSON is the custom unmarshaler for CreativeWork struct.
+func (cw *CreativeWork) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "thumbnailUrl":
+ if v != nil {
+ var thumbnailURL string
+ err = json.Unmarshal(*v, &thumbnailURL)
+ if err != nil {
+ return err
+ }
+ cw.ThumbnailURL = &thumbnailURL
+ }
+ case "provider":
+ if v != nil {
+ provider, err := unmarshalBasicThingArray(*v)
+ if err != nil {
+ return err
+ }
+ cw.Provider = &provider
+ }
+ case "text":
+ if v != nil {
+ var textVar string
+ err = json.Unmarshal(*v, &textVar)
+ if err != nil {
+ return err
+ }
+ cw.Text = &textVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cw.Name = &name
+ }
+ case "url":
+ if v != nil {
+ var URL string
+ err = json.Unmarshal(*v, &URL)
+ if err != nil {
+ return err
+ }
+ cw.URL = &URL
+ }
+ case "image":
+ if v != nil {
+ var imageVar ImageObject
+ err = json.Unmarshal(*v, &imageVar)
+ if err != nil {
+ return err
+ }
+ cw.Image = &imageVar
+ }
+ case "description":
+ if v != nil {
+ var description string
+ err = json.Unmarshal(*v, &description)
+ if err != nil {
+ return err
+ }
+ cw.Description = &description
+ }
+ case "alternateName":
+ if v != nil {
+ var alternateName string
+ err = json.Unmarshal(*v, &alternateName)
+ if err != nil {
+ return err
+ }
+ cw.AlternateName = &alternateName
+ }
+ case "bingId":
+ if v != nil {
+ var bingID string
+ err = json.Unmarshal(*v, &bingID)
+ if err != nil {
+ return err
+ }
+ cw.BingID = &bingID
+ }
+ case "readLink":
+ if v != nil {
+ var readLink string
+ err = json.Unmarshal(*v, &readLink)
+ if err != nil {
+ return err
+ }
+ cw.ReadLink = &readLink
+ }
+ case "webSearchUrl":
+ if v != nil {
+ var webSearchURL string
+ err = json.Unmarshal(*v, &webSearchURL)
+ if err != nil {
+ return err
+ }
+ cw.WebSearchURL = &webSearchURL
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ cw.ID = &ID
+ }
+ case "_type":
+ if v != nil {
+ var typeVar Type
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cw.Type = typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// Error defines the error that occurred.
+type Error struct {
+ // Code - The error code that identifies the category of error. Possible values include: 'None', 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'
+ Code ErrorCode `json:"code,omitempty"`
+ // SubCode - The error code that further helps to identify the error. Possible values include: 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', 'HTTPNotAllowed', 'Blocked', 'AuthorizationMissing', 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired'
+ SubCode ErrorSubCode `json:"subCode,omitempty"`
+ // Message - A description of the error.
+ Message *string `json:"message,omitempty"`
+ // MoreDetails - A description that provides additional information about the error.
+ MoreDetails *string `json:"moreDetails,omitempty"`
+ // Parameter - The parameter in the request that caused the error.
+ Parameter *string `json:"parameter,omitempty"`
+ // Value - The parameter's value in the request that was not valid.
+ Value *string `json:"value,omitempty"`
+}
+
+// ErrorResponse the top-level response that represents a failed request.
+type ErrorResponse struct {
+ // Errors - A list of errors that describe the reasons why the request failed.
+ Errors *[]Error `json:"errors,omitempty"`
+ // ReadLink - The URL that returns this resource.
+ ReadLink *string `json:"readLink,omitempty"`
+ // WebSearchURL - The URL To Bing's search result for this item.
+ WebSearchURL *string `json:"webSearchUrl,omitempty"`
+ // ID - A String identifier.
+ ID *string `json:"id,omitempty"`
+ // Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeImages', 'TypeSearchResultsAnswer', 'TypeAnswer', 'TypeMediaObject', 'TypeResponse', 'TypeThing', 'TypeCreativeWork', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeWebPage'
+ Type Type `json:"_type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ErrorResponse.
+func (er ErrorResponse) MarshalJSON() ([]byte, error) {
+ er.Type = TypeErrorResponse
+ objectMap := make(map[string]interface{})
+ if er.Errors != nil {
+ objectMap["errors"] = er.Errors
+ }
+ if er.ReadLink != nil {
+ objectMap["readLink"] = er.ReadLink
+ }
+ if er.WebSearchURL != nil {
+ objectMap["webSearchUrl"] = er.WebSearchURL
+ }
+ if er.ID != nil {
+ objectMap["id"] = er.ID
+ }
+ if er.Type != "" {
+ objectMap["_type"] = er.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsImageObject is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsImageObject() (*ImageObject, bool) {
+ return nil, false
+}
+
+// AsImages is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsImages() (*Images, bool) {
+ return nil, false
+}
+
+// AsSearchResultsAnswer is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsAnswer is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsAnswer() (*Answer, bool) {
+ return nil, false
+}
+
+// AsBasicAnswer is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsBasicAnswer() (BasicAnswer, bool) {
+ return nil, false
+}
+
+// AsMediaObject is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsMediaObject() (*MediaObject, bool) {
+ return nil, false
+}
+
+// AsBasicMediaObject is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsBasicMediaObject() (BasicMediaObject, bool) {
+ return nil, false
+}
+
+// AsResponse is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsResponse() (*Response, bool) {
+ return nil, false
+}
+
+// AsBasicResponse is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsBasicResponse() (BasicResponse, bool) {
+ return &er, true
+}
+
+// AsThing is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsThing() (*Thing, bool) {
+ return nil, false
+}
+
+// AsBasicThing is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsBasicThing() (BasicThing, bool) {
+ return nil, false
+}
+
+// AsCreativeWork is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsCreativeWork() (*CreativeWork, bool) {
+ return nil, false
+}
+
+// AsBasicCreativeWork is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsBasicCreativeWork() (BasicCreativeWork, bool) {
+ return nil, false
+}
+
+// AsIdentifiable is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsIdentifiable() (*Identifiable, bool) {
+ return nil, false
+}
+
+// AsBasicIdentifiable is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsBasicIdentifiable() (BasicIdentifiable, bool) {
+ return &er, true
+}
+
+// AsErrorResponse is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsErrorResponse() (*ErrorResponse, bool) {
+ return &er, true
+}
+
+// AsWebPage is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsWebPage() (*WebPage, bool) {
+ return nil, false
+}
+
+// AsResponseBase is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsResponseBase() (*ResponseBase, bool) {
+ return nil, false
+}
+
+// AsBasicResponseBase is the BasicResponseBase implementation for ErrorResponse.
+func (er ErrorResponse) AsBasicResponseBase() (BasicResponseBase, bool) {
+ return &er, true
+}
+
+// BasicIdentifiable defines the identity of a resource.
+type BasicIdentifiable interface {
+ AsImageObject() (*ImageObject, bool)
+ AsImages() (*Images, bool)
+ AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
+ AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)
+ AsAnswer() (*Answer, bool)
+ AsBasicAnswer() (BasicAnswer, bool)
+ AsMediaObject() (*MediaObject, bool)
+ AsBasicMediaObject() (BasicMediaObject, bool)
+ AsResponse() (*Response, bool)
+ AsBasicResponse() (BasicResponse, bool)
+ AsThing() (*Thing, bool)
+ AsBasicThing() (BasicThing, bool)
+ AsCreativeWork() (*CreativeWork, bool)
+ AsBasicCreativeWork() (BasicCreativeWork, bool)
+ AsErrorResponse() (*ErrorResponse, bool)
+ AsWebPage() (*WebPage, bool)
+ AsIdentifiable() (*Identifiable, bool)
+}
+
+// Identifiable defines the identity of a resource.
+type Identifiable struct {
+ // ID - A String identifier.
+ ID *string `json:"id,omitempty"`
+ // Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeImages', 'TypeSearchResultsAnswer', 'TypeAnswer', 'TypeMediaObject', 'TypeResponse', 'TypeThing', 'TypeCreativeWork', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeWebPage'
+ Type Type `json:"_type,omitempty"`
+}
+
+func unmarshalBasicIdentifiable(body []byte) (BasicIdentifiable, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["_type"] {
+ case string(TypeImageObject):
+ var ioVar ImageObject
+ err := json.Unmarshal(body, &ioVar)
+ return ioVar, err
+ case string(TypeImages):
+ var i Images
+ err := json.Unmarshal(body, &i)
+ return i, err
+ case string(TypeSearchResultsAnswer):
+ var sra SearchResultsAnswer
+ err := json.Unmarshal(body, &sra)
+ return sra, err
+ case string(TypeAnswer):
+ var a Answer
+ err := json.Unmarshal(body, &a)
+ return a, err
+ case string(TypeMediaObject):
+ var mo MediaObject
+ err := json.Unmarshal(body, &mo)
+ return mo, err
+ case string(TypeResponse):
+ var r Response
+ err := json.Unmarshal(body, &r)
+ return r, err
+ case string(TypeThing):
+ var t Thing
+ err := json.Unmarshal(body, &t)
+ return t, err
+ case string(TypeCreativeWork):
+ var cw CreativeWork
+ err := json.Unmarshal(body, &cw)
+ return cw, err
+ case string(TypeErrorResponse):
+ var er ErrorResponse
+ err := json.Unmarshal(body, &er)
+ return er, err
+ case string(TypeWebPage):
+ var wp WebPage
+ err := json.Unmarshal(body, &wp)
+ return wp, err
+ default:
+ var i Identifiable
+ err := json.Unmarshal(body, &i)
+ return i, err
+ }
+}
+func unmarshalBasicIdentifiableArray(body []byte) ([]BasicIdentifiable, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ iArray := make([]BasicIdentifiable, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ i, err := unmarshalBasicIdentifiable(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ iArray[index] = i
+ }
+ return iArray, nil
+}
+
+// MarshalJSON is the custom marshaler for Identifiable.
+func (i Identifiable) MarshalJSON() ([]byte, error) {
+ i.Type = TypeIdentifiable
+ objectMap := make(map[string]interface{})
+ if i.ID != nil {
+ objectMap["id"] = i.ID
+ }
+ if i.Type != "" {
+ objectMap["_type"] = i.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsImageObject is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsImageObject() (*ImageObject, bool) {
+ return nil, false
+}
+
+// AsImages is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsImages() (*Images, bool) {
+ return nil, false
+}
+
+// AsSearchResultsAnswer is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsAnswer is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsAnswer() (*Answer, bool) {
+ return nil, false
+}
+
+// AsBasicAnswer is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsBasicAnswer() (BasicAnswer, bool) {
+ return nil, false
+}
+
+// AsMediaObject is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsMediaObject() (*MediaObject, bool) {
+ return nil, false
+}
+
+// AsBasicMediaObject is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsBasicMediaObject() (BasicMediaObject, bool) {
+ return nil, false
+}
+
+// AsResponse is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsResponse() (*Response, bool) {
+ return nil, false
+}
+
+// AsBasicResponse is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsBasicResponse() (BasicResponse, bool) {
+ return nil, false
+}
+
+// AsThing is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsThing() (*Thing, bool) {
+ return nil, false
+}
+
+// AsBasicThing is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsBasicThing() (BasicThing, bool) {
+ return nil, false
+}
+
+// AsCreativeWork is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsCreativeWork() (*CreativeWork, bool) {
+ return nil, false
+}
+
+// AsBasicCreativeWork is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsBasicCreativeWork() (BasicCreativeWork, bool) {
+ return nil, false
+}
+
+// AsIdentifiable is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsIdentifiable() (*Identifiable, bool) {
+ return &i, true
+}
+
+// AsBasicIdentifiable is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsBasicIdentifiable() (BasicIdentifiable, bool) {
+ return &i, true
+}
+
+// AsErrorResponse is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsErrorResponse() (*ErrorResponse, bool) {
+ return nil, false
+}
+
+// AsWebPage is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsWebPage() (*WebPage, bool) {
+ return nil, false
+}
+
+// AsResponseBase is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsResponseBase() (*ResponseBase, bool) {
+ return nil, false
+}
+
+// AsBasicResponseBase is the BasicResponseBase implementation for Identifiable.
+func (i Identifiable) AsBasicResponseBase() (BasicResponseBase, bool) {
+ return &i, true
+}
+
+// ImageObject defines an image
+type ImageObject struct {
+ // Thumbnail - The URL to a thumbnail of the image
+ Thumbnail *ImageObject `json:"thumbnail,omitempty"`
+ // ImageInsightsToken - The token that you use in a subsequent call to the Image Search API to get additional information about the image. For information about using this token, see the insightsToken query parameter.
+ ImageInsightsToken *string `json:"imageInsightsToken,omitempty"`
+ // ImageID - Unique Id for the image
+ ImageID *string `json:"imageId,omitempty"`
+ // AccentColor - A three-byte hexadecimal number that represents the color that dominates the image. Use the color as the temporary background in your client until the image is loaded.
+ AccentColor *string `json:"accentColor,omitempty"`
+ // VisualWords - Visual representation of the image. Used for getting more sizes
+ VisualWords *string `json:"visualWords,omitempty"`
+ // ContentURL - Original URL to retrieve the source (file) for the media object (e.g the source URL for the image).
+ ContentURL *string `json:"contentUrl,omitempty"`
+ // HostPageURL - URL of the page that hosts the media object.
+ HostPageURL *string `json:"hostPageUrl,omitempty"`
+ // ContentSize - Size of the media object content (use format "value unit" e.g "1024 B").
+ ContentSize *string `json:"contentSize,omitempty"`
+ // EncodingFormat - Encoding format (e.g mp3, mp4, jpeg, etc).
+ EncodingFormat *string `json:"encodingFormat,omitempty"`
+ // HostPageDisplayURL - Display URL of the page that hosts the media object.
+ HostPageDisplayURL *string `json:"hostPageDisplayUrl,omitempty"`
+ // Width - The width of the media object, in pixels.
+ Width *int32 `json:"width,omitempty"`
+ // Height - The height of the media object, in pixels.
+ Height *int32 `json:"height,omitempty"`
+ // ThumbnailURL - The URL to a thumbnail of the item.
+ ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
+ // Provider - The source of the creative work.
+ Provider *[]BasicThing `json:"provider,omitempty"`
+ // Text - Text content of this creative work
+ Text *string `json:"text,omitempty"`
+ // Name - The name of the thing represented by this object.
+ Name *string `json:"name,omitempty"`
+ // URL - The URL to get more information about the thing represented by this object.
+ URL *string `json:"url,omitempty"`
+ // Image - An image of the item.
+ Image *ImageObject `json:"image,omitempty"`
+ // Description - A short description of the item.
+ Description *string `json:"description,omitempty"`
+ // AlternateName - An alias for the item
+ AlternateName *string `json:"alternateName,omitempty"`
+ // BingID - An ID that uniquely identifies this item.
+ BingID *string `json:"bingId,omitempty"`
+ // ReadLink - The URL that returns this resource.
+ ReadLink *string `json:"readLink,omitempty"`
+ // WebSearchURL - The URL To Bing's search result for this item.
+ WebSearchURL *string `json:"webSearchUrl,omitempty"`
+ // ID - A String identifier.
+ ID *string `json:"id,omitempty"`
+ // Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeImages', 'TypeSearchResultsAnswer', 'TypeAnswer', 'TypeMediaObject', 'TypeResponse', 'TypeThing', 'TypeCreativeWork', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeWebPage'
+ Type Type `json:"_type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ImageObject.
+func (ioVar ImageObject) MarshalJSON() ([]byte, error) {
+ ioVar.Type = TypeImageObject
+ objectMap := make(map[string]interface{})
+ if ioVar.Thumbnail != nil {
+ objectMap["thumbnail"] = ioVar.Thumbnail
+ }
+ if ioVar.ImageInsightsToken != nil {
+ objectMap["imageInsightsToken"] = ioVar.ImageInsightsToken
+ }
+ if ioVar.ImageID != nil {
+ objectMap["imageId"] = ioVar.ImageID
+ }
+ if ioVar.AccentColor != nil {
+ objectMap["accentColor"] = ioVar.AccentColor
+ }
+ if ioVar.VisualWords != nil {
+ objectMap["visualWords"] = ioVar.VisualWords
+ }
+ if ioVar.ContentURL != nil {
+ objectMap["contentUrl"] = ioVar.ContentURL
+ }
+ if ioVar.HostPageURL != nil {
+ objectMap["hostPageUrl"] = ioVar.HostPageURL
+ }
+ if ioVar.ContentSize != nil {
+ objectMap["contentSize"] = ioVar.ContentSize
+ }
+ if ioVar.EncodingFormat != nil {
+ objectMap["encodingFormat"] = ioVar.EncodingFormat
+ }
+ if ioVar.HostPageDisplayURL != nil {
+ objectMap["hostPageDisplayUrl"] = ioVar.HostPageDisplayURL
+ }
+ if ioVar.Width != nil {
+ objectMap["width"] = ioVar.Width
+ }
+ if ioVar.Height != nil {
+ objectMap["height"] = ioVar.Height
+ }
+ if ioVar.ThumbnailURL != nil {
+ objectMap["thumbnailUrl"] = ioVar.ThumbnailURL
+ }
+ if ioVar.Provider != nil {
+ objectMap["provider"] = ioVar.Provider
+ }
+ if ioVar.Text != nil {
+ objectMap["text"] = ioVar.Text
+ }
+ if ioVar.Name != nil {
+ objectMap["name"] = ioVar.Name
+ }
+ if ioVar.URL != nil {
+ objectMap["url"] = ioVar.URL
+ }
+ if ioVar.Image != nil {
+ objectMap["image"] = ioVar.Image
+ }
+ if ioVar.Description != nil {
+ objectMap["description"] = ioVar.Description
+ }
+ if ioVar.AlternateName != nil {
+ objectMap["alternateName"] = ioVar.AlternateName
+ }
+ if ioVar.BingID != nil {
+ objectMap["bingId"] = ioVar.BingID
+ }
+ if ioVar.ReadLink != nil {
+ objectMap["readLink"] = ioVar.ReadLink
+ }
+ if ioVar.WebSearchURL != nil {
+ objectMap["webSearchUrl"] = ioVar.WebSearchURL
+ }
+ if ioVar.ID != nil {
+ objectMap["id"] = ioVar.ID
+ }
+ if ioVar.Type != "" {
+ objectMap["_type"] = ioVar.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsImageObject is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsImageObject() (*ImageObject, bool) {
+ return &ioVar, true
+}
+
+// AsImages is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsImages() (*Images, bool) {
+ return nil, false
+}
+
+// AsSearchResultsAnswer is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsAnswer is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsAnswer() (*Answer, bool) {
+ return nil, false
+}
+
+// AsBasicAnswer is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsBasicAnswer() (BasicAnswer, bool) {
+ return nil, false
+}
+
+// AsMediaObject is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsMediaObject() (*MediaObject, bool) {
+ return nil, false
+}
+
+// AsBasicMediaObject is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsBasicMediaObject() (BasicMediaObject, bool) {
+ return &ioVar, true
+}
+
+// AsResponse is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsResponse() (*Response, bool) {
+ return nil, false
+}
+
+// AsBasicResponse is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsBasicResponse() (BasicResponse, bool) {
+ return &ioVar, true
+}
+
+// AsThing is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsThing() (*Thing, bool) {
+ return nil, false
+}
+
+// AsBasicThing is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsBasicThing() (BasicThing, bool) {
+ return &ioVar, true
+}
+
+// AsCreativeWork is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsCreativeWork() (*CreativeWork, bool) {
+ return nil, false
+}
+
+// AsBasicCreativeWork is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsBasicCreativeWork() (BasicCreativeWork, bool) {
+ return &ioVar, true
+}
+
+// AsIdentifiable is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsIdentifiable() (*Identifiable, bool) {
+ return nil, false
+}
+
+// AsBasicIdentifiable is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsBasicIdentifiable() (BasicIdentifiable, bool) {
+ return &ioVar, true
+}
+
+// AsErrorResponse is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsErrorResponse() (*ErrorResponse, bool) {
+ return nil, false
+}
+
+// AsWebPage is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsWebPage() (*WebPage, bool) {
+ return nil, false
+}
+
+// AsResponseBase is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsResponseBase() (*ResponseBase, bool) {
+ return nil, false
+}
+
+// AsBasicResponseBase is the BasicResponseBase implementation for ImageObject.
+func (ioVar ImageObject) AsBasicResponseBase() (BasicResponseBase, bool) {
+ return &ioVar, true
+}
+
+// UnmarshalJSON is the custom unmarshaler for ImageObject struct.
+func (ioVar *ImageObject) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "thumbnail":
+ if v != nil {
+ var thumbnail ImageObject
+ err = json.Unmarshal(*v, &thumbnail)
+ if err != nil {
+ return err
+ }
+ ioVar.Thumbnail = &thumbnail
+ }
+ case "imageInsightsToken":
+ if v != nil {
+ var imageInsightsToken string
+ err = json.Unmarshal(*v, &imageInsightsToken)
+ if err != nil {
+ return err
+ }
+ ioVar.ImageInsightsToken = &imageInsightsToken
+ }
+ case "imageId":
+ if v != nil {
+ var imageID string
+ err = json.Unmarshal(*v, &imageID)
+ if err != nil {
+ return err
+ }
+ ioVar.ImageID = &imageID
+ }
+ case "accentColor":
+ if v != nil {
+ var accentColor string
+ err = json.Unmarshal(*v, &accentColor)
+ if err != nil {
+ return err
+ }
+ ioVar.AccentColor = &accentColor
+ }
+ case "visualWords":
+ if v != nil {
+ var visualWords string
+ err = json.Unmarshal(*v, &visualWords)
+ if err != nil {
+ return err
+ }
+ ioVar.VisualWords = &visualWords
+ }
+ case "contentUrl":
+ if v != nil {
+ var contentURL string
+ err = json.Unmarshal(*v, &contentURL)
+ if err != nil {
+ return err
+ }
+ ioVar.ContentURL = &contentURL
+ }
+ case "hostPageUrl":
+ if v != nil {
+ var hostPageURL string
+ err = json.Unmarshal(*v, &hostPageURL)
+ if err != nil {
+ return err
+ }
+ ioVar.HostPageURL = &hostPageURL
+ }
+ case "contentSize":
+ if v != nil {
+ var contentSize string
+ err = json.Unmarshal(*v, &contentSize)
+ if err != nil {
+ return err
+ }
+ ioVar.ContentSize = &contentSize
+ }
+ case "encodingFormat":
+ if v != nil {
+ var encodingFormat string
+ err = json.Unmarshal(*v, &encodingFormat)
+ if err != nil {
+ return err
+ }
+ ioVar.EncodingFormat = &encodingFormat
+ }
+ case "hostPageDisplayUrl":
+ if v != nil {
+ var hostPageDisplayURL string
+ err = json.Unmarshal(*v, &hostPageDisplayURL)
+ if err != nil {
+ return err
+ }
+ ioVar.HostPageDisplayURL = &hostPageDisplayURL
+ }
+ case "width":
+ if v != nil {
+ var width int32
+ err = json.Unmarshal(*v, &width)
+ if err != nil {
+ return err
+ }
+ ioVar.Width = &width
+ }
+ case "height":
+ if v != nil {
+ var height int32
+ err = json.Unmarshal(*v, &height)
+ if err != nil {
+ return err
+ }
+ ioVar.Height = &height
+ }
+ case "thumbnailUrl":
+ if v != nil {
+ var thumbnailURL string
+ err = json.Unmarshal(*v, &thumbnailURL)
+ if err != nil {
+ return err
+ }
+ ioVar.ThumbnailURL = &thumbnailURL
+ }
+ case "provider":
+ if v != nil {
+ provider, err := unmarshalBasicThingArray(*v)
+ if err != nil {
+ return err
+ }
+ ioVar.Provider = &provider
+ }
+ case "text":
+ if v != nil {
+ var textVar string
+ err = json.Unmarshal(*v, &textVar)
+ if err != nil {
+ return err
+ }
+ ioVar.Text = &textVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ioVar.Name = &name
+ }
+ case "url":
+ if v != nil {
+ var URL string
+ err = json.Unmarshal(*v, &URL)
+ if err != nil {
+ return err
+ }
+ ioVar.URL = &URL
+ }
+ case "image":
+ if v != nil {
+ var imageVar ImageObject
+ err = json.Unmarshal(*v, &imageVar)
+ if err != nil {
+ return err
+ }
+ ioVar.Image = &imageVar
+ }
+ case "description":
+ if v != nil {
+ var description string
+ err = json.Unmarshal(*v, &description)
+ if err != nil {
+ return err
+ }
+ ioVar.Description = &description
+ }
+ case "alternateName":
+ if v != nil {
+ var alternateName string
+ err = json.Unmarshal(*v, &alternateName)
+ if err != nil {
+ return err
+ }
+ ioVar.AlternateName = &alternateName
+ }
+ case "bingId":
+ if v != nil {
+ var bingID string
+ err = json.Unmarshal(*v, &bingID)
+ if err != nil {
+ return err
+ }
+ ioVar.BingID = &bingID
+ }
+ case "readLink":
+ if v != nil {
+ var readLink string
+ err = json.Unmarshal(*v, &readLink)
+ if err != nil {
+ return err
+ }
+ ioVar.ReadLink = &readLink
+ }
+ case "webSearchUrl":
+ if v != nil {
+ var webSearchURL string
+ err = json.Unmarshal(*v, &webSearchURL)
+ if err != nil {
+ return err
+ }
+ ioVar.WebSearchURL = &webSearchURL
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ioVar.ID = &ID
+ }
+ case "_type":
+ if v != nil {
+ var typeVar Type
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ioVar.Type = typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// Images defines an image answer
+type Images struct {
+ autorest.Response `json:"-"`
+ // NextOffset - Used as part of deduping. Tells client the next offset that client should use in the next pagination request
+ NextOffset *int32 `json:"nextOffset,omitempty"`
+ // Value - A list of image objects that are relevant to the query. If there are no results, the List is empty.
+ Value *[]ImageObject `json:"value,omitempty"`
+ // TotalEstimatedMatches - The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.
+ TotalEstimatedMatches *int64 `json:"totalEstimatedMatches,omitempty"`
+ // ReadLink - The URL that returns this resource.
+ ReadLink *string `json:"readLink,omitempty"`
+ // WebSearchURL - The URL To Bing's search result for this item.
+ WebSearchURL *string `json:"webSearchUrl,omitempty"`
+ // ID - A String identifier.
+ ID *string `json:"id,omitempty"`
+ // Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeImages', 'TypeSearchResultsAnswer', 'TypeAnswer', 'TypeMediaObject', 'TypeResponse', 'TypeThing', 'TypeCreativeWork', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeWebPage'
+ Type Type `json:"_type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Images.
+func (i Images) MarshalJSON() ([]byte, error) {
+ i.Type = TypeImages
+ objectMap := make(map[string]interface{})
+ if i.NextOffset != nil {
+ objectMap["nextOffset"] = i.NextOffset
+ }
+ if i.Value != nil {
+ objectMap["value"] = i.Value
+ }
+ if i.TotalEstimatedMatches != nil {
+ objectMap["totalEstimatedMatches"] = i.TotalEstimatedMatches
+ }
+ if i.ReadLink != nil {
+ objectMap["readLink"] = i.ReadLink
+ }
+ if i.WebSearchURL != nil {
+ objectMap["webSearchUrl"] = i.WebSearchURL
+ }
+ if i.ID != nil {
+ objectMap["id"] = i.ID
+ }
+ if i.Type != "" {
+ objectMap["_type"] = i.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsImageObject is the BasicResponseBase implementation for Images.
+func (i Images) AsImageObject() (*ImageObject, bool) {
+ return nil, false
+}
+
+// AsImages is the BasicResponseBase implementation for Images.
+func (i Images) AsImages() (*Images, bool) {
+ return &i, true
+}
+
+// AsSearchResultsAnswer is the BasicResponseBase implementation for Images.
+func (i Images) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Images.
+func (i Images) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
+ return &i, true
+}
+
+// AsAnswer is the BasicResponseBase implementation for Images.
+func (i Images) AsAnswer() (*Answer, bool) {
+ return nil, false
+}
+
+// AsBasicAnswer is the BasicResponseBase implementation for Images.
+func (i Images) AsBasicAnswer() (BasicAnswer, bool) {
+ return &i, true
+}
+
+// AsMediaObject is the BasicResponseBase implementation for Images.
+func (i Images) AsMediaObject() (*MediaObject, bool) {
+ return nil, false
+}
+
+// AsBasicMediaObject is the BasicResponseBase implementation for Images.
+func (i Images) AsBasicMediaObject() (BasicMediaObject, bool) {
+ return nil, false
+}
+
+// AsResponse is the BasicResponseBase implementation for Images.
+func (i Images) AsResponse() (*Response, bool) {
+ return nil, false
+}
+
+// AsBasicResponse is the BasicResponseBase implementation for Images.
+func (i Images) AsBasicResponse() (BasicResponse, bool) {
+ return &i, true
+}
+
+// AsThing is the BasicResponseBase implementation for Images.
+func (i Images) AsThing() (*Thing, bool) {
+ return nil, false
+}
+
+// AsBasicThing is the BasicResponseBase implementation for Images.
+func (i Images) AsBasicThing() (BasicThing, bool) {
+ return nil, false
+}
+
+// AsCreativeWork is the BasicResponseBase implementation for Images.
+func (i Images) AsCreativeWork() (*CreativeWork, bool) {
+ return nil, false
+}
+
+// AsBasicCreativeWork is the BasicResponseBase implementation for Images.
+func (i Images) AsBasicCreativeWork() (BasicCreativeWork, bool) {
+ return nil, false
+}
+
+// AsIdentifiable is the BasicResponseBase implementation for Images.
+func (i Images) AsIdentifiable() (*Identifiable, bool) {
+ return nil, false
+}
+
+// AsBasicIdentifiable is the BasicResponseBase implementation for Images.
+func (i Images) AsBasicIdentifiable() (BasicIdentifiable, bool) {
+ return &i, true
+}
+
+// AsErrorResponse is the BasicResponseBase implementation for Images.
+func (i Images) AsErrorResponse() (*ErrorResponse, bool) {
+ return nil, false
+}
+
+// AsWebPage is the BasicResponseBase implementation for Images.
+func (i Images) AsWebPage() (*WebPage, bool) {
+ return nil, false
+}
+
+// AsResponseBase is the BasicResponseBase implementation for Images.
+func (i Images) AsResponseBase() (*ResponseBase, bool) {
+ return nil, false
+}
+
+// AsBasicResponseBase is the BasicResponseBase implementation for Images.
+func (i Images) AsBasicResponseBase() (BasicResponseBase, bool) {
+ return &i, true
+}
+
+// BasicMediaObject defines a media object.
+type BasicMediaObject interface {
+ AsImageObject() (*ImageObject, bool)
+ AsMediaObject() (*MediaObject, bool)
+}
+
+// MediaObject defines a media object.
+type MediaObject struct {
+ // ContentURL - Original URL to retrieve the source (file) for the media object (e.g the source URL for the image).
+ ContentURL *string `json:"contentUrl,omitempty"`
+ // HostPageURL - URL of the page that hosts the media object.
+ HostPageURL *string `json:"hostPageUrl,omitempty"`
+ // ContentSize - Size of the media object content (use format "value unit" e.g "1024 B").
+ ContentSize *string `json:"contentSize,omitempty"`
+ // EncodingFormat - Encoding format (e.g mp3, mp4, jpeg, etc).
+ EncodingFormat *string `json:"encodingFormat,omitempty"`
+ // HostPageDisplayURL - Display URL of the page that hosts the media object.
+ HostPageDisplayURL *string `json:"hostPageDisplayUrl,omitempty"`
+ // Width - The width of the media object, in pixels.
+ Width *int32 `json:"width,omitempty"`
+ // Height - The height of the media object, in pixels.
+ Height *int32 `json:"height,omitempty"`
+ // ThumbnailURL - The URL to a thumbnail of the item.
+ ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
+ // Provider - The source of the creative work.
+ Provider *[]BasicThing `json:"provider,omitempty"`
+ // Text - Text content of this creative work
+ Text *string `json:"text,omitempty"`
+ // Name - The name of the thing represented by this object.
+ Name *string `json:"name,omitempty"`
+ // URL - The URL to get more information about the thing represented by this object.
+ URL *string `json:"url,omitempty"`
+ // Image - An image of the item.
+ Image *ImageObject `json:"image,omitempty"`
+ // Description - A short description of the item.
+ Description *string `json:"description,omitempty"`
+ // AlternateName - An alias for the item
+ AlternateName *string `json:"alternateName,omitempty"`
+ // BingID - An ID that uniquely identifies this item.
+ BingID *string `json:"bingId,omitempty"`
+ // ReadLink - The URL that returns this resource.
+ ReadLink *string `json:"readLink,omitempty"`
+ // WebSearchURL - The URL To Bing's search result for this item.
+ WebSearchURL *string `json:"webSearchUrl,omitempty"`
+ // ID - A String identifier.
+ ID *string `json:"id,omitempty"`
+ // Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeImages', 'TypeSearchResultsAnswer', 'TypeAnswer', 'TypeMediaObject', 'TypeResponse', 'TypeThing', 'TypeCreativeWork', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeWebPage'
+ Type Type `json:"_type,omitempty"`
+}
+
+func unmarshalBasicMediaObject(body []byte) (BasicMediaObject, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["_type"] {
+ case string(TypeImageObject):
+ var ioVar ImageObject
+ err := json.Unmarshal(body, &ioVar)
+ return ioVar, err
+ default:
+ var mo MediaObject
+ err := json.Unmarshal(body, &mo)
+ return mo, err
+ }
+}
+func unmarshalBasicMediaObjectArray(body []byte) ([]BasicMediaObject, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ moArray := make([]BasicMediaObject, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ mo, err := unmarshalBasicMediaObject(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ moArray[index] = mo
+ }
+ return moArray, nil
+}
+
+// MarshalJSON is the custom marshaler for MediaObject.
+func (mo MediaObject) MarshalJSON() ([]byte, error) {
+ mo.Type = TypeMediaObject
+ objectMap := make(map[string]interface{})
+ if mo.ContentURL != nil {
+ objectMap["contentUrl"] = mo.ContentURL
+ }
+ if mo.HostPageURL != nil {
+ objectMap["hostPageUrl"] = mo.HostPageURL
+ }
+ if mo.ContentSize != nil {
+ objectMap["contentSize"] = mo.ContentSize
+ }
+ if mo.EncodingFormat != nil {
+ objectMap["encodingFormat"] = mo.EncodingFormat
+ }
+ if mo.HostPageDisplayURL != nil {
+ objectMap["hostPageDisplayUrl"] = mo.HostPageDisplayURL
+ }
+ if mo.Width != nil {
+ objectMap["width"] = mo.Width
+ }
+ if mo.Height != nil {
+ objectMap["height"] = mo.Height
+ }
+ if mo.ThumbnailURL != nil {
+ objectMap["thumbnailUrl"] = mo.ThumbnailURL
+ }
+ if mo.Provider != nil {
+ objectMap["provider"] = mo.Provider
+ }
+ if mo.Text != nil {
+ objectMap["text"] = mo.Text
+ }
+ if mo.Name != nil {
+ objectMap["name"] = mo.Name
+ }
+ if mo.URL != nil {
+ objectMap["url"] = mo.URL
+ }
+ if mo.Image != nil {
+ objectMap["image"] = mo.Image
+ }
+ if mo.Description != nil {
+ objectMap["description"] = mo.Description
+ }
+ if mo.AlternateName != nil {
+ objectMap["alternateName"] = mo.AlternateName
+ }
+ if mo.BingID != nil {
+ objectMap["bingId"] = mo.BingID
+ }
+ if mo.ReadLink != nil {
+ objectMap["readLink"] = mo.ReadLink
+ }
+ if mo.WebSearchURL != nil {
+ objectMap["webSearchUrl"] = mo.WebSearchURL
+ }
+ if mo.ID != nil {
+ objectMap["id"] = mo.ID
+ }
+ if mo.Type != "" {
+ objectMap["_type"] = mo.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsImageObject is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsImageObject() (*ImageObject, bool) {
+ return nil, false
+}
+
+// AsImages is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsImages() (*Images, bool) {
+ return nil, false
+}
+
+// AsSearchResultsAnswer is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsAnswer is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsAnswer() (*Answer, bool) {
+ return nil, false
+}
+
+// AsBasicAnswer is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsBasicAnswer() (BasicAnswer, bool) {
+ return nil, false
+}
+
+// AsMediaObject is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsMediaObject() (*MediaObject, bool) {
+ return &mo, true
+}
+
+// AsBasicMediaObject is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsBasicMediaObject() (BasicMediaObject, bool) {
+ return &mo, true
+}
+
+// AsResponse is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsResponse() (*Response, bool) {
+ return nil, false
+}
+
+// AsBasicResponse is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsBasicResponse() (BasicResponse, bool) {
+ return &mo, true
+}
+
+// AsThing is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsThing() (*Thing, bool) {
+ return nil, false
+}
+
+// AsBasicThing is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsBasicThing() (BasicThing, bool) {
+ return &mo, true
+}
+
+// AsCreativeWork is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsCreativeWork() (*CreativeWork, bool) {
+ return nil, false
+}
+
+// AsBasicCreativeWork is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsBasicCreativeWork() (BasicCreativeWork, bool) {
+ return &mo, true
+}
+
+// AsIdentifiable is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsIdentifiable() (*Identifiable, bool) {
+ return nil, false
+}
+
+// AsBasicIdentifiable is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsBasicIdentifiable() (BasicIdentifiable, bool) {
+ return &mo, true
+}
+
+// AsErrorResponse is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsErrorResponse() (*ErrorResponse, bool) {
+ return nil, false
+}
+
+// AsWebPage is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsWebPage() (*WebPage, bool) {
+ return nil, false
+}
+
+// AsResponseBase is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsResponseBase() (*ResponseBase, bool) {
+ return nil, false
+}
+
+// AsBasicResponseBase is the BasicResponseBase implementation for MediaObject.
+func (mo MediaObject) AsBasicResponseBase() (BasicResponseBase, bool) {
+ return &mo, true
+}
+
+// UnmarshalJSON is the custom unmarshaler for MediaObject struct.
+func (mo *MediaObject) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "contentUrl":
+ if v != nil {
+ var contentURL string
+ err = json.Unmarshal(*v, &contentURL)
+ if err != nil {
+ return err
+ }
+ mo.ContentURL = &contentURL
+ }
+ case "hostPageUrl":
+ if v != nil {
+ var hostPageURL string
+ err = json.Unmarshal(*v, &hostPageURL)
+ if err != nil {
+ return err
+ }
+ mo.HostPageURL = &hostPageURL
+ }
+ case "contentSize":
+ if v != nil {
+ var contentSize string
+ err = json.Unmarshal(*v, &contentSize)
+ if err != nil {
+ return err
+ }
+ mo.ContentSize = &contentSize
+ }
+ case "encodingFormat":
+ if v != nil {
+ var encodingFormat string
+ err = json.Unmarshal(*v, &encodingFormat)
+ if err != nil {
+ return err
+ }
+ mo.EncodingFormat = &encodingFormat
+ }
+ case "hostPageDisplayUrl":
+ if v != nil {
+ var hostPageDisplayURL string
+ err = json.Unmarshal(*v, &hostPageDisplayURL)
+ if err != nil {
+ return err
+ }
+ mo.HostPageDisplayURL = &hostPageDisplayURL
+ }
+ case "width":
+ if v != nil {
+ var width int32
+ err = json.Unmarshal(*v, &width)
+ if err != nil {
+ return err
+ }
+ mo.Width = &width
+ }
+ case "height":
+ if v != nil {
+ var height int32
+ err = json.Unmarshal(*v, &height)
+ if err != nil {
+ return err
+ }
+ mo.Height = &height
+ }
+ case "thumbnailUrl":
+ if v != nil {
+ var thumbnailURL string
+ err = json.Unmarshal(*v, &thumbnailURL)
+ if err != nil {
+ return err
+ }
+ mo.ThumbnailURL = &thumbnailURL
+ }
+ case "provider":
+ if v != nil {
+ provider, err := unmarshalBasicThingArray(*v)
+ if err != nil {
+ return err
+ }
+ mo.Provider = &provider
+ }
+ case "text":
+ if v != nil {
+ var textVar string
+ err = json.Unmarshal(*v, &textVar)
+ if err != nil {
+ return err
+ }
+ mo.Text = &textVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ mo.Name = &name
+ }
+ case "url":
+ if v != nil {
+ var URL string
+ err = json.Unmarshal(*v, &URL)
+ if err != nil {
+ return err
+ }
+ mo.URL = &URL
+ }
+ case "image":
+ if v != nil {
+ var imageVar ImageObject
+ err = json.Unmarshal(*v, &imageVar)
+ if err != nil {
+ return err
+ }
+ mo.Image = &imageVar
+ }
+ case "description":
+ if v != nil {
+ var description string
+ err = json.Unmarshal(*v, &description)
+ if err != nil {
+ return err
+ }
+ mo.Description = &description
+ }
+ case "alternateName":
+ if v != nil {
+ var alternateName string
+ err = json.Unmarshal(*v, &alternateName)
+ if err != nil {
+ return err
+ }
+ mo.AlternateName = &alternateName
+ }
+ case "bingId":
+ if v != nil {
+ var bingID string
+ err = json.Unmarshal(*v, &bingID)
+ if err != nil {
+ return err
+ }
+ mo.BingID = &bingID
+ }
+ case "readLink":
+ if v != nil {
+ var readLink string
+ err = json.Unmarshal(*v, &readLink)
+ if err != nil {
+ return err
+ }
+ mo.ReadLink = &readLink
+ }
+ case "webSearchUrl":
+ if v != nil {
+ var webSearchURL string
+ err = json.Unmarshal(*v, &webSearchURL)
+ if err != nil {
+ return err
+ }
+ mo.WebSearchURL = &webSearchURL
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ mo.ID = &ID
+ }
+ case "_type":
+ if v != nil {
+ var typeVar Type
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ mo.Type = typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// Query defines a search query.
+type Query struct {
+ // Text - The query string. Use this string as the query term in a new search request.
+ Text *string `json:"text,omitempty"`
+ // DisplayText - The display version of the query term. This version of the query term may contain special characters that highlight the search term found in the query string. The string contains the highlighting characters only if the query enabled hit highlighting
+ DisplayText *string `json:"displayText,omitempty"`
+ // WebSearchURL - The URL that takes the user to the Bing search results page for the query.Only related search results include this field.
+ WebSearchURL *string `json:"webSearchUrl,omitempty"`
+ // SearchLink - The URL that you use to get the results of the related search. Before using the URL, you must append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL if you're displaying the results in your own user interface. Otherwise, use the webSearchUrl URL.
+ SearchLink *string `json:"searchLink,omitempty"`
+ // Thumbnail - The URL to a thumbnail of a related image.
+ Thumbnail *ImageObject `json:"thumbnail,omitempty"`
+}
+
+// BasicResponse defines a response. All schemas that could be returned at the root of a response should inherit from
+// this
+type BasicResponse interface {
+ AsImageObject() (*ImageObject, bool)
+ AsImages() (*Images, bool)
+ AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
+ AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)
+ AsAnswer() (*Answer, bool)
+ AsBasicAnswer() (BasicAnswer, bool)
+ AsMediaObject() (*MediaObject, bool)
+ AsBasicMediaObject() (BasicMediaObject, bool)
+ AsThing() (*Thing, bool)
+ AsBasicThing() (BasicThing, bool)
+ AsCreativeWork() (*CreativeWork, bool)
+ AsBasicCreativeWork() (BasicCreativeWork, bool)
+ AsErrorResponse() (*ErrorResponse, bool)
+ AsWebPage() (*WebPage, bool)
+ AsResponse() (*Response, bool)
+}
+
+// Response defines a response. All schemas that could be returned at the root of a response should inherit from
+// this
+type Response struct {
+ // ReadLink - The URL that returns this resource.
+ ReadLink *string `json:"readLink,omitempty"`
+ // WebSearchURL - The URL To Bing's search result for this item.
+ WebSearchURL *string `json:"webSearchUrl,omitempty"`
+ // ID - A String identifier.
+ ID *string `json:"id,omitempty"`
+ // Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeImages', 'TypeSearchResultsAnswer', 'TypeAnswer', 'TypeMediaObject', 'TypeResponse', 'TypeThing', 'TypeCreativeWork', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeWebPage'
+ Type Type `json:"_type,omitempty"`
+}
+
+func unmarshalBasicResponse(body []byte) (BasicResponse, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["_type"] {
+ case string(TypeImageObject):
+ var ioVar ImageObject
+ err := json.Unmarshal(body, &ioVar)
+ return ioVar, err
+ case string(TypeImages):
+ var i Images
+ err := json.Unmarshal(body, &i)
+ return i, err
+ case string(TypeSearchResultsAnswer):
+ var sra SearchResultsAnswer
+ err := json.Unmarshal(body, &sra)
+ return sra, err
+ case string(TypeAnswer):
+ var a Answer
+ err := json.Unmarshal(body, &a)
+ return a, err
+ case string(TypeMediaObject):
+ var mo MediaObject
+ err := json.Unmarshal(body, &mo)
+ return mo, err
+ case string(TypeThing):
+ var t Thing
+ err := json.Unmarshal(body, &t)
+ return t, err
+ case string(TypeCreativeWork):
+ var cw CreativeWork
+ err := json.Unmarshal(body, &cw)
+ return cw, err
+ case string(TypeErrorResponse):
+ var er ErrorResponse
+ err := json.Unmarshal(body, &er)
+ return er, err
+ case string(TypeWebPage):
+ var wp WebPage
+ err := json.Unmarshal(body, &wp)
+ return wp, err
+ default:
+ var r Response
+ err := json.Unmarshal(body, &r)
+ return r, err
+ }
+}
+func unmarshalBasicResponseArray(body []byte) ([]BasicResponse, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ rArray := make([]BasicResponse, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ r, err := unmarshalBasicResponse(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ rArray[index] = r
+ }
+ return rArray, nil
+}
+
+// MarshalJSON is the custom marshaler for Response.
+func (r Response) MarshalJSON() ([]byte, error) {
+ r.Type = TypeResponse
+ objectMap := make(map[string]interface{})
+ if r.ReadLink != nil {
+ objectMap["readLink"] = r.ReadLink
+ }
+ if r.WebSearchURL != nil {
+ objectMap["webSearchUrl"] = r.WebSearchURL
+ }
+ if r.ID != nil {
+ objectMap["id"] = r.ID
+ }
+ if r.Type != "" {
+ objectMap["_type"] = r.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsImageObject is the BasicResponseBase implementation for Response.
+func (r Response) AsImageObject() (*ImageObject, bool) {
+ return nil, false
+}
+
+// AsImages is the BasicResponseBase implementation for Response.
+func (r Response) AsImages() (*Images, bool) {
+ return nil, false
+}
+
+// AsSearchResultsAnswer is the BasicResponseBase implementation for Response.
+func (r Response) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Response.
+func (r Response) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsAnswer is the BasicResponseBase implementation for Response.
+func (r Response) AsAnswer() (*Answer, bool) {
+ return nil, false
+}
+
+// AsBasicAnswer is the BasicResponseBase implementation for Response.
+func (r Response) AsBasicAnswer() (BasicAnswer, bool) {
+ return nil, false
+}
+
+// AsMediaObject is the BasicResponseBase implementation for Response.
+func (r Response) AsMediaObject() (*MediaObject, bool) {
+ return nil, false
+}
+
+// AsBasicMediaObject is the BasicResponseBase implementation for Response.
+func (r Response) AsBasicMediaObject() (BasicMediaObject, bool) {
+ return nil, false
+}
+
+// AsResponse is the BasicResponseBase implementation for Response.
+func (r Response) AsResponse() (*Response, bool) {
+ return &r, true
+}
+
+// AsBasicResponse is the BasicResponseBase implementation for Response.
+func (r Response) AsBasicResponse() (BasicResponse, bool) {
+ return &r, true
+}
+
+// AsThing is the BasicResponseBase implementation for Response.
+func (r Response) AsThing() (*Thing, bool) {
+ return nil, false
+}
+
+// AsBasicThing is the BasicResponseBase implementation for Response.
+func (r Response) AsBasicThing() (BasicThing, bool) {
+ return nil, false
+}
+
+// AsCreativeWork is the BasicResponseBase implementation for Response.
+func (r Response) AsCreativeWork() (*CreativeWork, bool) {
+ return nil, false
+}
+
+// AsBasicCreativeWork is the BasicResponseBase implementation for Response.
+func (r Response) AsBasicCreativeWork() (BasicCreativeWork, bool) {
+ return nil, false
+}
+
+// AsIdentifiable is the BasicResponseBase implementation for Response.
+func (r Response) AsIdentifiable() (*Identifiable, bool) {
+ return nil, false
+}
+
+// AsBasicIdentifiable is the BasicResponseBase implementation for Response.
+func (r Response) AsBasicIdentifiable() (BasicIdentifiable, bool) {
+ return &r, true
+}
+
+// AsErrorResponse is the BasicResponseBase implementation for Response.
+func (r Response) AsErrorResponse() (*ErrorResponse, bool) {
+ return nil, false
+}
+
+// AsWebPage is the BasicResponseBase implementation for Response.
+func (r Response) AsWebPage() (*WebPage, bool) {
+ return nil, false
+}
+
+// AsResponseBase is the BasicResponseBase implementation for Response.
+func (r Response) AsResponseBase() (*ResponseBase, bool) {
+ return nil, false
+}
+
+// AsBasicResponseBase is the BasicResponseBase implementation for Response.
+func (r Response) AsBasicResponseBase() (BasicResponseBase, bool) {
+ return &r, true
+}
+
+// BasicResponseBase response base
+type BasicResponseBase interface {
+ AsImageObject() (*ImageObject, bool)
+ AsImages() (*Images, bool)
+ AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
+ AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)
+ AsAnswer() (*Answer, bool)
+ AsBasicAnswer() (BasicAnswer, bool)
+ AsMediaObject() (*MediaObject, bool)
+ AsBasicMediaObject() (BasicMediaObject, bool)
+ AsResponse() (*Response, bool)
+ AsBasicResponse() (BasicResponse, bool)
+ AsThing() (*Thing, bool)
+ AsBasicThing() (BasicThing, bool)
+ AsCreativeWork() (*CreativeWork, bool)
+ AsBasicCreativeWork() (BasicCreativeWork, bool)
+ AsIdentifiable() (*Identifiable, bool)
+ AsBasicIdentifiable() (BasicIdentifiable, bool)
+ AsErrorResponse() (*ErrorResponse, bool)
+ AsWebPage() (*WebPage, bool)
+ AsResponseBase() (*ResponseBase, bool)
+}
+
+// ResponseBase response base
+type ResponseBase struct {
+ // Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeImages', 'TypeSearchResultsAnswer', 'TypeAnswer', 'TypeMediaObject', 'TypeResponse', 'TypeThing', 'TypeCreativeWork', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeWebPage'
+ Type Type `json:"_type,omitempty"`
+}
+
+func unmarshalBasicResponseBase(body []byte) (BasicResponseBase, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["_type"] {
+ case string(TypeImageObject):
+ var ioVar ImageObject
+ err := json.Unmarshal(body, &ioVar)
+ return ioVar, err
+ case string(TypeImages):
+ var i Images
+ err := json.Unmarshal(body, &i)
+ return i, err
+ case string(TypeSearchResultsAnswer):
+ var sra SearchResultsAnswer
+ err := json.Unmarshal(body, &sra)
+ return sra, err
+ case string(TypeAnswer):
+ var a Answer
+ err := json.Unmarshal(body, &a)
+ return a, err
+ case string(TypeMediaObject):
+ var mo MediaObject
+ err := json.Unmarshal(body, &mo)
+ return mo, err
+ case string(TypeResponse):
+ var r Response
+ err := json.Unmarshal(body, &r)
+ return r, err
+ case string(TypeThing):
+ var t Thing
+ err := json.Unmarshal(body, &t)
+ return t, err
+ case string(TypeCreativeWork):
+ var cw CreativeWork
+ err := json.Unmarshal(body, &cw)
+ return cw, err
+ case string(TypeIdentifiable):
+ var i Identifiable
+ err := json.Unmarshal(body, &i)
+ return i, err
+ case string(TypeErrorResponse):
+ var er ErrorResponse
+ err := json.Unmarshal(body, &er)
+ return er, err
+ case string(TypeWebPage):
+ var wp WebPage
+ err := json.Unmarshal(body, &wp)
+ return wp, err
+ default:
+ var rb ResponseBase
+ err := json.Unmarshal(body, &rb)
+ return rb, err
+ }
+}
+func unmarshalBasicResponseBaseArray(body []byte) ([]BasicResponseBase, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ rbArray := make([]BasicResponseBase, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ rb, err := unmarshalBasicResponseBase(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ rbArray[index] = rb
+ }
+ return rbArray, nil
+}
+
+// MarshalJSON is the custom marshaler for ResponseBase.
+func (rb ResponseBase) MarshalJSON() ([]byte, error) {
+ rb.Type = TypeResponseBase
+ objectMap := make(map[string]interface{})
+ if rb.Type != "" {
+ objectMap["_type"] = rb.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsImageObject is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsImageObject() (*ImageObject, bool) {
+ return nil, false
+}
+
+// AsImages is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsImages() (*Images, bool) {
+ return nil, false
+}
+
+// AsSearchResultsAnswer is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsAnswer is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsAnswer() (*Answer, bool) {
+ return nil, false
+}
+
+// AsBasicAnswer is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsBasicAnswer() (BasicAnswer, bool) {
+ return nil, false
+}
+
+// AsMediaObject is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsMediaObject() (*MediaObject, bool) {
+ return nil, false
+}
+
+// AsBasicMediaObject is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsBasicMediaObject() (BasicMediaObject, bool) {
+ return nil, false
+}
+
+// AsResponse is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsResponse() (*Response, bool) {
+ return nil, false
+}
+
+// AsBasicResponse is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsBasicResponse() (BasicResponse, bool) {
+ return nil, false
+}
+
+// AsThing is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsThing() (*Thing, bool) {
+ return nil, false
+}
+
+// AsBasicThing is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsBasicThing() (BasicThing, bool) {
+ return nil, false
+}
+
+// AsCreativeWork is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsCreativeWork() (*CreativeWork, bool) {
+ return nil, false
+}
+
+// AsBasicCreativeWork is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsBasicCreativeWork() (BasicCreativeWork, bool) {
+ return nil, false
+}
+
+// AsIdentifiable is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsIdentifiable() (*Identifiable, bool) {
+ return nil, false
+}
+
+// AsBasicIdentifiable is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsBasicIdentifiable() (BasicIdentifiable, bool) {
+ return nil, false
+}
+
+// AsErrorResponse is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsErrorResponse() (*ErrorResponse, bool) {
+ return nil, false
+}
+
+// AsWebPage is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsWebPage() (*WebPage, bool) {
+ return nil, false
+}
+
+// AsResponseBase is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsResponseBase() (*ResponseBase, bool) {
+ return &rb, true
+}
+
+// AsBasicResponseBase is the BasicResponseBase implementation for ResponseBase.
+func (rb ResponseBase) AsBasicResponseBase() (BasicResponseBase, bool) {
+ return &rb, true
+}
+
+// BasicSearchResultsAnswer defines a search result answer.
+type BasicSearchResultsAnswer interface {
+ AsImages() (*Images, bool)
+ AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
+}
+
+// SearchResultsAnswer defines a search result answer.
+type SearchResultsAnswer struct {
+ // TotalEstimatedMatches - The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.
+ TotalEstimatedMatches *int64 `json:"totalEstimatedMatches,omitempty"`
+ // ReadLink - The URL that returns this resource.
+ ReadLink *string `json:"readLink,omitempty"`
+ // WebSearchURL - The URL To Bing's search result for this item.
+ WebSearchURL *string `json:"webSearchUrl,omitempty"`
+ // ID - A String identifier.
+ ID *string `json:"id,omitempty"`
+ // Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeImages', 'TypeSearchResultsAnswer', 'TypeAnswer', 'TypeMediaObject', 'TypeResponse', 'TypeThing', 'TypeCreativeWork', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeWebPage'
+ Type Type `json:"_type,omitempty"`
+}
+
+func unmarshalBasicSearchResultsAnswer(body []byte) (BasicSearchResultsAnswer, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["_type"] {
+ case string(TypeImages):
+ var i Images
+ err := json.Unmarshal(body, &i)
+ return i, err
+ default:
+ var sra SearchResultsAnswer
+ err := json.Unmarshal(body, &sra)
+ return sra, err
+ }
+}
+func unmarshalBasicSearchResultsAnswerArray(body []byte) ([]BasicSearchResultsAnswer, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ sraArray := make([]BasicSearchResultsAnswer, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ sra, err := unmarshalBasicSearchResultsAnswer(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ sraArray[index] = sra
+ }
+ return sraArray, nil
+}
+
+// MarshalJSON is the custom marshaler for SearchResultsAnswer.
+func (sra SearchResultsAnswer) MarshalJSON() ([]byte, error) {
+ sra.Type = TypeSearchResultsAnswer
+ objectMap := make(map[string]interface{})
+ if sra.TotalEstimatedMatches != nil {
+ objectMap["totalEstimatedMatches"] = sra.TotalEstimatedMatches
+ }
+ if sra.ReadLink != nil {
+ objectMap["readLink"] = sra.ReadLink
+ }
+ if sra.WebSearchURL != nil {
+ objectMap["webSearchUrl"] = sra.WebSearchURL
+ }
+ if sra.ID != nil {
+ objectMap["id"] = sra.ID
+ }
+ if sra.Type != "" {
+ objectMap["_type"] = sra.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsImageObject is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsImageObject() (*ImageObject, bool) {
+ return nil, false
+}
+
+// AsImages is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsImages() (*Images, bool) {
+ return nil, false
+}
+
+// AsSearchResultsAnswer is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
+ return &sra, true
+}
+
+// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
+ return &sra, true
+}
+
+// AsAnswer is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsAnswer() (*Answer, bool) {
+ return nil, false
+}
+
+// AsBasicAnswer is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsBasicAnswer() (BasicAnswer, bool) {
+ return &sra, true
+}
+
+// AsMediaObject is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsMediaObject() (*MediaObject, bool) {
+ return nil, false
+}
+
+// AsBasicMediaObject is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsBasicMediaObject() (BasicMediaObject, bool) {
+ return nil, false
+}
+
+// AsResponse is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsResponse() (*Response, bool) {
+ return nil, false
+}
+
+// AsBasicResponse is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsBasicResponse() (BasicResponse, bool) {
+ return &sra, true
+}
+
+// AsThing is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsThing() (*Thing, bool) {
+ return nil, false
+}
+
+// AsBasicThing is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsBasicThing() (BasicThing, bool) {
+ return nil, false
+}
+
+// AsCreativeWork is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsCreativeWork() (*CreativeWork, bool) {
+ return nil, false
+}
+
+// AsBasicCreativeWork is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsBasicCreativeWork() (BasicCreativeWork, bool) {
+ return nil, false
+}
+
+// AsIdentifiable is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsIdentifiable() (*Identifiable, bool) {
+ return nil, false
+}
+
+// AsBasicIdentifiable is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsBasicIdentifiable() (BasicIdentifiable, bool) {
+ return &sra, true
+}
+
+// AsErrorResponse is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsErrorResponse() (*ErrorResponse, bool) {
+ return nil, false
+}
+
+// AsWebPage is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsWebPage() (*WebPage, bool) {
+ return nil, false
+}
+
+// AsResponseBase is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsResponseBase() (*ResponseBase, bool) {
+ return nil, false
+}
+
+// AsBasicResponseBase is the BasicResponseBase implementation for SearchResultsAnswer.
+func (sra SearchResultsAnswer) AsBasicResponseBase() (BasicResponseBase, bool) {
+ return &sra, true
+}
+
+// BasicThing defines a thing.
+type BasicThing interface {
+ AsImageObject() (*ImageObject, bool)
+ AsMediaObject() (*MediaObject, bool)
+ AsBasicMediaObject() (BasicMediaObject, bool)
+ AsCreativeWork() (*CreativeWork, bool)
+ AsBasicCreativeWork() (BasicCreativeWork, bool)
+ AsWebPage() (*WebPage, bool)
+ AsThing() (*Thing, bool)
+}
+
+// Thing defines a thing.
+type Thing struct {
+ // Name - The name of the thing represented by this object.
+ Name *string `json:"name,omitempty"`
+ // URL - The URL to get more information about the thing represented by this object.
+ URL *string `json:"url,omitempty"`
+ // Image - An image of the item.
+ Image *ImageObject `json:"image,omitempty"`
+ // Description - A short description of the item.
+ Description *string `json:"description,omitempty"`
+ // AlternateName - An alias for the item
+ AlternateName *string `json:"alternateName,omitempty"`
+ // BingID - An ID that uniquely identifies this item.
+ BingID *string `json:"bingId,omitempty"`
+ // ReadLink - The URL that returns this resource.
+ ReadLink *string `json:"readLink,omitempty"`
+ // WebSearchURL - The URL To Bing's search result for this item.
+ WebSearchURL *string `json:"webSearchUrl,omitempty"`
+ // ID - A String identifier.
+ ID *string `json:"id,omitempty"`
+ // Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeImages', 'TypeSearchResultsAnswer', 'TypeAnswer', 'TypeMediaObject', 'TypeResponse', 'TypeThing', 'TypeCreativeWork', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeWebPage'
+ Type Type `json:"_type,omitempty"`
+}
+
+func unmarshalBasicThing(body []byte) (BasicThing, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["_type"] {
+ case string(TypeImageObject):
+ var ioVar ImageObject
+ err := json.Unmarshal(body, &ioVar)
+ return ioVar, err
+ case string(TypeMediaObject):
+ var mo MediaObject
+ err := json.Unmarshal(body, &mo)
+ return mo, err
+ case string(TypeCreativeWork):
+ var cw CreativeWork
+ err := json.Unmarshal(body, &cw)
+ return cw, err
+ case string(TypeWebPage):
+ var wp WebPage
+ err := json.Unmarshal(body, &wp)
+ return wp, err
+ default:
+ var t Thing
+ err := json.Unmarshal(body, &t)
+ return t, err
+ }
+}
+func unmarshalBasicThingArray(body []byte) ([]BasicThing, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ tArray := make([]BasicThing, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ t, err := unmarshalBasicThing(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ tArray[index] = t
+ }
+ return tArray, nil
+}
+
+// MarshalJSON is the custom marshaler for Thing.
+func (t Thing) MarshalJSON() ([]byte, error) {
+ t.Type = TypeThing
+ objectMap := make(map[string]interface{})
+ if t.Name != nil {
+ objectMap["name"] = t.Name
+ }
+ if t.URL != nil {
+ objectMap["url"] = t.URL
+ }
+ if t.Image != nil {
+ objectMap["image"] = t.Image
+ }
+ if t.Description != nil {
+ objectMap["description"] = t.Description
+ }
+ if t.AlternateName != nil {
+ objectMap["alternateName"] = t.AlternateName
+ }
+ if t.BingID != nil {
+ objectMap["bingId"] = t.BingID
+ }
+ if t.ReadLink != nil {
+ objectMap["readLink"] = t.ReadLink
+ }
+ if t.WebSearchURL != nil {
+ objectMap["webSearchUrl"] = t.WebSearchURL
+ }
+ if t.ID != nil {
+ objectMap["id"] = t.ID
+ }
+ if t.Type != "" {
+ objectMap["_type"] = t.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsImageObject is the BasicResponseBase implementation for Thing.
+func (t Thing) AsImageObject() (*ImageObject, bool) {
+ return nil, false
+}
+
+// AsImages is the BasicResponseBase implementation for Thing.
+func (t Thing) AsImages() (*Images, bool) {
+ return nil, false
+}
+
+// AsSearchResultsAnswer is the BasicResponseBase implementation for Thing.
+func (t Thing) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Thing.
+func (t Thing) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsAnswer is the BasicResponseBase implementation for Thing.
+func (t Thing) AsAnswer() (*Answer, bool) {
+ return nil, false
+}
+
+// AsBasicAnswer is the BasicResponseBase implementation for Thing.
+func (t Thing) AsBasicAnswer() (BasicAnswer, bool) {
+ return nil, false
+}
+
+// AsMediaObject is the BasicResponseBase implementation for Thing.
+func (t Thing) AsMediaObject() (*MediaObject, bool) {
+ return nil, false
+}
+
+// AsBasicMediaObject is the BasicResponseBase implementation for Thing.
+func (t Thing) AsBasicMediaObject() (BasicMediaObject, bool) {
+ return nil, false
+}
+
+// AsResponse is the BasicResponseBase implementation for Thing.
+func (t Thing) AsResponse() (*Response, bool) {
+ return nil, false
+}
+
+// AsBasicResponse is the BasicResponseBase implementation for Thing.
+func (t Thing) AsBasicResponse() (BasicResponse, bool) {
+ return &t, true
+}
+
+// AsThing is the BasicResponseBase implementation for Thing.
+func (t Thing) AsThing() (*Thing, bool) {
+ return &t, true
+}
+
+// AsBasicThing is the BasicResponseBase implementation for Thing.
+func (t Thing) AsBasicThing() (BasicThing, bool) {
+ return &t, true
+}
+
+// AsCreativeWork is the BasicResponseBase implementation for Thing.
+func (t Thing) AsCreativeWork() (*CreativeWork, bool) {
+ return nil, false
+}
+
+// AsBasicCreativeWork is the BasicResponseBase implementation for Thing.
+func (t Thing) AsBasicCreativeWork() (BasicCreativeWork, bool) {
+ return nil, false
+}
+
+// AsIdentifiable is the BasicResponseBase implementation for Thing.
+func (t Thing) AsIdentifiable() (*Identifiable, bool) {
+ return nil, false
+}
+
+// AsBasicIdentifiable is the BasicResponseBase implementation for Thing.
+func (t Thing) AsBasicIdentifiable() (BasicIdentifiable, bool) {
+ return &t, true
+}
+
+// AsErrorResponse is the BasicResponseBase implementation for Thing.
+func (t Thing) AsErrorResponse() (*ErrorResponse, bool) {
+ return nil, false
+}
+
+// AsWebPage is the BasicResponseBase implementation for Thing.
+func (t Thing) AsWebPage() (*WebPage, bool) {
+ return nil, false
+}
+
+// AsResponseBase is the BasicResponseBase implementation for Thing.
+func (t Thing) AsResponseBase() (*ResponseBase, bool) {
+ return nil, false
+}
+
+// AsBasicResponseBase is the BasicResponseBase implementation for Thing.
+func (t Thing) AsBasicResponseBase() (BasicResponseBase, bool) {
+ return &t, true
+}
+
+// WebPage defines a webpage that is relevant to the query.
+type WebPage struct {
+ // ThumbnailURL - The URL to a thumbnail of the item.
+ ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
+ // Provider - The source of the creative work.
+ Provider *[]BasicThing `json:"provider,omitempty"`
+ // Text - Text content of this creative work
+ Text *string `json:"text,omitempty"`
+ // Name - The name of the thing represented by this object.
+ Name *string `json:"name,omitempty"`
+ // URL - The URL to get more information about the thing represented by this object.
+ URL *string `json:"url,omitempty"`
+ // Image - An image of the item.
+ Image *ImageObject `json:"image,omitempty"`
+ // Description - A short description of the item.
+ Description *string `json:"description,omitempty"`
+ // AlternateName - An alias for the item
+ AlternateName *string `json:"alternateName,omitempty"`
+ // BingID - An ID that uniquely identifies this item.
+ BingID *string `json:"bingId,omitempty"`
+ // ReadLink - The URL that returns this resource.
+ ReadLink *string `json:"readLink,omitempty"`
+ // WebSearchURL - The URL To Bing's search result for this item.
+ WebSearchURL *string `json:"webSearchUrl,omitempty"`
+ // ID - A String identifier.
+ ID *string `json:"id,omitempty"`
+ // Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeImages', 'TypeSearchResultsAnswer', 'TypeAnswer', 'TypeMediaObject', 'TypeResponse', 'TypeThing', 'TypeCreativeWork', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeWebPage'
+ Type Type `json:"_type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for WebPage.
+func (wp WebPage) MarshalJSON() ([]byte, error) {
+ wp.Type = TypeWebPage
+ objectMap := make(map[string]interface{})
+ if wp.ThumbnailURL != nil {
+ objectMap["thumbnailUrl"] = wp.ThumbnailURL
+ }
+ if wp.Provider != nil {
+ objectMap["provider"] = wp.Provider
+ }
+ if wp.Text != nil {
+ objectMap["text"] = wp.Text
+ }
+ if wp.Name != nil {
+ objectMap["name"] = wp.Name
+ }
+ if wp.URL != nil {
+ objectMap["url"] = wp.URL
+ }
+ if wp.Image != nil {
+ objectMap["image"] = wp.Image
+ }
+ if wp.Description != nil {
+ objectMap["description"] = wp.Description
+ }
+ if wp.AlternateName != nil {
+ objectMap["alternateName"] = wp.AlternateName
+ }
+ if wp.BingID != nil {
+ objectMap["bingId"] = wp.BingID
+ }
+ if wp.ReadLink != nil {
+ objectMap["readLink"] = wp.ReadLink
+ }
+ if wp.WebSearchURL != nil {
+ objectMap["webSearchUrl"] = wp.WebSearchURL
+ }
+ if wp.ID != nil {
+ objectMap["id"] = wp.ID
+ }
+ if wp.Type != "" {
+ objectMap["_type"] = wp.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsImageObject is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsImageObject() (*ImageObject, bool) {
+ return nil, false
+}
+
+// AsImages is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsImages() (*Images, bool) {
+ return nil, false
+}
+
+// AsSearchResultsAnswer is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
+ return nil, false
+}
+
+// AsAnswer is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsAnswer() (*Answer, bool) {
+ return nil, false
+}
+
+// AsBasicAnswer is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsBasicAnswer() (BasicAnswer, bool) {
+ return nil, false
+}
+
+// AsMediaObject is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsMediaObject() (*MediaObject, bool) {
+ return nil, false
+}
+
+// AsBasicMediaObject is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsBasicMediaObject() (BasicMediaObject, bool) {
+ return nil, false
+}
+
+// AsResponse is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsResponse() (*Response, bool) {
+ return nil, false
+}
+
+// AsBasicResponse is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsBasicResponse() (BasicResponse, bool) {
+ return &wp, true
+}
+
+// AsThing is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsThing() (*Thing, bool) {
+ return nil, false
+}
+
+// AsBasicThing is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsBasicThing() (BasicThing, bool) {
+ return &wp, true
+}
+
+// AsCreativeWork is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsCreativeWork() (*CreativeWork, bool) {
+ return nil, false
+}
+
+// AsBasicCreativeWork is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsBasicCreativeWork() (BasicCreativeWork, bool) {
+ return &wp, true
+}
+
+// AsIdentifiable is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsIdentifiable() (*Identifiable, bool) {
+ return nil, false
+}
+
+// AsBasicIdentifiable is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsBasicIdentifiable() (BasicIdentifiable, bool) {
+ return &wp, true
+}
+
+// AsErrorResponse is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsErrorResponse() (*ErrorResponse, bool) {
+ return nil, false
+}
+
+// AsWebPage is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsWebPage() (*WebPage, bool) {
+ return &wp, true
+}
+
+// AsResponseBase is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsResponseBase() (*ResponseBase, bool) {
+ return nil, false
+}
+
+// AsBasicResponseBase is the BasicResponseBase implementation for WebPage.
+func (wp WebPage) AsBasicResponseBase() (BasicResponseBase, bool) {
+ return &wp, true
+}
+
+// UnmarshalJSON is the custom unmarshaler for WebPage struct.
+func (wp *WebPage) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "thumbnailUrl":
+ if v != nil {
+ var thumbnailURL string
+ err = json.Unmarshal(*v, &thumbnailURL)
+ if err != nil {
+ return err
+ }
+ wp.ThumbnailURL = &thumbnailURL
+ }
+ case "provider":
+ if v != nil {
+ provider, err := unmarshalBasicThingArray(*v)
+ if err != nil {
+ return err
+ }
+ wp.Provider = &provider
+ }
+ case "text":
+ if v != nil {
+ var textVar string
+ err = json.Unmarshal(*v, &textVar)
+ if err != nil {
+ return err
+ }
+ wp.Text = &textVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ wp.Name = &name
+ }
+ case "url":
+ if v != nil {
+ var URL string
+ err = json.Unmarshal(*v, &URL)
+ if err != nil {
+ return err
+ }
+ wp.URL = &URL
+ }
+ case "image":
+ if v != nil {
+ var imageVar ImageObject
+ err = json.Unmarshal(*v, &imageVar)
+ if err != nil {
+ return err
+ }
+ wp.Image = &imageVar
+ }
+ case "description":
+ if v != nil {
+ var description string
+ err = json.Unmarshal(*v, &description)
+ if err != nil {
+ return err
+ }
+ wp.Description = &description
+ }
+ case "alternateName":
+ if v != nil {
+ var alternateName string
+ err = json.Unmarshal(*v, &alternateName)
+ if err != nil {
+ return err
+ }
+ wp.AlternateName = &alternateName
+ }
+ case "bingId":
+ if v != nil {
+ var bingID string
+ err = json.Unmarshal(*v, &bingID)
+ if err != nil {
+ return err
+ }
+ wp.BingID = &bingID
+ }
+ case "readLink":
+ if v != nil {
+ var readLink string
+ err = json.Unmarshal(*v, &readLink)
+ if err != nil {
+ return err
+ }
+ wp.ReadLink = &readLink
+ }
+ case "webSearchUrl":
+ if v != nil {
+ var webSearchURL string
+ err = json.Unmarshal(*v, &webSearchURL)
+ if err != nil {
+ return err
+ }
+ wp.WebSearchURL = &webSearchURL
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ wp.ID = &ID
+ }
+ case "_type":
+ if v != nil {
+ var typeVar Type
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ wp.Type = typeVar
+ }
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/customimagesearch/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/customimagesearch/version.go
new file mode 100644
index 000000000..c84001cc6
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/customimagesearch/version.go
@@ -0,0 +1,30 @@
+package customimagesearch
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " customimagesearch/1.0"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/face/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/face/models.go
index 9301a151e..aa5ace9d5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/face/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/face/models.go
@@ -448,6 +448,7 @@ type IdentifyResult struct {
// ImageURL ...
type ImageURL struct {
+ // URL - Publicly reachable URL of an image
URL *string `json:"url,omitempty"`
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.1/customvision/prediction/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.1/customvision/prediction/client.go
index 6872d1af1..76512e903 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.1/customvision/prediction/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.1/customvision/prediction/client.go
@@ -1,4 +1,4 @@
-// Package prediction implements the Azure ARM Prediction service API version 1.1.
+// Package prediction implements the Azure ARM Prediction service API version 2.0.
//
//
package prediction
@@ -31,7 +31,7 @@ import (
const (
// DefaultBaseURI is the default URI used for the service Prediction
- DefaultBaseURI = "https://southcentralus.api.cognitive.microsoft.com/customvision/v1.1/Prediction"
+ DefaultBaseURI = "https://southcentralus.api.cognitive.microsoft.com/customvision/v2.0/Prediction"
)
// BaseClient is the base client for Prediction.
@@ -61,7 +61,7 @@ func NewWithBaseURI(baseURI string, aPIKey string) BaseClient {
// iterationID - optional. Specifies the id of a particular iteration to evaluate against.
// The default iteration for the project will be used when not specified
// application - optional. Specifies the name of application using the endpoint
-func (client BaseClient) PredictImage(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, iterationID *uuid.UUID, application string) (result ImagePredictionResultModel, err error) {
+func (client BaseClient) PredictImage(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, iterationID *uuid.UUID, application string) (result ImagePrediction, err error) {
req, err := client.PredictImagePreparer(ctx, projectID, imageData, iterationID, application)
if err != nil {
err = autorest.NewErrorWithError(err, "prediction.BaseClient", "PredictImage", nil, "Failure preparing request")
@@ -120,7 +120,7 @@ func (client BaseClient) PredictImageSender(req *http.Request) (*http.Response,
// PredictImageResponder handles the response to the PredictImage request. The method always
// closes the http.Response Body.
-func (client BaseClient) PredictImageResponder(resp *http.Response) (result ImagePredictionResultModel, err error) {
+func (client BaseClient) PredictImageResponder(resp *http.Response) (result ImagePrediction, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -138,7 +138,7 @@ func (client BaseClient) PredictImageResponder(resp *http.Response) (result Imag
// iterationID - optional. Specifies the id of a particular iteration to evaluate against.
// The default iteration for the project will be used when not specified
// application - optional. Specifies the name of application using the endpoint
-func (client BaseClient) PredictImageURL(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, iterationID *uuid.UUID, application string) (result ImagePredictionResultModel, err error) {
+func (client BaseClient) PredictImageURL(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, iterationID *uuid.UUID, application string) (result ImagePrediction, err error) {
req, err := client.PredictImageURLPreparer(ctx, projectID, imageURL, iterationID, application)
if err != nil {
err = autorest.NewErrorWithError(err, "prediction.BaseClient", "PredictImageURL", nil, "Failure preparing request")
@@ -194,7 +194,7 @@ func (client BaseClient) PredictImageURLSender(req *http.Request) (*http.Respons
// PredictImageURLResponder handles the response to the PredictImageURL request. The method always
// closes the http.Response Body.
-func (client BaseClient) PredictImageURLResponder(resp *http.Response) (result ImagePredictionResultModel, err error) {
+func (client BaseClient) PredictImageURLResponder(resp *http.Response) (result ImagePrediction, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -212,7 +212,7 @@ func (client BaseClient) PredictImageURLResponder(resp *http.Response) (result I
// iterationID - optional. Specifies the id of a particular iteration to evaluate against.
// The default iteration for the project will be used when not specified
// application - optional. Specifies the name of application using the endpoint
-func (client BaseClient) PredictImageURLWithNoStore(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, iterationID *uuid.UUID, application string) (result ImagePredictionResultModel, err error) {
+func (client BaseClient) PredictImageURLWithNoStore(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, iterationID *uuid.UUID, application string) (result ImagePrediction, err error) {
req, err := client.PredictImageURLWithNoStorePreparer(ctx, projectID, imageURL, iterationID, application)
if err != nil {
err = autorest.NewErrorWithError(err, "prediction.BaseClient", "PredictImageURLWithNoStore", nil, "Failure preparing request")
@@ -268,7 +268,7 @@ func (client BaseClient) PredictImageURLWithNoStoreSender(req *http.Request) (*h
// PredictImageURLWithNoStoreResponder handles the response to the PredictImageURLWithNoStore request. The method always
// closes the http.Response Body.
-func (client BaseClient) PredictImageURLWithNoStoreResponder(resp *http.Response) (result ImagePredictionResultModel, err error) {
+func (client BaseClient) PredictImageURLWithNoStoreResponder(resp *http.Response) (result ImagePrediction, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -285,7 +285,7 @@ func (client BaseClient) PredictImageURLWithNoStoreResponder(resp *http.Response
// iterationID - optional. Specifies the id of a particular iteration to evaluate against.
// The default iteration for the project will be used when not specified
// application - optional. Specifies the name of application using the endpoint
-func (client BaseClient) PredictImageWithNoStore(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, iterationID *uuid.UUID, application string) (result ImagePredictionResultModel, err error) {
+func (client BaseClient) PredictImageWithNoStore(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, iterationID *uuid.UUID, application string) (result ImagePrediction, err error) {
req, err := client.PredictImageWithNoStorePreparer(ctx, projectID, imageData, iterationID, application)
if err != nil {
err = autorest.NewErrorWithError(err, "prediction.BaseClient", "PredictImageWithNoStore", nil, "Failure preparing request")
@@ -344,7 +344,7 @@ func (client BaseClient) PredictImageWithNoStoreSender(req *http.Request) (*http
// PredictImageWithNoStoreResponder handles the response to the PredictImageWithNoStore request. The method always
// closes the http.Response Body.
-func (client BaseClient) PredictImageWithNoStoreResponder(resp *http.Response) (result ImagePredictionResultModel, err error) {
+func (client BaseClient) PredictImageWithNoStoreResponder(resp *http.Response) (result ImagePrediction, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.1/customvision/prediction/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.1/customvision/prediction/models.go
index 4a73c5b96..2f0051cfe 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.1/customvision/prediction/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.1/customvision/prediction/models.go
@@ -23,24 +23,33 @@ import (
"github.com/satori/go.uuid"
)
-// ImagePredictionResultModel result of an image prediction request
-type ImagePredictionResultModel struct {
- autorest.Response `json:"-"`
- ID *uuid.UUID `json:"Id,omitempty"`
- Project *uuid.UUID `json:"Project,omitempty"`
- Iteration *uuid.UUID `json:"Iteration,omitempty"`
- Created *date.Time `json:"Created,omitempty"`
- Predictions *[]ImageTagPredictionModel `json:"Predictions,omitempty"`
+// BoundingBox ...
+type BoundingBox struct {
+ Left *float64 `json:"left,omitempty"`
+ Top *float64 `json:"top,omitempty"`
+ Width *float64 `json:"width,omitempty"`
+ Height *float64 `json:"height,omitempty"`
}
-// ImageTagPredictionModel ...
-type ImageTagPredictionModel struct {
- TagID *uuid.UUID `json:"TagId,omitempty"`
- Tag *string `json:"Tag,omitempty"`
- Probability *float64 `json:"Probability,omitempty"`
+// ImagePrediction ...
+type ImagePrediction struct {
+ autorest.Response `json:"-"`
+ ID *uuid.UUID `json:"id,omitempty"`
+ Project *uuid.UUID `json:"project,omitempty"`
+ Iteration *uuid.UUID `json:"iteration,omitempty"`
+ Created *date.Time `json:"created,omitempty"`
+ Predictions *[]Model `json:"predictions,omitempty"`
}
// ImageURL ...
type ImageURL struct {
- URL *string `json:"Url,omitempty"`
+ URL *string `json:"url,omitempty"`
+}
+
+// Model ...
+type Model struct {
+ Probability *float64 `json:"probability,omitempty"`
+ TagID *uuid.UUID `json:"tagId,omitempty"`
+ TagName *string `json:"tagName,omitempty"`
+ BoundingBox *BoundingBox `json:"boundingBox,omitempty"`
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.1/customvision/prediction/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.1/customvision/prediction/version.go
index df90c8bea..594886f14 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.1/customvision/prediction/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.1/customvision/prediction/version.go
@@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version"
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
- return "Azure-SDK-For-Go/" + version.Number + " prediction/1.1"
+ return "Azure-SDK-For-Go/" + version.Number + " prediction/2.0"
}
// Version returns the semantic version (see http://semver.org) of the client.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.2/customvision/training/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.2/customvision/training/client.go
index fcd37bc54..db5711046 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.2/customvision/training/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.2/customvision/training/client.go
@@ -1,4 +1,4 @@
-// Package training implements the Azure ARM Training service API version 1.2.
+// Package training implements the Azure ARM Training service API version 2.0.
//
//
package training
@@ -32,7 +32,7 @@ import (
const (
// DefaultBaseURI is the default URI used for the service Training
- DefaultBaseURI = "https://southcentralus.api.cognitive.microsoft.com/customvision/v1.2/Training"
+ DefaultBaseURI = "https://southcentralus.api.cognitive.microsoft.com/customvision/v2.0/Training"
)
// BaseClient is the base client for Training.
@@ -56,6 +56,70 @@ func NewWithBaseURI(baseURI string, aPIKey string) BaseClient {
}
}
+// CreateImageRegions this API accepts a batch of image regions, and optionally tags, to update existing images with
+// region information.
+// There is a limit of 64 entries in the batch.
+// Parameters:
+// projectID - the project id
+// batch - batch of image regions which include a tag and bounding box. Limited to 64
+func (client BaseClient) CreateImageRegions(ctx context.Context, projectID uuid.UUID, batch ImageRegionCreateBatch) (result ImageRegionCreateSummary, err error) {
+ req, err := client.CreateImageRegionsPreparer(ctx, projectID, batch)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "CreateImageRegions", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateImageRegionsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "CreateImageRegions", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateImageRegionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "CreateImageRegions", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateImageRegionsPreparer prepares the CreateImageRegions request.
+func (client BaseClient) CreateImageRegionsPreparer(ctx context.Context, projectID uuid.UUID, batch ImageRegionCreateBatch) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "projectId": autorest.Encode("path", projectID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/projects/{projectId}/images/regions", pathParameters),
+ autorest.WithJSON(batch),
+ autorest.WithHeader("Training-Key", client.APIKey))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateImageRegionsSender sends the CreateImageRegions request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) CreateImageRegionsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateImageRegionsResponder handles the response to the CreateImageRegions request. The method always
+// closes the http.Response Body.
+func (client BaseClient) CreateImageRegionsResponder(resp *http.Response) (result ImageRegionCreateSummary, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// CreateImagesFromData this API accepts body content as multipart/form-data and application/octet-stream. When using
// multipart
// multiple image files can be sent at once, with a maximum of 64 files
@@ -129,7 +193,8 @@ func (client BaseClient) CreateImagesFromDataResponder(resp *http.Response) (res
return
}
-// CreateImagesFromFiles sends the create images from files request.
+// CreateImagesFromFiles this API accepts a batch of files, and optionally tags, to create images. There is a limit of
+// 64 images and 20 tags.
// Parameters:
// projectID - the project id
// batch - the batch of image files to add. Limited to 64 images and 20 tags per batch
@@ -191,7 +256,8 @@ func (client BaseClient) CreateImagesFromFilesResponder(resp *http.Response) (re
return
}
-// CreateImagesFromPredictions sends the create images from predictions request.
+// CreateImagesFromPredictions this API creates a batch of images from predicted images specified. There is a limit of
+// 64 images and 20 tags.
// Parameters:
// projectID - the project id
// batch - image and tag ids. Limted to 64 images and 20 tags per batch
@@ -253,7 +319,8 @@ func (client BaseClient) CreateImagesFromPredictionsResponder(resp *http.Respons
return
}
-// CreateImagesFromUrls sends the create images from urls request.
+// CreateImagesFromUrls this API accepts a batch of urls, and optionally tags, to create images. There is a limit of 64
+// images and 20 tags.
// Parameters:
// projectID - the project id
// batch - image urls and tag ids. Limited to 64 images and 20 tags per batch
@@ -315,6 +382,68 @@ func (client BaseClient) CreateImagesFromUrlsResponder(resp *http.Response) (res
return
}
+// CreateImageTags sends the create image tags request.
+// Parameters:
+// projectID - the project id
+// batch - batch of image tags. Limited to 128 tags per batch
+func (client BaseClient) CreateImageTags(ctx context.Context, projectID uuid.UUID, batch ImageTagCreateBatch) (result ImageTagCreateSummary, err error) {
+ req, err := client.CreateImageTagsPreparer(ctx, projectID, batch)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "CreateImageTags", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateImageTagsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "CreateImageTags", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateImageTagsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "CreateImageTags", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateImageTagsPreparer prepares the CreateImageTags request.
+func (client BaseClient) CreateImageTagsPreparer(ctx context.Context, projectID uuid.UUID, batch ImageTagCreateBatch) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "projectId": autorest.Encode("path", projectID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/projects/{projectId}/images/tags", pathParameters),
+ autorest.WithJSON(batch),
+ autorest.WithHeader("Training-Key", client.APIKey))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateImageTagsSender sends the CreateImageTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) CreateImageTagsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateImageTagsResponder handles the response to the CreateImageTags request. The method always
+// closes the http.Response Body.
+func (client BaseClient) CreateImageTagsResponder(resp *http.Response) (result ImageTagCreateSummary, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// CreateProject sends the create project request.
// Parameters:
// name - name of the project
@@ -452,6 +581,76 @@ func (client BaseClient) CreateTagResponder(resp *http.Response) (result Tag, er
return
}
+// DeleteImageRegions sends the delete image regions request.
+// Parameters:
+// projectID - the project id
+// regionIds - regions to delete. Limited to 64
+func (client BaseClient) DeleteImageRegions(ctx context.Context, projectID uuid.UUID, regionIds []string) (result autorest.Response, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: regionIds,
+ Constraints: []validation.Constraint{{Target: "regionIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("training.BaseClient", "DeleteImageRegions", err.Error())
+ }
+
+ req, err := client.DeleteImageRegionsPreparer(ctx, projectID, regionIds)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "DeleteImageRegions", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteImageRegionsSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "DeleteImageRegions", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteImageRegionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "DeleteImageRegions", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteImageRegionsPreparer prepares the DeleteImageRegions request.
+func (client BaseClient) DeleteImageRegionsPreparer(ctx context.Context, projectID uuid.UUID, regionIds []string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "projectId": autorest.Encode("path", projectID),
+ }
+
+ queryParameters := map[string]interface{}{
+ "regionIds": autorest.Encode("query", regionIds, ","),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/projects/{projectId}/images/regions", pathParameters),
+ autorest.WithQueryParameters(queryParameters),
+ autorest.WithHeader("Training-Key", client.APIKey))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteImageRegionsSender sends the DeleteImageRegions request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) DeleteImageRegionsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteImageRegionsResponder handles the response to the DeleteImageRegions request. The method always
+// closes the http.Response Body.
+func (client BaseClient) DeleteImageRegionsResponder(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
+}
+
// DeleteImages sends the delete images request.
// Parameters:
// projectID - the project id
@@ -849,8 +1048,9 @@ func (client BaseClient) DeleteTagResponder(resp *http.Response) (result autores
// projectID - the project id
// iterationID - the iteration id
// platform - the target platform (coreml or tensorflow)
-func (client BaseClient) ExportIteration(ctx context.Context, projectID uuid.UUID, iterationID uuid.UUID, platform string) (result Export, err error) {
- req, err := client.ExportIterationPreparer(ctx, projectID, iterationID, platform)
+// flavor - the flavor of the target platform (Windows, Linux, ARM, or GPU)
+func (client BaseClient) ExportIteration(ctx context.Context, projectID uuid.UUID, iterationID uuid.UUID, platform string, flavor string) (result Export, err error) {
+ req, err := client.ExportIterationPreparer(ctx, projectID, iterationID, platform, flavor)
if err != nil {
err = autorest.NewErrorWithError(err, "training.BaseClient", "ExportIteration", nil, "Failure preparing request")
return
@@ -872,7 +1072,7 @@ func (client BaseClient) ExportIteration(ctx context.Context, projectID uuid.UUI
}
// ExportIterationPreparer prepares the ExportIteration request.
-func (client BaseClient) ExportIterationPreparer(ctx context.Context, projectID uuid.UUID, iterationID uuid.UUID, platform string) (*http.Request, error) {
+func (client BaseClient) ExportIterationPreparer(ctx context.Context, projectID uuid.UUID, iterationID uuid.UUID, platform string, flavor string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"iterationId": autorest.Encode("path", iterationID),
"projectId": autorest.Encode("path", projectID),
@@ -881,6 +1081,9 @@ func (client BaseClient) ExportIterationPreparer(ctx context.Context, projectID
queryParameters := map[string]interface{}{
"platform": autorest.Encode("query", platform),
}
+ if len(flavor) > 0 {
+ queryParameters["flavor"] = autorest.Encode("query", flavor)
+ }
preparer := autorest.CreatePreparer(
autorest.AsPost(),
@@ -911,59 +1114,6 @@ func (client BaseClient) ExportIterationResponder(resp *http.Response) (result E
return
}
-// GetAccountInfo sends the get account info request.
-func (client BaseClient) GetAccountInfo(ctx context.Context) (result Account, err error) {
- req, err := client.GetAccountInfoPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "training.BaseClient", "GetAccountInfo", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetAccountInfoSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "training.BaseClient", "GetAccountInfo", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetAccountInfoResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "training.BaseClient", "GetAccountInfo", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetAccountInfoPreparer prepares the GetAccountInfo request.
-func (client BaseClient) GetAccountInfoPreparer(ctx context.Context) (*http.Request, error) {
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPath("/account"),
- autorest.WithHeader("Training-Key", client.APIKey))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// GetAccountInfoSender sends the GetAccountInfo request. The method will close the
-// http.Response Body if it receives an error.
-func (client BaseClient) GetAccountInfoSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// GetAccountInfoResponder handles the response to the GetAccountInfo request. The method always
-// closes the http.Response Body.
-func (client BaseClient) GetAccountInfoResponder(resp *http.Response) (result Account, err error) {
- err = autorest.Respond(
- resp,
- client.ByInspecting(),
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
// GetDomain sends the get domain request.
// Parameters:
// domainID - the id of the domain to get information about
@@ -1137,6 +1287,298 @@ func (client BaseClient) GetExportsResponder(resp *http.Response) (result ListEx
return
}
+// GetImagePerformanceCount the filtering is on an and/or relationship. For example, if the provided tag ids are for
+// the "Dog" and
+// "Cat" tags, then only images tagged with Dog and/or Cat will be returned
+// Parameters:
+// projectID - the project id
+// iterationID - the iteration id. Defaults to workspace
+// tagIds - a list of tags ids to filter the images to count. Defaults to all tags when null.
+func (client BaseClient) GetImagePerformanceCount(ctx context.Context, projectID uuid.UUID, iterationID uuid.UUID, tagIds []string) (result Int32, err error) {
+ req, err := client.GetImagePerformanceCountPreparer(ctx, projectID, iterationID, tagIds)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetImagePerformanceCount", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetImagePerformanceCountSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetImagePerformanceCount", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetImagePerformanceCountResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetImagePerformanceCount", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetImagePerformanceCountPreparer prepares the GetImagePerformanceCount request.
+func (client BaseClient) GetImagePerformanceCountPreparer(ctx context.Context, projectID uuid.UUID, iterationID uuid.UUID, tagIds []string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "iterationId": autorest.Encode("path", iterationID),
+ "projectId": autorest.Encode("path", projectID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if tagIds != nil && len(tagIds) > 0 {
+ queryParameters["tagIds"] = autorest.Encode("query", tagIds, ",")
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/projects/{projectId}/iterations/{iterationId}/performance/images/count", pathParameters),
+ autorest.WithQueryParameters(queryParameters),
+ autorest.WithHeader("Training-Key", client.APIKey))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetImagePerformanceCountSender sends the GetImagePerformanceCount request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) GetImagePerformanceCountSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetImagePerformanceCountResponder handles the response to the GetImagePerformanceCount request. The method always
+// closes the http.Response Body.
+func (client BaseClient) GetImagePerformanceCountResponder(resp *http.Response) (result Int32, 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
+}
+
+// GetImagePerformances this API supports batching and range selection. By default it will only return first 50 images
+// matching images.
+// Use the {take} and {skip} parameters to control how many images to return in a given batch.
+// The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and
+// "Cat" tags, then only images tagged with Dog and/or Cat will be returned
+// Parameters:
+// projectID - the project id
+// iterationID - the iteration id. Defaults to workspace
+// tagIds - a list of tags ids to filter the images. Defaults to all tagged images when null. Limited to 20
+// orderBy - the ordering. Defaults to newest
+// take - maximum number of images to return. Defaults to 50, limited to 256
+// skip - number of images to skip before beginning the image batch. Defaults to 0
+func (client BaseClient) GetImagePerformances(ctx context.Context, projectID uuid.UUID, iterationID uuid.UUID, tagIds []string, orderBy string, take *int32, skip *int32) (result ListImagePerformance, err error) {
+ req, err := client.GetImagePerformancesPreparer(ctx, projectID, iterationID, tagIds, orderBy, take, skip)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetImagePerformances", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetImagePerformancesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetImagePerformances", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetImagePerformancesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetImagePerformances", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetImagePerformancesPreparer prepares the GetImagePerformances request.
+func (client BaseClient) GetImagePerformancesPreparer(ctx context.Context, projectID uuid.UUID, iterationID uuid.UUID, tagIds []string, orderBy string, take *int32, skip *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "iterationId": autorest.Encode("path", iterationID),
+ "projectId": autorest.Encode("path", projectID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if tagIds != nil && len(tagIds) > 0 {
+ queryParameters["tagIds"] = autorest.Encode("query", tagIds, ",")
+ }
+ if len(string(orderBy)) > 0 {
+ queryParameters["orderBy"] = autorest.Encode("query", orderBy)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 50)
+ }
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/projects/{projectId}/iterations/{iterationId}/performance/images", pathParameters),
+ autorest.WithQueryParameters(queryParameters),
+ autorest.WithHeader("Training-Key", client.APIKey))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetImagePerformancesSender sends the GetImagePerformances request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) GetImagePerformancesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetImagePerformancesResponder handles the response to the GetImagePerformances request. The method always
+// closes the http.Response Body.
+func (client BaseClient) GetImagePerformancesResponder(resp *http.Response) (result ListImagePerformance, 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
+}
+
+// GetImageRegionProposals this API will get region proposals for an image along with confidences for the region. It
+// returns an empty array if no proposals are found.
+// Parameters:
+// projectID - the project id
+// imageID - the image id
+func (client BaseClient) GetImageRegionProposals(ctx context.Context, projectID uuid.UUID, imageID uuid.UUID) (result ImageRegionProposal, err error) {
+ req, err := client.GetImageRegionProposalsPreparer(ctx, projectID, imageID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetImageRegionProposals", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetImageRegionProposalsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetImageRegionProposals", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetImageRegionProposalsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetImageRegionProposals", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetImageRegionProposalsPreparer prepares the GetImageRegionProposals request.
+func (client BaseClient) GetImageRegionProposalsPreparer(ctx context.Context, projectID uuid.UUID, imageID uuid.UUID) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "imageId": autorest.Encode("path", imageID),
+ "projectId": autorest.Encode("path", projectID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{projectId}/images/{imageId}/regionproposals", pathParameters),
+ autorest.WithHeader("Training-Key", client.APIKey))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetImageRegionProposalsSender sends the GetImageRegionProposals request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) GetImageRegionProposalsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetImageRegionProposalsResponder handles the response to the GetImageRegionProposals request. The method always
+// closes the http.Response Body.
+func (client BaseClient) GetImageRegionProposalsResponder(resp *http.Response) (result ImageRegionProposal, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetImagesByIds this API will return a set of Images for the specified tags and optionally iteration. If no iteration
+// is specified the
+// current workspace is used.
+// Parameters:
+// projectID - the project id
+// imageIds - the list of image ids to retrieve. Limited to 256
+// iterationID - the iteration id. Defaults to workspace
+func (client BaseClient) GetImagesByIds(ctx context.Context, projectID uuid.UUID, imageIds []string, iterationID *uuid.UUID) (result ListImage, err error) {
+ req, err := client.GetImagesByIdsPreparer(ctx, projectID, imageIds, iterationID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetImagesByIds", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetImagesByIdsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetImagesByIds", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetImagesByIdsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetImagesByIds", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetImagesByIdsPreparer prepares the GetImagesByIds request.
+func (client BaseClient) GetImagesByIdsPreparer(ctx context.Context, projectID uuid.UUID, imageIds []string, iterationID *uuid.UUID) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "projectId": autorest.Encode("path", projectID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if imageIds != nil && len(imageIds) > 0 {
+ queryParameters["imageIds"] = autorest.Encode("query", imageIds, ",")
+ }
+ if iterationID != nil {
+ queryParameters["iterationId"] = autorest.Encode("query", *iterationID)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/projects/{projectId}/images/id", pathParameters),
+ autorest.WithQueryParameters(queryParameters),
+ autorest.WithHeader("Training-Key", client.APIKey))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetImagesByIdsSender sends the GetImagesByIds request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) GetImagesByIdsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetImagesByIdsResponder handles the response to the GetImagesByIds request. The method always
+// closes the http.Response Body.
+func (client BaseClient) GetImagesByIdsResponder(resp *http.Response) (result ListImage, 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
+}
+
// GetIteration sends the get iteration request.
// Parameters:
// projectID - the id of the project the iteration belongs to
@@ -1200,11 +1642,12 @@ func (client BaseClient) GetIterationResponder(resp *http.Response) (result Iter
// GetIterationPerformance sends the get iteration performance request.
// Parameters:
-// projectID - the project id
-// iterationID - the id of the trained iteration
-// threshold - the 0 to 1 threshold to determine positive prediction
-func (client BaseClient) GetIterationPerformance(ctx context.Context, projectID uuid.UUID, iterationID uuid.UUID, threshold float64) (result IterationPerformance, err error) {
- req, err := client.GetIterationPerformancePreparer(ctx, projectID, iterationID, threshold)
+// projectID - the id of the project the iteration belongs to
+// iterationID - the id of the iteration to get
+// threshold - the threshold used to determine true predictions
+// overlapThreshold - if applicable, the bounding box overlap threshold used to determine true predictions
+func (client BaseClient) GetIterationPerformance(ctx context.Context, projectID uuid.UUID, iterationID uuid.UUID, threshold *float64, overlapThreshold *float64) (result IterationPerformance, err error) {
+ req, err := client.GetIterationPerformancePreparer(ctx, projectID, iterationID, threshold, overlapThreshold)
if err != nil {
err = autorest.NewErrorWithError(err, "training.BaseClient", "GetIterationPerformance", nil, "Failure preparing request")
return
@@ -1226,14 +1669,18 @@ func (client BaseClient) GetIterationPerformance(ctx context.Context, projectID
}
// GetIterationPerformancePreparer prepares the GetIterationPerformance request.
-func (client BaseClient) GetIterationPerformancePreparer(ctx context.Context, projectID uuid.UUID, iterationID uuid.UUID, threshold float64) (*http.Request, error) {
+func (client BaseClient) GetIterationPerformancePreparer(ctx context.Context, projectID uuid.UUID, iterationID uuid.UUID, threshold *float64, overlapThreshold *float64) (*http.Request, error) {
pathParameters := map[string]interface{}{
"iterationId": autorest.Encode("path", iterationID),
"projectId": autorest.Encode("path", projectID),
}
- queryParameters := map[string]interface{}{
- "threshold": autorest.Encode("query", threshold),
+ queryParameters := map[string]interface{}{}
+ if threshold != nil {
+ queryParameters["threshold"] = autorest.Encode("query", *threshold)
+ }
+ if overlapThreshold != nil {
+ queryParameters["overlapThreshold"] = autorest.Encode("query", *overlapThreshold)
}
preparer := autorest.CreatePreparer(
@@ -1504,6 +1951,78 @@ func (client BaseClient) GetTagResponder(resp *http.Response) (result Tag, err e
return
}
+// GetTaggedImageCount the filtering is on an and/or relationship. For example, if the provided tag ids are for the
+// "Dog" and
+// "Cat" tags, then only images tagged with Dog and/or Cat will be returned
+// Parameters:
+// projectID - the project id
+// iterationID - the iteration id. Defaults to workspace
+// tagIds - a list of tags ids to filter the images to count. Defaults to all tags when null.
+func (client BaseClient) GetTaggedImageCount(ctx context.Context, projectID uuid.UUID, iterationID *uuid.UUID, tagIds []string) (result Int32, err error) {
+ req, err := client.GetTaggedImageCountPreparer(ctx, projectID, iterationID, tagIds)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetTaggedImageCount", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetTaggedImageCountSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetTaggedImageCount", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetTaggedImageCountResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetTaggedImageCount", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetTaggedImageCountPreparer prepares the GetTaggedImageCount request.
+func (client BaseClient) GetTaggedImageCountPreparer(ctx context.Context, projectID uuid.UUID, iterationID *uuid.UUID, tagIds []string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "projectId": autorest.Encode("path", projectID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if iterationID != nil {
+ queryParameters["iterationId"] = autorest.Encode("query", *iterationID)
+ }
+ if tagIds != nil && len(tagIds) > 0 {
+ queryParameters["tagIds"] = autorest.Encode("query", tagIds, ",")
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/projects/{projectId}/images/tagged/count", pathParameters),
+ autorest.WithQueryParameters(queryParameters),
+ autorest.WithHeader("Training-Key", client.APIKey))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetTaggedImageCountSender sends the GetTaggedImageCount request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) GetTaggedImageCountSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetTaggedImageCountResponder handles the response to the GetTaggedImageCount request. The method always
+// closes the http.Response Body.
+func (client BaseClient) GetTaggedImageCountResponder(resp *http.Response) (result Int32, 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
+}
+
// GetTaggedImages this API supports batching and range selection. By default it will only return first 50 images
// matching images.
// Use the {take} and {skip} parameters to control how many images to return in a given batch.
@@ -1512,7 +2031,7 @@ func (client BaseClient) GetTagResponder(resp *http.Response) (result Tag, err e
// Parameters:
// projectID - the project id
// iterationID - the iteration id. Defaults to workspace
-// tagIds - an list of tags ids to filter the images. Defaults to all tagged images when null. Limited to 20
+// tagIds - a list of tags ids to filter the images. Defaults to all tagged images when null. Limited to 20
// orderBy - the ordering. Defaults to newest
// take - maximum number of images to return. Defaults to 50, limited to 256
// skip - number of images to skip before beginning the image batch. Defaults to 0
@@ -1598,7 +2117,7 @@ func (client BaseClient) GetTaggedImagesResponder(resp *http.Response) (result L
// Parameters:
// projectID - the project id
// iterationID - the iteration id. Defaults to workspace
-func (client BaseClient) GetTags(ctx context.Context, projectID uuid.UUID, iterationID *uuid.UUID) (result TagList, err error) {
+func (client BaseClient) GetTags(ctx context.Context, projectID uuid.UUID, iterationID *uuid.UUID) (result ListTag, err error) {
req, err := client.GetTagsPreparer(ctx, projectID, iterationID)
if err != nil {
err = autorest.NewErrorWithError(err, "training.BaseClient", "GetTags", nil, "Failure preparing request")
@@ -1649,12 +2168,80 @@ func (client BaseClient) GetTagsSender(req *http.Request) (*http.Response, error
// GetTagsResponder handles the response to the GetTags request. The method always
// closes the http.Response Body.
-func (client BaseClient) GetTagsResponder(resp *http.Response) (result TagList, err error) {
+func (client BaseClient) GetTagsResponder(resp *http.Response) (result ListTag, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetUntaggedImageCount this API returns the images which have no tags for a given project and optionally an
+// iteration. If no iteration is specified the
+// current workspace is used.
+// Parameters:
+// projectID - the project id
+// iterationID - the iteration id. Defaults to workspace
+func (client BaseClient) GetUntaggedImageCount(ctx context.Context, projectID uuid.UUID, iterationID *uuid.UUID) (result Int32, err error) {
+ req, err := client.GetUntaggedImageCountPreparer(ctx, projectID, iterationID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetUntaggedImageCount", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetUntaggedImageCountSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetUntaggedImageCount", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetUntaggedImageCountResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "GetUntaggedImageCount", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetUntaggedImageCountPreparer prepares the GetUntaggedImageCount request.
+func (client BaseClient) GetUntaggedImageCountPreparer(ctx context.Context, projectID uuid.UUID, iterationID *uuid.UUID) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "projectId": autorest.Encode("path", projectID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if iterationID != nil {
+ queryParameters["iterationId"] = autorest.Encode("query", *iterationID)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/projects/{projectId}/images/untagged/count", pathParameters),
+ autorest.WithQueryParameters(queryParameters),
+ autorest.WithHeader("Training-Key", client.APIKey))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetUntaggedImageCountSender sends the GetUntaggedImageCount request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) GetUntaggedImageCountSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetUntaggedImageCountResponder handles the response to the GetUntaggedImageCount request. The method always
+// closes the http.Response Body.
+func (client BaseClient) GetUntaggedImageCountResponder(resp *http.Response) (result Int32, 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
@@ -1744,96 +2331,34 @@ func (client BaseClient) GetUntaggedImagesResponder(resp *http.Response) (result
return
}
-// PostImageTags sends the post image tags request.
-// Parameters:
-// projectID - the project id
-// batch - batch of image tags. Limited to 128 tags per batch
-func (client BaseClient) PostImageTags(ctx context.Context, projectID uuid.UUID, batch ImageTagCreateBatch) (result ImageTagCreateSummary, err error) {
- req, err := client.PostImageTagsPreparer(ctx, projectID, batch)
- if err != nil {
- err = autorest.NewErrorWithError(err, "training.BaseClient", "PostImageTags", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.PostImageTagsSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "training.BaseClient", "PostImageTags", resp, "Failure sending request")
- return
- }
-
- result, err = client.PostImageTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "training.BaseClient", "PostImageTags", resp, "Failure responding to request")
- }
-
- return
-}
-
-// PostImageTagsPreparer prepares the PostImageTags request.
-func (client BaseClient) PostImageTagsPreparer(ctx context.Context, projectID uuid.UUID, batch ImageTagCreateBatch) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "projectId": autorest.Encode("path", projectID),
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsContentType("application/json; charset=utf-8"),
- autorest.AsPost(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/projects/{projectId}/images/tags", pathParameters),
- autorest.WithJSON(batch),
- autorest.WithHeader("Training-Key", client.APIKey))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// PostImageTagsSender sends the PostImageTags request. The method will close the
-// http.Response Body if it receives an error.
-func (client BaseClient) PostImageTagsSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// PostImageTagsResponder handles the response to the PostImageTags request. The method always
-// closes the http.Response Body.
-func (client BaseClient) PostImageTagsResponder(resp *http.Response) (result ImageTagCreateSummary, err error) {
- err = autorest.Respond(
- resp,
- client.ByInspecting(),
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// QueryPredictionResults sends the query prediction results request.
+// QueryPredictions sends the query predictions request.
// Parameters:
// projectID - the project id
// query - parameters used to query the predictions. Limited to combining 2 tags
-func (client BaseClient) QueryPredictionResults(ctx context.Context, projectID uuid.UUID, query PredictionQueryToken) (result PredictionQuery, err error) {
- req, err := client.QueryPredictionResultsPreparer(ctx, projectID, query)
+func (client BaseClient) QueryPredictions(ctx context.Context, projectID uuid.UUID, query PredictionQueryToken) (result PredictionQueryResult, err error) {
+ req, err := client.QueryPredictionsPreparer(ctx, projectID, query)
if err != nil {
- err = autorest.NewErrorWithError(err, "training.BaseClient", "QueryPredictionResults", nil, "Failure preparing request")
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "QueryPredictions", nil, "Failure preparing request")
return
}
- resp, err := client.QueryPredictionResultsSender(req)
+ resp, err := client.QueryPredictionsSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "training.BaseClient", "QueryPredictionResults", resp, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "QueryPredictions", resp, "Failure sending request")
return
}
- result, err = client.QueryPredictionResultsResponder(resp)
+ result, err = client.QueryPredictionsResponder(resp)
if err != nil {
- err = autorest.NewErrorWithError(err, "training.BaseClient", "QueryPredictionResults", resp, "Failure responding to request")
+ err = autorest.NewErrorWithError(err, "training.BaseClient", "QueryPredictions", resp, "Failure responding to request")
}
return
}
-// QueryPredictionResultsPreparer prepares the QueryPredictionResults request.
-func (client BaseClient) QueryPredictionResultsPreparer(ctx context.Context, projectID uuid.UUID, query PredictionQueryToken) (*http.Request, error) {
+// QueryPredictionsPreparer prepares the QueryPredictions request.
+func (client BaseClient) QueryPredictionsPreparer(ctx context.Context, projectID uuid.UUID, query PredictionQueryToken) (*http.Request, error) {
pathParameters := map[string]interface{}{
"projectId": autorest.Encode("path", projectID),
}
@@ -1848,16 +2373,16 @@ func (client BaseClient) QueryPredictionResultsPreparer(ctx context.Context, pro
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// QueryPredictionResultsSender sends the QueryPredictionResults request. The method will close the
+// QueryPredictionsSender sends the QueryPredictions request. The method will close the
// http.Response Body if it receives an error.
-func (client BaseClient) QueryPredictionResultsSender(req *http.Request) (*http.Response, error) {
+func (client BaseClient) QueryPredictionsSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req,
autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
}
-// QueryPredictionResultsResponder handles the response to the QueryPredictionResults request. The method always
+// QueryPredictionsResponder handles the response to the QueryPredictions request. The method always
// closes the http.Response Body.
-func (client BaseClient) QueryPredictionResultsResponder(resp *http.Response) (result PredictionQuery, err error) {
+func (client BaseClient) QueryPredictionsResponder(resp *http.Response) (result PredictionQueryResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -1873,7 +2398,7 @@ func (client BaseClient) QueryPredictionResultsResponder(resp *http.Response) (r
// projectID - the project id
// iterationID - optional. Specifies the id of a particular iteration to evaluate against.
// The default iteration for the project will be used when not specified.
-func (client BaseClient) QuickTestImage(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, iterationID *uuid.UUID) (result ImagePredictionResult, err error) {
+func (client BaseClient) QuickTestImage(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, iterationID *uuid.UUID) (result ImagePrediction, err error) {
req, err := client.QuickTestImagePreparer(ctx, projectID, imageData, iterationID)
if err != nil {
err = autorest.NewErrorWithError(err, "training.BaseClient", "QuickTestImage", nil, "Failure preparing request")
@@ -1929,7 +2454,7 @@ func (client BaseClient) QuickTestImageSender(req *http.Request) (*http.Response
// QuickTestImageResponder handles the response to the QuickTestImage request. The method always
// closes the http.Response Body.
-func (client BaseClient) QuickTestImageResponder(resp *http.Response) (result ImagePredictionResult, err error) {
+func (client BaseClient) QuickTestImageResponder(resp *http.Response) (result ImagePrediction, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -1946,7 +2471,7 @@ func (client BaseClient) QuickTestImageResponder(resp *http.Response) (result Im
// imageURL - an {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated
// iterationID - optional. Specifies the id of a particular iteration to evaluate against.
// The default iteration for the project will be used when not specified.
-func (client BaseClient) QuickTestImageURL(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, iterationID *uuid.UUID) (result ImagePredictionResult, err error) {
+func (client BaseClient) QuickTestImageURL(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, iterationID *uuid.UUID) (result ImagePrediction, err error) {
req, err := client.QuickTestImageURLPreparer(ctx, projectID, imageURL, iterationID)
if err != nil {
err = autorest.NewErrorWithError(err, "training.BaseClient", "QuickTestImageURL", nil, "Failure preparing request")
@@ -1999,7 +2524,7 @@ func (client BaseClient) QuickTestImageURLSender(req *http.Request) (*http.Respo
// QuickTestImageURLResponder handles the response to the QuickTestImageURL request. The method always
// closes the http.Response Body.
-func (client BaseClient) QuickTestImageURLResponder(resp *http.Response) (result ImagePredictionResult, err error) {
+func (client BaseClient) QuickTestImageURLResponder(resp *http.Response) (result ImagePrediction, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.2/customvision/training/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.2/customvision/training/models.go
index e252908e6..6db8a24fd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.2/customvision/training/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.2/customvision/training/models.go
@@ -23,6 +23,103 @@ import (
"github.com/satori/go.uuid"
)
+// DomainType enumerates the values for domain type.
+type DomainType string
+
+const (
+ // Classification ...
+ Classification DomainType = "Classification"
+ // ObjectDetection ...
+ ObjectDetection DomainType = "ObjectDetection"
+)
+
+// PossibleDomainTypeValues returns an array of possible values for the DomainType const type.
+func PossibleDomainTypeValues() []DomainType {
+ return []DomainType{Classification, ObjectDetection}
+}
+
+// ExportFlavor enumerates the values for export flavor.
+type ExportFlavor string
+
+const (
+ // Linux ...
+ Linux ExportFlavor = "Linux"
+ // Windows ...
+ Windows ExportFlavor = "Windows"
+)
+
+// PossibleExportFlavorValues returns an array of possible values for the ExportFlavor const type.
+func PossibleExportFlavorValues() []ExportFlavor {
+ return []ExportFlavor{Linux, Windows}
+}
+
+// ExportPlatform enumerates the values for export platform.
+type ExportPlatform string
+
+const (
+ // CoreML ...
+ CoreML ExportPlatform = "CoreML"
+ // DockerFile ...
+ DockerFile ExportPlatform = "DockerFile"
+ // ONNX ...
+ ONNX ExportPlatform = "ONNX"
+ // TensorFlow ...
+ TensorFlow ExportPlatform = "TensorFlow"
+)
+
+// PossibleExportPlatformValues returns an array of possible values for the ExportPlatform const type.
+func PossibleExportPlatformValues() []ExportPlatform {
+ return []ExportPlatform{CoreML, DockerFile, ONNX, TensorFlow}
+}
+
+// ExportStatusModel enumerates the values for export status model.
+type ExportStatusModel string
+
+const (
+ // Done ...
+ Done ExportStatusModel = "Done"
+ // Exporting ...
+ Exporting ExportStatusModel = "Exporting"
+ // Failed ...
+ Failed ExportStatusModel = "Failed"
+)
+
+// PossibleExportStatusModelValues returns an array of possible values for the ExportStatusModel const type.
+func PossibleExportStatusModelValues() []ExportStatusModel {
+ return []ExportStatusModel{Done, Exporting, Failed}
+}
+
+// ImageUploadStatus enumerates the values for image upload status.
+type ImageUploadStatus string
+
+const (
+ // ErrorImageFormat ...
+ ErrorImageFormat ImageUploadStatus = "ErrorImageFormat"
+ // ErrorImageSize ...
+ ErrorImageSize ImageUploadStatus = "ErrorImageSize"
+ // ErrorLimitExceed ...
+ ErrorLimitExceed ImageUploadStatus = "ErrorLimitExceed"
+ // ErrorRegionLimitExceed ...
+ ErrorRegionLimitExceed ImageUploadStatus = "ErrorRegionLimitExceed"
+ // ErrorSource ...
+ ErrorSource ImageUploadStatus = "ErrorSource"
+ // ErrorStorage ...
+ ErrorStorage ImageUploadStatus = "ErrorStorage"
+ // ErrorTagLimitExceed ...
+ ErrorTagLimitExceed ImageUploadStatus = "ErrorTagLimitExceed"
+ // ErrorUnknown ...
+ ErrorUnknown ImageUploadStatus = "ErrorUnknown"
+ // OK ...
+ OK ImageUploadStatus = "OK"
+ // OKDuplicate ...
+ OKDuplicate ImageUploadStatus = "OKDuplicate"
+)
+
+// PossibleImageUploadStatusValues returns an array of possible values for the ImageUploadStatus const type.
+func PossibleImageUploadStatusValues() []ImageUploadStatus {
+ return []ImageUploadStatus{ErrorImageFormat, ErrorImageSize, ErrorLimitExceed, ErrorRegionLimitExceed, ErrorSource, ErrorStorage, ErrorTagLimitExceed, ErrorUnknown, OK, OKDuplicate}
+}
+
// OrderBy enumerates the values for order by.
type OrderBy string
@@ -40,271 +137,260 @@ func PossibleOrderByValues() []OrderBy {
return []OrderBy{Newest, Oldest, Suggested}
}
-// Platform enumerates the values for platform.
-type Platform string
-
-const (
- // CoreML ...
- CoreML Platform = "CoreML"
- // TensorFlow ...
- TensorFlow Platform = "TensorFlow"
-)
-
-// PossiblePlatformValues returns an array of possible values for the Platform const type.
-func PossiblePlatformValues() []Platform {
- return []Platform{CoreML, TensorFlow}
-}
-
-// Status enumerates the values for status.
-type Status string
-
-const (
- // ErrorImageFormat ...
- ErrorImageFormat Status = "ErrorImageFormat"
- // ErrorImageSize ...
- ErrorImageSize Status = "ErrorImageSize"
- // ErrorLimitExceed ...
- ErrorLimitExceed Status = "ErrorLimitExceed"
- // ErrorSource ...
- ErrorSource Status = "ErrorSource"
- // ErrorStorage ...
- ErrorStorage Status = "ErrorStorage"
- // ErrorTagLimitExceed ...
- ErrorTagLimitExceed Status = "ErrorTagLimitExceed"
- // ErrorUnknown ...
- ErrorUnknown Status = "ErrorUnknown"
- // OK ...
- OK Status = "OK"
- // OKDuplicate ...
- OKDuplicate Status = "OKDuplicate"
-)
-
-// PossibleStatusValues returns an array of possible values for the Status const type.
-func PossibleStatusValues() []Status {
- return []Status{ErrorImageFormat, ErrorImageSize, ErrorLimitExceed, ErrorSource, ErrorStorage, ErrorTagLimitExceed, ErrorUnknown, OK, OKDuplicate}
-}
-
-// Status1 enumerates the values for status 1.
-type Status1 string
-
-const (
- // Done ...
- Done Status1 = "Done"
- // Exporting ...
- Exporting Status1 = "Exporting"
- // Failed ...
- Failed Status1 = "Failed"
-)
-
-// PossibleStatus1Values returns an array of possible values for the Status1 const type.
-func PossibleStatus1Values() []Status1 {
- return []Status1{Done, Exporting, Failed}
-}
-
-// Account represents a user account
-type Account struct {
- autorest.Response `json:"-"`
- // UserName - Gets the name of the account owner
- UserName *string `json:"UserName,omitempty"`
- // Email - Gets the email associated with this account
- Email *string `json:"Email,omitempty"`
- // Keys - Gets the api keys associated with this account
- Keys *APIKeys `json:"Keys,omitempty"`
- // Quotas - Gets the quotas associated with this account
- Quotas *AccountQuota `json:"Quotas,omitempty"`
-}
-
-// AccountQuota represents a set of quotas assocated with an account
-type AccountQuota struct {
- // Tier - Gets the tier of user
- Tier *string `json:"Tier,omitempty"`
- // Projects - Gets the project quota
- Projects *Quota `json:"Projects,omitempty"`
- // Predictions - Gets the prediction quota
- Predictions *Quota `json:"Predictions,omitempty"`
- // PerProject - Gets a list of quotas that apply per-project for each project
- PerProject *[]PerProjectQuota `json:"PerProject,omitempty"`
-}
-
-// APIKeys ...
-type APIKeys struct {
- TrainingKeys *KeyPair `json:"TrainingKeys,omitempty"`
- PredictionKeys *KeyPair `json:"PredictionKeys,omitempty"`
+// BoundingBox ...
+type BoundingBox struct {
+ Left *float64 `json:"left,omitempty"`
+ Top *float64 `json:"top,omitempty"`
+ Width *float64 `json:"width,omitempty"`
+ Height *float64 `json:"height,omitempty"`
}
// Domain ...
type Domain struct {
autorest.Response `json:"-"`
- ID *uuid.UUID `json:"Id,omitempty"`
- Name *string `json:"Name,omitempty"`
- Exportable *bool `json:"Exportable,omitempty"`
+ ID *uuid.UUID `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+ // Type - Possible values include: 'Classification', 'ObjectDetection'
+ Type DomainType `json:"type,omitempty"`
+ Exportable *bool `json:"exportable,omitempty"`
+ Enabled *bool `json:"enabled,omitempty"`
}
// Export ...
type Export struct {
autorest.Response `json:"-"`
- // Platform - Possible values include: 'CoreML', 'TensorFlow'
- Platform Platform `json:"Platform,omitempty"`
+ // Platform - Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX'
+ Platform ExportPlatform `json:"platform,omitempty"`
// Status - Possible values include: 'Exporting', 'Failed', 'Done'
- Status Status1 `json:"Status,omitempty"`
- DownloadURI *string `json:"DownloadUri,omitempty"`
+ Status ExportStatusModel `json:"status,omitempty"`
+ DownloadURI *string `json:"downloadUri,omitempty"`
+ // Flavor - Possible values include: 'Linux', 'Windows'
+ Flavor ExportFlavor `json:"flavor,omitempty"`
}
// Image image model to be sent as JSON
type Image struct {
- ID *uuid.UUID `json:"Id,omitempty"`
- Created *date.Time `json:"Created,omitempty"`
- Width *int32 `json:"Width,omitempty"`
- Height *int32 `json:"Height,omitempty"`
- ImageURI *string `json:"ImageUri,omitempty"`
- ThumbnailURI *string `json:"ThumbnailUri,omitempty"`
- Tags *[]ImageTag `json:"Tags,omitempty"`
- Predictions *[]PredictionTag `json:"Predictions,omitempty"`
+ ID *uuid.UUID `json:"id,omitempty"`
+ Created *date.Time `json:"created,omitempty"`
+ Width *int32 `json:"width,omitempty"`
+ Height *int32 `json:"height,omitempty"`
+ ImageURI *string `json:"imageUri,omitempty"`
+ ThumbnailURI *string `json:"thumbnailUri,omitempty"`
+ Tags *[]ImageTag `json:"tags,omitempty"`
+ Regions *[]ImageRegion `json:"regions,omitempty"`
}
// ImageCreateResult ...
type ImageCreateResult struct {
- SourceURL *string `json:"SourceUrl,omitempty"`
- // Status - Possible values include: 'OK', 'OKDuplicate', 'ErrorSource', 'ErrorImageFormat', 'ErrorImageSize', 'ErrorStorage', 'ErrorLimitExceed', 'ErrorTagLimitExceed', 'ErrorUnknown'
- Status Status `json:"Status,omitempty"`
- Image *Image `json:"Image,omitempty"`
+ SourceURL *string `json:"sourceUrl,omitempty"`
+ // Status - Possible values include: 'OK', 'OKDuplicate', 'ErrorSource', 'ErrorImageFormat', 'ErrorImageSize', 'ErrorStorage', 'ErrorLimitExceed', 'ErrorTagLimitExceed', 'ErrorRegionLimitExceed', 'ErrorUnknown'
+ Status ImageUploadStatus `json:"status,omitempty"`
+ Image *Image `json:"image,omitempty"`
}
// ImageCreateSummary ...
type ImageCreateSummary struct {
autorest.Response `json:"-"`
- IsBatchSuccessful *bool `json:"IsBatchSuccessful,omitempty"`
- Images *[]ImageCreateResult `json:"Images,omitempty"`
+ IsBatchSuccessful *bool `json:"isBatchSuccessful,omitempty"`
+ Images *[]ImageCreateResult `json:"images,omitempty"`
}
// ImageFileCreateBatch ...
type ImageFileCreateBatch struct {
- Images *[]ImageFileCreateEntry `json:"Images,omitempty"`
- TagIds *[]uuid.UUID `json:"TagIds,omitempty"`
+ Images *[]ImageFileCreateEntry `json:"images,omitempty"`
+ TagIds *[]uuid.UUID `json:"tagIds,omitempty"`
}
// ImageFileCreateEntry ...
type ImageFileCreateEntry struct {
- Name *string `json:"Name,omitempty"`
- Contents *[]byte `json:"Contents,omitempty"`
- TagIds *[]uuid.UUID `json:"TagIds,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Contents *[]byte `json:"contents,omitempty"`
+ TagIds *[]uuid.UUID `json:"tagIds,omitempty"`
+ Regions *[]Region `json:"regions,omitempty"`
}
// ImageIDCreateBatch ...
type ImageIDCreateBatch struct {
- Images *[]ImageIDCreateEntry `json:"Images,omitempty"`
- TagIds *[]uuid.UUID `json:"TagIds,omitempty"`
+ Images *[]ImageIDCreateEntry `json:"images,omitempty"`
+ TagIds *[]uuid.UUID `json:"tagIds,omitempty"`
}
// ImageIDCreateEntry ...
type ImageIDCreateEntry struct {
- ID *uuid.UUID `json:"Id,omitempty"`
- TagIds *[]uuid.UUID `json:"TagIds,omitempty"`
+ ID *uuid.UUID `json:"id,omitempty"`
+ TagIds *[]uuid.UUID `json:"tagIds,omitempty"`
+ Regions *[]Region `json:"regions,omitempty"`
}
-// ImagePredictionResult result of an image prediction request
-type ImagePredictionResult struct {
+// ImagePerformance image performance model
+type ImagePerformance struct {
+ Predictions *[]Prediction `json:"predictions,omitempty"`
+ ID *uuid.UUID `json:"id,omitempty"`
+ Created *date.Time `json:"created,omitempty"`
+ Width *int32 `json:"width,omitempty"`
+ Height *int32 `json:"height,omitempty"`
+ ImageURI *string `json:"imageUri,omitempty"`
+ ThumbnailURI *string `json:"thumbnailUri,omitempty"`
+ Tags *[]ImageTag `json:"tags,omitempty"`
+ Regions *[]ImageRegion `json:"regions,omitempty"`
+}
+
+// ImagePrediction ...
+type ImagePrediction struct {
autorest.Response `json:"-"`
- ID *uuid.UUID `json:"Id,omitempty"`
- Project *uuid.UUID `json:"Project,omitempty"`
- Iteration *uuid.UUID `json:"Iteration,omitempty"`
- Created *date.Time `json:"Created,omitempty"`
- Predictions *[]ImageTagPrediction `json:"Predictions,omitempty"`
+ ID *uuid.UUID `json:"id,omitempty"`
+ Project *uuid.UUID `json:"project,omitempty"`
+ Iteration *uuid.UUID `json:"iteration,omitempty"`
+ Created *date.Time `json:"created,omitempty"`
+ Predictions *[]Prediction `json:"predictions,omitempty"`
+}
+
+// ImageRegion ...
+type ImageRegion struct {
+ RegionID *uuid.UUID `json:"regionId,omitempty"`
+ TagName *string `json:"tagName,omitempty"`
+ Created *date.Time `json:"created,omitempty"`
+ TagID *uuid.UUID `json:"tagId,omitempty"`
+ Left *float64 `json:"left,omitempty"`
+ Top *float64 `json:"top,omitempty"`
+ Width *float64 `json:"width,omitempty"`
+ Height *float64 `json:"height,omitempty"`
+}
+
+// ImageRegionCreateBatch batch of image region information to create.
+type ImageRegionCreateBatch struct {
+ Regions *[]ImageRegionCreateEntry `json:"regions,omitempty"`
+}
+
+// ImageRegionCreateEntry ...
+type ImageRegionCreateEntry struct {
+ ImageID *uuid.UUID `json:"imageId,omitempty"`
+ TagID *uuid.UUID `json:"tagId,omitempty"`
+ Left *float64 `json:"left,omitempty"`
+ Top *float64 `json:"top,omitempty"`
+ Width *float64 `json:"width,omitempty"`
+ Height *float64 `json:"height,omitempty"`
+}
+
+// ImageRegionCreateResult ...
+type ImageRegionCreateResult struct {
+ ImageID *uuid.UUID `json:"imageId,omitempty"`
+ RegionID *uuid.UUID `json:"regionId,omitempty"`
+ TagName *string `json:"tagName,omitempty"`
+ Created *date.Time `json:"created,omitempty"`
+ TagID *uuid.UUID `json:"tagId,omitempty"`
+ Left *float64 `json:"left,omitempty"`
+ Top *float64 `json:"top,omitempty"`
+ Width *float64 `json:"width,omitempty"`
+ Height *float64 `json:"height,omitempty"`
+}
+
+// ImageRegionCreateSummary ...
+type ImageRegionCreateSummary struct {
+ autorest.Response `json:"-"`
+ Created *[]ImageRegionCreateResult `json:"created,omitempty"`
+ Duplicated *[]ImageRegionCreateEntry `json:"duplicated,omitempty"`
+ Exceeded *[]ImageRegionCreateEntry `json:"exceeded,omitempty"`
+}
+
+// ImageRegionProposal ...
+type ImageRegionProposal struct {
+ autorest.Response `json:"-"`
+ ProjectID *uuid.UUID `json:"projectId,omitempty"`
+ ImageID *uuid.UUID `json:"imageId,omitempty"`
+ Proposals *[]RegionProposal `json:"proposals,omitempty"`
}
// ImageTag ...
type ImageTag struct {
- TagID *uuid.UUID `json:"TagId,omitempty"`
- Created *date.Time `json:"Created,omitempty"`
+ TagID *uuid.UUID `json:"tagId,omitempty"`
+ TagName *string `json:"tagName,omitempty"`
+ Created *date.Time `json:"created,omitempty"`
}
// ImageTagCreateBatch ...
type ImageTagCreateBatch struct {
- Tags *[]ImageTagCreateEntry `json:"Tags,omitempty"`
+ Tags *[]ImageTagCreateEntry `json:"tags,omitempty"`
}
// ImageTagCreateEntry ...
type ImageTagCreateEntry struct {
- ImageID *uuid.UUID `json:"ImageId,omitempty"`
- TagID *uuid.UUID `json:"TagId,omitempty"`
+ ImageID *uuid.UUID `json:"imageId,omitempty"`
+ TagID *uuid.UUID `json:"tagId,omitempty"`
}
// ImageTagCreateSummary ...
type ImageTagCreateSummary struct {
autorest.Response `json:"-"`
- Created *[]ImageTagCreateEntry `json:"Created,omitempty"`
- Duplicated *[]ImageTagCreateEntry `json:"Duplicated,omitempty"`
- Exceeded *[]ImageTagCreateEntry `json:"Exceeded,omitempty"`
-}
-
-// ImageTagPrediction ...
-type ImageTagPrediction struct {
- TagID *uuid.UUID `json:"TagId,omitempty"`
- Tag *string `json:"Tag,omitempty"`
- Probability *float64 `json:"Probability,omitempty"`
+ Created *[]ImageTagCreateEntry `json:"created,omitempty"`
+ Duplicated *[]ImageTagCreateEntry `json:"duplicated,omitempty"`
+ Exceeded *[]ImageTagCreateEntry `json:"exceeded,omitempty"`
}
// ImageURL ...
type ImageURL struct {
- URL *string `json:"Url,omitempty"`
+ URL *string `json:"url,omitempty"`
}
// ImageURLCreateBatch ...
type ImageURLCreateBatch struct {
- Images *[]ImageURLCreateEntry `json:"Images,omitempty"`
- TagIds *[]uuid.UUID `json:"TagIds,omitempty"`
+ Images *[]ImageURLCreateEntry `json:"images,omitempty"`
+ TagIds *[]uuid.UUID `json:"tagIds,omitempty"`
}
// ImageURLCreateEntry ...
type ImageURLCreateEntry struct {
- URL *string `json:"Url,omitempty"`
- TagIds *[]uuid.UUID `json:"TagIds,omitempty"`
+ URL *string `json:"url,omitempty"`
+ TagIds *[]uuid.UUID `json:"tagIds,omitempty"`
+ Regions *[]Region `json:"regions,omitempty"`
+}
+
+// Int32 ...
+type Int32 struct {
+ autorest.Response `json:"-"`
+ Value *int32 `json:"value,omitempty"`
}
// Iteration iteration model to be sent over JSON
type Iteration struct {
autorest.Response `json:"-"`
// ID - Gets the id of the iteration
- ID *uuid.UUID `json:"Id,omitempty"`
+ ID *uuid.UUID `json:"id,omitempty"`
// Name - Gets or sets the name of the iteration
- Name *string `json:"Name,omitempty"`
+ Name *string `json:"name,omitempty"`
// IsDefault - Gets or sets a value indicating whether the iteration is the default iteration for the project
- IsDefault *bool `json:"IsDefault,omitempty"`
+ IsDefault *bool `json:"isDefault,omitempty"`
// Status - Gets the current iteration status
- Status *string `json:"Status,omitempty"`
+ Status *string `json:"status,omitempty"`
// Created - Gets the time this iteration was completed
- Created *date.Time `json:"Created,omitempty"`
+ Created *date.Time `json:"created,omitempty"`
// LastModified - Gets the time this iteration was last modified
- LastModified *date.Time `json:"LastModified,omitempty"`
+ LastModified *date.Time `json:"lastModified,omitempty"`
// TrainedAt - Gets the time this iteration was last modified
- TrainedAt *date.Time `json:"TrainedAt,omitempty"`
+ TrainedAt *date.Time `json:"trainedAt,omitempty"`
// ProjectID - Gets the project id of the iteration
- ProjectID *uuid.UUID `json:"ProjectId,omitempty"`
+ ProjectID *uuid.UUID `json:"projectId,omitempty"`
// Exportable - Whether the iteration can be exported to another format for download
- Exportable *bool `json:"Exportable,omitempty"`
+ Exportable *bool `json:"exportable,omitempty"`
// DomainID - Get or sets a guid of the domain the iteration has been trained on
- DomainID *uuid.UUID `json:"DomainId,omitempty"`
+ DomainID *uuid.UUID `json:"domainId,omitempty"`
}
// IterationPerformance represents the detailed performance data for a trained iteration
type IterationPerformance struct {
autorest.Response `json:"-"`
// PerTagPerformance - Gets the per-tag performance details for this iteration
- PerTagPerformance *[]TagPerformance `json:"PerTagPerformance,omitempty"`
+ PerTagPerformance *[]TagPerformance `json:"perTagPerformance,omitempty"`
// Precision - Gets the precision
- Precision *float64 `json:"Precision,omitempty"`
+ Precision *float64 `json:"precision,omitempty"`
// PrecisionStdDeviation - Gets the standard deviation for the precision
- PrecisionStdDeviation *float64 `json:"PrecisionStdDeviation,omitempty"`
+ PrecisionStdDeviation *float64 `json:"precisionStdDeviation,omitempty"`
// Recall - Gets the recall
- Recall *float64 `json:"Recall,omitempty"`
+ Recall *float64 `json:"recall,omitempty"`
// RecallStdDeviation - Gets the standard deviation for the recall
- RecallStdDeviation *float64 `json:"RecallStdDeviation,omitempty"`
-}
-
-// KeyPair ...
-type KeyPair struct {
- PrimaryKey *string `json:"PrimaryKey,omitempty"`
- SecondaryKey *string `json:"SecondaryKey,omitempty"`
+ RecallStdDeviation *float64 `json:"recallStdDeviation,omitempty"`
+ // AveragePrecision - Gets the average precision when applicable
+ AveragePrecision *float64 `json:"averagePrecision,omitempty"`
}
// ListDomain ...
@@ -325,6 +411,12 @@ type ListImage struct {
Value *[]Image `json:"value,omitempty"`
}
+// ListImagePerformance ...
+type ListImagePerformance struct {
+ autorest.Response `json:"-"`
+ Value *[]ImagePerformance `json:"value,omitempty"`
+}
+
// ListIteration ...
type ListIteration struct {
autorest.Response `json:"-"`
@@ -337,132 +429,125 @@ type ListProject struct {
Value *[]Project `json:"value,omitempty"`
}
-// PerProjectQuota represents a set of quotas for a given project
-type PerProjectQuota struct {
- // ProjectID - Gets the project id of the project this quota applies to
- ProjectID *uuid.UUID `json:"ProjectId,omitempty"`
- // Iterations - Gets the iteration quota for the project
- Iterations *Quota `json:"Iterations,omitempty"`
- // Images - Gets the image quota for the project
- Images *Quota `json:"Images,omitempty"`
- // Tags - Gets the tag quota for the project
- Tags *Quota `json:"Tags,omitempty"`
-}
-
-// Prediction result of an image classification request
-type Prediction struct {
- ID *uuid.UUID `json:"Id,omitempty"`
- Project *uuid.UUID `json:"Project,omitempty"`
- Iteration *uuid.UUID `json:"Iteration,omitempty"`
- Created *date.Time `json:"Created,omitempty"`
- Predictions *[]PredictionTag `json:"Predictions,omitempty"`
- ImageURI *string `json:"ImageUri,omitempty"`
- ThumbnailURI *string `json:"ThumbnailUri,omitempty"`
-}
-
-// PredictionQuery ...
-type PredictionQuery struct {
+// ListTag ...
+type ListTag struct {
autorest.Response `json:"-"`
- Results *[]Prediction `json:"Results,omitempty"`
- Token *PredictionQueryToken `json:"Token,omitempty"`
+ Value *[]Tag `json:"value,omitempty"`
+}
+
+// Prediction ...
+type Prediction struct {
+ Probability *float64 `json:"probability,omitempty"`
+ TagID *uuid.UUID `json:"tagId,omitempty"`
+ TagName *string `json:"tagName,omitempty"`
+ BoundingBox *BoundingBox `json:"boundingBox,omitempty"`
+}
+
+// PredictionQueryResult ...
+type PredictionQueryResult struct {
+ autorest.Response `json:"-"`
+ Token *PredictionQueryToken `json:"token,omitempty"`
+ Results *[]StoredImagePrediction `json:"results,omitempty"`
}
// PredictionQueryTag ...
type PredictionQueryTag struct {
- ID *uuid.UUID `json:"Id,omitempty"`
- MinThreshold *float64 `json:"MinThreshold,omitempty"`
- MaxThreshold *float64 `json:"MaxThreshold,omitempty"`
+ ID *uuid.UUID `json:"id,omitempty"`
+ MinThreshold *float64 `json:"minThreshold,omitempty"`
+ MaxThreshold *float64 `json:"maxThreshold,omitempty"`
}
// PredictionQueryToken ...
type PredictionQueryToken struct {
- Session *string `json:"Session,omitempty"`
- Continuation *string `json:"Continuation,omitempty"`
- MaxCount *int32 `json:"MaxCount,omitempty"`
+ Session *string `json:"session,omitempty"`
+ Continuation *string `json:"continuation,omitempty"`
+ MaxCount *int32 `json:"maxCount,omitempty"`
// OrderBy - Possible values include: 'Newest', 'Oldest', 'Suggested'
- OrderBy OrderBy `json:"OrderBy,omitempty"`
- Tags *[]PredictionQueryTag `json:"Tags,omitempty"`
- IterationID *uuid.UUID `json:"IterationId,omitempty"`
- StartTime *date.Time `json:"StartTime,omitempty"`
- EndTime *date.Time `json:"EndTime,omitempty"`
- Application *string `json:"Application,omitempty"`
-}
-
-// PredictionTag ...
-type PredictionTag struct {
- TagID *uuid.UUID `json:"TagId,omitempty"`
- Tag *string `json:"Tag,omitempty"`
- Probability *float64 `json:"Probability,omitempty"`
+ OrderBy OrderBy `json:"orderBy,omitempty"`
+ Tags *[]PredictionQueryTag `json:"tags,omitempty"`
+ IterationID *uuid.UUID `json:"iterationId,omitempty"`
+ StartTime *date.Time `json:"startTime,omitempty"`
+ EndTime *date.Time `json:"endTime,omitempty"`
+ Application *string `json:"application,omitempty"`
}
// Project represents a project
type Project struct {
autorest.Response `json:"-"`
// ID - Gets the project id
- ID *uuid.UUID `json:"Id,omitempty"`
+ ID *uuid.UUID `json:"id,omitempty"`
// Name - Gets or sets the name of the project
- Name *string `json:"Name,omitempty"`
+ Name *string `json:"name,omitempty"`
// Description - Gets or sets the description of the project
- Description *string `json:"Description,omitempty"`
+ Description *string `json:"description,omitempty"`
// Settings - Gets or sets the project settings
- Settings *ProjectSettings `json:"Settings,omitempty"`
- // CurrentIterationID - Gets the current iteration id
- CurrentIterationID *uuid.UUID `json:"CurrentIterationId,omitempty"`
+ Settings *ProjectSettings `json:"settings,omitempty"`
// Created - Gets the date this project was created
- Created *date.Time `json:"Created,omitempty"`
+ Created *date.Time `json:"created,omitempty"`
// LastModified - Gets the date this project was last modifed
- LastModified *date.Time `json:"LastModified,omitempty"`
- // ThumbnailURI - Gets the thumbnail url representing the image
- ThumbnailURI *string `json:"ThumbnailUri,omitempty"`
+ LastModified *date.Time `json:"lastModified,omitempty"`
+ // ThumbnailURI - Gets the thumbnail url representing the project
+ ThumbnailURI *string `json:"thumbnailUri,omitempty"`
}
// ProjectSettings represents settings associated with a project
type ProjectSettings struct {
// DomainID - Gets or sets the id of the Domain to use with this project
- DomainID *uuid.UUID `json:"DomainId,omitempty"`
+ DomainID *uuid.UUID `json:"domainId,omitempty"`
}
-// Quota represents a quota
-type Quota struct {
- // Total - The total allowable amount in the quota
- Total *int32 `json:"Total,omitempty"`
- // Used - The amount of quota that has currently been used
- Used *int32 `json:"Used,omitempty"`
- // TimeUntilReset - Gets the time remaining until the quota resets. Null if this quota does not reset.
- TimeUntilReset *string `json:"TimeUntilReset,omitempty"`
+// Region ...
+type Region struct {
+ TagID *uuid.UUID `json:"tagId,omitempty"`
+ Left *float64 `json:"left,omitempty"`
+ Top *float64 `json:"top,omitempty"`
+ Width *float64 `json:"width,omitempty"`
+ Height *float64 `json:"height,omitempty"`
+}
+
+// RegionProposal ...
+type RegionProposal struct {
+ Confidence *float64 `json:"confidence,omitempty"`
+ BoundingBox *BoundingBox `json:"boundingBox,omitempty"`
+}
+
+// StoredImagePrediction result of an image classification request
+type StoredImagePrediction struct {
+ ImageURI *string `json:"imageUri,omitempty"`
+ ThumbnailURI *string `json:"thumbnailUri,omitempty"`
+ Domain *uuid.UUID `json:"domain,omitempty"`
+ ID *uuid.UUID `json:"id,omitempty"`
+ Project *uuid.UUID `json:"project,omitempty"`
+ Iteration *uuid.UUID `json:"iteration,omitempty"`
+ Created *date.Time `json:"created,omitempty"`
+ Predictions *[]Prediction `json:"predictions,omitempty"`
}
// Tag represents a Tag
type Tag struct {
autorest.Response `json:"-"`
// ID - Gets the Tag ID
- ID *uuid.UUID `json:"Id,omitempty"`
+ ID *uuid.UUID `json:"id,omitempty"`
// Name - Gets or sets the name of the tag
- Name *string `json:"Name,omitempty"`
+ Name *string `json:"name,omitempty"`
// Description - Gets or sets the description of the tag
- Description *string `json:"Description,omitempty"`
+ Description *string `json:"description,omitempty"`
// ImageCount - Gets the number of images with this tag
- ImageCount *int32 `json:"ImageCount,omitempty"`
-}
-
-// TagList ...
-type TagList struct {
- autorest.Response `json:"-"`
- Tags *[]Tag `json:"Tags,omitempty"`
- TotalTaggedImages *int32 `json:"TotalTaggedImages,omitempty"`
- TotalUntaggedImages *int32 `json:"TotalUntaggedImages,omitempty"`
+ ImageCount *int32 `json:"imageCount,omitempty"`
}
// TagPerformance represents performance data for a particular tag in a trained iteration
type TagPerformance struct {
- ID *uuid.UUID `json:"Id,omitempty"`
- Name *string `json:"Name,omitempty"`
+ ID *uuid.UUID `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
// Precision - Gets the precision
- Precision *float64 `json:"Precision,omitempty"`
+ Precision *float64 `json:"precision,omitempty"`
// PrecisionStdDeviation - Gets the standard deviation for the precision
- PrecisionStdDeviation *float64 `json:"PrecisionStdDeviation,omitempty"`
+ PrecisionStdDeviation *float64 `json:"precisionStdDeviation,omitempty"`
// Recall - Gets the recall
- Recall *float64 `json:"Recall,omitempty"`
+ Recall *float64 `json:"recall,omitempty"`
// RecallStdDeviation - Gets the standard deviation for the recall
- RecallStdDeviation *float64 `json:"RecallStdDeviation,omitempty"`
+ RecallStdDeviation *float64 `json:"recallStdDeviation,omitempty"`
+ // AveragePrecision - Gets the average precision when applicable
+ AveragePrecision *float64 `json:"averagePrecision,omitempty"`
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.2/customvision/training/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.2/customvision/training/version.go
index f64e1c2a8..f84bd9afe 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.2/customvision/training/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.2/customvision/training/version.go
@@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version"
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
- return "Azure-SDK-For-Go/" + version.Number + " training/1.2"
+ return "Azure-SDK-For-Go/" + version.Number + " training/2.0"
}
// Version returns the semantic version (see http://semver.org) of the client.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/apps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/apps.go
new file mode 100644
index 000000000..678aa0cb4
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/apps.go
@@ -0,0 +1,1292 @@
+package authoring
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// AppsClient is the client for the Apps methods of the Authoring service.
+type AppsClient struct {
+ BaseClient
+}
+
+// NewAppsClient creates an instance of the AppsClient client.
+func NewAppsClient(azureRegion AzureRegions) AppsClient {
+ return AppsClient{New(azureRegion)}
+}
+
+// Add creates a new LUIS app.
+// Parameters:
+// applicationCreateObject - a model containing Name, Description (optional), Culture, Usage Scenario
+// (optional), Domain (optional) and initial version ID (optional) of the application. Default value for the
+// version ID is 0.1. Note: the culture cannot be changed after the app is created.
+func (client AppsClient) Add(ctx context.Context, applicationCreateObject ApplicationCreateObject) (result UUID, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: applicationCreateObject,
+ Constraints: []validation.Constraint{{Target: "applicationCreateObject.Culture", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "applicationCreateObject.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("authoring.AppsClient", "Add", err.Error())
+ }
+
+ req, err := client.AddPreparer(ctx, applicationCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Add", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Add", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Add", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddPreparer prepares the Add request.
+func (client AppsClient) AddPreparer(ctx context.Context, applicationCreateObject ApplicationCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPath("/apps/"),
+ autorest.WithJSON(applicationCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddSender sends the Add request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) AddSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddResponder handles the response to the Add request. The method always
+// closes the http.Response Body.
+func (client AppsClient) AddResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddCustomPrebuiltDomain adds a prebuilt domain along with its models as a new application.
+// Parameters:
+// prebuiltDomainCreateObject - a prebuilt domain create object containing the name and culture of the domain.
+func (client AppsClient) AddCustomPrebuiltDomain(ctx context.Context, prebuiltDomainCreateObject PrebuiltDomainCreateObject) (result UUID, err error) {
+ req, err := client.AddCustomPrebuiltDomainPreparer(ctx, prebuiltDomainCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "AddCustomPrebuiltDomain", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddCustomPrebuiltDomainSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "AddCustomPrebuiltDomain", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddCustomPrebuiltDomainResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "AddCustomPrebuiltDomain", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddCustomPrebuiltDomainPreparer prepares the AddCustomPrebuiltDomain request.
+func (client AppsClient) AddCustomPrebuiltDomainPreparer(ctx context.Context, prebuiltDomainCreateObject PrebuiltDomainCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPath("/apps/customprebuiltdomains"),
+ autorest.WithJSON(prebuiltDomainCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddCustomPrebuiltDomainSender sends the AddCustomPrebuiltDomain request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) AddCustomPrebuiltDomainSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddCustomPrebuiltDomainResponder handles the response to the AddCustomPrebuiltDomain request. The method always
+// closes the http.Response Body.
+func (client AppsClient) AddCustomPrebuiltDomainResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes an application.
+// Parameters:
+// appID - the application ID.
+func (client AppsClient) Delete(ctx context.Context, appID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeletePreparer(ctx, appID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client AppsClient) DeletePreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client AppsClient) DeleteResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DownloadQueryLogs gets the query logs of the past month for the application.
+// Parameters:
+// appID - the application ID.
+func (client AppsClient) DownloadQueryLogs(ctx context.Context, appID uuid.UUID) (result ReadCloser, err error) {
+ req, err := client.DownloadQueryLogsPreparer(ctx, appID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "DownloadQueryLogs", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DownloadQueryLogsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "DownloadQueryLogs", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DownloadQueryLogsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "DownloadQueryLogs", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DownloadQueryLogsPreparer prepares the DownloadQueryLogs request.
+func (client AppsClient) DownloadQueryLogsPreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/querylogs", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DownloadQueryLogsSender sends the DownloadQueryLogs request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) DownloadQueryLogsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DownloadQueryLogsResponder handles the response to the DownloadQueryLogs request. The method always
+// closes the http.Response Body.
+func (client AppsClient) DownloadQueryLogsResponder(resp *http.Response) (result ReadCloser, err error) {
+ result.Value = &resp.Body
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK))
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Get gets the application info.
+// Parameters:
+// appID - the application ID.
+func (client AppsClient) Get(ctx context.Context, appID uuid.UUID) (result ApplicationInfoResponse, err error) {
+ req, err := client.GetPreparer(ctx, appID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client AppsClient) GetPreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client AppsClient) GetResponder(resp *http.Response) (result ApplicationInfoResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetPublishSettings get the application publish settings.
+// Parameters:
+// appID - the application ID.
+func (client AppsClient) GetPublishSettings(ctx context.Context, appID uuid.UUID) (result PublishSettings, err error) {
+ req, err := client.GetPublishSettingsPreparer(ctx, appID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "GetPublishSettings", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPublishSettingsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "GetPublishSettings", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPublishSettingsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "GetPublishSettings", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPublishSettingsPreparer prepares the GetPublishSettings request.
+func (client AppsClient) GetPublishSettingsPreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/publishsettings", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPublishSettingsSender sends the GetPublishSettings request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) GetPublishSettingsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPublishSettingsResponder handles the response to the GetPublishSettings request. The method always
+// closes the http.Response Body.
+func (client AppsClient) GetPublishSettingsResponder(resp *http.Response) (result PublishSettings, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetSettings get the application settings.
+// Parameters:
+// appID - the application ID.
+func (client AppsClient) GetSettings(ctx context.Context, appID uuid.UUID) (result ApplicationSettings, err error) {
+ req, err := client.GetSettingsPreparer(ctx, appID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "GetSettings", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSettingsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "GetSettings", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetSettingsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "GetSettings", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetSettingsPreparer prepares the GetSettings request.
+func (client AppsClient) GetSettingsPreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/settings", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSettingsSender sends the GetSettings request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) GetSettingsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetSettingsResponder handles the response to the GetSettings request. The method always
+// closes the http.Response Body.
+func (client AppsClient) GetSettingsResponder(resp *http.Response) (result ApplicationSettings, 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 an application to LUIS, the application's structure should be included in in the request body.
+// Parameters:
+// luisApp - a LUIS application structure.
+// appName - the application name to create. If not specified, the application name will be read from the
+// imported object.
+func (client AppsClient) Import(ctx context.Context, luisApp LuisApp, appName string) (result UUID, err error) {
+ req, err := client.ImportPreparer(ctx, luisApp, appName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Import", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ImportSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Import", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ImportResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Import", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ImportPreparer prepares the Import request.
+func (client AppsClient) ImportPreparer(ctx context.Context, luisApp LuisApp, appName string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ queryParameters := map[string]interface{}{}
+ if len(appName) > 0 {
+ queryParameters["appName"] = autorest.Encode("query", appName)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPath("/apps/import"),
+ autorest.WithJSON(luisApp),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ImportSender sends the Import request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) ImportSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ImportResponder handles the response to the Import request. The method always
+// closes the http.Response Body.
+func (client AppsClient) ImportResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List lists all of the user applications.
+// Parameters:
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client AppsClient) List(ctx context.Context, skip *int32, take *int32) (result ListApplicationInfoResponse, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.AppsClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client AppsClient) ListPreparer(ctx context.Context, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPath("/apps/"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client AppsClient) ListResponder(resp *http.Response) (result ListApplicationInfoResponse, 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
+}
+
+// ListAvailableCustomPrebuiltDomains gets all the available custom prebuilt domains for all cultures.
+func (client AppsClient) ListAvailableCustomPrebuiltDomains(ctx context.Context) (result ListPrebuiltDomain, err error) {
+ req, err := client.ListAvailableCustomPrebuiltDomainsPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListAvailableCustomPrebuiltDomains", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAvailableCustomPrebuiltDomainsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListAvailableCustomPrebuiltDomains", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListAvailableCustomPrebuiltDomainsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListAvailableCustomPrebuiltDomains", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAvailableCustomPrebuiltDomainsPreparer prepares the ListAvailableCustomPrebuiltDomains request.
+func (client AppsClient) ListAvailableCustomPrebuiltDomainsPreparer(ctx context.Context) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPath("/apps/customprebuiltdomains"))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAvailableCustomPrebuiltDomainsSender sends the ListAvailableCustomPrebuiltDomains request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) ListAvailableCustomPrebuiltDomainsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListAvailableCustomPrebuiltDomainsResponder handles the response to the ListAvailableCustomPrebuiltDomains request. The method always
+// closes the http.Response Body.
+func (client AppsClient) ListAvailableCustomPrebuiltDomainsResponder(resp *http.Response) (result ListPrebuiltDomain, 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
+}
+
+// ListAvailableCustomPrebuiltDomainsForCulture gets all the available custom prebuilt domains for a specific culture.
+// Parameters:
+// culture - culture.
+func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCulture(ctx context.Context, culture string) (result ListPrebuiltDomain, err error) {
+ req, err := client.ListAvailableCustomPrebuiltDomainsForCulturePreparer(ctx, culture)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListAvailableCustomPrebuiltDomainsForCulture", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAvailableCustomPrebuiltDomainsForCultureSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListAvailableCustomPrebuiltDomainsForCulture", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListAvailableCustomPrebuiltDomainsForCultureResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListAvailableCustomPrebuiltDomainsForCulture", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAvailableCustomPrebuiltDomainsForCulturePreparer prepares the ListAvailableCustomPrebuiltDomainsForCulture request.
+func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCulturePreparer(ctx context.Context, culture string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "culture": autorest.Encode("path", culture),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/customprebuiltdomains/{culture}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAvailableCustomPrebuiltDomainsForCultureSender sends the ListAvailableCustomPrebuiltDomainsForCulture request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCultureSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListAvailableCustomPrebuiltDomainsForCultureResponder handles the response to the ListAvailableCustomPrebuiltDomainsForCulture request. The method always
+// closes the http.Response Body.
+func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCultureResponder(resp *http.Response) (result ListPrebuiltDomain, 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
+}
+
+// ListCortanaEndpoints gets the endpoint URLs for the prebuilt Cortana applications.
+func (client AppsClient) ListCortanaEndpoints(ctx context.Context) (result PersonalAssistantsResponse, err error) {
+ req, err := client.ListCortanaEndpointsPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListCortanaEndpoints", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListCortanaEndpointsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListCortanaEndpoints", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListCortanaEndpointsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListCortanaEndpoints", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListCortanaEndpointsPreparer prepares the ListCortanaEndpoints request.
+func (client AppsClient) ListCortanaEndpointsPreparer(ctx context.Context) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPath("/apps/assistants"))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListCortanaEndpointsSender sends the ListCortanaEndpoints request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) ListCortanaEndpointsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListCortanaEndpointsResponder handles the response to the ListCortanaEndpoints request. The method always
+// closes the http.Response Body.
+func (client AppsClient) ListCortanaEndpointsResponder(resp *http.Response) (result PersonalAssistantsResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListDomains gets the available application domains.
+func (client AppsClient) ListDomains(ctx context.Context) (result ListString, err error) {
+ req, err := client.ListDomainsPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListDomains", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListDomainsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListDomains", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListDomainsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListDomains", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListDomainsPreparer prepares the ListDomains request.
+func (client AppsClient) ListDomainsPreparer(ctx context.Context) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPath("/apps/domains"))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListDomainsSender sends the ListDomains request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) ListDomainsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListDomainsResponder handles the response to the ListDomains request. The method always
+// closes the http.Response Body.
+func (client AppsClient) ListDomainsResponder(resp *http.Response) (result ListString, 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
+}
+
+// ListEndpoints returns the available endpoint deployment regions and URLs.
+// Parameters:
+// appID - the application ID.
+func (client AppsClient) ListEndpoints(ctx context.Context, appID uuid.UUID) (result SetString, err error) {
+ req, err := client.ListEndpointsPreparer(ctx, appID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListEndpoints", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListEndpointsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListEndpoints", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListEndpointsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListEndpoints", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListEndpointsPreparer prepares the ListEndpoints request.
+func (client AppsClient) ListEndpointsPreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/endpoints", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListEndpointsSender sends the ListEndpoints request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) ListEndpointsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListEndpointsResponder handles the response to the ListEndpoints request. The method always
+// closes the http.Response Body.
+func (client AppsClient) ListEndpointsResponder(resp *http.Response) (result SetString, 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
+}
+
+// ListSupportedCultures gets the supported application cultures.
+func (client AppsClient) ListSupportedCultures(ctx context.Context) (result ListAvailableCulture, err error) {
+ req, err := client.ListSupportedCulturesPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListSupportedCultures", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSupportedCulturesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListSupportedCultures", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListSupportedCulturesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListSupportedCultures", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListSupportedCulturesPreparer prepares the ListSupportedCultures request.
+func (client AppsClient) ListSupportedCulturesPreparer(ctx context.Context) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPath("/apps/cultures"))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSupportedCulturesSender sends the ListSupportedCultures request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) ListSupportedCulturesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListSupportedCulturesResponder handles the response to the ListSupportedCultures request. The method always
+// closes the http.Response Body.
+func (client AppsClient) ListSupportedCulturesResponder(resp *http.Response) (result ListAvailableCulture, 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
+}
+
+// ListUsageScenarios gets the application available usage scenarios.
+func (client AppsClient) ListUsageScenarios(ctx context.Context) (result ListString, err error) {
+ req, err := client.ListUsageScenariosPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListUsageScenarios", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListUsageScenariosSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListUsageScenarios", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListUsageScenariosResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListUsageScenarios", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListUsageScenariosPreparer prepares the ListUsageScenarios request.
+func (client AppsClient) ListUsageScenariosPreparer(ctx context.Context) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPath("/apps/usagescenarios"))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListUsageScenariosSender sends the ListUsageScenarios request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) ListUsageScenariosSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListUsageScenariosResponder handles the response to the ListUsageScenarios request. The method always
+// closes the http.Response Body.
+func (client AppsClient) ListUsageScenariosResponder(resp *http.Response) (result ListString, 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
+}
+
+// Publish publishes a specific version of the application.
+// Parameters:
+// appID - the application ID.
+// applicationPublishObject - the application publish object. The region is the target region that the
+// application is published to.
+func (client AppsClient) Publish(ctx context.Context, appID uuid.UUID, applicationPublishObject ApplicationPublishObject) (result ProductionOrStagingEndpointInfo, err error) {
+ req, err := client.PublishPreparer(ctx, appID, applicationPublishObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Publish", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.PublishSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Publish", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.PublishResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Publish", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// PublishPreparer prepares the Publish request.
+func (client AppsClient) PublishPreparer(ctx context.Context, appID uuid.UUID, applicationPublishObject ApplicationPublishObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/publish", pathParameters),
+ autorest.WithJSON(applicationPublishObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PublishSender sends the Publish request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) PublishSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// PublishResponder handles the response to the Publish request. The method always
+// closes the http.Response Body.
+func (client AppsClient) PublishResponder(resp *http.Response) (result ProductionOrStagingEndpointInfo, 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
+}
+
+// Update updates the name or description of the application.
+// Parameters:
+// appID - the application ID.
+// applicationUpdateObject - a model containing Name and Description of the application.
+func (client AppsClient) Update(ctx context.Context, appID uuid.UUID, applicationUpdateObject ApplicationUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdatePreparer(ctx, appID, applicationUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client AppsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID, applicationUpdateObject ApplicationUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}", pathParameters),
+ autorest.WithJSON(applicationUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client AppsClient) UpdateResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdatePublishSettings updates the application publish settings.
+// Parameters:
+// appID - the application ID.
+// publishSettingUpdateObject - an object containing the new publish application settings.
+func (client AppsClient) UpdatePublishSettings(ctx context.Context, appID uuid.UUID, publishSettingUpdateObject PublishSettingUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdatePublishSettingsPreparer(ctx, appID, publishSettingUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "UpdatePublishSettings", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdatePublishSettingsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "UpdatePublishSettings", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdatePublishSettingsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "UpdatePublishSettings", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePublishSettingsPreparer prepares the UpdatePublishSettings request.
+func (client AppsClient) UpdatePublishSettingsPreparer(ctx context.Context, appID uuid.UUID, publishSettingUpdateObject PublishSettingUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/publishsettings", pathParameters),
+ autorest.WithJSON(publishSettingUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdatePublishSettingsSender sends the UpdatePublishSettings request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) UpdatePublishSettingsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdatePublishSettingsResponder handles the response to the UpdatePublishSettings request. The method always
+// closes the http.Response Body.
+func (client AppsClient) UpdatePublishSettingsResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateSettings updates the application settings.
+// Parameters:
+// appID - the application ID.
+// applicationSettingUpdateObject - an object containing the new application settings.
+func (client AppsClient) UpdateSettings(ctx context.Context, appID uuid.UUID, applicationSettingUpdateObject ApplicationSettingUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateSettingsPreparer(ctx, appID, applicationSettingUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "UpdateSettings", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSettingsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "UpdateSettings", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateSettingsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.AppsClient", "UpdateSettings", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateSettingsPreparer prepares the UpdateSettings request.
+func (client AppsClient) UpdateSettingsPreparer(ctx context.Context, appID uuid.UUID, applicationSettingUpdateObject ApplicationSettingUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/settings", pathParameters),
+ autorest.WithJSON(applicationSettingUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSettingsSender sends the UpdateSettings request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) UpdateSettingsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateSettingsResponder handles the response to the UpdateSettings request. The method always
+// closes the http.Response Body.
+func (client AppsClient) UpdateSettingsResponder(resp *http.Response) (result OperationStatus, 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/services/cognitiveservices/v2.0/luis/authoring/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/client.go
new file mode 100644
index 000000000..0f2e71353
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/client.go
@@ -0,0 +1,44 @@
+// Package authoring implements the Azure ARM Authoring service API version v2.0 preview.
+//
+//
+package authoring
+
+// 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"
+)
+
+// BaseClient is the base client for Authoring.
+type BaseClient struct {
+ autorest.Client
+ AzureRegion AzureRegions
+}
+
+// New creates an instance of the BaseClient client.
+func New(azureRegion AzureRegions) BaseClient {
+ return NewWithoutDefaults(azureRegion)
+}
+
+// NewWithoutDefaults creates an instance of the BaseClient client.
+func NewWithoutDefaults(azureRegion AzureRegions) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ AzureRegion: azureRegion,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/examples.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/examples.go
new file mode 100644
index 000000000..2aab906c4
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/examples.go
@@ -0,0 +1,334 @@
+package authoring
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// ExamplesClient is the client for the Examples methods of the Authoring service.
+type ExamplesClient struct {
+ BaseClient
+}
+
+// NewExamplesClient creates an instance of the ExamplesClient client.
+func NewExamplesClient(azureRegion AzureRegions) ExamplesClient {
+ return ExamplesClient{New(azureRegion)}
+}
+
+// Add adds a labeled example to the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// exampleLabelObject - an example label with the expected intent and entities.
+func (client ExamplesClient) Add(ctx context.Context, appID uuid.UUID, versionID string, exampleLabelObject ExampleLabelObject) (result LabelExampleResponse, err error) {
+ req, err := client.AddPreparer(ctx, appID, versionID, exampleLabelObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "Add", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "Add", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "Add", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddPreparer prepares the Add request.
+func (client ExamplesClient) AddPreparer(ctx context.Context, appID uuid.UUID, versionID string, exampleLabelObject ExampleLabelObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/example", pathParameters),
+ autorest.WithJSON(exampleLabelObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddSender sends the Add request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExamplesClient) AddSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddResponder handles the response to the Add request. The method always
+// closes the http.Response Body.
+func (client ExamplesClient) AddResponder(resp *http.Response) (result LabelExampleResponse, 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
+}
+
+// Batch adds a batch of labeled examples to the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// exampleLabelObjectArray - array of examples.
+func (client ExamplesClient) Batch(ctx context.Context, appID uuid.UUID, versionID string, exampleLabelObjectArray []ExampleLabelObject) (result ListBatchLabelExample, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: exampleLabelObjectArray,
+ Constraints: []validation.Constraint{{Target: "exampleLabelObjectArray", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("authoring.ExamplesClient", "Batch", err.Error())
+ }
+
+ req, err := client.BatchPreparer(ctx, appID, versionID, exampleLabelObjectArray)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "Batch", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.BatchSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "Batch", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.BatchResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "Batch", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// BatchPreparer prepares the Batch request.
+func (client ExamplesClient) BatchPreparer(ctx context.Context, appID uuid.UUID, versionID string, exampleLabelObjectArray []ExampleLabelObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/examples", pathParameters),
+ autorest.WithJSON(exampleLabelObjectArray))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// BatchSender sends the Batch request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExamplesClient) BatchSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// BatchResponder handles the response to the Batch request. The method always
+// closes the http.Response Body.
+func (client ExamplesClient) BatchResponder(resp *http.Response) (result ListBatchLabelExample, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusMultiStatus),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the labeled example with the specified ID.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// exampleID - the example ID.
+func (client ExamplesClient) Delete(ctx context.Context, appID uuid.UUID, versionID string, exampleID int32) (result OperationStatus, err error) {
+ req, err := client.DeletePreparer(ctx, appID, versionID, exampleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ExamplesClient) DeletePreparer(ctx context.Context, appID uuid.UUID, versionID string, exampleID int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "exampleId": autorest.Encode("path", exampleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/examples/{exampleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExamplesClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ExamplesClient) DeleteResponder(resp *http.Response) (result OperationStatus, 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 examples to be reviewed.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ExamplesClient) List(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListLabeledUtterance, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.ExamplesClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ExamplesClient) ListPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/examples", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExamplesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ExamplesClient) ListResponder(resp *http.Response) (result ListLabeledUtterance, 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/services/cognitiveservices/v2.0/luis/authoring/features.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/features.go
new file mode 100644
index 000000000..e7a49593c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/features.go
@@ -0,0 +1,492 @@
+package authoring
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// FeaturesClient is the client for the Features methods of the Authoring service.
+type FeaturesClient struct {
+ BaseClient
+}
+
+// NewFeaturesClient creates an instance of the FeaturesClient client.
+func NewFeaturesClient(azureRegion AzureRegions) FeaturesClient {
+ return FeaturesClient{New(azureRegion)}
+}
+
+// AddPhraseList creates a new phraselist feature.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// phraselistCreateObject - a Phraselist object containing Name, comma-separated Phrases and the isExchangeable
+// boolean. Default value for isExchangeable is true.
+func (client FeaturesClient) AddPhraseList(ctx context.Context, appID uuid.UUID, versionID string, phraselistCreateObject PhraselistCreateObject) (result Int32, err error) {
+ req, err := client.AddPhraseListPreparer(ctx, appID, versionID, phraselistCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "AddPhraseList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddPhraseListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "AddPhraseList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddPhraseListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "AddPhraseList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddPhraseListPreparer prepares the AddPhraseList request.
+func (client FeaturesClient) AddPhraseListPreparer(ctx context.Context, appID uuid.UUID, versionID string, phraselistCreateObject PhraselistCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists", pathParameters),
+ autorest.WithJSON(phraselistCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddPhraseListSender sends the AddPhraseList request. The method will close the
+// http.Response Body if it receives an error.
+func (client FeaturesClient) AddPhraseListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddPhraseListResponder handles the response to the AddPhraseList request. The method always
+// closes the http.Response Body.
+func (client FeaturesClient) AddPhraseListResponder(resp *http.Response) (result Int32, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeletePhraseList deletes a phraselist feature.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// phraselistID - the ID of the feature to be deleted.
+func (client FeaturesClient) DeletePhraseList(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32) (result OperationStatus, err error) {
+ req, err := client.DeletePhraseListPreparer(ctx, appID, versionID, phraselistID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "DeletePhraseList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeletePhraseListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "DeletePhraseList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeletePhraseListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "DeletePhraseList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePhraseListPreparer prepares the DeletePhraseList request.
+func (client FeaturesClient) DeletePhraseListPreparer(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "phraselistId": autorest.Encode("path", phraselistID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeletePhraseListSender sends the DeletePhraseList request. The method will close the
+// http.Response Body if it receives an error.
+func (client FeaturesClient) DeletePhraseListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeletePhraseListResponder handles the response to the DeletePhraseList request. The method always
+// closes the http.Response Body.
+func (client FeaturesClient) DeletePhraseListResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetPhraseList gets phraselist feature info.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// phraselistID - the ID of the feature to be retrieved.
+func (client FeaturesClient) GetPhraseList(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32) (result PhraseListFeatureInfo, err error) {
+ req, err := client.GetPhraseListPreparer(ctx, appID, versionID, phraselistID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "GetPhraseList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPhraseListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "GetPhraseList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPhraseListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "GetPhraseList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPhraseListPreparer prepares the GetPhraseList request.
+func (client FeaturesClient) GetPhraseListPreparer(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "phraselistId": autorest.Encode("path", phraselistID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPhraseListSender sends the GetPhraseList request. The method will close the
+// http.Response Body if it receives an error.
+func (client FeaturesClient) GetPhraseListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPhraseListResponder handles the response to the GetPhraseList request. The method always
+// closes the http.Response Body.
+func (client FeaturesClient) GetPhraseListResponder(resp *http.Response) (result PhraseListFeatureInfo, 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 extraction features for the specified application version.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client FeaturesClient) List(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result FeaturesResponseObject, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.FeaturesClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client FeaturesClient) ListPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/features", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client FeaturesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client FeaturesClient) ListResponder(resp *http.Response) (result FeaturesResponseObject, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListPhraseLists gets all the phraselist features.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client FeaturesClient) ListPhraseLists(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPhraseListFeatureInfo, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.FeaturesClient", "ListPhraseLists", err.Error())
+ }
+
+ req, err := client.ListPhraseListsPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "ListPhraseLists", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListPhraseListsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "ListPhraseLists", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListPhraseListsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "ListPhraseLists", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPhraseListsPreparer prepares the ListPhraseLists request.
+func (client FeaturesClient) ListPhraseListsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListPhraseListsSender sends the ListPhraseLists request. The method will close the
+// http.Response Body if it receives an error.
+func (client FeaturesClient) ListPhraseListsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListPhraseListsResponder handles the response to the ListPhraseLists request. The method always
+// closes the http.Response Body.
+func (client FeaturesClient) ListPhraseListsResponder(resp *http.Response) (result ListPhraseListFeatureInfo, 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
+}
+
+// UpdatePhraseList updates the phrases, the state and the name of the phraselist feature.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// phraselistID - the ID of the feature to be updated.
+// phraselistUpdateObject - the new values for: - Just a boolean called IsActive, in which case the status of
+// the feature will be changed. - Name, Pattern, Mode, and a boolean called IsActive to update the feature.
+func (client FeaturesClient) UpdatePhraseList(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32, phraselistUpdateObject *PhraselistUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdatePhraseListPreparer(ctx, appID, versionID, phraselistID, phraselistUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "UpdatePhraseList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdatePhraseListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "UpdatePhraseList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdatePhraseListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "UpdatePhraseList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePhraseListPreparer prepares the UpdatePhraseList request.
+func (client FeaturesClient) UpdatePhraseListPreparer(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32, phraselistUpdateObject *PhraselistUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "phraselistId": autorest.Encode("path", phraselistID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", pathParameters))
+ if phraselistUpdateObject != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(phraselistUpdateObject))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdatePhraseListSender sends the UpdatePhraseList request. The method will close the
+// http.Response Body if it receives an error.
+func (client FeaturesClient) UpdatePhraseListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdatePhraseListResponder handles the response to the UpdatePhraseList request. The method always
+// closes the http.Response Body.
+func (client FeaturesClient) UpdatePhraseListResponder(resp *http.Response) (result OperationStatus, 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/services/cognitiveservices/v2.0/luis/authoring/model.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/model.go
new file mode 100644
index 000000000..bb576f070
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/model.go
@@ -0,0 +1,7504 @@
+package authoring
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// ModelClient is the client for the Model methods of the Authoring service.
+type ModelClient struct {
+ BaseClient
+}
+
+// NewModelClient creates an instance of the ModelClient client.
+func NewModelClient(azureRegion AzureRegions) ModelClient {
+ return ModelClient{New(azureRegion)}
+}
+
+// AddClosedList adds a closed list model to the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// closedListModelCreateObject - a model containing the name and words for the new closed list entity
+// extractor.
+func (client ModelClient) AddClosedList(ctx context.Context, appID uuid.UUID, versionID string, closedListModelCreateObject ClosedListModelCreateObject) (result UUID, err error) {
+ req, err := client.AddClosedListPreparer(ctx, appID, versionID, closedListModelCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddClosedList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddClosedListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddClosedList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddClosedListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddClosedList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddClosedListPreparer prepares the AddClosedList request.
+func (client ModelClient) AddClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, closedListModelCreateObject ClosedListModelCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists", pathParameters),
+ autorest.WithJSON(closedListModelCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddClosedListSender sends the AddClosedList request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddClosedListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddClosedListResponder handles the response to the AddClosedList request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddClosedListResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddCompositeEntity adds a composite entity extractor to the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// compositeModelCreateObject - a model containing the name and children of the new entity extractor.
+func (client ModelClient) AddCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, compositeModelCreateObject CompositeEntityModel) (result UUID, err error) {
+ req, err := client.AddCompositeEntityPreparer(ctx, appID, versionID, compositeModelCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCompositeEntity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddCompositeEntitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCompositeEntity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddCompositeEntityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCompositeEntity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddCompositeEntityPreparer prepares the AddCompositeEntity request.
+func (client ModelClient) AddCompositeEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, compositeModelCreateObject CompositeEntityModel) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities", pathParameters),
+ autorest.WithJSON(compositeModelCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddCompositeEntitySender sends the AddCompositeEntity request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddCompositeEntitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddCompositeEntityResponder handles the response to the AddCompositeEntity request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddCompositeEntityResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddCompositeEntityChild creates a single child in an existing composite entity model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+// compositeChildModelCreateObject - a model object containing the name of the new composite child model.
+func (client ModelClient) AddCompositeEntityChild(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeChildModelCreateObject CompositeChildModelCreateObject) (result UUID, err error) {
+ req, err := client.AddCompositeEntityChildPreparer(ctx, appID, versionID, cEntityID, compositeChildModelCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCompositeEntityChild", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddCompositeEntityChildSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCompositeEntityChild", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddCompositeEntityChildResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCompositeEntityChild", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddCompositeEntityChildPreparer prepares the AddCompositeEntityChild request.
+func (client ModelClient) AddCompositeEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeChildModelCreateObject CompositeChildModelCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children", pathParameters),
+ autorest.WithJSON(compositeChildModelCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddCompositeEntityChildSender sends the AddCompositeEntityChild request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddCompositeEntityChildSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddCompositeEntityChildResponder handles the response to the AddCompositeEntityChild request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddCompositeEntityChildResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddCustomPrebuiltDomain adds a customizable prebuilt domain along with all of its models to this application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// prebuiltDomainObject - a prebuilt domain create object containing the name of the domain.
+func (client ModelClient) AddCustomPrebuiltDomain(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainObject PrebuiltDomainCreateBaseObject) (result ListUUID, err error) {
+ req, err := client.AddCustomPrebuiltDomainPreparer(ctx, appID, versionID, prebuiltDomainObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltDomain", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddCustomPrebuiltDomainSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltDomain", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddCustomPrebuiltDomainResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltDomain", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddCustomPrebuiltDomainPreparer prepares the AddCustomPrebuiltDomain request.
+func (client ModelClient) AddCustomPrebuiltDomainPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainObject PrebuiltDomainCreateBaseObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltdomains", pathParameters),
+ autorest.WithJSON(prebuiltDomainObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddCustomPrebuiltDomainSender sends the AddCustomPrebuiltDomain request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddCustomPrebuiltDomainSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddCustomPrebuiltDomainResponder handles the response to the AddCustomPrebuiltDomain request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddCustomPrebuiltDomainResponder(resp *http.Response) (result ListUUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddCustomPrebuiltEntity adds a custom prebuilt entity model to the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// prebuiltDomainModelCreateObject - a model object containing the name of the custom prebuilt entity and the
+// name of the domain to which this model belongs.
+func (client ModelClient) AddCustomPrebuiltEntity(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (result UUID, err error) {
+ req, err := client.AddCustomPrebuiltEntityPreparer(ctx, appID, versionID, prebuiltDomainModelCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltEntity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddCustomPrebuiltEntitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltEntity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddCustomPrebuiltEntityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltEntity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddCustomPrebuiltEntityPreparer prepares the AddCustomPrebuiltEntity request.
+func (client ModelClient) AddCustomPrebuiltEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities", pathParameters),
+ autorest.WithJSON(prebuiltDomainModelCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddCustomPrebuiltEntitySender sends the AddCustomPrebuiltEntity request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddCustomPrebuiltEntitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddCustomPrebuiltEntityResponder handles the response to the AddCustomPrebuiltEntity request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddCustomPrebuiltEntityResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddCustomPrebuiltIntent adds a custom prebuilt intent model to the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// prebuiltDomainModelCreateObject - a model object containing the name of the custom prebuilt intent and the
+// name of the domain to which this model belongs.
+func (client ModelClient) AddCustomPrebuiltIntent(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (result UUID, err error) {
+ req, err := client.AddCustomPrebuiltIntentPreparer(ctx, appID, versionID, prebuiltDomainModelCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltIntent", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddCustomPrebuiltIntentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltIntent", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddCustomPrebuiltIntentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltIntent", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddCustomPrebuiltIntentPreparer prepares the AddCustomPrebuiltIntent request.
+func (client ModelClient) AddCustomPrebuiltIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltintents", pathParameters),
+ autorest.WithJSON(prebuiltDomainModelCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddCustomPrebuiltIntentSender sends the AddCustomPrebuiltIntent request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddCustomPrebuiltIntentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddCustomPrebuiltIntentResponder handles the response to the AddCustomPrebuiltIntent request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddCustomPrebuiltIntentResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddEntity adds an entity extractor to the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// modelCreateObject - a model object containing the name for the new entity extractor.
+func (client ModelClient) AddEntity(ctx context.Context, appID uuid.UUID, versionID string, modelCreateObject ModelCreateObject) (result UUID, err error) {
+ req, err := client.AddEntityPreparer(ctx, appID, versionID, modelCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddEntity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddEntitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddEntity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddEntityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddEntity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddEntityPreparer prepares the AddEntity request.
+func (client ModelClient) AddEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, modelCreateObject ModelCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities", pathParameters),
+ autorest.WithJSON(modelCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddEntitySender sends the AddEntity request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddEntitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddEntityResponder handles the response to the AddEntity request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddEntityResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddExplicitListItem sends the add explicit list item request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the Pattern.Any entity extractor ID.
+// item - the new explicit list item.
+func (client ModelClient) AddExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, item ExplicitListItemCreateObject) (result Int32, err error) {
+ req, err := client.AddExplicitListItemPreparer(ctx, appID, versionID, entityID, item)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddExplicitListItem", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddExplicitListItemSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddExplicitListItem", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddExplicitListItemResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddExplicitListItem", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddExplicitListItemPreparer prepares the AddExplicitListItem request.
+func (client ModelClient) AddExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, item ExplicitListItemCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", pathParameters),
+ autorest.WithJSON(item))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddExplicitListItemSender sends the AddExplicitListItem request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddExplicitListItemSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddExplicitListItemResponder handles the response to the AddExplicitListItem request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddExplicitListItemResponder(resp *http.Response) (result Int32, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddHierarchicalEntity adds a hierarchical entity extractor to the application version.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hierarchicalModelCreateObject - a model containing the name and children of the new entity extractor.
+func (client ModelClient) AddHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hierarchicalModelCreateObject HierarchicalEntityModel) (result UUID, err error) {
+ req, err := client.AddHierarchicalEntityPreparer(ctx, appID, versionID, hierarchicalModelCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddHierarchicalEntity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddHierarchicalEntitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddHierarchicalEntity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddHierarchicalEntityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddHierarchicalEntity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddHierarchicalEntityPreparer prepares the AddHierarchicalEntity request.
+func (client ModelClient) AddHierarchicalEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, hierarchicalModelCreateObject HierarchicalEntityModel) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities", pathParameters),
+ autorest.WithJSON(hierarchicalModelCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddHierarchicalEntitySender sends the AddHierarchicalEntity request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddHierarchicalEntitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddHierarchicalEntityResponder handles the response to the AddHierarchicalEntity request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddHierarchicalEntityResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddHierarchicalEntityChild creates a single child in an existing hierarchical entity model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+// hierarchicalChildModelCreateObject - a model object containing the name of the new hierarchical child model.
+func (client ModelClient) AddHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalChildModelCreateObject HierarchicalChildModelCreateObject) (result UUID, err error) {
+ req, err := client.AddHierarchicalEntityChildPreparer(ctx, appID, versionID, hEntityID, hierarchicalChildModelCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddHierarchicalEntityChild", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddHierarchicalEntityChildSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddHierarchicalEntityChild", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddHierarchicalEntityChildResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddHierarchicalEntityChild", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddHierarchicalEntityChildPreparer prepares the AddHierarchicalEntityChild request.
+func (client ModelClient) AddHierarchicalEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalChildModelCreateObject HierarchicalChildModelCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children", pathParameters),
+ autorest.WithJSON(hierarchicalChildModelCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddHierarchicalEntityChildSender sends the AddHierarchicalEntityChild request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddHierarchicalEntityChildSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddHierarchicalEntityChildResponder handles the response to the AddHierarchicalEntityChild request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddHierarchicalEntityChildResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddIntent adds an intent classifier to the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// intentCreateObject - a model object containing the name of the new intent classifier.
+func (client ModelClient) AddIntent(ctx context.Context, appID uuid.UUID, versionID string, intentCreateObject ModelCreateObject) (result UUID, err error) {
+ req, err := client.AddIntentPreparer(ctx, appID, versionID, intentCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddIntent", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddIntentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddIntent", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddIntentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddIntent", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddIntentPreparer prepares the AddIntent request.
+func (client ModelClient) AddIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentCreateObject ModelCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents", pathParameters),
+ autorest.WithJSON(intentCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddIntentSender sends the AddIntent request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddIntentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddIntentResponder handles the response to the AddIntent request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddIntentResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddPrebuilt adds a list of prebuilt entity extractors to the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// prebuiltExtractorNames - an array of prebuilt entity extractor names.
+func (client ModelClient) AddPrebuilt(ctx context.Context, appID uuid.UUID, versionID string, prebuiltExtractorNames []string) (result ListPrebuiltEntityExtractor, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: prebuiltExtractorNames,
+ Constraints: []validation.Constraint{{Target: "prebuiltExtractorNames", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("authoring.ModelClient", "AddPrebuilt", err.Error())
+ }
+
+ req, err := client.AddPrebuiltPreparer(ctx, appID, versionID, prebuiltExtractorNames)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddPrebuilt", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddPrebuiltSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddPrebuilt", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddPrebuiltResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddPrebuilt", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddPrebuiltPreparer prepares the AddPrebuilt request.
+func (client ModelClient) AddPrebuiltPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltExtractorNames []string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts", pathParameters),
+ autorest.WithJSON(prebuiltExtractorNames))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddPrebuiltSender sends the AddPrebuilt request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddPrebuiltSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddPrebuiltResponder handles the response to the AddPrebuilt request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddPrebuiltResponder(resp *http.Response) (result ListPrebuiltEntityExtractor, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// AddSubList adds a list to an existing closed list.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// clEntityID - the closed list entity extractor ID.
+// wordListCreateObject - words list.
+func (client ModelClient) AddSubList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, wordListCreateObject WordListObject) (result Int32, err error) {
+ req, err := client.AddSubListPreparer(ctx, appID, versionID, clEntityID, wordListCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddSubList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddSubListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddSubList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddSubListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddSubList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddSubListPreparer prepares the AddSubList request.
+func (client ModelClient) AddSubListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, wordListCreateObject WordListObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "clEntityId": autorest.Encode("path", clEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists", pathParameters),
+ autorest.WithJSON(wordListCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddSubListSender sends the AddSubList request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddSubListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddSubListResponder handles the response to the AddSubList request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddSubListResponder(resp *http.Response) (result Int32, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateClosedListEntityRole sends the create closed list entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity model ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreateClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreateClosedListEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateClosedListEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateClosedListEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateClosedListEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateClosedListEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateClosedListEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateClosedListEntityRolePreparer prepares the CreateClosedListEntityRole request.
+func (client ModelClient) CreateClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateClosedListEntityRoleSender sends the CreateClosedListEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateClosedListEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateClosedListEntityRoleResponder handles the response to the CreateClosedListEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateClosedListEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateCompositeEntityRole sends the create composite entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreateCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreateCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCompositeEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateCompositeEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCompositeEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateCompositeEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCompositeEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateCompositeEntityRolePreparer prepares the CreateCompositeEntityRole request.
+func (client ModelClient) CreateCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateCompositeEntityRoleSender sends the CreateCompositeEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateCompositeEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateCompositeEntityRoleResponder handles the response to the CreateCompositeEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateCompositeEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateCustomPrebuiltEntityRole sends the create custom prebuilt entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity model ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreateCustomPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreateCustomPrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCustomPrebuiltEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateCustomPrebuiltEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCustomPrebuiltEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateCustomPrebuiltEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCustomPrebuiltEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateCustomPrebuiltEntityRolePreparer prepares the CreateCustomPrebuiltEntityRole request.
+func (client ModelClient) CreateCustomPrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateCustomPrebuiltEntityRoleSender sends the CreateCustomPrebuiltEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateCustomPrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateCustomPrebuiltEntityRoleResponder handles the response to the CreateCustomPrebuiltEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateCustomPrebuiltEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateEntityRole sends the create entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity model ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreateEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreateEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateEntityRolePreparer prepares the CreateEntityRole request.
+func (client ModelClient) CreateEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateEntityRoleSender sends the CreateEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateEntityRoleResponder handles the response to the CreateEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateHierarchicalEntityRole sends the create hierarchical entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreateHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreateHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateHierarchicalEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateHierarchicalEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateHierarchicalEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateHierarchicalEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateHierarchicalEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateHierarchicalEntityRolePreparer prepares the CreateHierarchicalEntityRole request.
+func (client ModelClient) CreateHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateHierarchicalEntityRoleSender sends the CreateHierarchicalEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateHierarchicalEntityRoleResponder handles the response to the CreateHierarchicalEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateHierarchicalEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreatePatternAnyEntityModel sends the create pattern any entity model request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// extractorCreateObject - a model object containing the name and explicit list for the new Pattern.Any entity
+// extractor.
+func (client ModelClient) CreatePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, extractorCreateObject PatternAnyModelCreateObject) (result UUID, err error) {
+ req, err := client.CreatePatternAnyEntityModelPreparer(ctx, appID, versionID, extractorCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityModel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreatePatternAnyEntityModelSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityModel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreatePatternAnyEntityModelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityModel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePatternAnyEntityModelPreparer prepares the CreatePatternAnyEntityModel request.
+func (client ModelClient) CreatePatternAnyEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, extractorCreateObject PatternAnyModelCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities", pathParameters),
+ autorest.WithJSON(extractorCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreatePatternAnyEntityModelSender sends the CreatePatternAnyEntityModel request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreatePatternAnyEntityModelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreatePatternAnyEntityModelResponder handles the response to the CreatePatternAnyEntityModel request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreatePatternAnyEntityModelResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreatePatternAnyEntityRole sends the create pattern any entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity model ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreatePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreatePatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreatePatternAnyEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreatePatternAnyEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePatternAnyEntityRolePreparer prepares the CreatePatternAnyEntityRole request.
+func (client ModelClient) CreatePatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreatePatternAnyEntityRoleSender sends the CreatePatternAnyEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreatePatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreatePatternAnyEntityRoleResponder handles the response to the CreatePatternAnyEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreatePatternAnyEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreatePrebuiltEntityRole sends the create prebuilt entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity model ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreatePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreatePrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePrebuiltEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreatePrebuiltEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePrebuiltEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreatePrebuiltEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePrebuiltEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePrebuiltEntityRolePreparer prepares the CreatePrebuiltEntityRole request.
+func (client ModelClient) CreatePrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreatePrebuiltEntityRoleSender sends the CreatePrebuiltEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreatePrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreatePrebuiltEntityRoleResponder handles the response to the CreatePrebuiltEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreatePrebuiltEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateRegexEntityModel sends the create regex entity model request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// regexEntityExtractorCreateObj - a model object containing the name and regex pattern for the new regex
+// entity extractor.
+func (client ModelClient) CreateRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityExtractorCreateObj RegexModelCreateObject) (result UUID, err error) {
+ req, err := client.CreateRegexEntityModelPreparer(ctx, appID, versionID, regexEntityExtractorCreateObj)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityModel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateRegexEntityModelSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityModel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateRegexEntityModelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityModel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateRegexEntityModelPreparer prepares the CreateRegexEntityModel request.
+func (client ModelClient) CreateRegexEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityExtractorCreateObj RegexModelCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities", pathParameters),
+ autorest.WithJSON(regexEntityExtractorCreateObj))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateRegexEntityModelSender sends the CreateRegexEntityModel request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateRegexEntityModelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateRegexEntityModelResponder handles the response to the CreateRegexEntityModel request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateRegexEntityModelResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateRegexEntityRole sends the create regex entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity model ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreateRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreateRegexEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateRegexEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateRegexEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateRegexEntityRolePreparer prepares the CreateRegexEntityRole request.
+func (client ModelClient) CreateRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateRegexEntityRoleSender sends the CreateRegexEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateRegexEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateRegexEntityRoleResponder handles the response to the CreateRegexEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateRegexEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteClosedList deletes a closed list model from the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// clEntityID - the closed list model ID.
+func (client ModelClient) DeleteClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteClosedListPreparer(ctx, appID, versionID, clEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteClosedListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteClosedListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteClosedListPreparer prepares the DeleteClosedList request.
+func (client ModelClient) DeleteClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "clEntityId": autorest.Encode("path", clEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteClosedListSender sends the DeleteClosedList request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteClosedListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteClosedListResponder handles the response to the DeleteClosedList request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteClosedListResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteClosedListEntityRole sends the delete closed list entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeleteClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteClosedListEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedListEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteClosedListEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedListEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteClosedListEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedListEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteClosedListEntityRolePreparer prepares the DeleteClosedListEntityRole request.
+func (client ModelClient) DeleteClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteClosedListEntityRoleSender sends the DeleteClosedListEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteClosedListEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteClosedListEntityRoleResponder handles the response to the DeleteClosedListEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteClosedListEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteCompositeEntity deletes a composite entity extractor from the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+func (client ModelClient) DeleteCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteCompositeEntityPreparer(ctx, appID, versionID, cEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteCompositeEntitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteCompositeEntityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteCompositeEntityPreparer prepares the DeleteCompositeEntity request.
+func (client ModelClient) DeleteCompositeEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteCompositeEntitySender sends the DeleteCompositeEntity request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteCompositeEntitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteCompositeEntityResponder handles the response to the DeleteCompositeEntity request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteCompositeEntityResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteCompositeEntityChild deletes a composite entity extractor child from the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+// cChildID - the hierarchical entity extractor child ID.
+func (client ModelClient) DeleteCompositeEntityChild(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, cChildID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteCompositeEntityChildPreparer(ctx, appID, versionID, cEntityID, cChildID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityChild", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteCompositeEntityChildSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityChild", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteCompositeEntityChildResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityChild", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteCompositeEntityChildPreparer prepares the DeleteCompositeEntityChild request.
+func (client ModelClient) DeleteCompositeEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, cChildID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cChildId": autorest.Encode("path", cChildID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children/{cChildId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteCompositeEntityChildSender sends the DeleteCompositeEntityChild request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteCompositeEntityChildSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteCompositeEntityChildResponder handles the response to the DeleteCompositeEntityChild request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteCompositeEntityChildResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteCompositeEntityRole sends the delete composite entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeleteCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteCompositeEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteCompositeEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteCompositeEntityRolePreparer prepares the DeleteCompositeEntityRole request.
+func (client ModelClient) DeleteCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteCompositeEntityRoleSender sends the DeleteCompositeEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteCompositeEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteCompositeEntityRoleResponder handles the response to the DeleteCompositeEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteCompositeEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteCustomEntityRole sends the delete custom entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeleteCustomEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteCustomEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteCustomEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteCustomEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteCustomEntityRolePreparer prepares the DeleteCustomEntityRole request.
+func (client ModelClient) DeleteCustomEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteCustomEntityRoleSender sends the DeleteCustomEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteCustomEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteCustomEntityRoleResponder handles the response to the DeleteCustomEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteCustomEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteCustomPrebuiltDomain deletes a prebuilt domain's models from the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// domainName - domain name.
+func (client ModelClient) DeleteCustomPrebuiltDomain(ctx context.Context, appID uuid.UUID, versionID string, domainName string) (result OperationStatus, err error) {
+ req, err := client.DeleteCustomPrebuiltDomainPreparer(ctx, appID, versionID, domainName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomPrebuiltDomain", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteCustomPrebuiltDomainSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomPrebuiltDomain", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteCustomPrebuiltDomainResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomPrebuiltDomain", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteCustomPrebuiltDomainPreparer prepares the DeleteCustomPrebuiltDomain request.
+func (client ModelClient) DeleteCustomPrebuiltDomainPreparer(ctx context.Context, appID uuid.UUID, versionID string, domainName string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "domainName": autorest.Encode("path", domainName),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltdomains/{domainName}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteCustomPrebuiltDomainSender sends the DeleteCustomPrebuiltDomain request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteCustomPrebuiltDomainSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteCustomPrebuiltDomainResponder handles the response to the DeleteCustomPrebuiltDomain request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteCustomPrebuiltDomainResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteEntity deletes an entity extractor from the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity extractor ID.
+func (client ModelClient) DeleteEntity(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteEntityPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteEntitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteEntityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteEntityPreparer prepares the DeleteEntity request.
+func (client ModelClient) DeleteEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteEntitySender sends the DeleteEntity request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteEntitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteEntityResponder handles the response to the DeleteEntity request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteEntityResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteEntityRole sends the delete entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeleteEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteEntityRolePreparer prepares the DeleteEntityRole request.
+func (client ModelClient) DeleteEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteEntityRoleSender sends the DeleteEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteEntityRoleResponder handles the response to the DeleteEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteExplicitListItem sends the delete explicit list item request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the pattern.any entity id.
+// itemID - the explicit list item which will be deleted.
+func (client ModelClient) DeleteExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result OperationStatus, err error) {
+ req, err := client.DeleteExplicitListItemPreparer(ctx, appID, versionID, entityID, itemID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteExplicitListItem", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteExplicitListItemSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteExplicitListItem", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteExplicitListItemResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteExplicitListItem", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteExplicitListItemPreparer prepares the DeleteExplicitListItem request.
+func (client ModelClient) DeleteExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "itemId": autorest.Encode("path", itemID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteExplicitListItemSender sends the DeleteExplicitListItem request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteExplicitListItemSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteExplicitListItemResponder handles the response to the DeleteExplicitListItem request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteExplicitListItemResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteHierarchicalEntity deletes a hierarchical entity extractor from the application version.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+func (client ModelClient) DeleteHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteHierarchicalEntityPreparer(ctx, appID, versionID, hEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteHierarchicalEntitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteHierarchicalEntityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteHierarchicalEntityPreparer prepares the DeleteHierarchicalEntity request.
+func (client ModelClient) DeleteHierarchicalEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteHierarchicalEntitySender sends the DeleteHierarchicalEntity request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteHierarchicalEntitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteHierarchicalEntityResponder handles the response to the DeleteHierarchicalEntity request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteHierarchicalEntityResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteHierarchicalEntityChild deletes a hierarchical entity extractor child from the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+// hChildID - the hierarchical entity extractor child ID.
+func (client ModelClient) DeleteHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteHierarchicalEntityChildPreparer(ctx, appID, versionID, hEntityID, hChildID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityChild", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteHierarchicalEntityChildSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityChild", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteHierarchicalEntityChildResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityChild", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteHierarchicalEntityChildPreparer prepares the DeleteHierarchicalEntityChild request.
+func (client ModelClient) DeleteHierarchicalEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hChildId": autorest.Encode("path", hChildID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteHierarchicalEntityChildSender sends the DeleteHierarchicalEntityChild request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteHierarchicalEntityChildSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteHierarchicalEntityChildResponder handles the response to the DeleteHierarchicalEntityChild request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteHierarchicalEntityChildResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteHierarchicalEntityRole sends the delete hierarchical entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeleteHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteHierarchicalEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteHierarchicalEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteHierarchicalEntityRolePreparer prepares the DeleteHierarchicalEntityRole request.
+func (client ModelClient) DeleteHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteHierarchicalEntityRoleSender sends the DeleteHierarchicalEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteHierarchicalEntityRoleResponder handles the response to the DeleteHierarchicalEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteHierarchicalEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteIntent deletes an intent classifier from the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// intentID - the intent classifier ID.
+// deleteUtterances - also delete the intent's utterances (true). Or move the utterances to the None intent
+// (false - the default value).
+func (client ModelClient) DeleteIntent(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, deleteUtterances *bool) (result OperationStatus, err error) {
+ req, err := client.DeleteIntentPreparer(ctx, appID, versionID, intentID, deleteUtterances)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteIntent", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteIntentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteIntent", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteIntentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteIntent", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteIntentPreparer prepares the DeleteIntent request.
+func (client ModelClient) DeleteIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, deleteUtterances *bool) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "intentId": autorest.Encode("path", intentID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if deleteUtterances != nil {
+ queryParameters["deleteUtterances"] = autorest.Encode("query", *deleteUtterances)
+ } else {
+ queryParameters["deleteUtterances"] = autorest.Encode("query", false)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteIntentSender sends the DeleteIntent request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteIntentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteIntentResponder handles the response to the DeleteIntent request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteIntentResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeletePatternAnyEntityModel sends the delete pattern any entity model request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the Pattern.Any entity extractor ID.
+func (client ModelClient) DeletePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeletePatternAnyEntityModelPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityModel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeletePatternAnyEntityModelSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityModel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeletePatternAnyEntityModelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityModel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePatternAnyEntityModelPreparer prepares the DeletePatternAnyEntityModel request.
+func (client ModelClient) DeletePatternAnyEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeletePatternAnyEntityModelSender sends the DeletePatternAnyEntityModel request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeletePatternAnyEntityModelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeletePatternAnyEntityModelResponder handles the response to the DeletePatternAnyEntityModel request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeletePatternAnyEntityModelResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeletePatternAnyEntityRole sends the delete pattern any entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeletePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeletePatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeletePatternAnyEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeletePatternAnyEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePatternAnyEntityRolePreparer prepares the DeletePatternAnyEntityRole request.
+func (client ModelClient) DeletePatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeletePatternAnyEntityRoleSender sends the DeletePatternAnyEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeletePatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeletePatternAnyEntityRoleResponder handles the response to the DeletePatternAnyEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeletePatternAnyEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeletePrebuilt deletes a prebuilt entity extractor from the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// prebuiltID - the prebuilt entity extractor ID.
+func (client ModelClient) DeletePrebuilt(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeletePrebuiltPreparer(ctx, appID, versionID, prebuiltID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuilt", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeletePrebuiltSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuilt", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeletePrebuiltResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuilt", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePrebuiltPreparer prepares the DeletePrebuilt request.
+func (client ModelClient) DeletePrebuiltPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "prebuiltId": autorest.Encode("path", prebuiltID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeletePrebuiltSender sends the DeletePrebuilt request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeletePrebuiltSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeletePrebuiltResponder handles the response to the DeletePrebuilt request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeletePrebuiltResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeletePrebuiltEntityRole sends the delete prebuilt entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeletePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeletePrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuiltEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeletePrebuiltEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuiltEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeletePrebuiltEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuiltEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePrebuiltEntityRolePreparer prepares the DeletePrebuiltEntityRole request.
+func (client ModelClient) DeletePrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeletePrebuiltEntityRoleSender sends the DeletePrebuiltEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeletePrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeletePrebuiltEntityRoleResponder handles the response to the DeletePrebuiltEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeletePrebuiltEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteRegexEntityModel sends the delete regex entity model request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// regexEntityID - the regex entity extractor ID.
+func (client ModelClient) DeleteRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteRegexEntityModelPreparer(ctx, appID, versionID, regexEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityModel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteRegexEntityModelSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityModel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteRegexEntityModelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityModel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteRegexEntityModelPreparer prepares the DeleteRegexEntityModel request.
+func (client ModelClient) DeleteRegexEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "regexEntityId": autorest.Encode("path", regexEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteRegexEntityModelSender sends the DeleteRegexEntityModel request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteRegexEntityModelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteRegexEntityModelResponder handles the response to the DeleteRegexEntityModel request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteRegexEntityModelResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteRegexEntityRole sends the delete regex entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeleteRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteRegexEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteRegexEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteRegexEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteRegexEntityRolePreparer prepares the DeleteRegexEntityRole request.
+func (client ModelClient) DeleteRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteRegexEntityRoleSender sends the DeleteRegexEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteRegexEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteRegexEntityRoleResponder handles the response to the DeleteRegexEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteRegexEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteSubList deletes a sublist of a specific closed list model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// clEntityID - the closed list entity extractor ID.
+// subListID - the sublist ID.
+func (client ModelClient) DeleteSubList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int32) (result OperationStatus, err error) {
+ req, err := client.DeleteSubListPreparer(ctx, appID, versionID, clEntityID, subListID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteSubList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSubListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteSubList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteSubListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteSubList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteSubListPreparer prepares the DeleteSubList request.
+func (client ModelClient) DeleteSubListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "clEntityId": autorest.Encode("path", clEntityID),
+ "subListId": autorest.Encode("path", subListID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSubListSender sends the DeleteSubList request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteSubListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteSubListResponder handles the response to the DeleteSubList request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteSubListResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ExamplesMethod gets the utterances for the given model in the given app version.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// modelID - the ID (GUID) of the model.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) ExamplesMethod(ctx context.Context, appID uuid.UUID, versionID string, modelID string, skip *int32, take *int32) (result ListLabelTextObject, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.ModelClient", "ExamplesMethod", err.Error())
+ }
+
+ req, err := client.ExamplesMethodPreparer(ctx, appID, versionID, modelID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ExamplesMethod", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ExamplesMethodSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ExamplesMethod", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ExamplesMethodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ExamplesMethod", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ExamplesMethodPreparer prepares the ExamplesMethod request.
+func (client ModelClient) ExamplesMethodPreparer(ctx context.Context, appID uuid.UUID, versionID string, modelID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "modelId": autorest.Encode("path", modelID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/models/{modelId}/examples", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ExamplesMethodSender sends the ExamplesMethod request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) ExamplesMethodSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ExamplesMethodResponder handles the response to the ExamplesMethod request. The method always
+// closes the http.Response Body.
+func (client ModelClient) ExamplesMethodResponder(resp *http.Response) (result ListLabelTextObject, 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
+}
+
+// GetClosedList gets information of a closed list model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// clEntityID - the closed list model ID.
+func (client ModelClient) GetClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (result ClosedListEntityExtractor, err error) {
+ req, err := client.GetClosedListPreparer(ctx, appID, versionID, clEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetClosedListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetClosedListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetClosedListPreparer prepares the GetClosedList request.
+func (client ModelClient) GetClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "clEntityId": autorest.Encode("path", clEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetClosedListSender sends the GetClosedList request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetClosedListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetClosedListResponder handles the response to the GetClosedList request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetClosedListResponder(resp *http.Response) (result ClosedListEntityExtractor, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetClosedListEntityRole sends the get closed list entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity ID.
+// roleID - entity role ID.
+func (client ModelClient) GetClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetClosedListEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedListEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetClosedListEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedListEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetClosedListEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedListEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetClosedListEntityRolePreparer prepares the GetClosedListEntityRole request.
+func (client ModelClient) GetClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetClosedListEntityRoleSender sends the GetClosedListEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetClosedListEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetClosedListEntityRoleResponder handles the response to the GetClosedListEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetClosedListEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetClosedListEntityRoles sends the get closed list entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity Id
+func (client ModelClient) GetClosedListEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetClosedListEntityRolesPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedListEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetClosedListEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedListEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetClosedListEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedListEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetClosedListEntityRolesPreparer prepares the GetClosedListEntityRoles request.
+func (client ModelClient) GetClosedListEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetClosedListEntityRolesSender sends the GetClosedListEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetClosedListEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetClosedListEntityRolesResponder handles the response to the GetClosedListEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetClosedListEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
+// GetCompositeEntity gets information about the composite entity model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+func (client ModelClient) GetCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result CompositeEntityExtractor, err error) {
+ req, err := client.GetCompositeEntityPreparer(ctx, appID, versionID, cEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetCompositeEntitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetCompositeEntityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetCompositeEntityPreparer prepares the GetCompositeEntity request.
+func (client ModelClient) GetCompositeEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetCompositeEntitySender sends the GetCompositeEntity request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetCompositeEntitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetCompositeEntityResponder handles the response to the GetCompositeEntity request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetCompositeEntityResponder(resp *http.Response) (result CompositeEntityExtractor, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetCompositeEntityRole sends the get composite entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+// roleID - entity role ID.
+func (client ModelClient) GetCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetCompositeEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetCompositeEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetCompositeEntityRolePreparer prepares the GetCompositeEntityRole request.
+func (client ModelClient) GetCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetCompositeEntityRoleSender sends the GetCompositeEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetCompositeEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetCompositeEntityRoleResponder handles the response to the GetCompositeEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetCompositeEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetCompositeEntityRoles sends the get composite entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+func (client ModelClient) GetCompositeEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetCompositeEntityRolesPreparer(ctx, appID, versionID, cEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetCompositeEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetCompositeEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetCompositeEntityRolesPreparer prepares the GetCompositeEntityRoles request.
+func (client ModelClient) GetCompositeEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetCompositeEntityRolesSender sends the GetCompositeEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetCompositeEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetCompositeEntityRolesResponder handles the response to the GetCompositeEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetCompositeEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
+// GetCustomEntityRole sends the get custom entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity ID.
+// roleID - entity role ID.
+func (client ModelClient) GetCustomEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetCustomEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetCustomEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetCustomEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetCustomEntityRolePreparer prepares the GetCustomEntityRole request.
+func (client ModelClient) GetCustomEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetCustomEntityRoleSender sends the GetCustomEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetCustomEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetCustomEntityRoleResponder handles the response to the GetCustomEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetCustomEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetCustomPrebuiltEntityRoles sends the get custom prebuilt entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity Id
+func (client ModelClient) GetCustomPrebuiltEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetCustomPrebuiltEntityRolesPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomPrebuiltEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetCustomPrebuiltEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomPrebuiltEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetCustomPrebuiltEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomPrebuiltEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetCustomPrebuiltEntityRolesPreparer prepares the GetCustomPrebuiltEntityRoles request.
+func (client ModelClient) GetCustomPrebuiltEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetCustomPrebuiltEntityRolesSender sends the GetCustomPrebuiltEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetCustomPrebuiltEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetCustomPrebuiltEntityRolesResponder handles the response to the GetCustomPrebuiltEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetCustomPrebuiltEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
+// GetEntity gets information about the entity model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity extractor ID.
+func (client ModelClient) GetEntity(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result EntityExtractor, err error) {
+ req, err := client.GetEntityPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetEntitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetEntityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetEntityPreparer prepares the GetEntity request.
+func (client ModelClient) GetEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetEntitySender sends the GetEntity request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetEntitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetEntityResponder handles the response to the GetEntity request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetEntityResponder(resp *http.Response) (result EntityExtractor, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetEntityRole sends the get entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity ID.
+// roleID - entity role ID.
+func (client ModelClient) GetEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetEntityRolePreparer prepares the GetEntityRole request.
+func (client ModelClient) GetEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetEntityRoleSender sends the GetEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetEntityRoleResponder handles the response to the GetEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetEntityRoles sends the get entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity Id
+func (client ModelClient) GetEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetEntityRolesPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetEntityRolesPreparer prepares the GetEntityRoles request.
+func (client ModelClient) GetEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetEntityRolesSender sends the GetEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetEntityRolesResponder handles the response to the GetEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
+// GetEntitySuggestions get suggestion examples that would improve the accuracy of the entity model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the target entity extractor model to enhance.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) GetEntitySuggestions(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, take *int32) (result ListEntitiesSuggestionExample, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.ModelClient", "GetEntitySuggestions", err.Error())
+ }
+
+ req, err := client.GetEntitySuggestionsPreparer(ctx, appID, versionID, entityID, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntitySuggestions", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetEntitySuggestionsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntitySuggestions", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetEntitySuggestionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntitySuggestions", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetEntitySuggestionsPreparer prepares the GetEntitySuggestions request.
+func (client ModelClient) GetEntitySuggestionsPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/suggest", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetEntitySuggestionsSender sends the GetEntitySuggestions request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetEntitySuggestionsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetEntitySuggestionsResponder handles the response to the GetEntitySuggestions request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetEntitySuggestionsResponder(resp *http.Response) (result ListEntitiesSuggestionExample, 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
+}
+
+// GetExplicitList sends the get explicit list request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the Pattern.Any entity id.
+func (client ModelClient) GetExplicitList(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListExplicitListItem, err error) {
+ req, err := client.GetExplicitListPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetExplicitListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetExplicitListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetExplicitListPreparer prepares the GetExplicitList request.
+func (client ModelClient) GetExplicitListPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetExplicitListSender sends the GetExplicitList request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetExplicitListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetExplicitListResponder handles the response to the GetExplicitList request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetExplicitListResponder(resp *http.Response) (result ListExplicitListItem, 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
+}
+
+// GetExplicitListItem sends the get explicit list item request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the Pattern.Any entity Id.
+// itemID - the explicit list item Id.
+func (client ModelClient) GetExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result ExplicitListItem, err error) {
+ req, err := client.GetExplicitListItemPreparer(ctx, appID, versionID, entityID, itemID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitListItem", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetExplicitListItemSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitListItem", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetExplicitListItemResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitListItem", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetExplicitListItemPreparer prepares the GetExplicitListItem request.
+func (client ModelClient) GetExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "itemId": autorest.Encode("path", itemID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetExplicitListItemSender sends the GetExplicitListItem request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetExplicitListItemSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetExplicitListItemResponder handles the response to the GetExplicitListItem request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetExplicitListItemResponder(resp *http.Response) (result ExplicitListItem, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetHierarchicalEntity gets information about the hierarchical entity model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+func (client ModelClient) GetHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result HierarchicalEntityExtractor, err error) {
+ req, err := client.GetHierarchicalEntityPreparer(ctx, appID, versionID, hEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetHierarchicalEntitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetHierarchicalEntityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetHierarchicalEntityPreparer prepares the GetHierarchicalEntity request.
+func (client ModelClient) GetHierarchicalEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetHierarchicalEntitySender sends the GetHierarchicalEntity request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetHierarchicalEntitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetHierarchicalEntityResponder handles the response to the GetHierarchicalEntity request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetHierarchicalEntityResponder(resp *http.Response) (result HierarchicalEntityExtractor, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetHierarchicalEntityChild gets information about the hierarchical entity child model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+// hChildID - the hierarchical entity extractor child ID.
+func (client ModelClient) GetHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (result HierarchicalChildEntity, err error) {
+ req, err := client.GetHierarchicalEntityChildPreparer(ctx, appID, versionID, hEntityID, hChildID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityChild", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetHierarchicalEntityChildSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityChild", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetHierarchicalEntityChildResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityChild", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetHierarchicalEntityChildPreparer prepares the GetHierarchicalEntityChild request.
+func (client ModelClient) GetHierarchicalEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hChildId": autorest.Encode("path", hChildID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetHierarchicalEntityChildSender sends the GetHierarchicalEntityChild request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetHierarchicalEntityChildSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetHierarchicalEntityChildResponder handles the response to the GetHierarchicalEntityChild request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetHierarchicalEntityChildResponder(resp *http.Response) (result HierarchicalChildEntity, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetHierarchicalEntityRole sends the get hierarchical entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+// roleID - entity role ID.
+func (client ModelClient) GetHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetHierarchicalEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetHierarchicalEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetHierarchicalEntityRolePreparer prepares the GetHierarchicalEntityRole request.
+func (client ModelClient) GetHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetHierarchicalEntityRoleSender sends the GetHierarchicalEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetHierarchicalEntityRoleResponder handles the response to the GetHierarchicalEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetHierarchicalEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetHierarchicalEntityRoles sends the get hierarchical entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+func (client ModelClient) GetHierarchicalEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetHierarchicalEntityRolesPreparer(ctx, appID, versionID, hEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetHierarchicalEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetHierarchicalEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetHierarchicalEntityRolesPreparer prepares the GetHierarchicalEntityRoles request.
+func (client ModelClient) GetHierarchicalEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetHierarchicalEntityRolesSender sends the GetHierarchicalEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetHierarchicalEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetHierarchicalEntityRolesResponder handles the response to the GetHierarchicalEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetHierarchicalEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
+// GetIntent gets information about the intent model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// intentID - the intent classifier ID.
+func (client ModelClient) GetIntent(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID) (result IntentClassifier, err error) {
+ req, err := client.GetIntentPreparer(ctx, appID, versionID, intentID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntent", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetIntentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntent", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetIntentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntent", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetIntentPreparer prepares the GetIntent request.
+func (client ModelClient) GetIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "intentId": autorest.Encode("path", intentID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetIntentSender sends the GetIntent request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetIntentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetIntentResponder handles the response to the GetIntent request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetIntentResponder(resp *http.Response) (result IntentClassifier, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetIntentSuggestions suggests examples that would improve the accuracy of the intent model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// intentID - the intent classifier ID.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) GetIntentSuggestions(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, take *int32) (result ListIntentsSuggestionExample, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.ModelClient", "GetIntentSuggestions", err.Error())
+ }
+
+ req, err := client.GetIntentSuggestionsPreparer(ctx, appID, versionID, intentID, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntentSuggestions", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetIntentSuggestionsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntentSuggestions", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetIntentSuggestionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntentSuggestions", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetIntentSuggestionsPreparer prepares the GetIntentSuggestions request.
+func (client ModelClient) GetIntentSuggestionsPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "intentId": autorest.Encode("path", intentID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/suggest", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetIntentSuggestionsSender sends the GetIntentSuggestions request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetIntentSuggestionsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetIntentSuggestionsResponder handles the response to the GetIntentSuggestions request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetIntentSuggestionsResponder(resp *http.Response) (result ListIntentsSuggestionExample, 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
+}
+
+// GetPatternAnyEntityInfo sends the get pattern any entity info request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity extractor ID.
+func (client ModelClient) GetPatternAnyEntityInfo(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result PatternAnyEntityExtractor, err error) {
+ req, err := client.GetPatternAnyEntityInfoPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfo", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPatternAnyEntityInfoSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfo", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPatternAnyEntityInfoResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfo", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPatternAnyEntityInfoPreparer prepares the GetPatternAnyEntityInfo request.
+func (client ModelClient) GetPatternAnyEntityInfoPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPatternAnyEntityInfoSender sends the GetPatternAnyEntityInfo request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetPatternAnyEntityInfoSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPatternAnyEntityInfoResponder handles the response to the GetPatternAnyEntityInfo request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetPatternAnyEntityInfoResponder(resp *http.Response) (result PatternAnyEntityExtractor, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetPatternAnyEntityInfos sends the get pattern any entity infos request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) GetPatternAnyEntityInfos(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPatternAnyEntityExtractor, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.ModelClient", "GetPatternAnyEntityInfos", err.Error())
+ }
+
+ req, err := client.GetPatternAnyEntityInfosPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfos", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPatternAnyEntityInfosSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfos", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPatternAnyEntityInfosResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfos", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPatternAnyEntityInfosPreparer prepares the GetPatternAnyEntityInfos request.
+func (client ModelClient) GetPatternAnyEntityInfosPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPatternAnyEntityInfosSender sends the GetPatternAnyEntityInfos request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetPatternAnyEntityInfosSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPatternAnyEntityInfosResponder handles the response to the GetPatternAnyEntityInfos request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetPatternAnyEntityInfosResponder(resp *http.Response) (result ListPatternAnyEntityExtractor, 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
+}
+
+// GetPatternAnyEntityRole sends the get pattern any entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity ID.
+// roleID - entity role ID.
+func (client ModelClient) GetPatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetPatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPatternAnyEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPatternAnyEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPatternAnyEntityRolePreparer prepares the GetPatternAnyEntityRole request.
+func (client ModelClient) GetPatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPatternAnyEntityRoleSender sends the GetPatternAnyEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetPatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPatternAnyEntityRoleResponder handles the response to the GetPatternAnyEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetPatternAnyEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetPatternAnyEntityRoles sends the get pattern any entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity Id
+func (client ModelClient) GetPatternAnyEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetPatternAnyEntityRolesPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPatternAnyEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPatternAnyEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPatternAnyEntityRolesPreparer prepares the GetPatternAnyEntityRoles request.
+func (client ModelClient) GetPatternAnyEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPatternAnyEntityRolesSender sends the GetPatternAnyEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetPatternAnyEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPatternAnyEntityRolesResponder handles the response to the GetPatternAnyEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetPatternAnyEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
+// GetPrebuilt gets information about the prebuilt entity model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// prebuiltID - the prebuilt entity extractor ID.
+func (client ModelClient) GetPrebuilt(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (result PrebuiltEntityExtractor, err error) {
+ req, err := client.GetPrebuiltPreparer(ctx, appID, versionID, prebuiltID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuilt", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPrebuiltSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuilt", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPrebuiltResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuilt", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPrebuiltPreparer prepares the GetPrebuilt request.
+func (client ModelClient) GetPrebuiltPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "prebuiltId": autorest.Encode("path", prebuiltID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPrebuiltSender sends the GetPrebuilt request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetPrebuiltSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPrebuiltResponder handles the response to the GetPrebuilt request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetPrebuiltResponder(resp *http.Response) (result PrebuiltEntityExtractor, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetPrebuiltEntityRole sends the get prebuilt entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity ID.
+// roleID - entity role ID.
+func (client ModelClient) GetPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetPrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPrebuiltEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPrebuiltEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPrebuiltEntityRolePreparer prepares the GetPrebuiltEntityRole request.
+func (client ModelClient) GetPrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPrebuiltEntityRoleSender sends the GetPrebuiltEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetPrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPrebuiltEntityRoleResponder handles the response to the GetPrebuiltEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetPrebuiltEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetPrebuiltEntityRoles sends the get prebuilt entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity Id
+func (client ModelClient) GetPrebuiltEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetPrebuiltEntityRolesPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPrebuiltEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPrebuiltEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPrebuiltEntityRolesPreparer prepares the GetPrebuiltEntityRoles request.
+func (client ModelClient) GetPrebuiltEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPrebuiltEntityRolesSender sends the GetPrebuiltEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetPrebuiltEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPrebuiltEntityRolesResponder handles the response to the GetPrebuiltEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetPrebuiltEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
+// GetRegexEntityEntityInfo sends the get regex entity entity info request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// regexEntityID - the regex entity model ID.
+func (client ModelClient) GetRegexEntityEntityInfo(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result RegexEntityExtractor, err error) {
+ req, err := client.GetRegexEntityEntityInfoPreparer(ctx, appID, versionID, regexEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityEntityInfo", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetRegexEntityEntityInfoSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityEntityInfo", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetRegexEntityEntityInfoResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityEntityInfo", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetRegexEntityEntityInfoPreparer prepares the GetRegexEntityEntityInfo request.
+func (client ModelClient) GetRegexEntityEntityInfoPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "regexEntityId": autorest.Encode("path", regexEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetRegexEntityEntityInfoSender sends the GetRegexEntityEntityInfo request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetRegexEntityEntityInfoSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetRegexEntityEntityInfoResponder handles the response to the GetRegexEntityEntityInfo request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetRegexEntityEntityInfoResponder(resp *http.Response) (result RegexEntityExtractor, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetRegexEntityInfos sends the get regex entity infos request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) GetRegexEntityInfos(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListRegexEntityExtractor, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.ModelClient", "GetRegexEntityInfos", err.Error())
+ }
+
+ req, err := client.GetRegexEntityInfosPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityInfos", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetRegexEntityInfosSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityInfos", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetRegexEntityInfosResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityInfos", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetRegexEntityInfosPreparer prepares the GetRegexEntityInfos request.
+func (client ModelClient) GetRegexEntityInfosPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetRegexEntityInfosSender sends the GetRegexEntityInfos request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetRegexEntityInfosSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetRegexEntityInfosResponder handles the response to the GetRegexEntityInfos request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetRegexEntityInfosResponder(resp *http.Response) (result ListRegexEntityExtractor, 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
+}
+
+// GetRegexEntityRole sends the get regex entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity ID.
+// roleID - entity role ID.
+func (client ModelClient) GetRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetRegexEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetRegexEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetRegexEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetRegexEntityRolePreparer prepares the GetRegexEntityRole request.
+func (client ModelClient) GetRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetRegexEntityRoleSender sends the GetRegexEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetRegexEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetRegexEntityRoleResponder handles the response to the GetRegexEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetRegexEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetRegexEntityRoles sends the get regex entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity Id
+func (client ModelClient) GetRegexEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetRegexEntityRolesPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetRegexEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetRegexEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetRegexEntityRolesPreparer prepares the GetRegexEntityRoles request.
+func (client ModelClient) GetRegexEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetRegexEntityRolesSender sends the GetRegexEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetRegexEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetRegexEntityRolesResponder handles the response to the GetRegexEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetRegexEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
+// ListClosedLists gets information about the closedlist models.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) ListClosedLists(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListClosedListEntityExtractor, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.ModelClient", "ListClosedLists", err.Error())
+ }
+
+ req, err := client.ListClosedListsPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedLists", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListClosedListsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedLists", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListClosedListsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedLists", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListClosedListsPreparer prepares the ListClosedLists request.
+func (client ModelClient) ListClosedListsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListClosedListsSender sends the ListClosedLists request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) ListClosedListsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListClosedListsResponder handles the response to the ListClosedLists request. The method always
+// closes the http.Response Body.
+func (client ModelClient) ListClosedListsResponder(resp *http.Response) (result ListClosedListEntityExtractor, 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
+}
+
+// ListCompositeEntities gets information about the composite entity models.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) ListCompositeEntities(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListCompositeEntityExtractor, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.ModelClient", "ListCompositeEntities", err.Error())
+ }
+
+ req, err := client.ListCompositeEntitiesPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntities", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListCompositeEntitiesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntities", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListCompositeEntitiesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntities", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListCompositeEntitiesPreparer prepares the ListCompositeEntities request.
+func (client ModelClient) ListCompositeEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListCompositeEntitiesSender sends the ListCompositeEntities request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) ListCompositeEntitiesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListCompositeEntitiesResponder handles the response to the ListCompositeEntities request. The method always
+// closes the http.Response Body.
+func (client ModelClient) ListCompositeEntitiesResponder(resp *http.Response) (result ListCompositeEntityExtractor, 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
+}
+
+// ListCustomPrebuiltEntities gets all custom prebuilt entities information of this application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+func (client ModelClient) ListCustomPrebuiltEntities(ctx context.Context, appID uuid.UUID, versionID string) (result ListEntityExtractor, err error) {
+ req, err := client.ListCustomPrebuiltEntitiesPreparer(ctx, appID, versionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntities", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListCustomPrebuiltEntitiesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntities", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListCustomPrebuiltEntitiesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntities", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListCustomPrebuiltEntitiesPreparer prepares the ListCustomPrebuiltEntities request.
+func (client ModelClient) ListCustomPrebuiltEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListCustomPrebuiltEntitiesSender sends the ListCustomPrebuiltEntities request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) ListCustomPrebuiltEntitiesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListCustomPrebuiltEntitiesResponder handles the response to the ListCustomPrebuiltEntities request. The method always
+// closes the http.Response Body.
+func (client ModelClient) ListCustomPrebuiltEntitiesResponder(resp *http.Response) (result ListEntityExtractor, 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
+}
+
+// ListCustomPrebuiltIntents gets custom prebuilt intents information of this application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+func (client ModelClient) ListCustomPrebuiltIntents(ctx context.Context, appID uuid.UUID, versionID string) (result ListIntentClassifier, err error) {
+ req, err := client.ListCustomPrebuiltIntentsPreparer(ctx, appID, versionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltIntents", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListCustomPrebuiltIntentsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltIntents", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListCustomPrebuiltIntentsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltIntents", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListCustomPrebuiltIntentsPreparer prepares the ListCustomPrebuiltIntents request.
+func (client ModelClient) ListCustomPrebuiltIntentsPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltintents", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListCustomPrebuiltIntentsSender sends the ListCustomPrebuiltIntents request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) ListCustomPrebuiltIntentsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListCustomPrebuiltIntentsResponder handles the response to the ListCustomPrebuiltIntents request. The method always
+// closes the http.Response Body.
+func (client ModelClient) ListCustomPrebuiltIntentsResponder(resp *http.Response) (result ListIntentClassifier, 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
+}
+
+// ListCustomPrebuiltModels gets all custom prebuilt models information of this application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+func (client ModelClient) ListCustomPrebuiltModels(ctx context.Context, appID uuid.UUID, versionID string) (result ListCustomPrebuiltModel, err error) {
+ req, err := client.ListCustomPrebuiltModelsPreparer(ctx, appID, versionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltModels", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListCustomPrebuiltModelsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltModels", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListCustomPrebuiltModelsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltModels", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListCustomPrebuiltModelsPreparer prepares the ListCustomPrebuiltModels request.
+func (client ModelClient) ListCustomPrebuiltModelsPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltmodels", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListCustomPrebuiltModelsSender sends the ListCustomPrebuiltModels request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) ListCustomPrebuiltModelsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListCustomPrebuiltModelsResponder handles the response to the ListCustomPrebuiltModels request. The method always
+// closes the http.Response Body.
+func (client ModelClient) ListCustomPrebuiltModelsResponder(resp *http.Response) (result ListCustomPrebuiltModel, 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
+}
+
+// ListEntities gets information about the entity models.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) ListEntities(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListEntityExtractor, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.ModelClient", "ListEntities", err.Error())
+ }
+
+ req, err := client.ListEntitiesPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntities", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListEntitiesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntities", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListEntitiesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntities", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListEntitiesPreparer prepares the ListEntities request.
+func (client ModelClient) ListEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListEntitiesSender sends the ListEntities request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) ListEntitiesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListEntitiesResponder handles the response to the ListEntities request. The method always
+// closes the http.Response Body.
+func (client ModelClient) ListEntitiesResponder(resp *http.Response) (result ListEntityExtractor, 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
+}
+
+// ListHierarchicalEntities gets information about the hierarchical entity models.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) ListHierarchicalEntities(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListHierarchicalEntityExtractor, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.ModelClient", "ListHierarchicalEntities", err.Error())
+ }
+
+ req, err := client.ListHierarchicalEntitiesPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntities", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListHierarchicalEntitiesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntities", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListHierarchicalEntitiesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntities", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListHierarchicalEntitiesPreparer prepares the ListHierarchicalEntities request.
+func (client ModelClient) ListHierarchicalEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListHierarchicalEntitiesSender sends the ListHierarchicalEntities request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) ListHierarchicalEntitiesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListHierarchicalEntitiesResponder handles the response to the ListHierarchicalEntities request. The method always
+// closes the http.Response Body.
+func (client ModelClient) ListHierarchicalEntitiesResponder(resp *http.Response) (result ListHierarchicalEntityExtractor, 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
+}
+
+// ListIntents gets information about the intent models.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) ListIntents(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListIntentClassifier, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.ModelClient", "ListIntents", err.Error())
+ }
+
+ req, err := client.ListIntentsPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntents", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListIntentsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntents", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListIntentsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntents", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListIntentsPreparer prepares the ListIntents request.
+func (client ModelClient) ListIntentsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListIntentsSender sends the ListIntents request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) ListIntentsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListIntentsResponder handles the response to the ListIntents request. The method always
+// closes the http.Response Body.
+func (client ModelClient) ListIntentsResponder(resp *http.Response) (result ListIntentClassifier, 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
+}
+
+// ListModels gets information about the application version models.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) ListModels(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListModelInfoResponse, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.ModelClient", "ListModels", err.Error())
+ }
+
+ req, err := client.ListModelsPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListModels", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListModelsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListModels", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListModelsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListModels", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListModelsPreparer prepares the ListModels request.
+func (client ModelClient) ListModelsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/models", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListModelsSender sends the ListModels request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) ListModelsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListModelsResponder handles the response to the ListModels request. The method always
+// closes the http.Response Body.
+func (client ModelClient) ListModelsResponder(resp *http.Response) (result ListModelInfoResponse, 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
+}
+
+// ListPrebuiltEntities gets all the available prebuilt entity extractors for the application.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+func (client ModelClient) ListPrebuiltEntities(ctx context.Context, appID uuid.UUID, versionID string) (result ListAvailablePrebuiltEntityModel, err error) {
+ req, err := client.ListPrebuiltEntitiesPreparer(ctx, appID, versionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntities", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListPrebuiltEntitiesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntities", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListPrebuiltEntitiesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntities", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPrebuiltEntitiesPreparer prepares the ListPrebuiltEntities request.
+func (client ModelClient) ListPrebuiltEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/listprebuilts", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListPrebuiltEntitiesSender sends the ListPrebuiltEntities request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) ListPrebuiltEntitiesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListPrebuiltEntitiesResponder handles the response to the ListPrebuiltEntities request. The method always
+// closes the http.Response Body.
+func (client ModelClient) ListPrebuiltEntitiesResponder(resp *http.Response) (result ListAvailablePrebuiltEntityModel, 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
+}
+
+// ListPrebuilts gets information about the prebuilt entity models.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) ListPrebuilts(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPrebuiltEntityExtractor, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.ModelClient", "ListPrebuilts", err.Error())
+ }
+
+ req, err := client.ListPrebuiltsPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuilts", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListPrebuiltsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuilts", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListPrebuiltsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuilts", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPrebuiltsPreparer prepares the ListPrebuilts request.
+func (client ModelClient) ListPrebuiltsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListPrebuiltsSender sends the ListPrebuilts request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) ListPrebuiltsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListPrebuiltsResponder handles the response to the ListPrebuilts request. The method always
+// closes the http.Response Body.
+func (client ModelClient) ListPrebuiltsResponder(resp *http.Response) (result ListPrebuiltEntityExtractor, 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
+}
+
+// PatchClosedList adds a batch of sublists to an existing closedlist.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// clEntityID - the closed list model ID.
+// closedListModelPatchObject - a words list batch.
+func (client ModelClient) PatchClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelPatchObject ClosedListModelPatchObject) (result OperationStatus, err error) {
+ req, err := client.PatchClosedListPreparer(ctx, appID, versionID, clEntityID, closedListModelPatchObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "PatchClosedList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.PatchClosedListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "PatchClosedList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.PatchClosedListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "PatchClosedList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// PatchClosedListPreparer prepares the PatchClosedList request.
+func (client ModelClient) PatchClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelPatchObject ClosedListModelPatchObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "clEntityId": autorest.Encode("path", clEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters),
+ autorest.WithJSON(closedListModelPatchObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PatchClosedListSender sends the PatchClosedList request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) PatchClosedListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// PatchClosedListResponder handles the response to the PatchClosedList request. The method always
+// closes the http.Response Body.
+func (client ModelClient) PatchClosedListResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateClosedList updates the closed list model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// clEntityID - the closed list model ID.
+// closedListModelUpdateObject - the new entity name and words list.
+func (client ModelClient) UpdateClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelUpdateObject ClosedListModelUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateClosedListPreparer(ctx, appID, versionID, clEntityID, closedListModelUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateClosedListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateClosedListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateClosedListPreparer prepares the UpdateClosedList request.
+func (client ModelClient) UpdateClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelUpdateObject ClosedListModelUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "clEntityId": autorest.Encode("path", clEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters),
+ autorest.WithJSON(closedListModelUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateClosedListSender sends the UpdateClosedList request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateClosedListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateClosedListResponder handles the response to the UpdateClosedList request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateClosedListResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateClosedListEntityRole sends the update closed list entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdateClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateClosedListEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedListEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateClosedListEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedListEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateClosedListEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedListEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateClosedListEntityRolePreparer prepares the UpdateClosedListEntityRole request.
+func (client ModelClient) UpdateClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateClosedListEntityRoleSender sends the UpdateClosedListEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateClosedListEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateClosedListEntityRoleResponder handles the response to the UpdateClosedListEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateClosedListEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateCompositeEntity updates the composite entity extractor.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+// compositeModelUpdateObject - a model object containing the new entity extractor name and children.
+func (client ModelClient) UpdateCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeModelUpdateObject CompositeEntityModel) (result OperationStatus, err error) {
+ req, err := client.UpdateCompositeEntityPreparer(ctx, appID, versionID, cEntityID, compositeModelUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateCompositeEntitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateCompositeEntityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateCompositeEntityPreparer prepares the UpdateCompositeEntity request.
+func (client ModelClient) UpdateCompositeEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeModelUpdateObject CompositeEntityModel) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters),
+ autorest.WithJSON(compositeModelUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateCompositeEntitySender sends the UpdateCompositeEntity request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateCompositeEntitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateCompositeEntityResponder handles the response to the UpdateCompositeEntity request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateCompositeEntityResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateCompositeEntityRole sends the update composite entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdateCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateCompositeEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateCompositeEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateCompositeEntityRolePreparer prepares the UpdateCompositeEntityRole request.
+func (client ModelClient) UpdateCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateCompositeEntityRoleSender sends the UpdateCompositeEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateCompositeEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateCompositeEntityRoleResponder handles the response to the UpdateCompositeEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateCompositeEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateCustomPrebuiltEntityRole sends the update custom prebuilt entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdateCustomPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateCustomPrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCustomPrebuiltEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateCustomPrebuiltEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCustomPrebuiltEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateCustomPrebuiltEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCustomPrebuiltEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateCustomPrebuiltEntityRolePreparer prepares the UpdateCustomPrebuiltEntityRole request.
+func (client ModelClient) UpdateCustomPrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateCustomPrebuiltEntityRoleSender sends the UpdateCustomPrebuiltEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateCustomPrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateCustomPrebuiltEntityRoleResponder handles the response to the UpdateCustomPrebuiltEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateCustomPrebuiltEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateEntity updates the name of an entity extractor.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity extractor ID.
+// modelUpdateObject - a model object containing the new entity extractor name.
+func (client ModelClient) UpdateEntity(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, modelUpdateObject ModelUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateEntityPreparer(ctx, appID, versionID, entityID, modelUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateEntitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateEntityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateEntityPreparer prepares the UpdateEntity request.
+func (client ModelClient) UpdateEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, modelUpdateObject ModelUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters),
+ autorest.WithJSON(modelUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateEntitySender sends the UpdateEntity request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateEntitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateEntityResponder handles the response to the UpdateEntity request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateEntityResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateEntityRole sends the update entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdateEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateEntityRolePreparer prepares the UpdateEntityRole request.
+func (client ModelClient) UpdateEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateEntityRoleSender sends the UpdateEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateEntityRoleResponder handles the response to the UpdateEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateExplicitListItem sends the update explicit list item request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the Pattern.Any entity extractor ID.
+// itemID - the explicit list item ID.
+// item - the new explicit list item.
+func (client ModelClient) UpdateExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64, item ExplicitListItemUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateExplicitListItemPreparer(ctx, appID, versionID, entityID, itemID, item)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateExplicitListItem", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateExplicitListItemSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateExplicitListItem", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateExplicitListItemResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateExplicitListItem", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateExplicitListItemPreparer prepares the UpdateExplicitListItem request.
+func (client ModelClient) UpdateExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64, item ExplicitListItemUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "itemId": autorest.Encode("path", itemID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters),
+ autorest.WithJSON(item))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateExplicitListItemSender sends the UpdateExplicitListItem request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateExplicitListItemSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateExplicitListItemResponder handles the response to the UpdateExplicitListItem request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateExplicitListItemResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateHierarchicalEntity updates the name and children of a hierarchical entity model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+// hierarchicalModelUpdateObject - model containing names of the children of the hierarchical entity.
+func (client ModelClient) UpdateHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalModelUpdateObject HierarchicalEntityModel) (result OperationStatus, err error) {
+ req, err := client.UpdateHierarchicalEntityPreparer(ctx, appID, versionID, hEntityID, hierarchicalModelUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateHierarchicalEntitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateHierarchicalEntityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateHierarchicalEntityPreparer prepares the UpdateHierarchicalEntity request.
+func (client ModelClient) UpdateHierarchicalEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalModelUpdateObject HierarchicalEntityModel) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters),
+ autorest.WithJSON(hierarchicalModelUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateHierarchicalEntitySender sends the UpdateHierarchicalEntity request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateHierarchicalEntitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateHierarchicalEntityResponder handles the response to the UpdateHierarchicalEntity request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateHierarchicalEntityResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateHierarchicalEntityChild renames a single child in an existing hierarchical entity model.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+// hChildID - the hierarchical entity extractor child ID.
+// hierarchicalChildModelUpdateObject - model object containing new name of the hierarchical entity child.
+func (client ModelClient) UpdateHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID, hierarchicalChildModelUpdateObject HierarchicalChildModelUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateHierarchicalEntityChildPreparer(ctx, appID, versionID, hEntityID, hChildID, hierarchicalChildModelUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityChild", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateHierarchicalEntityChildSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityChild", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateHierarchicalEntityChildResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityChild", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateHierarchicalEntityChildPreparer prepares the UpdateHierarchicalEntityChild request.
+func (client ModelClient) UpdateHierarchicalEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID, hierarchicalChildModelUpdateObject HierarchicalChildModelUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hChildId": autorest.Encode("path", hChildID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters),
+ autorest.WithJSON(hierarchicalChildModelUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateHierarchicalEntityChildSender sends the UpdateHierarchicalEntityChild request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateHierarchicalEntityChildSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateHierarchicalEntityChildResponder handles the response to the UpdateHierarchicalEntityChild request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateHierarchicalEntityChildResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateHierarchicalEntityRole sends the update hierarchical entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdateHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateHierarchicalEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateHierarchicalEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateHierarchicalEntityRolePreparer prepares the UpdateHierarchicalEntityRole request.
+func (client ModelClient) UpdateHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateHierarchicalEntityRoleSender sends the UpdateHierarchicalEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateHierarchicalEntityRoleResponder handles the response to the UpdateHierarchicalEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateHierarchicalEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateIntent updates the name of an intent classifier.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// intentID - the intent classifier ID.
+// modelUpdateObject - a model object containing the new intent classifier name.
+func (client ModelClient) UpdateIntent(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, modelUpdateObject ModelUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateIntentPreparer(ctx, appID, versionID, intentID, modelUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateIntent", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateIntentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateIntent", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateIntentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateIntent", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateIntentPreparer prepares the UpdateIntent request.
+func (client ModelClient) UpdateIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, modelUpdateObject ModelUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "intentId": autorest.Encode("path", intentID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters),
+ autorest.WithJSON(modelUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateIntentSender sends the UpdateIntent request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateIntentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateIntentResponder handles the response to the UpdateIntent request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateIntentResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdatePatternAnyEntityModel sends the update pattern any entity model request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the Pattern.Any entity extractor ID.
+// patternAnyUpdateObject - an object containing the explicit list of the Pattern.Any entity.
+func (client ModelClient) UpdatePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, patternAnyUpdateObject PatternAnyModelUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdatePatternAnyEntityModelPreparer(ctx, appID, versionID, entityID, patternAnyUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityModel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdatePatternAnyEntityModelSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityModel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdatePatternAnyEntityModelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityModel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePatternAnyEntityModelPreparer prepares the UpdatePatternAnyEntityModel request.
+func (client ModelClient) UpdatePatternAnyEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, patternAnyUpdateObject PatternAnyModelUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters),
+ autorest.WithJSON(patternAnyUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdatePatternAnyEntityModelSender sends the UpdatePatternAnyEntityModel request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdatePatternAnyEntityModelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdatePatternAnyEntityModelResponder handles the response to the UpdatePatternAnyEntityModel request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdatePatternAnyEntityModelResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdatePatternAnyEntityRole sends the update pattern any entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdatePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdatePatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdatePatternAnyEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdatePatternAnyEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePatternAnyEntityRolePreparer prepares the UpdatePatternAnyEntityRole request.
+func (client ModelClient) UpdatePatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdatePatternAnyEntityRoleSender sends the UpdatePatternAnyEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdatePatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdatePatternAnyEntityRoleResponder handles the response to the UpdatePatternAnyEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdatePatternAnyEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdatePrebuiltEntityRole sends the update prebuilt entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdatePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdatePrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePrebuiltEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdatePrebuiltEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePrebuiltEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdatePrebuiltEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePrebuiltEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePrebuiltEntityRolePreparer prepares the UpdatePrebuiltEntityRole request.
+func (client ModelClient) UpdatePrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdatePrebuiltEntityRoleSender sends the UpdatePrebuiltEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdatePrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdatePrebuiltEntityRoleResponder handles the response to the UpdatePrebuiltEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdatePrebuiltEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateRegexEntityModel sends the update regex entity model request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// regexEntityID - the regex entity extractor ID.
+// regexEntityUpdateObject - an object containing the new entity name and regex pattern.
+func (client ModelClient) UpdateRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID, regexEntityUpdateObject RegexModelUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateRegexEntityModelPreparer(ctx, appID, versionID, regexEntityID, regexEntityUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityModel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateRegexEntityModelSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityModel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateRegexEntityModelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityModel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateRegexEntityModelPreparer prepares the UpdateRegexEntityModel request.
+func (client ModelClient) UpdateRegexEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID, regexEntityUpdateObject RegexModelUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "regexEntityId": autorest.Encode("path", regexEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters),
+ autorest.WithJSON(regexEntityUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateRegexEntityModelSender sends the UpdateRegexEntityModel request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateRegexEntityModelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateRegexEntityModelResponder handles the response to the UpdateRegexEntityModel request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateRegexEntityModelResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateRegexEntityRole sends the update regex entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdateRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateRegexEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateRegexEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateRegexEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateRegexEntityRolePreparer prepares the UpdateRegexEntityRole request.
+func (client ModelClient) UpdateRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateRegexEntityRoleSender sends the UpdateRegexEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateRegexEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateRegexEntityRoleResponder handles the response to the UpdateRegexEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateRegexEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateSubList updates one of the closed list's sublists.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// clEntityID - the closed list entity extractor ID.
+// subListID - the sublist ID.
+// wordListBaseUpdateObject - a sublist update object containing the new canonical form and the list of words.
+func (client ModelClient) UpdateSubList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int32, wordListBaseUpdateObject WordListBaseUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateSubListPreparer(ctx, appID, versionID, clEntityID, subListID, wordListBaseUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateSubList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSubListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateSubList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateSubListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateSubList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateSubListPreparer prepares the UpdateSubList request.
+func (client ModelClient) UpdateSubListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int32, wordListBaseUpdateObject WordListBaseUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "clEntityId": autorest.Encode("path", clEntityID),
+ "subListId": autorest.Encode("path", subListID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}", pathParameters),
+ autorest.WithJSON(wordListBaseUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSubListSender sends the UpdateSubList request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateSubListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateSubListResponder handles the response to the UpdateSubList request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateSubListResponder(resp *http.Response) (result OperationStatus, 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/services/cognitiveservices/v2.0/luis/authoring/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/models.go
new file mode 100644
index 000000000..7cc2f76c2
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/models.go
@@ -0,0 +1,1832 @@
+package authoring
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/satori/go.uuid"
+ "io"
+)
+
+// AzureRegions enumerates the values for azure regions.
+type AzureRegions string
+
+const (
+ // Australiaeast ...
+ Australiaeast AzureRegions = "australiaeast"
+ // Brazilsouth ...
+ Brazilsouth AzureRegions = "brazilsouth"
+ // Eastasia ...
+ Eastasia AzureRegions = "eastasia"
+ // Eastus ...
+ Eastus AzureRegions = "eastus"
+ // Eastus2 ...
+ Eastus2 AzureRegions = "eastus2"
+ // Northeurope ...
+ Northeurope AzureRegions = "northeurope"
+ // Southcentralus ...
+ Southcentralus AzureRegions = "southcentralus"
+ // Southeastasia ...
+ Southeastasia AzureRegions = "southeastasia"
+ // Westcentralus ...
+ Westcentralus AzureRegions = "westcentralus"
+ // Westeurope ...
+ Westeurope AzureRegions = "westeurope"
+ // Westus ...
+ Westus AzureRegions = "westus"
+ // Westus2 ...
+ Westus2 AzureRegions = "westus2"
+)
+
+// PossibleAzureRegionsValues returns an array of possible values for the AzureRegions const type.
+func PossibleAzureRegionsValues() []AzureRegions {
+ return []AzureRegions{Australiaeast, Brazilsouth, Eastasia, Eastus, Eastus2, Northeurope, Southcentralus, Southeastasia, Westcentralus, Westeurope, Westus, Westus2}
+}
+
+// OperationStatusType enumerates the values for operation status type.
+type OperationStatusType string
+
+const (
+ // Failed ...
+ Failed OperationStatusType = "Failed"
+ // FAILED ...
+ FAILED OperationStatusType = "FAILED"
+ // Success ...
+ Success OperationStatusType = "Success"
+)
+
+// PossibleOperationStatusTypeValues returns an array of possible values for the OperationStatusType const type.
+func PossibleOperationStatusTypeValues() []OperationStatusType {
+ return []OperationStatusType{Failed, FAILED, Success}
+}
+
+// ReadableType enumerates the values for readable type.
+type ReadableType string
+
+const (
+ // ReadableTypeClosedListEntityExtractor ...
+ ReadableTypeClosedListEntityExtractor ReadableType = "Closed List Entity Extractor"
+ // ReadableTypeCompositeEntityExtractor ...
+ ReadableTypeCompositeEntityExtractor ReadableType = "Composite Entity Extractor"
+ // ReadableTypeEntityExtractor ...
+ ReadableTypeEntityExtractor ReadableType = "Entity Extractor"
+ // ReadableTypeHierarchicalChildEntityExtractor ...
+ ReadableTypeHierarchicalChildEntityExtractor ReadableType = "Hierarchical Child Entity Extractor"
+ // ReadableTypeHierarchicalEntityExtractor ...
+ ReadableTypeHierarchicalEntityExtractor ReadableType = "Hierarchical Entity Extractor"
+ // ReadableTypeIntentClassifier ...
+ ReadableTypeIntentClassifier ReadableType = "Intent Classifier"
+ // ReadableTypePatternAnyEntityExtractor ...
+ ReadableTypePatternAnyEntityExtractor ReadableType = "Pattern.Any Entity Extractor"
+ // ReadableTypePrebuiltEntityExtractor ...
+ ReadableTypePrebuiltEntityExtractor ReadableType = "Prebuilt Entity Extractor"
+ // ReadableTypeRegexEntityExtractor ...
+ ReadableTypeRegexEntityExtractor ReadableType = "Regex Entity Extractor"
+)
+
+// PossibleReadableTypeValues returns an array of possible values for the ReadableType const type.
+func PossibleReadableTypeValues() []ReadableType {
+ return []ReadableType{ReadableTypeClosedListEntityExtractor, ReadableTypeCompositeEntityExtractor, ReadableTypeEntityExtractor, ReadableTypeHierarchicalChildEntityExtractor, ReadableTypeHierarchicalEntityExtractor, ReadableTypeIntentClassifier, ReadableTypePatternAnyEntityExtractor, ReadableTypePrebuiltEntityExtractor, ReadableTypeRegexEntityExtractor}
+}
+
+// ReadableType1 enumerates the values for readable type 1.
+type ReadableType1 string
+
+const (
+ // ReadableType1ClosedListEntityExtractor ...
+ ReadableType1ClosedListEntityExtractor ReadableType1 = "Closed List Entity Extractor"
+ // ReadableType1CompositeEntityExtractor ...
+ ReadableType1CompositeEntityExtractor ReadableType1 = "Composite Entity Extractor"
+ // ReadableType1EntityExtractor ...
+ ReadableType1EntityExtractor ReadableType1 = "Entity Extractor"
+ // ReadableType1HierarchicalChildEntityExtractor ...
+ ReadableType1HierarchicalChildEntityExtractor ReadableType1 = "Hierarchical Child Entity Extractor"
+ // ReadableType1HierarchicalEntityExtractor ...
+ ReadableType1HierarchicalEntityExtractor ReadableType1 = "Hierarchical Entity Extractor"
+ // ReadableType1IntentClassifier ...
+ ReadableType1IntentClassifier ReadableType1 = "Intent Classifier"
+ // ReadableType1PatternAnyEntityExtractor ...
+ ReadableType1PatternAnyEntityExtractor ReadableType1 = "Pattern.Any Entity Extractor"
+ // ReadableType1PrebuiltEntityExtractor ...
+ ReadableType1PrebuiltEntityExtractor ReadableType1 = "Prebuilt Entity Extractor"
+ // ReadableType1RegexEntityExtractor ...
+ ReadableType1RegexEntityExtractor ReadableType1 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType1Values returns an array of possible values for the ReadableType1 const type.
+func PossibleReadableType1Values() []ReadableType1 {
+ return []ReadableType1{ReadableType1ClosedListEntityExtractor, ReadableType1CompositeEntityExtractor, ReadableType1EntityExtractor, ReadableType1HierarchicalChildEntityExtractor, ReadableType1HierarchicalEntityExtractor, ReadableType1IntentClassifier, ReadableType1PatternAnyEntityExtractor, ReadableType1PrebuiltEntityExtractor, ReadableType1RegexEntityExtractor}
+}
+
+// ReadableType10 enumerates the values for readable type 10.
+type ReadableType10 string
+
+const (
+ // ReadableType10ClosedListEntityExtractor ...
+ ReadableType10ClosedListEntityExtractor ReadableType10 = "Closed List Entity Extractor"
+ // ReadableType10CompositeEntityExtractor ...
+ ReadableType10CompositeEntityExtractor ReadableType10 = "Composite Entity Extractor"
+ // ReadableType10EntityExtractor ...
+ ReadableType10EntityExtractor ReadableType10 = "Entity Extractor"
+ // ReadableType10HierarchicalChildEntityExtractor ...
+ ReadableType10HierarchicalChildEntityExtractor ReadableType10 = "Hierarchical Child Entity Extractor"
+ // ReadableType10HierarchicalEntityExtractor ...
+ ReadableType10HierarchicalEntityExtractor ReadableType10 = "Hierarchical Entity Extractor"
+ // ReadableType10IntentClassifier ...
+ ReadableType10IntentClassifier ReadableType10 = "Intent Classifier"
+ // ReadableType10PatternAnyEntityExtractor ...
+ ReadableType10PatternAnyEntityExtractor ReadableType10 = "Pattern.Any Entity Extractor"
+ // ReadableType10PrebuiltEntityExtractor ...
+ ReadableType10PrebuiltEntityExtractor ReadableType10 = "Prebuilt Entity Extractor"
+ // ReadableType10RegexEntityExtractor ...
+ ReadableType10RegexEntityExtractor ReadableType10 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType10Values returns an array of possible values for the ReadableType10 const type.
+func PossibleReadableType10Values() []ReadableType10 {
+ return []ReadableType10{ReadableType10ClosedListEntityExtractor, ReadableType10CompositeEntityExtractor, ReadableType10EntityExtractor, ReadableType10HierarchicalChildEntityExtractor, ReadableType10HierarchicalEntityExtractor, ReadableType10IntentClassifier, ReadableType10PatternAnyEntityExtractor, ReadableType10PrebuiltEntityExtractor, ReadableType10RegexEntityExtractor}
+}
+
+// ReadableType2 enumerates the values for readable type 2.
+type ReadableType2 string
+
+const (
+ // ReadableType2ClosedListEntityExtractor ...
+ ReadableType2ClosedListEntityExtractor ReadableType2 = "Closed List Entity Extractor"
+ // ReadableType2CompositeEntityExtractor ...
+ ReadableType2CompositeEntityExtractor ReadableType2 = "Composite Entity Extractor"
+ // ReadableType2EntityExtractor ...
+ ReadableType2EntityExtractor ReadableType2 = "Entity Extractor"
+ // ReadableType2HierarchicalChildEntityExtractor ...
+ ReadableType2HierarchicalChildEntityExtractor ReadableType2 = "Hierarchical Child Entity Extractor"
+ // ReadableType2HierarchicalEntityExtractor ...
+ ReadableType2HierarchicalEntityExtractor ReadableType2 = "Hierarchical Entity Extractor"
+ // ReadableType2IntentClassifier ...
+ ReadableType2IntentClassifier ReadableType2 = "Intent Classifier"
+ // ReadableType2PatternAnyEntityExtractor ...
+ ReadableType2PatternAnyEntityExtractor ReadableType2 = "Pattern.Any Entity Extractor"
+ // ReadableType2PrebuiltEntityExtractor ...
+ ReadableType2PrebuiltEntityExtractor ReadableType2 = "Prebuilt Entity Extractor"
+ // ReadableType2RegexEntityExtractor ...
+ ReadableType2RegexEntityExtractor ReadableType2 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType2Values returns an array of possible values for the ReadableType2 const type.
+func PossibleReadableType2Values() []ReadableType2 {
+ return []ReadableType2{ReadableType2ClosedListEntityExtractor, ReadableType2CompositeEntityExtractor, ReadableType2EntityExtractor, ReadableType2HierarchicalChildEntityExtractor, ReadableType2HierarchicalEntityExtractor, ReadableType2IntentClassifier, ReadableType2PatternAnyEntityExtractor, ReadableType2PrebuiltEntityExtractor, ReadableType2RegexEntityExtractor}
+}
+
+// ReadableType3 enumerates the values for readable type 3.
+type ReadableType3 string
+
+const (
+ // ReadableType3ClosedListEntityExtractor ...
+ ReadableType3ClosedListEntityExtractor ReadableType3 = "Closed List Entity Extractor"
+ // ReadableType3CompositeEntityExtractor ...
+ ReadableType3CompositeEntityExtractor ReadableType3 = "Composite Entity Extractor"
+ // ReadableType3EntityExtractor ...
+ ReadableType3EntityExtractor ReadableType3 = "Entity Extractor"
+ // ReadableType3HierarchicalChildEntityExtractor ...
+ ReadableType3HierarchicalChildEntityExtractor ReadableType3 = "Hierarchical Child Entity Extractor"
+ // ReadableType3HierarchicalEntityExtractor ...
+ ReadableType3HierarchicalEntityExtractor ReadableType3 = "Hierarchical Entity Extractor"
+ // ReadableType3IntentClassifier ...
+ ReadableType3IntentClassifier ReadableType3 = "Intent Classifier"
+ // ReadableType3PatternAnyEntityExtractor ...
+ ReadableType3PatternAnyEntityExtractor ReadableType3 = "Pattern.Any Entity Extractor"
+ // ReadableType3PrebuiltEntityExtractor ...
+ ReadableType3PrebuiltEntityExtractor ReadableType3 = "Prebuilt Entity Extractor"
+ // ReadableType3RegexEntityExtractor ...
+ ReadableType3RegexEntityExtractor ReadableType3 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType3Values returns an array of possible values for the ReadableType3 const type.
+func PossibleReadableType3Values() []ReadableType3 {
+ return []ReadableType3{ReadableType3ClosedListEntityExtractor, ReadableType3CompositeEntityExtractor, ReadableType3EntityExtractor, ReadableType3HierarchicalChildEntityExtractor, ReadableType3HierarchicalEntityExtractor, ReadableType3IntentClassifier, ReadableType3PatternAnyEntityExtractor, ReadableType3PrebuiltEntityExtractor, ReadableType3RegexEntityExtractor}
+}
+
+// ReadableType4 enumerates the values for readable type 4.
+type ReadableType4 string
+
+const (
+ // ReadableType4ClosedListEntityExtractor ...
+ ReadableType4ClosedListEntityExtractor ReadableType4 = "Closed List Entity Extractor"
+ // ReadableType4CompositeEntityExtractor ...
+ ReadableType4CompositeEntityExtractor ReadableType4 = "Composite Entity Extractor"
+ // ReadableType4EntityExtractor ...
+ ReadableType4EntityExtractor ReadableType4 = "Entity Extractor"
+ // ReadableType4HierarchicalChildEntityExtractor ...
+ ReadableType4HierarchicalChildEntityExtractor ReadableType4 = "Hierarchical Child Entity Extractor"
+ // ReadableType4HierarchicalEntityExtractor ...
+ ReadableType4HierarchicalEntityExtractor ReadableType4 = "Hierarchical Entity Extractor"
+ // ReadableType4IntentClassifier ...
+ ReadableType4IntentClassifier ReadableType4 = "Intent Classifier"
+ // ReadableType4PatternAnyEntityExtractor ...
+ ReadableType4PatternAnyEntityExtractor ReadableType4 = "Pattern.Any Entity Extractor"
+ // ReadableType4PrebuiltEntityExtractor ...
+ ReadableType4PrebuiltEntityExtractor ReadableType4 = "Prebuilt Entity Extractor"
+ // ReadableType4RegexEntityExtractor ...
+ ReadableType4RegexEntityExtractor ReadableType4 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType4Values returns an array of possible values for the ReadableType4 const type.
+func PossibleReadableType4Values() []ReadableType4 {
+ return []ReadableType4{ReadableType4ClosedListEntityExtractor, ReadableType4CompositeEntityExtractor, ReadableType4EntityExtractor, ReadableType4HierarchicalChildEntityExtractor, ReadableType4HierarchicalEntityExtractor, ReadableType4IntentClassifier, ReadableType4PatternAnyEntityExtractor, ReadableType4PrebuiltEntityExtractor, ReadableType4RegexEntityExtractor}
+}
+
+// ReadableType5 enumerates the values for readable type 5.
+type ReadableType5 string
+
+const (
+ // ReadableType5ClosedListEntityExtractor ...
+ ReadableType5ClosedListEntityExtractor ReadableType5 = "Closed List Entity Extractor"
+ // ReadableType5CompositeEntityExtractor ...
+ ReadableType5CompositeEntityExtractor ReadableType5 = "Composite Entity Extractor"
+ // ReadableType5EntityExtractor ...
+ ReadableType5EntityExtractor ReadableType5 = "Entity Extractor"
+ // ReadableType5HierarchicalChildEntityExtractor ...
+ ReadableType5HierarchicalChildEntityExtractor ReadableType5 = "Hierarchical Child Entity Extractor"
+ // ReadableType5HierarchicalEntityExtractor ...
+ ReadableType5HierarchicalEntityExtractor ReadableType5 = "Hierarchical Entity Extractor"
+ // ReadableType5IntentClassifier ...
+ ReadableType5IntentClassifier ReadableType5 = "Intent Classifier"
+ // ReadableType5PatternAnyEntityExtractor ...
+ ReadableType5PatternAnyEntityExtractor ReadableType5 = "Pattern.Any Entity Extractor"
+ // ReadableType5PrebuiltEntityExtractor ...
+ ReadableType5PrebuiltEntityExtractor ReadableType5 = "Prebuilt Entity Extractor"
+ // ReadableType5RegexEntityExtractor ...
+ ReadableType5RegexEntityExtractor ReadableType5 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType5Values returns an array of possible values for the ReadableType5 const type.
+func PossibleReadableType5Values() []ReadableType5 {
+ return []ReadableType5{ReadableType5ClosedListEntityExtractor, ReadableType5CompositeEntityExtractor, ReadableType5EntityExtractor, ReadableType5HierarchicalChildEntityExtractor, ReadableType5HierarchicalEntityExtractor, ReadableType5IntentClassifier, ReadableType5PatternAnyEntityExtractor, ReadableType5PrebuiltEntityExtractor, ReadableType5RegexEntityExtractor}
+}
+
+// ReadableType6 enumerates the values for readable type 6.
+type ReadableType6 string
+
+const (
+ // ReadableType6ClosedListEntityExtractor ...
+ ReadableType6ClosedListEntityExtractor ReadableType6 = "Closed List Entity Extractor"
+ // ReadableType6CompositeEntityExtractor ...
+ ReadableType6CompositeEntityExtractor ReadableType6 = "Composite Entity Extractor"
+ // ReadableType6EntityExtractor ...
+ ReadableType6EntityExtractor ReadableType6 = "Entity Extractor"
+ // ReadableType6HierarchicalChildEntityExtractor ...
+ ReadableType6HierarchicalChildEntityExtractor ReadableType6 = "Hierarchical Child Entity Extractor"
+ // ReadableType6HierarchicalEntityExtractor ...
+ ReadableType6HierarchicalEntityExtractor ReadableType6 = "Hierarchical Entity Extractor"
+ // ReadableType6IntentClassifier ...
+ ReadableType6IntentClassifier ReadableType6 = "Intent Classifier"
+ // ReadableType6PatternAnyEntityExtractor ...
+ ReadableType6PatternAnyEntityExtractor ReadableType6 = "Pattern.Any Entity Extractor"
+ // ReadableType6PrebuiltEntityExtractor ...
+ ReadableType6PrebuiltEntityExtractor ReadableType6 = "Prebuilt Entity Extractor"
+ // ReadableType6RegexEntityExtractor ...
+ ReadableType6RegexEntityExtractor ReadableType6 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType6Values returns an array of possible values for the ReadableType6 const type.
+func PossibleReadableType6Values() []ReadableType6 {
+ return []ReadableType6{ReadableType6ClosedListEntityExtractor, ReadableType6CompositeEntityExtractor, ReadableType6EntityExtractor, ReadableType6HierarchicalChildEntityExtractor, ReadableType6HierarchicalEntityExtractor, ReadableType6IntentClassifier, ReadableType6PatternAnyEntityExtractor, ReadableType6PrebuiltEntityExtractor, ReadableType6RegexEntityExtractor}
+}
+
+// ReadableType7 enumerates the values for readable type 7.
+type ReadableType7 string
+
+const (
+ // ReadableType7ClosedListEntityExtractor ...
+ ReadableType7ClosedListEntityExtractor ReadableType7 = "Closed List Entity Extractor"
+ // ReadableType7CompositeEntityExtractor ...
+ ReadableType7CompositeEntityExtractor ReadableType7 = "Composite Entity Extractor"
+ // ReadableType7EntityExtractor ...
+ ReadableType7EntityExtractor ReadableType7 = "Entity Extractor"
+ // ReadableType7HierarchicalChildEntityExtractor ...
+ ReadableType7HierarchicalChildEntityExtractor ReadableType7 = "Hierarchical Child Entity Extractor"
+ // ReadableType7HierarchicalEntityExtractor ...
+ ReadableType7HierarchicalEntityExtractor ReadableType7 = "Hierarchical Entity Extractor"
+ // ReadableType7IntentClassifier ...
+ ReadableType7IntentClassifier ReadableType7 = "Intent Classifier"
+ // ReadableType7PatternAnyEntityExtractor ...
+ ReadableType7PatternAnyEntityExtractor ReadableType7 = "Pattern.Any Entity Extractor"
+ // ReadableType7PrebuiltEntityExtractor ...
+ ReadableType7PrebuiltEntityExtractor ReadableType7 = "Prebuilt Entity Extractor"
+ // ReadableType7RegexEntityExtractor ...
+ ReadableType7RegexEntityExtractor ReadableType7 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType7Values returns an array of possible values for the ReadableType7 const type.
+func PossibleReadableType7Values() []ReadableType7 {
+ return []ReadableType7{ReadableType7ClosedListEntityExtractor, ReadableType7CompositeEntityExtractor, ReadableType7EntityExtractor, ReadableType7HierarchicalChildEntityExtractor, ReadableType7HierarchicalEntityExtractor, ReadableType7IntentClassifier, ReadableType7PatternAnyEntityExtractor, ReadableType7PrebuiltEntityExtractor, ReadableType7RegexEntityExtractor}
+}
+
+// ReadableType8 enumerates the values for readable type 8.
+type ReadableType8 string
+
+const (
+ // ReadableType8ClosedListEntityExtractor ...
+ ReadableType8ClosedListEntityExtractor ReadableType8 = "Closed List Entity Extractor"
+ // ReadableType8CompositeEntityExtractor ...
+ ReadableType8CompositeEntityExtractor ReadableType8 = "Composite Entity Extractor"
+ // ReadableType8EntityExtractor ...
+ ReadableType8EntityExtractor ReadableType8 = "Entity Extractor"
+ // ReadableType8HierarchicalChildEntityExtractor ...
+ ReadableType8HierarchicalChildEntityExtractor ReadableType8 = "Hierarchical Child Entity Extractor"
+ // ReadableType8HierarchicalEntityExtractor ...
+ ReadableType8HierarchicalEntityExtractor ReadableType8 = "Hierarchical Entity Extractor"
+ // ReadableType8IntentClassifier ...
+ ReadableType8IntentClassifier ReadableType8 = "Intent Classifier"
+ // ReadableType8PatternAnyEntityExtractor ...
+ ReadableType8PatternAnyEntityExtractor ReadableType8 = "Pattern.Any Entity Extractor"
+ // ReadableType8PrebuiltEntityExtractor ...
+ ReadableType8PrebuiltEntityExtractor ReadableType8 = "Prebuilt Entity Extractor"
+ // ReadableType8RegexEntityExtractor ...
+ ReadableType8RegexEntityExtractor ReadableType8 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType8Values returns an array of possible values for the ReadableType8 const type.
+func PossibleReadableType8Values() []ReadableType8 {
+ return []ReadableType8{ReadableType8ClosedListEntityExtractor, ReadableType8CompositeEntityExtractor, ReadableType8EntityExtractor, ReadableType8HierarchicalChildEntityExtractor, ReadableType8HierarchicalEntityExtractor, ReadableType8IntentClassifier, ReadableType8PatternAnyEntityExtractor, ReadableType8PrebuiltEntityExtractor, ReadableType8RegexEntityExtractor}
+}
+
+// ReadableType9 enumerates the values for readable type 9.
+type ReadableType9 string
+
+const (
+ // ReadableType9ClosedListEntityExtractor ...
+ ReadableType9ClosedListEntityExtractor ReadableType9 = "Closed List Entity Extractor"
+ // ReadableType9CompositeEntityExtractor ...
+ ReadableType9CompositeEntityExtractor ReadableType9 = "Composite Entity Extractor"
+ // ReadableType9EntityExtractor ...
+ ReadableType9EntityExtractor ReadableType9 = "Entity Extractor"
+ // ReadableType9HierarchicalChildEntityExtractor ...
+ ReadableType9HierarchicalChildEntityExtractor ReadableType9 = "Hierarchical Child Entity Extractor"
+ // ReadableType9HierarchicalEntityExtractor ...
+ ReadableType9HierarchicalEntityExtractor ReadableType9 = "Hierarchical Entity Extractor"
+ // ReadableType9IntentClassifier ...
+ ReadableType9IntentClassifier ReadableType9 = "Intent Classifier"
+ // ReadableType9PatternAnyEntityExtractor ...
+ ReadableType9PatternAnyEntityExtractor ReadableType9 = "Pattern.Any Entity Extractor"
+ // ReadableType9PrebuiltEntityExtractor ...
+ ReadableType9PrebuiltEntityExtractor ReadableType9 = "Prebuilt Entity Extractor"
+ // ReadableType9RegexEntityExtractor ...
+ ReadableType9RegexEntityExtractor ReadableType9 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType9Values returns an array of possible values for the ReadableType9 const type.
+func PossibleReadableType9Values() []ReadableType9 {
+ return []ReadableType9{ReadableType9ClosedListEntityExtractor, ReadableType9CompositeEntityExtractor, ReadableType9EntityExtractor, ReadableType9HierarchicalChildEntityExtractor, ReadableType9HierarchicalEntityExtractor, ReadableType9IntentClassifier, ReadableType9PatternAnyEntityExtractor, ReadableType9PrebuiltEntityExtractor, ReadableType9RegexEntityExtractor}
+}
+
+// Status enumerates the values for status.
+type Status string
+
+const (
+ // StatusFail ...
+ StatusFail Status = "Fail"
+ // StatusInProgress ...
+ StatusInProgress Status = "InProgress"
+ // StatusQueued ...
+ StatusQueued Status = "Queued"
+ // StatusSuccess ...
+ StatusSuccess Status = "Success"
+ // StatusUpToDate ...
+ StatusUpToDate Status = "UpToDate"
+)
+
+// PossibleStatusValues returns an array of possible values for the Status const type.
+func PossibleStatusValues() []Status {
+ return []Status{StatusFail, StatusInProgress, StatusQueued, StatusSuccess, StatusUpToDate}
+}
+
+// Status1 enumerates the values for status 1.
+type Status1 string
+
+const (
+ // Status1Fail ...
+ Status1Fail Status1 = "Fail"
+ // Status1InProgress ...
+ Status1InProgress Status1 = "InProgress"
+ // Status1Queued ...
+ Status1Queued Status1 = "Queued"
+ // Status1Success ...
+ Status1Success Status1 = "Success"
+ // Status1UpToDate ...
+ Status1UpToDate Status1 = "UpToDate"
+)
+
+// PossibleStatus1Values returns an array of possible values for the Status1 const type.
+func PossibleStatus1Values() []Status1 {
+ return []Status1{Status1Fail, Status1InProgress, Status1Queued, Status1Success, Status1UpToDate}
+}
+
+// TrainingStatus enumerates the values for training status.
+type TrainingStatus string
+
+const (
+ // InProgress ...
+ InProgress TrainingStatus = "InProgress"
+ // NeedsTraining ...
+ NeedsTraining TrainingStatus = "NeedsTraining"
+ // Trained ...
+ Trained TrainingStatus = "Trained"
+)
+
+// PossibleTrainingStatusValues returns an array of possible values for the TrainingStatus const type.
+func PossibleTrainingStatusValues() []TrainingStatus {
+ return []TrainingStatus{InProgress, NeedsTraining, Trained}
+}
+
+// ApplicationCreateObject properties for creating a new LUIS Application
+type ApplicationCreateObject struct {
+ // Culture - The culture for the new application. It is the language that your app understands and speaks. E.g.: "en-us". Note: the culture cannot be changed after the app is created.
+ Culture *string `json:"culture,omitempty"`
+ // Domain - The domain for the new application. Optional. E.g.: Comics.
+ Domain *string `json:"domain,omitempty"`
+ // Description - Description of the new application. Optional.
+ Description *string `json:"description,omitempty"`
+ // InitialVersionID - The initial version ID. Optional. Default value is: "0.1"
+ InitialVersionID *string `json:"initialVersionId,omitempty"`
+ // UsageScenario - Defines the scenario for the new application. Optional. E.g.: IoT.
+ UsageScenario *string `json:"usageScenario,omitempty"`
+ // Name - The name for the new application.
+ Name *string `json:"name,omitempty"`
+}
+
+// ApplicationInfoResponse response containing the Application Info.
+type ApplicationInfoResponse struct {
+ autorest.Response `json:"-"`
+ // ID - The ID (GUID) of the application.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - The name of the application.
+ Name *string `json:"name,omitempty"`
+ // Description - The description of the application.
+ Description *string `json:"description,omitempty"`
+ // Culture - The culture of the application. E.g.: en-us.
+ Culture *string `json:"culture,omitempty"`
+ // UsageScenario - Defines the scenario for the new application. Optional. E.g.: IoT.
+ UsageScenario *string `json:"usageScenario,omitempty"`
+ // Domain - The domain for the new application. Optional. E.g.: Comics.
+ Domain *string `json:"domain,omitempty"`
+ // VersionsCount - Amount of model versions within the application.
+ VersionsCount *int32 `json:"versionsCount,omitempty"`
+ // CreatedDateTime - The version's creation timestamp.
+ CreatedDateTime *string `json:"createdDateTime,omitempty"`
+ // Endpoints - The Runtime endpoint URL for this model version.
+ Endpoints interface{} `json:"endpoints,omitempty"`
+ // EndpointHitsCount - Number of calls made to this endpoint.
+ EndpointHitsCount *int32 `json:"endpointHitsCount,omitempty"`
+ // ActiveVersion - The version ID currently marked as active.
+ ActiveVersion *string `json:"activeVersion,omitempty"`
+}
+
+// ApplicationPublishObject object model for publishing a specific application version.
+type ApplicationPublishObject struct {
+ // VersionID - The version ID to publish.
+ VersionID *string `json:"versionId,omitempty"`
+ // IsStaging - Indicates if the staging slot should be used, instead of the Production one.
+ IsStaging *bool `json:"isStaging,omitempty"`
+ // Region - The target region that the application is published to.
+ Region *string `json:"region,omitempty"`
+}
+
+// ApplicationSettings the application settings.
+type ApplicationSettings struct {
+ autorest.Response `json:"-"`
+ // ID - The application ID.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // IsPublic - Setting your application as public allows other people to use your application's endpoint using their own keys.
+ IsPublic *bool `json:"public,omitempty"`
+}
+
+// ApplicationSettingUpdateObject object model for updating an application's settings.
+type ApplicationSettingUpdateObject struct {
+ // Public - Setting your application as public allows other people to use your application's endpoint using their own keys.
+ Public *bool `json:"public,omitempty"`
+}
+
+// ApplicationUpdateObject object model for updating the name or description of an application.
+type ApplicationUpdateObject struct {
+ // Name - The application's new name.
+ Name *string `json:"name,omitempty"`
+ // Description - The application's new description.
+ Description *string `json:"description,omitempty"`
+}
+
+// AvailableCulture available culture for using in a new application.
+type AvailableCulture struct {
+ // Name - The language name.
+ Name *string `json:"name,omitempty"`
+ // Code - The ISO value for the language.
+ Code *string `json:"code,omitempty"`
+}
+
+// AvailablePrebuiltEntityModel available Prebuilt entity model for using in an application.
+type AvailablePrebuiltEntityModel struct {
+ // Name - The entity name.
+ Name *string `json:"name,omitempty"`
+ // Description - The entity description and usage information.
+ Description *string `json:"description,omitempty"`
+ // Examples - Usage examples.
+ Examples *string `json:"examples,omitempty"`
+}
+
+// BatchLabelExample response when adding a batch of labeled examples.
+type BatchLabelExample struct {
+ Value *LabelExampleResponse `json:"value,omitempty"`
+ HasError *bool `json:"hasError,omitempty"`
+ Error *OperationStatus `json:"error,omitempty"`
+}
+
+// ChildEntity the base child entity type.
+type ChildEntity struct {
+ // ID - The ID (GUID) belonging to a child entity.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - The name of a child entity.
+ Name *string `json:"name,omitempty"`
+}
+
+// ClosedList exported Model - A Closed List.
+type ClosedList struct {
+ // Name - Name of the closed list feature.
+ Name *string `json:"name,omitempty"`
+ // SubLists - Sublists for the feature.
+ SubLists *[]SubClosedList `json:"subLists,omitempty"`
+ Roles *[]string `json:"roles,omitempty"`
+}
+
+// ClosedListEntityExtractor closed List Entity Extractor.
+type ClosedListEntityExtractor struct {
+ autorest.Response `json:"-"`
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType4EntityExtractor', 'ReadableType4HierarchicalEntityExtractor', 'ReadableType4HierarchicalChildEntityExtractor', 'ReadableType4CompositeEntityExtractor', 'ReadableType4ClosedListEntityExtractor', 'ReadableType4PrebuiltEntityExtractor', 'ReadableType4IntentClassifier', 'ReadableType4PatternAnyEntityExtractor', 'ReadableType4RegexEntityExtractor'
+ ReadableType ReadableType4 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ // SubLists - List of sub-lists.
+ SubLists *[]SubClosedListResponse `json:"subLists,omitempty"`
+}
+
+// ClosedListModelCreateObject object model for creating a closed list.
+type ClosedListModelCreateObject struct {
+ // SubLists - Sublists for the feature.
+ SubLists *[]WordListObject `json:"subLists,omitempty"`
+ // Name - Name of the closed list feature.
+ Name *string `json:"name,omitempty"`
+}
+
+// ClosedListModelPatchObject object model for adding a batch of sublists to an existing closedlist.
+type ClosedListModelPatchObject struct {
+ // SubLists - Sublists to add.
+ SubLists *[]WordListObject `json:"subLists,omitempty"`
+}
+
+// ClosedListModelUpdateObject object model for updating a closed list.
+type ClosedListModelUpdateObject struct {
+ // SubLists - The new sublists for the feature.
+ SubLists *[]WordListObject `json:"subLists,omitempty"`
+ // Name - The new name of the closed list feature.
+ Name *string `json:"name,omitempty"`
+}
+
+// CollaboratorsArray ...
+type CollaboratorsArray struct {
+ // Emails - The email address of the users.
+ Emails *[]string `json:"emails,omitempty"`
+}
+
+// CompositeChildModelCreateObject ...
+type CompositeChildModelCreateObject struct {
+ Name *string `json:"name,omitempty"`
+}
+
+// CompositeEntityExtractor a Composite Entity Extractor.
+type CompositeEntityExtractor struct {
+ autorest.Response `json:"-"`
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType3EntityExtractor', 'ReadableType3HierarchicalEntityExtractor', 'ReadableType3HierarchicalChildEntityExtractor', 'ReadableType3CompositeEntityExtractor', 'ReadableType3ClosedListEntityExtractor', 'ReadableType3PrebuiltEntityExtractor', 'ReadableType3IntentClassifier', 'ReadableType3PatternAnyEntityExtractor', 'ReadableType3RegexEntityExtractor'
+ ReadableType ReadableType3 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ // Children - List of child entities.
+ Children *[]ChildEntity `json:"children,omitempty"`
+}
+
+// CompositeEntityModel a composite entity.
+type CompositeEntityModel struct {
+ // Children - Child entities.
+ Children *[]string `json:"children,omitempty"`
+ // Name - Entity name.
+ Name *string `json:"name,omitempty"`
+}
+
+// CustomPrebuiltModel a Custom Prebuilt model.
+type CustomPrebuiltModel struct {
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType7EntityExtractor', 'ReadableType7HierarchicalEntityExtractor', 'ReadableType7HierarchicalChildEntityExtractor', 'ReadableType7CompositeEntityExtractor', 'ReadableType7ClosedListEntityExtractor', 'ReadableType7PrebuiltEntityExtractor', 'ReadableType7IntentClassifier', 'ReadableType7PatternAnyEntityExtractor', 'ReadableType7RegexEntityExtractor'
+ ReadableType ReadableType7 `json:"readableType,omitempty"`
+ // CustomPrebuiltDomainName - The domain name.
+ CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
+ // CustomPrebuiltModelName - The intent name or entity name.
+ CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+}
+
+// EndpointInfo the base class "ProductionOrStagingEndpointInfo" inherits from.
+type EndpointInfo struct {
+ // VersionID - The version ID to publish.
+ VersionID *string `json:"versionId,omitempty"`
+ // IsStaging - Indicates if the staging slot should be used, instead of the Production one.
+ IsStaging *bool `json:"isStaging,omitempty"`
+ // EndpointURL - The Runtime endpoint URL for this model version.
+ EndpointURL *string `json:"endpointUrl,omitempty"`
+ // Region - The target region that the application is published to.
+ Region *string `json:"region,omitempty"`
+ // AssignedEndpointKey - The endpoint key.
+ AssignedEndpointKey *string `json:"assignedEndpointKey,omitempty"`
+ // EndpointRegion - The endpoint's region.
+ EndpointRegion *string `json:"endpointRegion,omitempty"`
+ // PublishedDateTime - Timestamp when was last published.
+ PublishedDateTime *string `json:"publishedDateTime,omitempty"`
+}
+
+// EnqueueTrainingResponse response model when requesting to train the model.
+type EnqueueTrainingResponse struct {
+ autorest.Response `json:"-"`
+ // StatusID - The train request status ID.
+ StatusID *int32 `json:"statusId,omitempty"`
+ // Status - Possible values include: 'StatusQueued', 'StatusInProgress', 'StatusUpToDate', 'StatusFail', 'StatusSuccess'
+ Status Status `json:"status,omitempty"`
+}
+
+// EntitiesSuggestionExample predicted/suggested entity.
+type EntitiesSuggestionExample struct {
+ // Text - The utterance. E.g.: what's the weather like in seattle?
+ Text *string `json:"text,omitempty"`
+ // TokenizedText - The utterance tokenized.
+ TokenizedText *[]string `json:"tokenizedText,omitempty"`
+ // IntentPredictions - Predicted/suggested intents.
+ IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"`
+ // EntityPredictions - Predicted/suggested entities.
+ EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"`
+}
+
+// EntityExtractor entity Extractor.
+type EntityExtractor struct {
+ autorest.Response `json:"-"`
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType8EntityExtractor', 'ReadableType8HierarchicalEntityExtractor', 'ReadableType8HierarchicalChildEntityExtractor', 'ReadableType8CompositeEntityExtractor', 'ReadableType8ClosedListEntityExtractor', 'ReadableType8PrebuiltEntityExtractor', 'ReadableType8IntentClassifier', 'ReadableType8PatternAnyEntityExtractor', 'ReadableType8RegexEntityExtractor'
+ ReadableType ReadableType8 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ // CustomPrebuiltDomainName - The domain name.
+ CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
+ // CustomPrebuiltModelName - The intent name or entity name.
+ CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
+}
+
+// EntityLabel defines the entity type and position of the extracted entity within the example.
+type EntityLabel struct {
+ // EntityName - The entity type.
+ EntityName *string `json:"entityName,omitempty"`
+ // StartTokenIndex - The index within the utterance where the extracted entity starts.
+ StartTokenIndex *int32 `json:"startTokenIndex,omitempty"`
+ // EndTokenIndex - The index within the utterance where the extracted entity ends.
+ EndTokenIndex *int32 `json:"endTokenIndex,omitempty"`
+}
+
+// EntityLabelObject defines the entity type and position of the extracted entity within the example.
+type EntityLabelObject struct {
+ // EntityName - The entity type.
+ EntityName *string `json:"entityName,omitempty"`
+ // StartCharIndex - The index within the utterance where the extracted entity starts.
+ StartCharIndex *int32 `json:"startCharIndex,omitempty"`
+ // EndCharIndex - The index within the utterance where the extracted entity ends.
+ EndCharIndex *int32 `json:"endCharIndex,omitempty"`
+}
+
+// EntityModelInfo an Entity Extractor model info.
+type EntityModelInfo struct {
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegexEntityExtractor'
+ ReadableType ReadableType `json:"readableType,omitempty"`
+}
+
+// EntityPrediction a suggested entity.
+type EntityPrediction struct {
+ // EntityName - The entity's name
+ EntityName *string `json:"entityName,omitempty"`
+ // StartTokenIndex - The index within the utterance where the extracted entity starts.
+ StartTokenIndex *int32 `json:"startTokenIndex,omitempty"`
+ // EndTokenIndex - The index within the utterance where the extracted entity ends.
+ EndTokenIndex *int32 `json:"endTokenIndex,omitempty"`
+ // Phrase - The actual token(s) that comprise the entity.
+ Phrase *string `json:"phrase,omitempty"`
+}
+
+// EntityRole entity extractor role
+type EntityRole struct {
+ autorest.Response `json:"-"`
+ // ID - The entity role ID.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - The entity role name.
+ Name *string `json:"name,omitempty"`
+}
+
+// EntityRoleCreateObject object model for creating an entity role.
+type EntityRoleCreateObject struct {
+ // Name - The entity role name.
+ Name *string `json:"name,omitempty"`
+}
+
+// EntityRoleUpdateObject object model for updating an entity role.
+type EntityRoleUpdateObject struct {
+ // Name - The entity role name.
+ Name *string `json:"name,omitempty"`
+}
+
+// ErrorResponse error response when invoking an operation on the API.
+type ErrorResponse struct {
+ // AdditionalProperties - Unmatched properties from the message are deserialized this collection
+ AdditionalProperties map[string]interface{} `json:""`
+ ErrorType *string `json:"errorType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ErrorResponse.
+func (er ErrorResponse) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if er.ErrorType != nil {
+ objectMap["errorType"] = er.ErrorType
+ }
+ for k, v := range er.AdditionalProperties {
+ objectMap[k] = v
+ }
+ return json.Marshal(objectMap)
+}
+
+// ExampleLabelObject a labeled example.
+type ExampleLabelObject struct {
+ // Text - The sample's utterance.
+ Text *string `json:"text,omitempty"`
+ // EntityLabels - The idenfied entities within the utterance.
+ EntityLabels *[]EntityLabelObject `json:"entityLabels,omitempty"`
+ // IntentName - The idenfitied intent representing the utterance.
+ IntentName *string `json:"intentName,omitempty"`
+}
+
+// ExplicitListItem explicit list item
+type ExplicitListItem struct {
+ autorest.Response `json:"-"`
+ // ID - The explicit list item ID.
+ ID *int64 `json:"id,omitempty"`
+ // ExplicitListItem - The explicit list item value.
+ ExplicitListItem *string `json:"explicitListItem,omitempty"`
+}
+
+// ExplicitListItemCreateObject object model for creating an explicit list item.
+type ExplicitListItemCreateObject struct {
+ // ExplicitListItem - The explicit list item.
+ ExplicitListItem *string `json:"explicitListItem,omitempty"`
+}
+
+// ExplicitListItemUpdateObject model object for updating an explicit list item.
+type ExplicitListItemUpdateObject struct {
+ // ExplicitListItem - The explicit list item.
+ ExplicitListItem *string `json:"explicitListItem,omitempty"`
+}
+
+// FeatureInfoObject the base class Features-related response objects inherit from.
+type FeatureInfoObject struct {
+ // ID - A six-digit ID used for Features.
+ ID *int32 `json:"id,omitempty"`
+ // Name - The name of the Feature.
+ Name *string `json:"name,omitempty"`
+ // IsActive - Indicates if the feature is enabled.
+ IsActive *bool `json:"isActive,omitempty"`
+}
+
+// FeaturesResponseObject model Features, including Patterns and Phraselists.
+type FeaturesResponseObject struct {
+ autorest.Response `json:"-"`
+ PhraselistFeatures *[]PhraseListFeatureInfo `json:"phraselistFeatures,omitempty"`
+ PatternFeatures *[]PatternFeatureInfo `json:"patternFeatures,omitempty"`
+}
+
+// HierarchicalChildEntity a Hierarchical Child Entity.
+type HierarchicalChildEntity struct {
+ autorest.Response `json:"-"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType6EntityExtractor', 'ReadableType6HierarchicalEntityExtractor', 'ReadableType6HierarchicalChildEntityExtractor', 'ReadableType6CompositeEntityExtractor', 'ReadableType6ClosedListEntityExtractor', 'ReadableType6PrebuiltEntityExtractor', 'ReadableType6IntentClassifier', 'ReadableType6PatternAnyEntityExtractor', 'ReadableType6RegexEntityExtractor'
+ ReadableType ReadableType6 `json:"readableType,omitempty"`
+ // ID - The ID (GUID) belonging to a child entity.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - The name of a child entity.
+ Name *string `json:"name,omitempty"`
+}
+
+// HierarchicalChildModelCreateObject ...
+type HierarchicalChildModelCreateObject struct {
+ Name *string `json:"name,omitempty"`
+}
+
+// HierarchicalChildModelUpdateObject ...
+type HierarchicalChildModelUpdateObject struct {
+ Name *string `json:"name,omitempty"`
+}
+
+// HierarchicalEntityExtractor hierarchical Entity Extractor.
+type HierarchicalEntityExtractor struct {
+ autorest.Response `json:"-"`
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType2EntityExtractor', 'ReadableType2HierarchicalEntityExtractor', 'ReadableType2HierarchicalChildEntityExtractor', 'ReadableType2CompositeEntityExtractor', 'ReadableType2ClosedListEntityExtractor', 'ReadableType2PrebuiltEntityExtractor', 'ReadableType2IntentClassifier', 'ReadableType2PatternAnyEntityExtractor', 'ReadableType2RegexEntityExtractor'
+ ReadableType ReadableType2 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ // Children - List of child entities.
+ Children *[]ChildEntity `json:"children,omitempty"`
+}
+
+// HierarchicalEntityModel a Hierarchical Entity Extractor.
+type HierarchicalEntityModel struct {
+ // Children - Child entities.
+ Children *[]string `json:"children,omitempty"`
+ // Name - Entity name.
+ Name *string `json:"name,omitempty"`
+}
+
+// HierarchicalModel ...
+type HierarchicalModel struct {
+ Name *string `json:"name,omitempty"`
+ Children *[]string `json:"children,omitempty"`
+ Inherits *PrebuiltDomainObject `json:"inherits,omitempty"`
+ Roles *[]string `json:"roles,omitempty"`
+}
+
+// Int32 ...
+type Int32 struct {
+ autorest.Response `json:"-"`
+ Value *int32 `json:"value,omitempty"`
+}
+
+// IntentClassifier intent Classifier.
+type IntentClassifier struct {
+ autorest.Response `json:"-"`
+ // CustomPrebuiltDomainName - The domain name.
+ CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
+ // CustomPrebuiltModelName - The intent name or entity name.
+ CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegexEntityExtractor'
+ ReadableType ReadableType `json:"readableType,omitempty"`
+}
+
+// IntentPrediction a suggested intent.
+type IntentPrediction struct {
+ // Name - The intent's name
+ Name *string `json:"name,omitempty"`
+ // Score - The intent's score, based on the prediction model.
+ Score *float64 `json:"score,omitempty"`
+}
+
+// IntentsSuggestionExample predicted/suggested intent.
+type IntentsSuggestionExample struct {
+ // Text - The utterance. E.g.: what's the weather like in seattle?
+ Text *string `json:"text,omitempty"`
+ // TokenizedText - The utterance tokenized.
+ TokenizedText *[]string `json:"tokenizedText,omitempty"`
+ // IntentPredictions - Predicted/suggested intents.
+ IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"`
+ // EntityPredictions - Predicted/suggested entities.
+ EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"`
+}
+
+// JSONEntity exported Model - Extracted Entity from utterance.
+type JSONEntity struct {
+ // StartPos - The index within the utterance where the extracted entity starts.
+ StartPos *int32 `json:"startPos,omitempty"`
+ // EndPos - The index within the utterance where the extracted entity ends.
+ EndPos *int32 `json:"endPos,omitempty"`
+ // Entity - The entity name.
+ Entity *string `json:"entity,omitempty"`
+}
+
+// JSONModelFeature exported Model - Phraselist Model Feature.
+type JSONModelFeature struct {
+ // Activated - Indicates if the feature is enabled.
+ Activated *bool `json:"activated,omitempty"`
+ // Name - The Phraselist name.
+ Name *string `json:"name,omitempty"`
+ // Words - List of comma-separated phrases that represent the Phraselist.
+ Words *string `json:"words,omitempty"`
+ // Mode - An exchangeable phrase list feature are serves as single feature to the LUIS underlying training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn’t. Think of an exchangeable as a synonyms list. A non-exchangeable phrase list feature has all the phrases in the list serve as separate features to the underlying training algorithm. So, if you your phrase list feature contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable phrase list feature as an additional bag of words that you are willing to add to LUIS existing vocabulary features. Think of a non-exchangeable as set of different words. Default value is true.
+ Mode *bool `json:"mode,omitempty"`
+}
+
+// JSONRegexFeature exported Model - A Pattern feature.
+type JSONRegexFeature struct {
+ // Pattern - The Regular Expression to match.
+ Pattern *string `json:"pattern,omitempty"`
+ // Activated - Indicates if the Pattern feature is enabled.
+ Activated *bool `json:"activated,omitempty"`
+ // Name - Name of the feature.
+ Name *string `json:"name,omitempty"`
+}
+
+// JSONUtterance exported Model - Utterance that was used to train the model.
+type JSONUtterance struct {
+ // Text - The utterance.
+ Text *string `json:"text,omitempty"`
+ // Intent - The matched intent.
+ Intent *string `json:"intent,omitempty"`
+ // Entities - The matched entities.
+ Entities *[]JSONEntity `json:"entities,omitempty"`
+}
+
+// LabeledUtterance a prediction and label pair of an example.
+type LabeledUtterance struct {
+ // ID - ID of Labeled Utterance.
+ ID *int32 `json:"id,omitempty"`
+ // Text - The utterance. E.g.: what's the weather like in seattle?
+ Text *string `json:"text,omitempty"`
+ // TokenizedText - The utterance tokenized.
+ TokenizedText *[]string `json:"tokenizedText,omitempty"`
+ // IntentLabel - The intent matching the example.
+ IntentLabel *string `json:"intentLabel,omitempty"`
+ // EntityLabels - The entities matching the example.
+ EntityLabels *[]EntityLabel `json:"entityLabels,omitempty"`
+ // IntentPredictions - List of suggested intents.
+ IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"`
+ // EntityPredictions - List of suggested entities.
+ EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"`
+}
+
+// LabelExampleResponse response when adding a labeled example.
+type LabelExampleResponse struct {
+ autorest.Response `json:"-"`
+ // UtteranceText - The sample's utterance.
+ UtteranceText *string `json:"UtteranceText,omitempty"`
+ // ExampleID - The newly created sample ID.
+ ExampleID *int32 `json:"ExampleId,omitempty"`
+}
+
+// LabelTextObject an object containing the example's text.
+type LabelTextObject struct {
+ // ID - The ID of the Label.
+ ID *int32 `json:"id,omitempty"`
+ // Text - The text of the label.
+ Text *string `json:"text,omitempty"`
+}
+
+// ListApplicationInfoResponse ...
+type ListApplicationInfoResponse struct {
+ autorest.Response `json:"-"`
+ Value *[]ApplicationInfoResponse `json:"value,omitempty"`
+}
+
+// ListAvailableCulture ...
+type ListAvailableCulture struct {
+ autorest.Response `json:"-"`
+ Value *[]AvailableCulture `json:"value,omitempty"`
+}
+
+// ListAvailablePrebuiltEntityModel ...
+type ListAvailablePrebuiltEntityModel struct {
+ autorest.Response `json:"-"`
+ Value *[]AvailablePrebuiltEntityModel `json:"value,omitempty"`
+}
+
+// ListBatchLabelExample ...
+type ListBatchLabelExample struct {
+ autorest.Response `json:"-"`
+ Value *[]BatchLabelExample `json:"value,omitempty"`
+}
+
+// ListClosedListEntityExtractor ...
+type ListClosedListEntityExtractor struct {
+ autorest.Response `json:"-"`
+ Value *[]ClosedListEntityExtractor `json:"value,omitempty"`
+}
+
+// ListCompositeEntityExtractor ...
+type ListCompositeEntityExtractor struct {
+ autorest.Response `json:"-"`
+ Value *[]CompositeEntityExtractor `json:"value,omitempty"`
+}
+
+// ListCustomPrebuiltModel ...
+type ListCustomPrebuiltModel struct {
+ autorest.Response `json:"-"`
+ Value *[]CustomPrebuiltModel `json:"value,omitempty"`
+}
+
+// ListEntitiesSuggestionExample ...
+type ListEntitiesSuggestionExample struct {
+ autorest.Response `json:"-"`
+ Value *[]EntitiesSuggestionExample `json:"value,omitempty"`
+}
+
+// ListEntityExtractor ...
+type ListEntityExtractor struct {
+ autorest.Response `json:"-"`
+ Value *[]EntityExtractor `json:"value,omitempty"`
+}
+
+// ListEntityRole ...
+type ListEntityRole struct {
+ autorest.Response `json:"-"`
+ Value *[]EntityRole `json:"value,omitempty"`
+}
+
+// ListExplicitListItem ...
+type ListExplicitListItem struct {
+ autorest.Response `json:"-"`
+ Value *[]ExplicitListItem `json:"value,omitempty"`
+}
+
+// ListHierarchicalEntityExtractor ...
+type ListHierarchicalEntityExtractor struct {
+ autorest.Response `json:"-"`
+ Value *[]HierarchicalEntityExtractor `json:"value,omitempty"`
+}
+
+// ListIntentClassifier ...
+type ListIntentClassifier struct {
+ autorest.Response `json:"-"`
+ Value *[]IntentClassifier `json:"value,omitempty"`
+}
+
+// ListIntentsSuggestionExample ...
+type ListIntentsSuggestionExample struct {
+ autorest.Response `json:"-"`
+ Value *[]IntentsSuggestionExample `json:"value,omitempty"`
+}
+
+// ListLabeledUtterance ...
+type ListLabeledUtterance struct {
+ autorest.Response `json:"-"`
+ Value *[]LabeledUtterance `json:"value,omitempty"`
+}
+
+// ListLabelTextObject ...
+type ListLabelTextObject struct {
+ autorest.Response `json:"-"`
+ Value *[]LabelTextObject `json:"value,omitempty"`
+}
+
+// ListModelInfoResponse ...
+type ListModelInfoResponse struct {
+ autorest.Response `json:"-"`
+ Value *[]ModelInfoResponse `json:"value,omitempty"`
+}
+
+// ListModelTrainingInfo ...
+type ListModelTrainingInfo struct {
+ autorest.Response `json:"-"`
+ Value *[]ModelTrainingInfo `json:"value,omitempty"`
+}
+
+// ListPatternAnyEntityExtractor ...
+type ListPatternAnyEntityExtractor struct {
+ autorest.Response `json:"-"`
+ Value *[]PatternAnyEntityExtractor `json:"value,omitempty"`
+}
+
+// ListPatternRuleInfo ...
+type ListPatternRuleInfo struct {
+ autorest.Response `json:"-"`
+ Value *[]PatternRuleInfo `json:"value,omitempty"`
+}
+
+// ListPhraseListFeatureInfo ...
+type ListPhraseListFeatureInfo struct {
+ autorest.Response `json:"-"`
+ Value *[]PhraseListFeatureInfo `json:"value,omitempty"`
+}
+
+// ListPrebuiltDomain ...
+type ListPrebuiltDomain struct {
+ autorest.Response `json:"-"`
+ Value *[]PrebuiltDomain `json:"value,omitempty"`
+}
+
+// ListPrebuiltEntityExtractor ...
+type ListPrebuiltEntityExtractor struct {
+ autorest.Response `json:"-"`
+ Value *[]PrebuiltEntityExtractor `json:"value,omitempty"`
+}
+
+// ListRegexEntityExtractor ...
+type ListRegexEntityExtractor struct {
+ autorest.Response `json:"-"`
+ Value *[]RegexEntityExtractor `json:"value,omitempty"`
+}
+
+// ListString ...
+type ListString struct {
+ autorest.Response `json:"-"`
+ Value *[]string `json:"value,omitempty"`
+}
+
+// ListUUID ...
+type ListUUID struct {
+ autorest.Response `json:"-"`
+ Value *[]uuid.UUID `json:"value,omitempty"`
+}
+
+// ListVersionInfo ...
+type ListVersionInfo struct {
+ autorest.Response `json:"-"`
+ Value *[]VersionInfo `json:"value,omitempty"`
+}
+
+// LuisApp exported Model - An exported LUIS Application.
+type LuisApp struct {
+ autorest.Response `json:"-"`
+ // AdditionalProperties - Unmatched properties from the message are deserialized this collection
+ AdditionalProperties map[string]interface{} `json:""`
+ // Name - The name of the application.
+ Name *string `json:"name,omitempty"`
+ // VersionID - The version ID of the application that was exported.
+ VersionID *string `json:"versionId,omitempty"`
+ // Desc - The description of the application.
+ Desc *string `json:"desc,omitempty"`
+ // Culture - The culture of the application. E.g.: en-us.
+ Culture *string `json:"culture,omitempty"`
+ // Intents - List of intents.
+ Intents *[]HierarchicalModel `json:"intents,omitempty"`
+ // Entities - List of entities.
+ Entities *[]HierarchicalModel `json:"entities,omitempty"`
+ // ClosedLists - List of closed lists.
+ ClosedLists *[]ClosedList `json:"closedLists,omitempty"`
+ // Composites - List of composite entities.
+ Composites *[]HierarchicalModel `json:"composites,omitempty"`
+ // PatternAnyEntities - List of Pattern.Any entities.
+ PatternAnyEntities *[]PatternAny `json:"patternAnyEntities,omitempty"`
+ // RegexEntities - List of regular expression entities.
+ RegexEntities *[]RegexEntity `json:"regex_entities,omitempty"`
+ // PrebuiltEntities - List of prebuilt entities.
+ PrebuiltEntities *[]PrebuiltEntity `json:"prebuiltEntities,omitempty"`
+ // RegexFeatures - List of pattern features.
+ RegexFeatures *[]JSONRegexFeature `json:"regex_features,omitempty"`
+ // ModelFeatures - List of model features.
+ ModelFeatures *[]JSONModelFeature `json:"model_features,omitempty"`
+ // Patterns - List of patterns.
+ Patterns *[]PatternRule `json:"patterns,omitempty"`
+ // Utterances - List of sample utterances.
+ Utterances *[]JSONUtterance `json:"utterances,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LuisApp.
+func (la LuisApp) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if la.Name != nil {
+ objectMap["name"] = la.Name
+ }
+ if la.VersionID != nil {
+ objectMap["versionId"] = la.VersionID
+ }
+ if la.Desc != nil {
+ objectMap["desc"] = la.Desc
+ }
+ if la.Culture != nil {
+ objectMap["culture"] = la.Culture
+ }
+ if la.Intents != nil {
+ objectMap["intents"] = la.Intents
+ }
+ if la.Entities != nil {
+ objectMap["entities"] = la.Entities
+ }
+ if la.ClosedLists != nil {
+ objectMap["closedLists"] = la.ClosedLists
+ }
+ if la.Composites != nil {
+ objectMap["composites"] = la.Composites
+ }
+ if la.PatternAnyEntities != nil {
+ objectMap["patternAnyEntities"] = la.PatternAnyEntities
+ }
+ if la.RegexEntities != nil {
+ objectMap["regex_entities"] = la.RegexEntities
+ }
+ if la.PrebuiltEntities != nil {
+ objectMap["prebuiltEntities"] = la.PrebuiltEntities
+ }
+ if la.RegexFeatures != nil {
+ objectMap["regex_features"] = la.RegexFeatures
+ }
+ if la.ModelFeatures != nil {
+ objectMap["model_features"] = la.ModelFeatures
+ }
+ if la.Patterns != nil {
+ objectMap["patterns"] = la.Patterns
+ }
+ if la.Utterances != nil {
+ objectMap["utterances"] = la.Utterances
+ }
+ for k, v := range la.AdditionalProperties {
+ objectMap[k] = v
+ }
+ return json.Marshal(objectMap)
+}
+
+// ModelCreateObject object model for creating a new entity extractor.
+type ModelCreateObject struct {
+ // Name - Name of the new entity extractor.
+ Name *string `json:"name,omitempty"`
+}
+
+// ModelInfo base type used in entity types.
+type ModelInfo struct {
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegexEntityExtractor'
+ ReadableType ReadableType `json:"readableType,omitempty"`
+}
+
+// ModelInfoResponse an application model info.
+type ModelInfoResponse struct {
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType1EntityExtractor', 'ReadableType1HierarchicalEntityExtractor', 'ReadableType1HierarchicalChildEntityExtractor', 'ReadableType1CompositeEntityExtractor', 'ReadableType1ClosedListEntityExtractor', 'ReadableType1PrebuiltEntityExtractor', 'ReadableType1IntentClassifier', 'ReadableType1PatternAnyEntityExtractor', 'ReadableType1RegexEntityExtractor'
+ ReadableType ReadableType1 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ // Children - List of child entities.
+ Children *[]ChildEntity `json:"children,omitempty"`
+ // SubLists - List of sub-lists.
+ SubLists *[]SubClosedListResponse `json:"subLists,omitempty"`
+ // CustomPrebuiltDomainName - The domain name.
+ CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
+ // CustomPrebuiltModelName - The intent name or entity name.
+ CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
+ // RegexPattern - The Regex entity pattern.
+ RegexPattern *string `json:"regexPattern,omitempty"`
+ ExplicitList *[]ExplicitListItem `json:"explicitList,omitempty"`
+}
+
+// ModelTrainingDetails model Training Details.
+type ModelTrainingDetails struct {
+ // StatusID - The train request status ID.
+ StatusID *int32 `json:"statusId,omitempty"`
+ // Status - Possible values include: 'Status1Queued', 'Status1InProgress', 'Status1UpToDate', 'Status1Fail', 'Status1Success'
+ Status Status1 `json:"status,omitempty"`
+ // ExampleCount - The count of examples used to train the model.
+ ExampleCount *int32 `json:"exampleCount,omitempty"`
+ // TrainingDateTime - When the model was trained.
+ TrainingDateTime *date.Time `json:"trainingDateTime,omitempty"`
+ // FailureReason - Reason for the training failure.
+ FailureReason *string `json:"failureReason,omitempty"`
+}
+
+// ModelTrainingInfo model Training Info.
+type ModelTrainingInfo struct {
+ // ModelID - The ID (GUID) of the model.
+ ModelID *uuid.UUID `json:"modelId,omitempty"`
+ Details *ModelTrainingDetails `json:"details,omitempty"`
+}
+
+// ModelUpdateObject object model for updating an intent classifier.
+type ModelUpdateObject struct {
+ // Name - The entity's new name.
+ Name *string `json:"name,omitempty"`
+}
+
+// OperationError operation error details when invoking an operation on the API.
+type OperationError struct {
+ Code *string `json:"code,omitempty"`
+ Message *string `json:"message,omitempty"`
+}
+
+// OperationStatus response of an Operation status.
+type OperationStatus struct {
+ autorest.Response `json:"-"`
+ // Code - Status Code. Possible values include: 'Failed', 'FAILED', 'Success'
+ Code OperationStatusType `json:"code,omitempty"`
+ // Message - Status details.
+ Message *string `json:"message,omitempty"`
+}
+
+// PatternAny pattern.Any Entity Extractor.
+type PatternAny struct {
+ Name *string `json:"name,omitempty"`
+ ExplicitList *[]string `json:"explicitList,omitempty"`
+ Roles *[]string `json:"roles,omitempty"`
+}
+
+// PatternAnyEntityExtractor pattern.Any Entity Extractor.
+type PatternAnyEntityExtractor struct {
+ autorest.Response `json:"-"`
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType10EntityExtractor', 'ReadableType10HierarchicalEntityExtractor', 'ReadableType10HierarchicalChildEntityExtractor', 'ReadableType10CompositeEntityExtractor', 'ReadableType10ClosedListEntityExtractor', 'ReadableType10PrebuiltEntityExtractor', 'ReadableType10IntentClassifier', 'ReadableType10PatternAnyEntityExtractor', 'ReadableType10RegexEntityExtractor'
+ ReadableType ReadableType10 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ ExplicitList *[]ExplicitListItem `json:"explicitList,omitempty"`
+}
+
+// PatternAnyModelCreateObject model object for creating a Pattern.Any entity model.
+type PatternAnyModelCreateObject struct {
+ // Name - The model name.
+ Name *string `json:"name,omitempty"`
+ // ExplicitList - The Pattern.Any explicit list.
+ ExplicitList *[]string `json:"explicitList,omitempty"`
+}
+
+// PatternAnyModelUpdateObject model object for updating a Pattern.Any entity model.
+type PatternAnyModelUpdateObject struct {
+ // Name - The model name.
+ Name *string `json:"name,omitempty"`
+ // ExplicitList - The Pattern.Any explicit list.
+ ExplicitList *[]string `json:"explicitList,omitempty"`
+}
+
+// PatternCreateObject object model for creating a Pattern feature.
+type PatternCreateObject struct {
+ // Pattern - The Regular Expression to match.
+ Pattern *string `json:"pattern,omitempty"`
+ // Name - Name of the feature.
+ Name *string `json:"name,omitempty"`
+}
+
+// PatternFeatureInfo pattern feature.
+type PatternFeatureInfo struct {
+ // Pattern - The Regular Expression to match.
+ Pattern *string `json:"pattern,omitempty"`
+ // ID - A six-digit ID used for Features.
+ ID *int32 `json:"id,omitempty"`
+ // Name - The name of the Feature.
+ Name *string `json:"name,omitempty"`
+ // IsActive - Indicates if the feature is enabled.
+ IsActive *bool `json:"isActive,omitempty"`
+}
+
+// PatternRule pattern
+type PatternRule struct {
+ // Pattern - The pattern text.
+ Pattern *string `json:"pattern,omitempty"`
+ // Intent - The intent's name where the pattern belongs to.
+ Intent *string `json:"intent,omitempty"`
+}
+
+// PatternRuleCreateObject object model for creating a pattern
+type PatternRuleCreateObject struct {
+ // Pattern - The pattern text.
+ Pattern *string `json:"pattern,omitempty"`
+ // Intent - The intent's name which the pattern belongs to.
+ Intent *string `json:"intent,omitempty"`
+}
+
+// PatternRuleInfo pattern rule
+type PatternRuleInfo struct {
+ autorest.Response `json:"-"`
+ // ID - The pattern ID.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Pattern - The pattern text.
+ Pattern *string `json:"pattern,omitempty"`
+ // Intent - The intent's name where the pattern belongs to.
+ Intent *string `json:"intent,omitempty"`
+}
+
+// PatternRuleUpdateObject object model for updating a pattern.
+type PatternRuleUpdateObject struct {
+ // ID - The pattern ID.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Pattern - The pattern text.
+ Pattern *string `json:"pattern,omitempty"`
+ // Intent - The intent's name which the pattern belongs to.
+ Intent *string `json:"intent,omitempty"`
+}
+
+// PatternUpdateObject object model for updating an existing Pattern feature.
+type PatternUpdateObject struct {
+ // Pattern - The Regular Expression to match.
+ Pattern *string `json:"pattern,omitempty"`
+ // Name - Name of the feature.
+ Name *string `json:"name,omitempty"`
+ // IsActive - Indicates if the Pattern feature is enabled.
+ IsActive *bool `json:"isActive,omitempty"`
+}
+
+// PersonalAssistantsResponse response containing user's endpoint keys and the endpoint URLs of the prebuilt
+// Cortana applications.
+type PersonalAssistantsResponse struct {
+ autorest.Response `json:"-"`
+ EndpointKeys *[]uuid.UUID `json:"endpointKeys,omitempty"`
+ EndpointUrls map[string]*string `json:"endpointUrls"`
+}
+
+// MarshalJSON is the custom marshaler for PersonalAssistantsResponse.
+func (par PersonalAssistantsResponse) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if par.EndpointKeys != nil {
+ objectMap["endpointKeys"] = par.EndpointKeys
+ }
+ if par.EndpointUrls != nil {
+ objectMap["endpointUrls"] = par.EndpointUrls
+ }
+ return json.Marshal(objectMap)
+}
+
+// PhraselistCreateObject object model for creating a phraselist model.
+type PhraselistCreateObject struct {
+ // Phrases - List of comma-separated phrases that represent the Phraselist.
+ Phrases *string `json:"phrases,omitempty"`
+ // Name - The Phraselist name.
+ Name *string `json:"name,omitempty"`
+ // IsExchangeable - An exchangeable phrase list feature are serves as single feature to the LUIS underlying training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn’t. Think of an exchangeable as a synonyms list. A non-exchangeable phrase list feature has all the phrases in the list serve as separate features to the underlying training algorithm. So, if you your phrase list feature contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable phrase list feature as an additional bag of words that you are willing to add to LUIS existing vocabulary features. Think of a non-exchangeable as set of different words. Default value is true.
+ IsExchangeable *bool `json:"isExchangeable,omitempty"`
+}
+
+// PhraseListFeatureInfo phraselist Feature.
+type PhraseListFeatureInfo struct {
+ autorest.Response `json:"-"`
+ // Phrases - A list of comma-separated values.
+ Phrases *string `json:"phrases,omitempty"`
+ // IsExchangeable - An exchangeable phrase list feature are serves as single feature to the LUIS underlying training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn’t. Think of an exchangeable as a synonyms list. A non-exchangeable phrase list feature has all the phrases in the list serve as separate features to the underlying training algorithm. So, if you your phrase list feature contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable phrase list feature as an additional bag of words that you are willing to add to LUIS existing vocabulary features. Think of a non-exchangeable as set of different words. Default value is true.
+ IsExchangeable *bool `json:"isExchangeable,omitempty"`
+ // ID - A six-digit ID used for Features.
+ ID *int32 `json:"id,omitempty"`
+ // Name - The name of the Feature.
+ Name *string `json:"name,omitempty"`
+ // IsActive - Indicates if the feature is enabled.
+ IsActive *bool `json:"isActive,omitempty"`
+}
+
+// PhraselistUpdateObject object model for updating a Phraselist.
+type PhraselistUpdateObject struct {
+ // Phrases - List of comma-separated phrases that represent the Phraselist.
+ Phrases *string `json:"phrases,omitempty"`
+ // Name - The Phraselist name.
+ Name *string `json:"name,omitempty"`
+ // IsActive - Indicates if the Phraselist is enabled.
+ IsActive *bool `json:"isActive,omitempty"`
+ // IsExchangeable - An exchangeable phrase list feature are serves as single feature to the LUIS underlying training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn’t. Think of an exchangeable as a synonyms list. A non-exchangeable phrase list feature has all the phrases in the list serve as separate features to the underlying training algorithm. So, if you your phrase list feature contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable phrase list feature as an additional bag of words that you are willing to add to LUIS existing vocabulary features. Think of a non-exchangeable as set of different words. Default value is true.
+ IsExchangeable *bool `json:"isExchangeable,omitempty"`
+}
+
+// PrebuiltDomain prebuilt Domain.
+type PrebuiltDomain struct {
+ Name *string `json:"name,omitempty"`
+ Culture *string `json:"culture,omitempty"`
+ Description *string `json:"description,omitempty"`
+ Examples *string `json:"examples,omitempty"`
+ Intents *[]PrebuiltDomainItem `json:"intents,omitempty"`
+ Entities *[]PrebuiltDomainItem `json:"entities,omitempty"`
+}
+
+// PrebuiltDomainCreateBaseObject a model object containing the name of the custom prebuilt entity and the name of
+// the domain to which this model belongs.
+type PrebuiltDomainCreateBaseObject struct {
+ // DomainName - The domain name.
+ DomainName *string `json:"domainName,omitempty"`
+}
+
+// PrebuiltDomainCreateObject a prebuilt domain create object containing the name and culture of the domain.
+type PrebuiltDomainCreateObject struct {
+ // DomainName - The domain name.
+ DomainName *string `json:"domainName,omitempty"`
+ // Culture - The culture of the new domain.
+ Culture *string `json:"culture,omitempty"`
+}
+
+// PrebuiltDomainItem ...
+type PrebuiltDomainItem struct {
+ Name *string `json:"name,omitempty"`
+ Description *string `json:"description,omitempty"`
+ Examples *string `json:"examples,omitempty"`
+}
+
+// PrebuiltDomainModelCreateObject a model object containing the name of the custom prebuilt intent or entity and
+// the name of the domain to which this model belongs.
+type PrebuiltDomainModelCreateObject struct {
+ // DomainName - The domain name.
+ DomainName *string `json:"domainName,omitempty"`
+ // ModelName - The intent name or entity name.
+ ModelName *string `json:"modelName,omitempty"`
+}
+
+// PrebuiltDomainObject ...
+type PrebuiltDomainObject struct {
+ DomainName *string `json:"domain_name,omitempty"`
+ ModelName *string `json:"model_name,omitempty"`
+}
+
+// PrebuiltEntity prebuilt Entity Extractor.
+type PrebuiltEntity struct {
+ Name *string `json:"name,omitempty"`
+ Roles *[]string `json:"roles,omitempty"`
+}
+
+// PrebuiltEntityExtractor prebuilt Entity Extractor.
+type PrebuiltEntityExtractor struct {
+ autorest.Response `json:"-"`
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType5EntityExtractor', 'ReadableType5HierarchicalEntityExtractor', 'ReadableType5HierarchicalChildEntityExtractor', 'ReadableType5CompositeEntityExtractor', 'ReadableType5ClosedListEntityExtractor', 'ReadableType5PrebuiltEntityExtractor', 'ReadableType5IntentClassifier', 'ReadableType5PatternAnyEntityExtractor', 'ReadableType5RegexEntityExtractor'
+ ReadableType ReadableType5 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+}
+
+// ProductionOrStagingEndpointInfo ...
+type ProductionOrStagingEndpointInfo struct {
+ autorest.Response `json:"-"`
+ // VersionID - The version ID to publish.
+ VersionID *string `json:"versionId,omitempty"`
+ // IsStaging - Indicates if the staging slot should be used, instead of the Production one.
+ IsStaging *bool `json:"isStaging,omitempty"`
+ // EndpointURL - The Runtime endpoint URL for this model version.
+ EndpointURL *string `json:"endpointUrl,omitempty"`
+ // Region - The target region that the application is published to.
+ Region *string `json:"region,omitempty"`
+ // AssignedEndpointKey - The endpoint key.
+ AssignedEndpointKey *string `json:"assignedEndpointKey,omitempty"`
+ // EndpointRegion - The endpoint's region.
+ EndpointRegion *string `json:"endpointRegion,omitempty"`
+ // PublishedDateTime - Timestamp when was last published.
+ PublishedDateTime *string `json:"publishedDateTime,omitempty"`
+}
+
+// PublishSettings the application publish settings.
+type PublishSettings struct {
+ autorest.Response `json:"-"`
+ // ID - The application ID.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // IsSentimentAnalysisEnabled - Setting sentiment analysis as true returns the Sentiment of the input utterance along with the resopnse
+ IsSentimentAnalysisEnabled *bool `json:"sentimentAnalysis,omitempty"`
+ // IsSpeechEnabled - Setting speech as public enables speech priming in your app
+ IsSpeechEnabled *bool `json:"speech,omitempty"`
+ // IsSpellCheckerEnabled - Setting spell checker as public enables spell checking the input utterance.
+ IsSpellCheckerEnabled *bool `json:"spellChecker,omitempty"`
+}
+
+// PublishSettingUpdateObject object model for updating an application's publish settings.
+type PublishSettingUpdateObject struct {
+ // SentimentAnalysis - Setting sentiment analysis as true returns the Sentiment of the input utterance along with the resopnse
+ SentimentAnalysis *bool `json:"sentimentAnalysis,omitempty"`
+ // Speech - Setting speech as public enables speech priming in your app
+ Speech *bool `json:"speech,omitempty"`
+ // SpellChecker - Setting spell checker as public enables spell checking the input utterance.
+ SpellChecker *bool `json:"spellChecker,omitempty"`
+}
+
+// ReadCloser ...
+type ReadCloser struct {
+ autorest.Response `json:"-"`
+ Value *io.ReadCloser `json:"value,omitempty"`
+}
+
+// RegexEntity regular Expression Entity Extractor.
+type RegexEntity struct {
+ Name *string `json:"name,omitempty"`
+ RegexPattern *string `json:"regexPattern,omitempty"`
+ Roles *[]string `json:"roles,omitempty"`
+}
+
+// RegexEntityExtractor regex Entity Extractor.
+type RegexEntityExtractor struct {
+ autorest.Response `json:"-"`
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType9EntityExtractor', 'ReadableType9HierarchicalEntityExtractor', 'ReadableType9HierarchicalChildEntityExtractor', 'ReadableType9CompositeEntityExtractor', 'ReadableType9ClosedListEntityExtractor', 'ReadableType9PrebuiltEntityExtractor', 'ReadableType9IntentClassifier', 'ReadableType9PatternAnyEntityExtractor', 'ReadableType9RegexEntityExtractor'
+ ReadableType ReadableType9 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ // RegexPattern - The Regex entity pattern.
+ RegexPattern *string `json:"regexPattern,omitempty"`
+}
+
+// RegexModelCreateObject model object for creating a regex entity model.
+type RegexModelCreateObject struct {
+ // RegexPattern - The regex entity pattern.
+ RegexPattern *string `json:"regexPattern,omitempty"`
+ // Name - The model name.
+ Name *string `json:"name,omitempty"`
+}
+
+// RegexModelUpdateObject model object for updating a regex entity model.
+type RegexModelUpdateObject struct {
+ // RegexPattern - The regex entity pattern.
+ RegexPattern *string `json:"regexPattern,omitempty"`
+ // Name - The model name.
+ Name *string `json:"name,omitempty"`
+}
+
+// SetString ...
+type SetString struct {
+ autorest.Response `json:"-"`
+ Value map[string]*string `json:"value"`
+}
+
+// MarshalJSON is the custom marshaler for SetString.
+func (ss SetString) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ss.Value != nil {
+ objectMap["value"] = ss.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// String ...
+type String struct {
+ autorest.Response `json:"-"`
+ Value *string `json:"value,omitempty"`
+}
+
+// SubClosedList sublist of items for a Closed list.
+type SubClosedList struct {
+ // CanonicalForm - The standard form that the list represents.
+ CanonicalForm *string `json:"canonicalForm,omitempty"`
+ // List - List of synonym words.
+ List *[]string `json:"list,omitempty"`
+}
+
+// SubClosedListResponse sublist of items for a Closed list.
+type SubClosedListResponse struct {
+ // ID - The sublist ID
+ ID *int32 `json:"id,omitempty"`
+ // CanonicalForm - The standard form that the list represents.
+ CanonicalForm *string `json:"canonicalForm,omitempty"`
+ // List - List of synonym words.
+ List *[]string `json:"list,omitempty"`
+}
+
+// TaskUpdateObject object model for cloning an application's version.
+type TaskUpdateObject struct {
+ // Version - The new version for the cloned model.
+ Version *string `json:"version,omitempty"`
+}
+
+// UserAccessList list of user permissions.
+type UserAccessList struct {
+ autorest.Response `json:"-"`
+ // Owner - The email address of owner of the application.
+ Owner *string `json:"owner,omitempty"`
+ Emails *[]string `json:"emails,omitempty"`
+}
+
+// UserCollaborator ...
+type UserCollaborator struct {
+ // Email - The email address of the user.
+ Email *string `json:"email,omitempty"`
+}
+
+// UUID ...
+type UUID struct {
+ autorest.Response `json:"-"`
+ Value *uuid.UUID `json:"value,omitempty"`
+}
+
+// VersionInfo object model of an application version.
+type VersionInfo struct {
+ autorest.Response `json:"-"`
+ // Version - The version ID. E.g.: "0.1"
+ Version *string `json:"version,omitempty"`
+ // CreatedDateTime - The version's creation timestamp.
+ CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
+ // LastModifiedDateTime - Timestamp of the last update.
+ LastModifiedDateTime *date.Time `json:"lastModifiedDateTime,omitempty"`
+ // LastTrainedDateTime - Timestamp of the last time the model was trained.
+ LastTrainedDateTime *date.Time `json:"lastTrainedDateTime,omitempty"`
+ // LastPublishedDateTime - Timestamp when was last published.
+ LastPublishedDateTime *date.Time `json:"lastPublishedDateTime,omitempty"`
+ // EndpointURL - The Runtime endpoint URL for this model version.
+ EndpointURL *string `json:"endpointUrl,omitempty"`
+ // AssignedEndpointKey - The endpoint key.
+ AssignedEndpointKey map[string]*string `json:"assignedEndpointKey"`
+ // ExternalAPIKeys - External keys.
+ ExternalAPIKeys interface{} `json:"externalApiKeys,omitempty"`
+ // IntentsCount - Number of intents in this model.
+ IntentsCount *int32 `json:"intentsCount,omitempty"`
+ // EntitiesCount - Number of entities in this model.
+ EntitiesCount *int32 `json:"entitiesCount,omitempty"`
+ // EndpointHitsCount - Number of calls made to this endpoint.
+ EndpointHitsCount *int32 `json:"endpointHitsCount,omitempty"`
+ // TrainingStatus - The current training status. Possible values include: 'NeedsTraining', 'InProgress', 'Trained'
+ TrainingStatus TrainingStatus `json:"trainingStatus,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VersionInfo.
+func (vi VersionInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vi.Version != nil {
+ objectMap["version"] = vi.Version
+ }
+ if vi.CreatedDateTime != nil {
+ objectMap["createdDateTime"] = vi.CreatedDateTime
+ }
+ if vi.LastModifiedDateTime != nil {
+ objectMap["lastModifiedDateTime"] = vi.LastModifiedDateTime
+ }
+ if vi.LastTrainedDateTime != nil {
+ objectMap["lastTrainedDateTime"] = vi.LastTrainedDateTime
+ }
+ if vi.LastPublishedDateTime != nil {
+ objectMap["lastPublishedDateTime"] = vi.LastPublishedDateTime
+ }
+ if vi.EndpointURL != nil {
+ objectMap["endpointUrl"] = vi.EndpointURL
+ }
+ if vi.AssignedEndpointKey != nil {
+ objectMap["assignedEndpointKey"] = vi.AssignedEndpointKey
+ }
+ objectMap["externalApiKeys"] = vi.ExternalAPIKeys
+ if vi.IntentsCount != nil {
+ objectMap["intentsCount"] = vi.IntentsCount
+ }
+ if vi.EntitiesCount != nil {
+ objectMap["entitiesCount"] = vi.EntitiesCount
+ }
+ if vi.EndpointHitsCount != nil {
+ objectMap["endpointHitsCount"] = vi.EndpointHitsCount
+ }
+ if vi.TrainingStatus != "" {
+ objectMap["trainingStatus"] = vi.TrainingStatus
+ }
+ return json.Marshal(objectMap)
+}
+
+// WordListBaseUpdateObject object model for updating one of the closed list's sublists.
+type WordListBaseUpdateObject struct {
+ // CanonicalForm - The standard form that the list represents.
+ CanonicalForm *string `json:"canonicalForm,omitempty"`
+ // List - List of synonym words.
+ List *[]string `json:"list,omitempty"`
+}
+
+// WordListObject sublist of items for a Closed list.
+type WordListObject struct {
+ // CanonicalForm - The standard form that the list represents.
+ CanonicalForm *string `json:"canonicalForm,omitempty"`
+ // List - List of synonym words.
+ List *[]string `json:"list,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/pattern.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/pattern.go
new file mode 100644
index 000000000..b96539d0a
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/pattern.go
@@ -0,0 +1,642 @@
+package authoring
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// PatternClient is the client for the Pattern methods of the Authoring service.
+type PatternClient struct {
+ BaseClient
+}
+
+// NewPatternClient creates an instance of the PatternClient client.
+func NewPatternClient(azureRegion AzureRegions) PatternClient {
+ return PatternClient{New(azureRegion)}
+}
+
+// AddPattern sends the add pattern request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// pattern - the input pattern.
+func (client PatternClient) AddPattern(ctx context.Context, appID uuid.UUID, versionID string, pattern PatternRuleCreateObject) (result PatternRuleInfo, err error) {
+ req, err := client.AddPatternPreparer(ctx, appID, versionID, pattern)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "AddPattern", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddPatternSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "AddPattern", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddPatternResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "AddPattern", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddPatternPreparer prepares the AddPattern request.
+func (client PatternClient) AddPatternPreparer(ctx context.Context, appID uuid.UUID, versionID string, pattern PatternRuleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrule", pathParameters),
+ autorest.WithJSON(pattern))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddPatternSender sends the AddPattern request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) AddPatternSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddPatternResponder handles the response to the AddPattern request. The method always
+// closes the http.Response Body.
+func (client PatternClient) AddPatternResponder(resp *http.Response) (result PatternRuleInfo, 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
+}
+
+// BatchAddPatterns sends the batch add patterns request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// patterns - a JSON array containing patterns.
+func (client PatternClient) BatchAddPatterns(ctx context.Context, appID uuid.UUID, versionID string, patterns []PatternRuleCreateObject) (result ListPatternRuleInfo, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: patterns,
+ Constraints: []validation.Constraint{{Target: "patterns", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("authoring.PatternClient", "BatchAddPatterns", err.Error())
+ }
+
+ req, err := client.BatchAddPatternsPreparer(ctx, appID, versionID, patterns)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "BatchAddPatterns", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.BatchAddPatternsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "BatchAddPatterns", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.BatchAddPatternsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "BatchAddPatterns", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// BatchAddPatternsPreparer prepares the BatchAddPatterns request.
+func (client PatternClient) BatchAddPatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, patterns []PatternRuleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters),
+ autorest.WithJSON(patterns))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// BatchAddPatternsSender sends the BatchAddPatterns request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) BatchAddPatternsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// BatchAddPatternsResponder handles the response to the BatchAddPatterns request. The method always
+// closes the http.Response Body.
+func (client PatternClient) BatchAddPatternsResponder(resp *http.Response) (result ListPatternRuleInfo, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeletePattern sends the delete pattern request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// patternID - the pattern ID.
+func (client PatternClient) DeletePattern(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeletePatternPreparer(ctx, appID, versionID, patternID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "DeletePattern", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeletePatternSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "DeletePattern", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeletePatternResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "DeletePattern", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePatternPreparer prepares the DeletePattern request.
+func (client PatternClient) DeletePatternPreparer(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "patternId": autorest.Encode("path", patternID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules/{patternId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeletePatternSender sends the DeletePattern request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) DeletePatternSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeletePatternResponder handles the response to the DeletePattern request. The method always
+// closes the http.Response Body.
+func (client PatternClient) DeletePatternResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeletePatterns sends the delete patterns request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// patternIds - the patterns IDs.
+func (client PatternClient) DeletePatterns(ctx context.Context, appID uuid.UUID, versionID string, patternIds []uuid.UUID) (result OperationStatus, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: patternIds,
+ Constraints: []validation.Constraint{{Target: "patternIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("authoring.PatternClient", "DeletePatterns", err.Error())
+ }
+
+ req, err := client.DeletePatternsPreparer(ctx, appID, versionID, patternIds)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "DeletePatterns", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeletePatternsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "DeletePatterns", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeletePatternsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "DeletePatterns", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePatternsPreparer prepares the DeletePatterns request.
+func (client PatternClient) DeletePatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, patternIds []uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters),
+ autorest.WithJSON(patternIds))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeletePatternsSender sends the DeletePatterns request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) DeletePatternsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeletePatternsResponder handles the response to the DeletePatterns request. The method always
+// closes the http.Response Body.
+func (client PatternClient) DeletePatternsResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetIntentPatterns sends the get intent patterns request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// intentID - the intent classifier ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client PatternClient) GetIntentPatterns(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, skip *int32, take *int32) (result ListPatternRuleInfo, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.PatternClient", "GetIntentPatterns", err.Error())
+ }
+
+ req, err := client.GetIntentPatternsPreparer(ctx, appID, versionID, intentID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "GetIntentPatterns", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetIntentPatternsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "GetIntentPatterns", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetIntentPatternsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "GetIntentPatterns", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetIntentPatternsPreparer prepares the GetIntentPatterns request.
+func (client PatternClient) GetIntentPatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "intentId": autorest.Encode("path", intentID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/patternrules", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetIntentPatternsSender sends the GetIntentPatterns request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) GetIntentPatternsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetIntentPatternsResponder handles the response to the GetIntentPatterns request. The method always
+// closes the http.Response Body.
+func (client PatternClient) GetIntentPatternsResponder(resp *http.Response) (result ListPatternRuleInfo, 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
+}
+
+// GetPatterns sends the get patterns request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client PatternClient) GetPatterns(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPatternRuleInfo, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.PatternClient", "GetPatterns", err.Error())
+ }
+
+ req, err := client.GetPatternsPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "GetPatterns", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPatternsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "GetPatterns", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPatternsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "GetPatterns", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPatternsPreparer prepares the GetPatterns request.
+func (client PatternClient) GetPatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPatternsSender sends the GetPatterns request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) GetPatternsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPatternsResponder handles the response to the GetPatterns request. The method always
+// closes the http.Response Body.
+func (client PatternClient) GetPatternsResponder(resp *http.Response) (result ListPatternRuleInfo, 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
+}
+
+// UpdatePattern sends the update pattern request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// patternID - the pattern ID.
+// pattern - an object representing a pattern.
+func (client PatternClient) UpdatePattern(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID, pattern PatternRuleUpdateObject) (result PatternRuleInfo, err error) {
+ req, err := client.UpdatePatternPreparer(ctx, appID, versionID, patternID, pattern)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "UpdatePattern", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdatePatternSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "UpdatePattern", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdatePatternResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "UpdatePattern", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePatternPreparer prepares the UpdatePattern request.
+func (client PatternClient) UpdatePatternPreparer(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID, pattern PatternRuleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "patternId": autorest.Encode("path", patternID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules/{patternId}", pathParameters),
+ autorest.WithJSON(pattern))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdatePatternSender sends the UpdatePattern request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) UpdatePatternSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdatePatternResponder handles the response to the UpdatePattern request. The method always
+// closes the http.Response Body.
+func (client PatternClient) UpdatePatternResponder(resp *http.Response) (result PatternRuleInfo, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdatePatterns sends the update patterns request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// patterns - an array represents the patterns.
+func (client PatternClient) UpdatePatterns(ctx context.Context, appID uuid.UUID, versionID string, patterns []PatternRuleUpdateObject) (result ListPatternRuleInfo, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: patterns,
+ Constraints: []validation.Constraint{{Target: "patterns", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("authoring.PatternClient", "UpdatePatterns", err.Error())
+ }
+
+ req, err := client.UpdatePatternsPreparer(ctx, appID, versionID, patterns)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "UpdatePatterns", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdatePatternsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "UpdatePatterns", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdatePatternsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PatternClient", "UpdatePatterns", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePatternsPreparer prepares the UpdatePatterns request.
+func (client PatternClient) UpdatePatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, patterns []PatternRuleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters),
+ autorest.WithJSON(patterns))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdatePatternsSender sends the UpdatePatterns request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) UpdatePatternsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdatePatternsResponder handles the response to the UpdatePatterns request. The method always
+// closes the http.Response Body.
+func (client PatternClient) UpdatePatternsResponder(resp *http.Response) (result ListPatternRuleInfo, 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/services/cognitiveservices/v2.0/luis/authoring/permissions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/permissions.go
new file mode 100644
index 000000000..c0c6d10f5
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/permissions.go
@@ -0,0 +1,296 @@
+package authoring
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// PermissionsClient is the client for the Permissions methods of the Authoring service.
+type PermissionsClient struct {
+ BaseClient
+}
+
+// NewPermissionsClient creates an instance of the PermissionsClient client.
+func NewPermissionsClient(azureRegion AzureRegions) PermissionsClient {
+ return PermissionsClient{New(azureRegion)}
+}
+
+// Add adds a user to the allowed list of users to access this LUIS application. Users are added using their email
+// address.
+// Parameters:
+// appID - the application ID.
+// userToAdd - a model containing the user's email address.
+func (client PermissionsClient) Add(ctx context.Context, appID uuid.UUID, userToAdd UserCollaborator) (result OperationStatus, err error) {
+ req, err := client.AddPreparer(ctx, appID, userToAdd)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "Add", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "Add", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "Add", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddPreparer prepares the Add request.
+func (client PermissionsClient) AddPreparer(ctx context.Context, appID uuid.UUID, userToAdd UserCollaborator) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters),
+ autorest.WithJSON(userToAdd))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddSender sends the Add request. The method will close the
+// http.Response Body if it receives an error.
+func (client PermissionsClient) AddSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddResponder handles the response to the Add request. The method always
+// closes the http.Response Body.
+func (client PermissionsClient) AddResponder(resp *http.Response) (result OperationStatus, 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 a user from the allowed list of users to access this LUIS application. Users are removed using their
+// email address.
+// Parameters:
+// appID - the application ID.
+// userToDelete - a model containing the user's email address.
+func (client PermissionsClient) Delete(ctx context.Context, appID uuid.UUID, userToDelete UserCollaborator) (result OperationStatus, err error) {
+ req, err := client.DeletePreparer(ctx, appID, userToDelete)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client PermissionsClient) DeletePreparer(ctx context.Context, appID uuid.UUID, userToDelete UserCollaborator) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters),
+ autorest.WithJSON(userToDelete))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client PermissionsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client PermissionsClient) DeleteResponder(resp *http.Response) (result OperationStatus, 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 list of user emails that have permissions to access your application.
+// Parameters:
+// appID - the application ID.
+func (client PermissionsClient) List(ctx context.Context, appID uuid.UUID) (result UserAccessList, err error) {
+ req, err := client.ListPreparer(ctx, appID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client PermissionsClient) ListPreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client PermissionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client PermissionsClient) ListResponder(resp *http.Response) (result UserAccessList, 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 replaces the current users access list with the one sent in the body. If an empty list is sent, all access to
+// other users will be removed.
+// Parameters:
+// appID - the application ID.
+// collaborators - a model containing a list of user's email addresses.
+func (client PermissionsClient) Update(ctx context.Context, appID uuid.UUID, collaborators CollaboratorsArray) (result OperationStatus, err error) {
+ req, err := client.UpdatePreparer(ctx, appID, collaborators)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client PermissionsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID, collaborators CollaboratorsArray) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters),
+ autorest.WithJSON(collaborators))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client PermissionsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client PermissionsClient) UpdateResponder(resp *http.Response) (result OperationStatus, 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/services/cognitiveservices/v2.0/luis/authoring/train.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/train.go
new file mode 100644
index 000000000..22b72ce47
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/train.go
@@ -0,0 +1,170 @@
+package authoring
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// TrainClient is the client for the Train methods of the Authoring service.
+type TrainClient struct {
+ BaseClient
+}
+
+// NewTrainClient creates an instance of the TrainClient client.
+func NewTrainClient(azureRegion AzureRegions) TrainClient {
+ return TrainClient{New(azureRegion)}
+}
+
+// GetStatus gets the training status of all models (intents and entities) for the specified LUIS app. You must call
+// the train API to train the LUIS app before you call this API to get training status. "appID" specifies the LUIS app
+// ID. "versionId" specifies the version number of the LUIS app. For example, "0.1".
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+func (client TrainClient) GetStatus(ctx context.Context, appID uuid.UUID, versionID string) (result ListModelTrainingInfo, err error) {
+ req, err := client.GetStatusPreparer(ctx, appID, versionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.TrainClient", "GetStatus", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetStatusSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.TrainClient", "GetStatus", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetStatusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.TrainClient", "GetStatus", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetStatusPreparer prepares the GetStatus request.
+func (client TrainClient) GetStatusPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/train", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetStatusSender sends the GetStatus request. The method will close the
+// http.Response Body if it receives an error.
+func (client TrainClient) GetStatusSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetStatusResponder handles the response to the GetStatus request. The method always
+// closes the http.Response Body.
+func (client TrainClient) GetStatusResponder(resp *http.Response) (result ListModelTrainingInfo, 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
+}
+
+// TrainVersion sends a training request for a version of a specified LUIS app. This POST request initiates a request
+// asynchronously. To determine whether the training request is successful, submit a GET request to get training
+// status. Note: The application version is not fully trained unless all the models (intents and entities) are trained
+// successfully or are up to date. To verify training success, get the training status at least once after training is
+// complete.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+func (client TrainClient) TrainVersion(ctx context.Context, appID uuid.UUID, versionID string) (result EnqueueTrainingResponse, err error) {
+ req, err := client.TrainVersionPreparer(ctx, appID, versionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.TrainClient", "TrainVersion", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.TrainVersionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.TrainClient", "TrainVersion", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.TrainVersionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.TrainClient", "TrainVersion", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// TrainVersionPreparer prepares the TrainVersion request.
+func (client TrainClient) TrainVersionPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/train", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// TrainVersionSender sends the TrainVersion request. The method will close the
+// http.Response Body if it receives an error.
+func (client TrainClient) TrainVersionSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// TrainVersionResponder handles the response to the TrainVersion request. The method always
+// closes the http.Response Body.
+func (client TrainClient) TrainVersionResponder(resp *http.Response) (result EnqueueTrainingResponse, 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/services/cognitiveservices/v2.0/luis/authoring/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/version.go
new file mode 100644
index 000000000..b888af5dc
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/version.go
@@ -0,0 +1,30 @@
+package authoring
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " authoring/v2.0 preview"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/versions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/versions.go
new file mode 100644
index 000000000..c77bc18d9
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring/versions.go
@@ -0,0 +1,595 @@
+package authoring
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// VersionsClient is the client for the Versions methods of the Authoring service.
+type VersionsClient struct {
+ BaseClient
+}
+
+// NewVersionsClient creates an instance of the VersionsClient client.
+func NewVersionsClient(azureRegion AzureRegions) VersionsClient {
+ return VersionsClient{New(azureRegion)}
+}
+
+// Clone creates a new version using the current snapshot of the selected application version.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// versionCloneObject - a model containing the new version ID.
+func (client VersionsClient) Clone(ctx context.Context, appID uuid.UUID, versionID string, versionCloneObject *TaskUpdateObject) (result String, err error) {
+ req, err := client.ClonePreparer(ctx, appID, versionID, versionCloneObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Clone", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CloneSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Clone", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CloneResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Clone", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ClonePreparer prepares the Clone request.
+func (client VersionsClient) ClonePreparer(ctx context.Context, appID uuid.UUID, versionID string, versionCloneObject *TaskUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/clone", pathParameters))
+ if versionCloneObject != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(versionCloneObject))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CloneSender sends the Clone request. The method will close the
+// http.Response Body if it receives an error.
+func (client VersionsClient) CloneSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CloneResponder handles the response to the Clone request. The method always
+// closes the http.Response Body.
+func (client VersionsClient) CloneResponder(resp *http.Response) (result String, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes an application version.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+func (client VersionsClient) Delete(ctx context.Context, appID uuid.UUID, versionID string) (result OperationStatus, err error) {
+ req, err := client.DeletePreparer(ctx, appID, versionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VersionsClient) DeletePreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VersionsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VersionsClient) DeleteResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteUnlabelledUtterance deleted an unlabelled utterance.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// utterance - the utterance text to delete.
+func (client VersionsClient) DeleteUnlabelledUtterance(ctx context.Context, appID uuid.UUID, versionID string, utterance string) (result OperationStatus, err error) {
+ req, err := client.DeleteUnlabelledUtterancePreparer(ctx, appID, versionID, utterance)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "DeleteUnlabelledUtterance", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteUnlabelledUtteranceSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "DeleteUnlabelledUtterance", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteUnlabelledUtteranceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "DeleteUnlabelledUtterance", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteUnlabelledUtterancePreparer prepares the DeleteUnlabelledUtterance request.
+func (client VersionsClient) DeleteUnlabelledUtterancePreparer(ctx context.Context, appID uuid.UUID, versionID string, utterance string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/suggest", pathParameters),
+ autorest.WithJSON(utterance))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteUnlabelledUtteranceSender sends the DeleteUnlabelledUtterance request. The method will close the
+// http.Response Body if it receives an error.
+func (client VersionsClient) DeleteUnlabelledUtteranceSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteUnlabelledUtteranceResponder handles the response to the DeleteUnlabelledUtterance request. The method always
+// closes the http.Response Body.
+func (client VersionsClient) DeleteUnlabelledUtteranceResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Export exports a LUIS application to JSON format.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+func (client VersionsClient) Export(ctx context.Context, appID uuid.UUID, versionID string) (result LuisApp, err error) {
+ req, err := client.ExportPreparer(ctx, appID, versionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Export", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ExportSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Export", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ExportResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Export", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ExportPreparer prepares the Export request.
+func (client VersionsClient) ExportPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/export", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ExportSender sends the Export request. The method will close the
+// http.Response Body if it receives an error.
+func (client VersionsClient) ExportSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ExportResponder handles the response to the Export request. The method always
+// closes the http.Response Body.
+func (client VersionsClient) ExportResponder(resp *http.Response) (result LuisApp, 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 version info.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+func (client VersionsClient) Get(ctx context.Context, appID uuid.UUID, versionID string) (result VersionInfo, err error) {
+ req, err := client.GetPreparer(ctx, appID, versionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VersionsClient) GetPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VersionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VersionsClient) GetResponder(resp *http.Response) (result VersionInfo, 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 new version into a LUIS application.
+// Parameters:
+// appID - the application ID.
+// luisApp - a LUIS application structure.
+// versionID - the new versionId to import. If not specified, the versionId will be read from the imported
+// object.
+func (client VersionsClient) Import(ctx context.Context, appID uuid.UUID, luisApp LuisApp, versionID string) (result String, err error) {
+ req, err := client.ImportPreparer(ctx, appID, luisApp, versionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Import", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ImportSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Import", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ImportResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Import", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ImportPreparer prepares the Import request.
+func (client VersionsClient) ImportPreparer(ctx context.Context, appID uuid.UUID, luisApp LuisApp, versionID string) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if len(versionID) > 0 {
+ queryParameters["versionId"] = autorest.Encode("query", versionID)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/import", pathParameters),
+ autorest.WithJSON(luisApp),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ImportSender sends the Import request. The method will close the
+// http.Response Body if it receives an error.
+func (client VersionsClient) ImportSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ImportResponder handles the response to the Import request. The method always
+// closes the http.Response Body.
+func (client VersionsClient) ImportResponder(resp *http.Response) (result String, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets the application versions info.
+// Parameters:
+// appID - the application ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client VersionsClient) List(ctx context.Context, appID uuid.UUID, skip *int32, take *int32) (result ListVersionInfo, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("authoring.VersionsClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, appID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VersionsClient) ListPreparer(ctx context.Context, appID uuid.UUID, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VersionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VersionsClient) ListResponder(resp *http.Response) (result ListVersionInfo, 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 updates the name or description of the application version.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// versionUpdateObject - a model containing Name and Description of the application.
+func (client VersionsClient) Update(ctx context.Context, appID uuid.UUID, versionID string, versionUpdateObject TaskUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdatePreparer(ctx, appID, versionID, versionUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VersionsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID, versionID string, versionUpdateObject TaskUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/", pathParameters),
+ autorest.WithJSON(versionUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VersionsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client VersionsClient) UpdateResponder(resp *http.Response) (result OperationStatus, 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/services/cognitiveservices/v2.0/luis/programmatic/model.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/programmatic/model.go
index ed5bda42c..46e9587d5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/programmatic/model.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/programmatic/model.go
@@ -510,6 +510,75 @@ func (client ModelClient) AddEntityResponder(resp *http.Response) (result UUID,
return
}
+// AddExplicitListItem sends the add explicit list item request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the Pattern.Any entity extractor ID.
+// item - the new explicit list item.
+func (client ModelClient) AddExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, item ExplicitListItemCreateObject) (result Int32, err error) {
+ req, err := client.AddExplicitListItemPreparer(ctx, appID, versionID, entityID, item)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "AddExplicitListItem", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddExplicitListItemSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "AddExplicitListItem", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddExplicitListItemResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "AddExplicitListItem", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddExplicitListItemPreparer prepares the AddExplicitListItem request.
+func (client ModelClient) AddExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, item ExplicitListItemCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", pathParameters),
+ autorest.WithJSON(item))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddExplicitListItemSender sends the AddExplicitListItem request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) AddExplicitListItemSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddExplicitListItemResponder handles the response to the AddExplicitListItem request. The method always
+// closes the http.Response Body.
+func (client ModelClient) AddExplicitListItemResponder(resp *http.Response) (result Int32, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// AddHierarchicalEntity adds a hierarchical entity extractor to the application version.
// Parameters:
// appID - the application ID.
@@ -855,6 +924,694 @@ func (client ModelClient) AddSubListResponder(resp *http.Response) (result Int32
return
}
+// CreateClosedListEntityRole sends the create closed list entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity model ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreateClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreateClosedListEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateClosedListEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateClosedListEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateClosedListEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateClosedListEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateClosedListEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateClosedListEntityRolePreparer prepares the CreateClosedListEntityRole request.
+func (client ModelClient) CreateClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateClosedListEntityRoleSender sends the CreateClosedListEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateClosedListEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateClosedListEntityRoleResponder handles the response to the CreateClosedListEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateClosedListEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateCompositeEntityRole sends the create composite entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreateCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreateCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateCompositeEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateCompositeEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateCompositeEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateCompositeEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateCompositeEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateCompositeEntityRolePreparer prepares the CreateCompositeEntityRole request.
+func (client ModelClient) CreateCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateCompositeEntityRoleSender sends the CreateCompositeEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateCompositeEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateCompositeEntityRoleResponder handles the response to the CreateCompositeEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateCompositeEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateCustomPrebuiltEntityRole sends the create custom prebuilt entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity model ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreateCustomPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreateCustomPrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateCustomPrebuiltEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateCustomPrebuiltEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateCustomPrebuiltEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateCustomPrebuiltEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateCustomPrebuiltEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateCustomPrebuiltEntityRolePreparer prepares the CreateCustomPrebuiltEntityRole request.
+func (client ModelClient) CreateCustomPrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateCustomPrebuiltEntityRoleSender sends the CreateCustomPrebuiltEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateCustomPrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateCustomPrebuiltEntityRoleResponder handles the response to the CreateCustomPrebuiltEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateCustomPrebuiltEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateEntityRole sends the create entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity model ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreateEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreateEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateEntityRolePreparer prepares the CreateEntityRole request.
+func (client ModelClient) CreateEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateEntityRoleSender sends the CreateEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateEntityRoleResponder handles the response to the CreateEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateHierarchicalEntityRole sends the create hierarchical entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreateHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreateHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateHierarchicalEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateHierarchicalEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateHierarchicalEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateHierarchicalEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateHierarchicalEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateHierarchicalEntityRolePreparer prepares the CreateHierarchicalEntityRole request.
+func (client ModelClient) CreateHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateHierarchicalEntityRoleSender sends the CreateHierarchicalEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateHierarchicalEntityRoleResponder handles the response to the CreateHierarchicalEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateHierarchicalEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreatePatternAnyEntityModel sends the create pattern any entity model request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// extractorCreateObject - a model object containing the name and explicit list for the new Pattern.Any entity
+// extractor.
+func (client ModelClient) CreatePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, extractorCreateObject PatternAnyModelCreateObject) (result UUID, err error) {
+ req, err := client.CreatePatternAnyEntityModelPreparer(ctx, appID, versionID, extractorCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreatePatternAnyEntityModel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreatePatternAnyEntityModelSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreatePatternAnyEntityModel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreatePatternAnyEntityModelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreatePatternAnyEntityModel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePatternAnyEntityModelPreparer prepares the CreatePatternAnyEntityModel request.
+func (client ModelClient) CreatePatternAnyEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, extractorCreateObject PatternAnyModelCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities", pathParameters),
+ autorest.WithJSON(extractorCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreatePatternAnyEntityModelSender sends the CreatePatternAnyEntityModel request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreatePatternAnyEntityModelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreatePatternAnyEntityModelResponder handles the response to the CreatePatternAnyEntityModel request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreatePatternAnyEntityModelResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreatePatternAnyEntityRole sends the create pattern any entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity model ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreatePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreatePatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreatePatternAnyEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreatePatternAnyEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreatePatternAnyEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreatePatternAnyEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreatePatternAnyEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePatternAnyEntityRolePreparer prepares the CreatePatternAnyEntityRole request.
+func (client ModelClient) CreatePatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreatePatternAnyEntityRoleSender sends the CreatePatternAnyEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreatePatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreatePatternAnyEntityRoleResponder handles the response to the CreatePatternAnyEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreatePatternAnyEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreatePrebuiltEntityRole sends the create prebuilt entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity model ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreatePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreatePrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreatePrebuiltEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreatePrebuiltEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreatePrebuiltEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreatePrebuiltEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreatePrebuiltEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePrebuiltEntityRolePreparer prepares the CreatePrebuiltEntityRole request.
+func (client ModelClient) CreatePrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreatePrebuiltEntityRoleSender sends the CreatePrebuiltEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreatePrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreatePrebuiltEntityRoleResponder handles the response to the CreatePrebuiltEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreatePrebuiltEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateRegexEntityModel sends the create regex entity model request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// regexEntityExtractorCreateObj - a model object containing the name and regex pattern for the new regex
+// entity extractor.
+func (client ModelClient) CreateRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityExtractorCreateObj RegexModelCreateObject) (result UUID, err error) {
+ req, err := client.CreateRegexEntityModelPreparer(ctx, appID, versionID, regexEntityExtractorCreateObj)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateRegexEntityModel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateRegexEntityModelSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateRegexEntityModel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateRegexEntityModelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateRegexEntityModel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateRegexEntityModelPreparer prepares the CreateRegexEntityModel request.
+func (client ModelClient) CreateRegexEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityExtractorCreateObj RegexModelCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities", pathParameters),
+ autorest.WithJSON(regexEntityExtractorCreateObj))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateRegexEntityModelSender sends the CreateRegexEntityModel request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateRegexEntityModelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateRegexEntityModelResponder handles the response to the CreateRegexEntityModel request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateRegexEntityModelResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateRegexEntityRole sends the create regex entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity model ID.
+// entityRoleCreateObject - an entity role object containing the name of role.
+func (client ModelClient) CreateRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
+ req, err := client.CreateRegexEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateRegexEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateRegexEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateRegexEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateRegexEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "CreateRegexEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateRegexEntityRolePreparer prepares the CreateRegexEntityRole request.
+func (client ModelClient) CreateRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", pathParameters),
+ autorest.WithJSON(entityRoleCreateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateRegexEntityRoleSender sends the CreateRegexEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) CreateRegexEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateRegexEntityRoleResponder handles the response to the CreateRegexEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) CreateRegexEntityRoleResponder(resp *http.Response) (result UUID, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// DeleteClosedList deletes a closed list model from the application.
// Parameters:
// appID - the application ID.
@@ -921,6 +1678,74 @@ func (client ModelClient) DeleteClosedListResponder(resp *http.Response) (result
return
}
+// DeleteClosedListEntityRole sends the delete closed list entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeleteClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteClosedListEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteClosedListEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteClosedListEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteClosedListEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteClosedListEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteClosedListEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteClosedListEntityRolePreparer prepares the DeleteClosedListEntityRole request.
+func (client ModelClient) DeleteClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteClosedListEntityRoleSender sends the DeleteClosedListEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteClosedListEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteClosedListEntityRoleResponder handles the response to the DeleteClosedListEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteClosedListEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// DeleteCompositeEntity deletes a composite entity extractor from the application.
// Parameters:
// appID - the application ID.
@@ -1055,6 +1880,142 @@ func (client ModelClient) DeleteCompositeEntityChildResponder(resp *http.Respons
return
}
+// DeleteCompositeEntityRole sends the delete composite entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeleteCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteCompositeEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteCompositeEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteCompositeEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteCompositeEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteCompositeEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteCompositeEntityRolePreparer prepares the DeleteCompositeEntityRole request.
+func (client ModelClient) DeleteCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteCompositeEntityRoleSender sends the DeleteCompositeEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteCompositeEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteCompositeEntityRoleResponder handles the response to the DeleteCompositeEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteCompositeEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteCustomEntityRole sends the delete custom entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeleteCustomEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteCustomEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteCustomEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteCustomEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteCustomEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteCustomEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteCustomEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteCustomEntityRolePreparer prepares the DeleteCustomEntityRole request.
+func (client ModelClient) DeleteCustomEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteCustomEntityRoleSender sends the DeleteCustomEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteCustomEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteCustomEntityRoleResponder handles the response to the DeleteCustomEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteCustomEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// DeleteCustomPrebuiltDomain deletes a prebuilt domain's models from the application.
// Parameters:
// appID - the application ID.
@@ -1187,6 +2148,142 @@ func (client ModelClient) DeleteEntityResponder(resp *http.Response) (result Ope
return
}
+// DeleteEntityRole sends the delete entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeleteEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteEntityRolePreparer prepares the DeleteEntityRole request.
+func (client ModelClient) DeleteEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteEntityRoleSender sends the DeleteEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteEntityRoleResponder handles the response to the DeleteEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteExplicitListItem sends the delete explicit list item request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the pattern.any entity id.
+// itemID - the explicit list item which will be deleted.
+func (client ModelClient) DeleteExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result OperationStatus, err error) {
+ req, err := client.DeleteExplicitListItemPreparer(ctx, appID, versionID, entityID, itemID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteExplicitListItem", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteExplicitListItemSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteExplicitListItem", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteExplicitListItemResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteExplicitListItem", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteExplicitListItemPreparer prepares the DeleteExplicitListItem request.
+func (client ModelClient) DeleteExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "itemId": autorest.Encode("path", itemID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteExplicitListItemSender sends the DeleteExplicitListItem request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteExplicitListItemSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteExplicitListItemResponder handles the response to the DeleteExplicitListItem request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteExplicitListItemResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// DeleteHierarchicalEntity deletes a hierarchical entity extractor from the application version.
// Parameters:
// appID - the application ID.
@@ -1321,6 +2418,74 @@ func (client ModelClient) DeleteHierarchicalEntityChildResponder(resp *http.Resp
return
}
+// DeleteHierarchicalEntityRole sends the delete hierarchical entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeleteHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteHierarchicalEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteHierarchicalEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteHierarchicalEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteHierarchicalEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteHierarchicalEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteHierarchicalEntityRolePreparer prepares the DeleteHierarchicalEntityRole request.
+func (client ModelClient) DeleteHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteHierarchicalEntityRoleSender sends the DeleteHierarchicalEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteHierarchicalEntityRoleResponder handles the response to the DeleteHierarchicalEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteHierarchicalEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// DeleteIntent deletes an intent classifier from the application.
// Parameters:
// appID - the application ID.
@@ -1397,6 +2562,140 @@ func (client ModelClient) DeleteIntentResponder(resp *http.Response) (result Ope
return
}
+// DeletePatternAnyEntityModel sends the delete pattern any entity model request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the Pattern.Any entity extractor ID.
+func (client ModelClient) DeletePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeletePatternAnyEntityModelPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeletePatternAnyEntityModel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeletePatternAnyEntityModelSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeletePatternAnyEntityModel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeletePatternAnyEntityModelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeletePatternAnyEntityModel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePatternAnyEntityModelPreparer prepares the DeletePatternAnyEntityModel request.
+func (client ModelClient) DeletePatternAnyEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeletePatternAnyEntityModelSender sends the DeletePatternAnyEntityModel request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeletePatternAnyEntityModelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeletePatternAnyEntityModelResponder handles the response to the DeletePatternAnyEntityModel request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeletePatternAnyEntityModelResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeletePatternAnyEntityRole sends the delete pattern any entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeletePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeletePatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeletePatternAnyEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeletePatternAnyEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeletePatternAnyEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeletePatternAnyEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeletePatternAnyEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePatternAnyEntityRolePreparer prepares the DeletePatternAnyEntityRole request.
+func (client ModelClient) DeletePatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeletePatternAnyEntityRoleSender sends the DeletePatternAnyEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeletePatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeletePatternAnyEntityRoleResponder handles the response to the DeletePatternAnyEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeletePatternAnyEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// DeletePrebuilt deletes a prebuilt entity extractor from the application.
// Parameters:
// appID - the application ID.
@@ -1463,6 +2762,208 @@ func (client ModelClient) DeletePrebuiltResponder(resp *http.Response) (result O
return
}
+// DeletePrebuiltEntityRole sends the delete prebuilt entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeletePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeletePrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeletePrebuiltEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeletePrebuiltEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeletePrebuiltEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeletePrebuiltEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeletePrebuiltEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePrebuiltEntityRolePreparer prepares the DeletePrebuiltEntityRole request.
+func (client ModelClient) DeletePrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeletePrebuiltEntityRoleSender sends the DeletePrebuiltEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeletePrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeletePrebuiltEntityRoleResponder handles the response to the DeletePrebuiltEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeletePrebuiltEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteRegexEntityModel sends the delete regex entity model request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// regexEntityID - the regex entity extractor ID.
+func (client ModelClient) DeleteRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteRegexEntityModelPreparer(ctx, appID, versionID, regexEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteRegexEntityModel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteRegexEntityModelSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteRegexEntityModel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteRegexEntityModelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteRegexEntityModel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteRegexEntityModelPreparer prepares the DeleteRegexEntityModel request.
+func (client ModelClient) DeleteRegexEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "regexEntityId": autorest.Encode("path", regexEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteRegexEntityModelSender sends the DeleteRegexEntityModel request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteRegexEntityModelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteRegexEntityModelResponder handles the response to the DeleteRegexEntityModel request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteRegexEntityModelResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteRegexEntityRole sends the delete regex entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role Id.
+func (client ModelClient) DeleteRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeleteRegexEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteRegexEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteRegexEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteRegexEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteRegexEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "DeleteRegexEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteRegexEntityRolePreparer prepares the DeleteRegexEntityRole request.
+func (client ModelClient) DeleteRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteRegexEntityRoleSender sends the DeleteRegexEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) DeleteRegexEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteRegexEntityRoleResponder handles the response to the DeleteRegexEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) DeleteRegexEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// DeleteSubList deletes a sublist of a specific closed list model.
// Parameters:
// appID - the application ID.
@@ -1597,6 +3098,140 @@ func (client ModelClient) GetClosedListResponder(resp *http.Response) (result Cl
return
}
+// GetClosedListEntityRole sends the get closed list entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity ID.
+// roleID - entity role ID.
+func (client ModelClient) GetClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetClosedListEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetClosedListEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetClosedListEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetClosedListEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetClosedListEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetClosedListEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetClosedListEntityRolePreparer prepares the GetClosedListEntityRole request.
+func (client ModelClient) GetClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetClosedListEntityRoleSender sends the GetClosedListEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetClosedListEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetClosedListEntityRoleResponder handles the response to the GetClosedListEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetClosedListEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetClosedListEntityRoles sends the get closed list entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity Id
+func (client ModelClient) GetClosedListEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetClosedListEntityRolesPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetClosedListEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetClosedListEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetClosedListEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetClosedListEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetClosedListEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetClosedListEntityRolesPreparer prepares the GetClosedListEntityRoles request.
+func (client ModelClient) GetClosedListEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetClosedListEntityRolesSender sends the GetClosedListEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetClosedListEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetClosedListEntityRolesResponder handles the response to the GetClosedListEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetClosedListEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
// GetCompositeEntity gets information about the composite entity model.
// Parameters:
// appID - the application ID.
@@ -1663,6 +3298,274 @@ func (client ModelClient) GetCompositeEntityResponder(resp *http.Response) (resu
return
}
+// GetCompositeEntityRole sends the get composite entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+// roleID - entity role ID.
+func (client ModelClient) GetCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetCompositeEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetCompositeEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetCompositeEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetCompositeEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetCompositeEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetCompositeEntityRolePreparer prepares the GetCompositeEntityRole request.
+func (client ModelClient) GetCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetCompositeEntityRoleSender sends the GetCompositeEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetCompositeEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetCompositeEntityRoleResponder handles the response to the GetCompositeEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetCompositeEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetCompositeEntityRoles sends the get composite entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+func (client ModelClient) GetCompositeEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetCompositeEntityRolesPreparer(ctx, appID, versionID, cEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetCompositeEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetCompositeEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetCompositeEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetCompositeEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetCompositeEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetCompositeEntityRolesPreparer prepares the GetCompositeEntityRoles request.
+func (client ModelClient) GetCompositeEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetCompositeEntityRolesSender sends the GetCompositeEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetCompositeEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetCompositeEntityRolesResponder handles the response to the GetCompositeEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetCompositeEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
+// GetCustomEntityRole sends the get custom entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity ID.
+// roleID - entity role ID.
+func (client ModelClient) GetCustomEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetCustomEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetCustomEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetCustomEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetCustomEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetCustomEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetCustomEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetCustomEntityRolePreparer prepares the GetCustomEntityRole request.
+func (client ModelClient) GetCustomEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetCustomEntityRoleSender sends the GetCustomEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetCustomEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetCustomEntityRoleResponder handles the response to the GetCustomEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetCustomEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetCustomPrebuiltEntityRoles sends the get custom prebuilt entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity Id
+func (client ModelClient) GetCustomPrebuiltEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetCustomPrebuiltEntityRolesPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetCustomPrebuiltEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetCustomPrebuiltEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetCustomPrebuiltEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetCustomPrebuiltEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetCustomPrebuiltEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetCustomPrebuiltEntityRolesPreparer prepares the GetCustomPrebuiltEntityRoles request.
+func (client ModelClient) GetCustomPrebuiltEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetCustomPrebuiltEntityRolesSender sends the GetCustomPrebuiltEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetCustomPrebuiltEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetCustomPrebuiltEntityRolesResponder handles the response to the GetCustomPrebuiltEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetCustomPrebuiltEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
// GetEntity gets information about the entity model.
// Parameters:
// appID - the application ID.
@@ -1729,6 +3632,140 @@ func (client ModelClient) GetEntityResponder(resp *http.Response) (result Entity
return
}
+// GetEntityRole sends the get entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity ID.
+// roleID - entity role ID.
+func (client ModelClient) GetEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetEntityRolePreparer prepares the GetEntityRole request.
+func (client ModelClient) GetEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetEntityRoleSender sends the GetEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetEntityRoleResponder handles the response to the GetEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetEntityRoles sends the get entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity Id
+func (client ModelClient) GetEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetEntityRolesPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetEntityRolesPreparer prepares the GetEntityRoles request.
+func (client ModelClient) GetEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetEntityRolesSender sends the GetEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetEntityRolesResponder handles the response to the GetEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
// GetEntitySuggestions get suggestion examples that would improve the accuracy of the entity model.
// Parameters:
// appID - the application ID.
@@ -1813,6 +3850,140 @@ func (client ModelClient) GetEntitySuggestionsResponder(resp *http.Response) (re
return
}
+// GetExplicitList sends the get explicit list request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the Pattern.Any entity id.
+func (client ModelClient) GetExplicitList(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListExplicitListItem, err error) {
+ req, err := client.GetExplicitListPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetExplicitList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetExplicitListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetExplicitList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetExplicitListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetExplicitList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetExplicitListPreparer prepares the GetExplicitList request.
+func (client ModelClient) GetExplicitListPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetExplicitListSender sends the GetExplicitList request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetExplicitListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetExplicitListResponder handles the response to the GetExplicitList request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetExplicitListResponder(resp *http.Response) (result ListExplicitListItem, 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
+}
+
+// GetExplicitListItem sends the get explicit list item request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the Pattern.Any entity Id.
+// itemID - the explicit list item Id.
+func (client ModelClient) GetExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result ExplicitListItem, err error) {
+ req, err := client.GetExplicitListItemPreparer(ctx, appID, versionID, entityID, itemID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetExplicitListItem", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetExplicitListItemSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetExplicitListItem", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetExplicitListItemResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetExplicitListItem", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetExplicitListItemPreparer prepares the GetExplicitListItem request.
+func (client ModelClient) GetExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "itemId": autorest.Encode("path", itemID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetExplicitListItemSender sends the GetExplicitListItem request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetExplicitListItemSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetExplicitListItemResponder handles the response to the GetExplicitListItem request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetExplicitListItemResponder(resp *http.Response) (result ExplicitListItem, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// GetHierarchicalEntity gets information about the hierarchical entity model.
// Parameters:
// appID - the application ID.
@@ -1947,6 +4118,140 @@ func (client ModelClient) GetHierarchicalEntityChildResponder(resp *http.Respons
return
}
+// GetHierarchicalEntityRole sends the get hierarchical entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+// roleID - entity role ID.
+func (client ModelClient) GetHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetHierarchicalEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetHierarchicalEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetHierarchicalEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetHierarchicalEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetHierarchicalEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetHierarchicalEntityRolePreparer prepares the GetHierarchicalEntityRole request.
+func (client ModelClient) GetHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetHierarchicalEntityRoleSender sends the GetHierarchicalEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetHierarchicalEntityRoleResponder handles the response to the GetHierarchicalEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetHierarchicalEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetHierarchicalEntityRoles sends the get hierarchical entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+func (client ModelClient) GetHierarchicalEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetHierarchicalEntityRolesPreparer(ctx, appID, versionID, hEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetHierarchicalEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetHierarchicalEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetHierarchicalEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetHierarchicalEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetHierarchicalEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetHierarchicalEntityRolesPreparer prepares the GetHierarchicalEntityRoles request.
+func (client ModelClient) GetHierarchicalEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetHierarchicalEntityRolesSender sends the GetHierarchicalEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetHierarchicalEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetHierarchicalEntityRolesResponder handles the response to the GetHierarchicalEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetHierarchicalEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
// GetIntent gets information about the intent model.
// Parameters:
// appID - the application ID.
@@ -2097,6 +4402,297 @@ func (client ModelClient) GetIntentSuggestionsResponder(resp *http.Response) (re
return
}
+// GetPatternAnyEntityInfo sends the get pattern any entity info request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity extractor ID.
+func (client ModelClient) GetPatternAnyEntityInfo(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result PatternAnyEntityExtractor, err error) {
+ req, err := client.GetPatternAnyEntityInfoPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPatternAnyEntityInfo", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPatternAnyEntityInfoSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPatternAnyEntityInfo", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPatternAnyEntityInfoResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPatternAnyEntityInfo", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPatternAnyEntityInfoPreparer prepares the GetPatternAnyEntityInfo request.
+func (client ModelClient) GetPatternAnyEntityInfoPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPatternAnyEntityInfoSender sends the GetPatternAnyEntityInfo request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetPatternAnyEntityInfoSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPatternAnyEntityInfoResponder handles the response to the GetPatternAnyEntityInfo request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetPatternAnyEntityInfoResponder(resp *http.Response) (result PatternAnyEntityExtractor, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetPatternAnyEntityInfos sends the get pattern any entity infos request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) GetPatternAnyEntityInfos(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPatternAnyEntityExtractor, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("programmatic.ModelClient", "GetPatternAnyEntityInfos", err.Error())
+ }
+
+ req, err := client.GetPatternAnyEntityInfosPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPatternAnyEntityInfos", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPatternAnyEntityInfosSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPatternAnyEntityInfos", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPatternAnyEntityInfosResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPatternAnyEntityInfos", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPatternAnyEntityInfosPreparer prepares the GetPatternAnyEntityInfos request.
+func (client ModelClient) GetPatternAnyEntityInfosPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPatternAnyEntityInfosSender sends the GetPatternAnyEntityInfos request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetPatternAnyEntityInfosSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPatternAnyEntityInfosResponder handles the response to the GetPatternAnyEntityInfos request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetPatternAnyEntityInfosResponder(resp *http.Response) (result ListPatternAnyEntityExtractor, 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
+}
+
+// GetPatternAnyEntityRole sends the get pattern any entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity ID.
+// roleID - entity role ID.
+func (client ModelClient) GetPatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetPatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPatternAnyEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPatternAnyEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPatternAnyEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPatternAnyEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPatternAnyEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPatternAnyEntityRolePreparer prepares the GetPatternAnyEntityRole request.
+func (client ModelClient) GetPatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPatternAnyEntityRoleSender sends the GetPatternAnyEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetPatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPatternAnyEntityRoleResponder handles the response to the GetPatternAnyEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetPatternAnyEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetPatternAnyEntityRoles sends the get pattern any entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity Id
+func (client ModelClient) GetPatternAnyEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetPatternAnyEntityRolesPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPatternAnyEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPatternAnyEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPatternAnyEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPatternAnyEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPatternAnyEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPatternAnyEntityRolesPreparer prepares the GetPatternAnyEntityRoles request.
+func (client ModelClient) GetPatternAnyEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPatternAnyEntityRolesSender sends the GetPatternAnyEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetPatternAnyEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPatternAnyEntityRolesResponder handles the response to the GetPatternAnyEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetPatternAnyEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
// GetPrebuilt gets information about the prebuilt entity model.
// Parameters:
// appID - the application ID.
@@ -2163,6 +4759,431 @@ func (client ModelClient) GetPrebuiltResponder(resp *http.Response) (result Preb
return
}
+// GetPrebuiltEntityRole sends the get prebuilt entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity ID.
+// roleID - entity role ID.
+func (client ModelClient) GetPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetPrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPrebuiltEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPrebuiltEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPrebuiltEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPrebuiltEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPrebuiltEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPrebuiltEntityRolePreparer prepares the GetPrebuiltEntityRole request.
+func (client ModelClient) GetPrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPrebuiltEntityRoleSender sends the GetPrebuiltEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetPrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPrebuiltEntityRoleResponder handles the response to the GetPrebuiltEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetPrebuiltEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetPrebuiltEntityRoles sends the get prebuilt entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity Id
+func (client ModelClient) GetPrebuiltEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetPrebuiltEntityRolesPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPrebuiltEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPrebuiltEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPrebuiltEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPrebuiltEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetPrebuiltEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPrebuiltEntityRolesPreparer prepares the GetPrebuiltEntityRoles request.
+func (client ModelClient) GetPrebuiltEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPrebuiltEntityRolesSender sends the GetPrebuiltEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetPrebuiltEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPrebuiltEntityRolesResponder handles the response to the GetPrebuiltEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetPrebuiltEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
+// GetRegexEntityEntityInfo sends the get regex entity entity info request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// regexEntityID - the regex entity model ID.
+func (client ModelClient) GetRegexEntityEntityInfo(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result RegexEntityExtractor, err error) {
+ req, err := client.GetRegexEntityEntityInfoPreparer(ctx, appID, versionID, regexEntityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetRegexEntityEntityInfo", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetRegexEntityEntityInfoSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetRegexEntityEntityInfo", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetRegexEntityEntityInfoResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetRegexEntityEntityInfo", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetRegexEntityEntityInfoPreparer prepares the GetRegexEntityEntityInfo request.
+func (client ModelClient) GetRegexEntityEntityInfoPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "regexEntityId": autorest.Encode("path", regexEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetRegexEntityEntityInfoSender sends the GetRegexEntityEntityInfo request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetRegexEntityEntityInfoSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetRegexEntityEntityInfoResponder handles the response to the GetRegexEntityEntityInfo request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetRegexEntityEntityInfoResponder(resp *http.Response) (result RegexEntityExtractor, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetRegexEntityInfos sends the get regex entity infos request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client ModelClient) GetRegexEntityInfos(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListRegexEntityExtractor, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("programmatic.ModelClient", "GetRegexEntityInfos", err.Error())
+ }
+
+ req, err := client.GetRegexEntityInfosPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetRegexEntityInfos", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetRegexEntityInfosSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetRegexEntityInfos", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetRegexEntityInfosResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetRegexEntityInfos", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetRegexEntityInfosPreparer prepares the GetRegexEntityInfos request.
+func (client ModelClient) GetRegexEntityInfosPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetRegexEntityInfosSender sends the GetRegexEntityInfos request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetRegexEntityInfosSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetRegexEntityInfosResponder handles the response to the GetRegexEntityInfos request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetRegexEntityInfosResponder(resp *http.Response) (result ListRegexEntityExtractor, 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
+}
+
+// GetRegexEntityRole sends the get regex entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity ID.
+// roleID - entity role ID.
+func (client ModelClient) GetRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
+ req, err := client.GetRegexEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetRegexEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetRegexEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetRegexEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetRegexEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetRegexEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetRegexEntityRolePreparer prepares the GetRegexEntityRole request.
+func (client ModelClient) GetRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetRegexEntityRoleSender sends the GetRegexEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetRegexEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetRegexEntityRoleResponder handles the response to the GetRegexEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetRegexEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetRegexEntityRoles sends the get regex entity roles request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - entity Id
+func (client ModelClient) GetRegexEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
+ req, err := client.GetRegexEntityRolesPreparer(ctx, appID, versionID, entityID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetRegexEntityRoles", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetRegexEntityRolesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetRegexEntityRoles", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetRegexEntityRolesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "GetRegexEntityRoles", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetRegexEntityRolesPreparer prepares the GetRegexEntityRoles request.
+func (client ModelClient) GetRegexEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetRegexEntityRolesSender sends the GetRegexEntityRoles request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) GetRegexEntityRolesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetRegexEntityRolesResponder handles the response to the GetRegexEntityRoles request. The method always
+// closes the http.Response Body.
+func (client ModelClient) GetRegexEntityRolesResponder(resp *http.Response) (result ListEntityRole, 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
+}
+
// ListClosedLists gets information about the closedlist models.
// Parameters:
// appID - the application ID.
@@ -3194,6 +6215,77 @@ func (client ModelClient) UpdateClosedListResponder(resp *http.Response) (result
return
}
+// UpdateClosedListEntityRole sends the update closed list entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdateClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateClosedListEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateClosedListEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateClosedListEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateClosedListEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateClosedListEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateClosedListEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateClosedListEntityRolePreparer prepares the UpdateClosedListEntityRole request.
+func (client ModelClient) UpdateClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateClosedListEntityRoleSender sends the UpdateClosedListEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateClosedListEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateClosedListEntityRoleResponder handles the response to the UpdateClosedListEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateClosedListEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// UpdateCompositeEntity updates the composite entity extractor.
// Parameters:
// appID - the application ID.
@@ -3263,6 +6355,148 @@ func (client ModelClient) UpdateCompositeEntityResponder(resp *http.Response) (r
return
}
+// UpdateCompositeEntityRole sends the update composite entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// cEntityID - the composite entity extractor ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdateCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateCompositeEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateCompositeEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateCompositeEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateCompositeEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateCompositeEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateCompositeEntityRolePreparer prepares the UpdateCompositeEntityRole request.
+func (client ModelClient) UpdateCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "cEntityId": autorest.Encode("path", cEntityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateCompositeEntityRoleSender sends the UpdateCompositeEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateCompositeEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateCompositeEntityRoleResponder handles the response to the UpdateCompositeEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateCompositeEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateCustomPrebuiltEntityRole sends the update custom prebuilt entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdateCustomPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateCustomPrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateCustomPrebuiltEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateCustomPrebuiltEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateCustomPrebuiltEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateCustomPrebuiltEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateCustomPrebuiltEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateCustomPrebuiltEntityRolePreparer prepares the UpdateCustomPrebuiltEntityRole request.
+func (client ModelClient) UpdateCustomPrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateCustomPrebuiltEntityRoleSender sends the UpdateCustomPrebuiltEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateCustomPrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateCustomPrebuiltEntityRoleResponder handles the response to the UpdateCustomPrebuiltEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateCustomPrebuiltEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// UpdateEntity updates the name of an entity extractor.
// Parameters:
// appID - the application ID.
@@ -3332,6 +6566,148 @@ func (client ModelClient) UpdateEntityResponder(resp *http.Response) (result Ope
return
}
+// UpdateEntityRole sends the update entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdateEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateEntityRolePreparer prepares the UpdateEntityRole request.
+func (client ModelClient) UpdateEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateEntityRoleSender sends the UpdateEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateEntityRoleResponder handles the response to the UpdateEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateExplicitListItem sends the update explicit list item request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the Pattern.Any entity extractor ID.
+// itemID - the explicit list item ID.
+// item - the new explicit list item.
+func (client ModelClient) UpdateExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64, item ExplicitListItemUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateExplicitListItemPreparer(ctx, appID, versionID, entityID, itemID, item)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateExplicitListItem", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateExplicitListItemSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateExplicitListItem", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateExplicitListItemResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateExplicitListItem", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateExplicitListItemPreparer prepares the UpdateExplicitListItem request.
+func (client ModelClient) UpdateExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64, item ExplicitListItemUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "itemId": autorest.Encode("path", itemID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters),
+ autorest.WithJSON(item))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateExplicitListItemSender sends the UpdateExplicitListItem request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateExplicitListItemSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateExplicitListItemResponder handles the response to the UpdateExplicitListItem request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateExplicitListItemResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// UpdateHierarchicalEntity updates the name and children of a hierarchical entity model.
// Parameters:
// appID - the application ID.
@@ -3472,6 +6848,77 @@ func (client ModelClient) UpdateHierarchicalEntityChildResponder(resp *http.Resp
return
}
+// UpdateHierarchicalEntityRole sends the update hierarchical entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// hEntityID - the hierarchical entity extractor ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdateHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateHierarchicalEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateHierarchicalEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateHierarchicalEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateHierarchicalEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateHierarchicalEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateHierarchicalEntityRolePreparer prepares the UpdateHierarchicalEntityRole request.
+func (client ModelClient) UpdateHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "hEntityId": autorest.Encode("path", hEntityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateHierarchicalEntityRoleSender sends the UpdateHierarchicalEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateHierarchicalEntityRoleResponder handles the response to the UpdateHierarchicalEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateHierarchicalEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// UpdateIntent updates the name of an intent classifier.
// Parameters:
// appID - the application ID.
@@ -3541,6 +6988,357 @@ func (client ModelClient) UpdateIntentResponder(resp *http.Response) (result Ope
return
}
+// UpdatePatternAnyEntityModel sends the update pattern any entity model request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the Pattern.Any entity extractor ID.
+// patternAnyUpdateObject - an object containing the explicit list of the Pattern.Any entity.
+func (client ModelClient) UpdatePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, patternAnyUpdateObject PatternAnyModelUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdatePatternAnyEntityModelPreparer(ctx, appID, versionID, entityID, patternAnyUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdatePatternAnyEntityModel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdatePatternAnyEntityModelSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdatePatternAnyEntityModel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdatePatternAnyEntityModelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdatePatternAnyEntityModel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePatternAnyEntityModelPreparer prepares the UpdatePatternAnyEntityModel request.
+func (client ModelClient) UpdatePatternAnyEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, patternAnyUpdateObject PatternAnyModelUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters),
+ autorest.WithJSON(patternAnyUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdatePatternAnyEntityModelSender sends the UpdatePatternAnyEntityModel request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdatePatternAnyEntityModelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdatePatternAnyEntityModelResponder handles the response to the UpdatePatternAnyEntityModel request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdatePatternAnyEntityModelResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdatePatternAnyEntityRole sends the update pattern any entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdatePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdatePatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdatePatternAnyEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdatePatternAnyEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdatePatternAnyEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdatePatternAnyEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdatePatternAnyEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePatternAnyEntityRolePreparer prepares the UpdatePatternAnyEntityRole request.
+func (client ModelClient) UpdatePatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdatePatternAnyEntityRoleSender sends the UpdatePatternAnyEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdatePatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdatePatternAnyEntityRoleResponder handles the response to the UpdatePatternAnyEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdatePatternAnyEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdatePrebuiltEntityRole sends the update prebuilt entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdatePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdatePrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdatePrebuiltEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdatePrebuiltEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdatePrebuiltEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdatePrebuiltEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdatePrebuiltEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePrebuiltEntityRolePreparer prepares the UpdatePrebuiltEntityRole request.
+func (client ModelClient) UpdatePrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdatePrebuiltEntityRoleSender sends the UpdatePrebuiltEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdatePrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdatePrebuiltEntityRoleResponder handles the response to the UpdatePrebuiltEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdatePrebuiltEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateRegexEntityModel sends the update regex entity model request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// regexEntityID - the regex entity extractor ID.
+// regexEntityUpdateObject - an object containing the new entity name and regex pattern.
+func (client ModelClient) UpdateRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID, regexEntityUpdateObject RegexModelUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateRegexEntityModelPreparer(ctx, appID, versionID, regexEntityID, regexEntityUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateRegexEntityModel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateRegexEntityModelSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateRegexEntityModel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateRegexEntityModelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateRegexEntityModel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateRegexEntityModelPreparer prepares the UpdateRegexEntityModel request.
+func (client ModelClient) UpdateRegexEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID, regexEntityUpdateObject RegexModelUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "regexEntityId": autorest.Encode("path", regexEntityID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters),
+ autorest.WithJSON(regexEntityUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateRegexEntityModelSender sends the UpdateRegexEntityModel request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateRegexEntityModelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateRegexEntityModelResponder handles the response to the UpdateRegexEntityModel request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateRegexEntityModelResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateRegexEntityRole sends the update regex entity role request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// entityID - the entity ID.
+// roleID - the entity role ID.
+// entityRoleUpdateObject - the new entity role.
+func (client ModelClient) UpdateRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
+ req, err := client.UpdateRegexEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateRegexEntityRole", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateRegexEntityRoleSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateRegexEntityRole", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateRegexEntityRoleResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.ModelClient", "UpdateRegexEntityRole", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateRegexEntityRolePreparer prepares the UpdateRegexEntityRole request.
+func (client ModelClient) UpdateRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "entityId": autorest.Encode("path", entityID),
+ "roleId": autorest.Encode("path", roleID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters),
+ autorest.WithJSON(entityRoleUpdateObject))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateRegexEntityRoleSender sends the UpdateRegexEntityRole request. The method will close the
+// http.Response Body if it receives an error.
+func (client ModelClient) UpdateRegexEntityRoleSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateRegexEntityRoleResponder handles the response to the UpdateRegexEntityRole request. The method always
+// closes the http.Response Body.
+func (client ModelClient) UpdateRegexEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// UpdateSubList updates one of the closed list's sublists.
// Parameters:
// appID - the application ID.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/programmatic/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/programmatic/models.go
index 4410de4e1..20baf248c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/programmatic/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/programmatic/models.go
@@ -93,13 +93,17 @@ const (
ReadableTypeHierarchicalEntityExtractor ReadableType = "Hierarchical Entity Extractor"
// ReadableTypeIntentClassifier ...
ReadableTypeIntentClassifier ReadableType = "Intent Classifier"
+ // ReadableTypePatternAnyEntityExtractor ...
+ ReadableTypePatternAnyEntityExtractor ReadableType = "Pattern.Any Entity Extractor"
// ReadableTypePrebuiltEntityExtractor ...
ReadableTypePrebuiltEntityExtractor ReadableType = "Prebuilt Entity Extractor"
+ // ReadableTypeRegexEntityExtractor ...
+ ReadableTypeRegexEntityExtractor ReadableType = "Regex Entity Extractor"
)
// PossibleReadableTypeValues returns an array of possible values for the ReadableType const type.
func PossibleReadableTypeValues() []ReadableType {
- return []ReadableType{ReadableTypeClosedListEntityExtractor, ReadableTypeCompositeEntityExtractor, ReadableTypeEntityExtractor, ReadableTypeHierarchicalChildEntityExtractor, ReadableTypeHierarchicalEntityExtractor, ReadableTypeIntentClassifier, ReadableTypePrebuiltEntityExtractor}
+ return []ReadableType{ReadableTypeClosedListEntityExtractor, ReadableTypeCompositeEntityExtractor, ReadableTypeEntityExtractor, ReadableTypeHierarchicalChildEntityExtractor, ReadableTypeHierarchicalEntityExtractor, ReadableTypeIntentClassifier, ReadableTypePatternAnyEntityExtractor, ReadableTypePrebuiltEntityExtractor, ReadableTypeRegexEntityExtractor}
}
// ReadableType1 enumerates the values for readable type 1.
@@ -118,13 +122,46 @@ const (
ReadableType1HierarchicalEntityExtractor ReadableType1 = "Hierarchical Entity Extractor"
// ReadableType1IntentClassifier ...
ReadableType1IntentClassifier ReadableType1 = "Intent Classifier"
+ // ReadableType1PatternAnyEntityExtractor ...
+ ReadableType1PatternAnyEntityExtractor ReadableType1 = "Pattern.Any Entity Extractor"
// ReadableType1PrebuiltEntityExtractor ...
ReadableType1PrebuiltEntityExtractor ReadableType1 = "Prebuilt Entity Extractor"
+ // ReadableType1RegexEntityExtractor ...
+ ReadableType1RegexEntityExtractor ReadableType1 = "Regex Entity Extractor"
)
// PossibleReadableType1Values returns an array of possible values for the ReadableType1 const type.
func PossibleReadableType1Values() []ReadableType1 {
- return []ReadableType1{ReadableType1ClosedListEntityExtractor, ReadableType1CompositeEntityExtractor, ReadableType1EntityExtractor, ReadableType1HierarchicalChildEntityExtractor, ReadableType1HierarchicalEntityExtractor, ReadableType1IntentClassifier, ReadableType1PrebuiltEntityExtractor}
+ return []ReadableType1{ReadableType1ClosedListEntityExtractor, ReadableType1CompositeEntityExtractor, ReadableType1EntityExtractor, ReadableType1HierarchicalChildEntityExtractor, ReadableType1HierarchicalEntityExtractor, ReadableType1IntentClassifier, ReadableType1PatternAnyEntityExtractor, ReadableType1PrebuiltEntityExtractor, ReadableType1RegexEntityExtractor}
+}
+
+// ReadableType10 enumerates the values for readable type 10.
+type ReadableType10 string
+
+const (
+ // ReadableType10ClosedListEntityExtractor ...
+ ReadableType10ClosedListEntityExtractor ReadableType10 = "Closed List Entity Extractor"
+ // ReadableType10CompositeEntityExtractor ...
+ ReadableType10CompositeEntityExtractor ReadableType10 = "Composite Entity Extractor"
+ // ReadableType10EntityExtractor ...
+ ReadableType10EntityExtractor ReadableType10 = "Entity Extractor"
+ // ReadableType10HierarchicalChildEntityExtractor ...
+ ReadableType10HierarchicalChildEntityExtractor ReadableType10 = "Hierarchical Child Entity Extractor"
+ // ReadableType10HierarchicalEntityExtractor ...
+ ReadableType10HierarchicalEntityExtractor ReadableType10 = "Hierarchical Entity Extractor"
+ // ReadableType10IntentClassifier ...
+ ReadableType10IntentClassifier ReadableType10 = "Intent Classifier"
+ // ReadableType10PatternAnyEntityExtractor ...
+ ReadableType10PatternAnyEntityExtractor ReadableType10 = "Pattern.Any Entity Extractor"
+ // ReadableType10PrebuiltEntityExtractor ...
+ ReadableType10PrebuiltEntityExtractor ReadableType10 = "Prebuilt Entity Extractor"
+ // ReadableType10RegexEntityExtractor ...
+ ReadableType10RegexEntityExtractor ReadableType10 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType10Values returns an array of possible values for the ReadableType10 const type.
+func PossibleReadableType10Values() []ReadableType10 {
+ return []ReadableType10{ReadableType10ClosedListEntityExtractor, ReadableType10CompositeEntityExtractor, ReadableType10EntityExtractor, ReadableType10HierarchicalChildEntityExtractor, ReadableType10HierarchicalEntityExtractor, ReadableType10IntentClassifier, ReadableType10PatternAnyEntityExtractor, ReadableType10PrebuiltEntityExtractor, ReadableType10RegexEntityExtractor}
}
// ReadableType2 enumerates the values for readable type 2.
@@ -143,13 +180,17 @@ const (
ReadableType2HierarchicalEntityExtractor ReadableType2 = "Hierarchical Entity Extractor"
// ReadableType2IntentClassifier ...
ReadableType2IntentClassifier ReadableType2 = "Intent Classifier"
+ // ReadableType2PatternAnyEntityExtractor ...
+ ReadableType2PatternAnyEntityExtractor ReadableType2 = "Pattern.Any Entity Extractor"
// ReadableType2PrebuiltEntityExtractor ...
ReadableType2PrebuiltEntityExtractor ReadableType2 = "Prebuilt Entity Extractor"
+ // ReadableType2RegexEntityExtractor ...
+ ReadableType2RegexEntityExtractor ReadableType2 = "Regex Entity Extractor"
)
// PossibleReadableType2Values returns an array of possible values for the ReadableType2 const type.
func PossibleReadableType2Values() []ReadableType2 {
- return []ReadableType2{ReadableType2ClosedListEntityExtractor, ReadableType2CompositeEntityExtractor, ReadableType2EntityExtractor, ReadableType2HierarchicalChildEntityExtractor, ReadableType2HierarchicalEntityExtractor, ReadableType2IntentClassifier, ReadableType2PrebuiltEntityExtractor}
+ return []ReadableType2{ReadableType2ClosedListEntityExtractor, ReadableType2CompositeEntityExtractor, ReadableType2EntityExtractor, ReadableType2HierarchicalChildEntityExtractor, ReadableType2HierarchicalEntityExtractor, ReadableType2IntentClassifier, ReadableType2PatternAnyEntityExtractor, ReadableType2PrebuiltEntityExtractor, ReadableType2RegexEntityExtractor}
}
// ReadableType3 enumerates the values for readable type 3.
@@ -168,13 +209,191 @@ const (
ReadableType3HierarchicalEntityExtractor ReadableType3 = "Hierarchical Entity Extractor"
// ReadableType3IntentClassifier ...
ReadableType3IntentClassifier ReadableType3 = "Intent Classifier"
+ // ReadableType3PatternAnyEntityExtractor ...
+ ReadableType3PatternAnyEntityExtractor ReadableType3 = "Pattern.Any Entity Extractor"
// ReadableType3PrebuiltEntityExtractor ...
ReadableType3PrebuiltEntityExtractor ReadableType3 = "Prebuilt Entity Extractor"
+ // ReadableType3RegexEntityExtractor ...
+ ReadableType3RegexEntityExtractor ReadableType3 = "Regex Entity Extractor"
)
// PossibleReadableType3Values returns an array of possible values for the ReadableType3 const type.
func PossibleReadableType3Values() []ReadableType3 {
- return []ReadableType3{ReadableType3ClosedListEntityExtractor, ReadableType3CompositeEntityExtractor, ReadableType3EntityExtractor, ReadableType3HierarchicalChildEntityExtractor, ReadableType3HierarchicalEntityExtractor, ReadableType3IntentClassifier, ReadableType3PrebuiltEntityExtractor}
+ return []ReadableType3{ReadableType3ClosedListEntityExtractor, ReadableType3CompositeEntityExtractor, ReadableType3EntityExtractor, ReadableType3HierarchicalChildEntityExtractor, ReadableType3HierarchicalEntityExtractor, ReadableType3IntentClassifier, ReadableType3PatternAnyEntityExtractor, ReadableType3PrebuiltEntityExtractor, ReadableType3RegexEntityExtractor}
+}
+
+// ReadableType4 enumerates the values for readable type 4.
+type ReadableType4 string
+
+const (
+ // ReadableType4ClosedListEntityExtractor ...
+ ReadableType4ClosedListEntityExtractor ReadableType4 = "Closed List Entity Extractor"
+ // ReadableType4CompositeEntityExtractor ...
+ ReadableType4CompositeEntityExtractor ReadableType4 = "Composite Entity Extractor"
+ // ReadableType4EntityExtractor ...
+ ReadableType4EntityExtractor ReadableType4 = "Entity Extractor"
+ // ReadableType4HierarchicalChildEntityExtractor ...
+ ReadableType4HierarchicalChildEntityExtractor ReadableType4 = "Hierarchical Child Entity Extractor"
+ // ReadableType4HierarchicalEntityExtractor ...
+ ReadableType4HierarchicalEntityExtractor ReadableType4 = "Hierarchical Entity Extractor"
+ // ReadableType4IntentClassifier ...
+ ReadableType4IntentClassifier ReadableType4 = "Intent Classifier"
+ // ReadableType4PatternAnyEntityExtractor ...
+ ReadableType4PatternAnyEntityExtractor ReadableType4 = "Pattern.Any Entity Extractor"
+ // ReadableType4PrebuiltEntityExtractor ...
+ ReadableType4PrebuiltEntityExtractor ReadableType4 = "Prebuilt Entity Extractor"
+ // ReadableType4RegexEntityExtractor ...
+ ReadableType4RegexEntityExtractor ReadableType4 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType4Values returns an array of possible values for the ReadableType4 const type.
+func PossibleReadableType4Values() []ReadableType4 {
+ return []ReadableType4{ReadableType4ClosedListEntityExtractor, ReadableType4CompositeEntityExtractor, ReadableType4EntityExtractor, ReadableType4HierarchicalChildEntityExtractor, ReadableType4HierarchicalEntityExtractor, ReadableType4IntentClassifier, ReadableType4PatternAnyEntityExtractor, ReadableType4PrebuiltEntityExtractor, ReadableType4RegexEntityExtractor}
+}
+
+// ReadableType5 enumerates the values for readable type 5.
+type ReadableType5 string
+
+const (
+ // ReadableType5ClosedListEntityExtractor ...
+ ReadableType5ClosedListEntityExtractor ReadableType5 = "Closed List Entity Extractor"
+ // ReadableType5CompositeEntityExtractor ...
+ ReadableType5CompositeEntityExtractor ReadableType5 = "Composite Entity Extractor"
+ // ReadableType5EntityExtractor ...
+ ReadableType5EntityExtractor ReadableType5 = "Entity Extractor"
+ // ReadableType5HierarchicalChildEntityExtractor ...
+ ReadableType5HierarchicalChildEntityExtractor ReadableType5 = "Hierarchical Child Entity Extractor"
+ // ReadableType5HierarchicalEntityExtractor ...
+ ReadableType5HierarchicalEntityExtractor ReadableType5 = "Hierarchical Entity Extractor"
+ // ReadableType5IntentClassifier ...
+ ReadableType5IntentClassifier ReadableType5 = "Intent Classifier"
+ // ReadableType5PatternAnyEntityExtractor ...
+ ReadableType5PatternAnyEntityExtractor ReadableType5 = "Pattern.Any Entity Extractor"
+ // ReadableType5PrebuiltEntityExtractor ...
+ ReadableType5PrebuiltEntityExtractor ReadableType5 = "Prebuilt Entity Extractor"
+ // ReadableType5RegexEntityExtractor ...
+ ReadableType5RegexEntityExtractor ReadableType5 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType5Values returns an array of possible values for the ReadableType5 const type.
+func PossibleReadableType5Values() []ReadableType5 {
+ return []ReadableType5{ReadableType5ClosedListEntityExtractor, ReadableType5CompositeEntityExtractor, ReadableType5EntityExtractor, ReadableType5HierarchicalChildEntityExtractor, ReadableType5HierarchicalEntityExtractor, ReadableType5IntentClassifier, ReadableType5PatternAnyEntityExtractor, ReadableType5PrebuiltEntityExtractor, ReadableType5RegexEntityExtractor}
+}
+
+// ReadableType6 enumerates the values for readable type 6.
+type ReadableType6 string
+
+const (
+ // ReadableType6ClosedListEntityExtractor ...
+ ReadableType6ClosedListEntityExtractor ReadableType6 = "Closed List Entity Extractor"
+ // ReadableType6CompositeEntityExtractor ...
+ ReadableType6CompositeEntityExtractor ReadableType6 = "Composite Entity Extractor"
+ // ReadableType6EntityExtractor ...
+ ReadableType6EntityExtractor ReadableType6 = "Entity Extractor"
+ // ReadableType6HierarchicalChildEntityExtractor ...
+ ReadableType6HierarchicalChildEntityExtractor ReadableType6 = "Hierarchical Child Entity Extractor"
+ // ReadableType6HierarchicalEntityExtractor ...
+ ReadableType6HierarchicalEntityExtractor ReadableType6 = "Hierarchical Entity Extractor"
+ // ReadableType6IntentClassifier ...
+ ReadableType6IntentClassifier ReadableType6 = "Intent Classifier"
+ // ReadableType6PatternAnyEntityExtractor ...
+ ReadableType6PatternAnyEntityExtractor ReadableType6 = "Pattern.Any Entity Extractor"
+ // ReadableType6PrebuiltEntityExtractor ...
+ ReadableType6PrebuiltEntityExtractor ReadableType6 = "Prebuilt Entity Extractor"
+ // ReadableType6RegexEntityExtractor ...
+ ReadableType6RegexEntityExtractor ReadableType6 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType6Values returns an array of possible values for the ReadableType6 const type.
+func PossibleReadableType6Values() []ReadableType6 {
+ return []ReadableType6{ReadableType6ClosedListEntityExtractor, ReadableType6CompositeEntityExtractor, ReadableType6EntityExtractor, ReadableType6HierarchicalChildEntityExtractor, ReadableType6HierarchicalEntityExtractor, ReadableType6IntentClassifier, ReadableType6PatternAnyEntityExtractor, ReadableType6PrebuiltEntityExtractor, ReadableType6RegexEntityExtractor}
+}
+
+// ReadableType7 enumerates the values for readable type 7.
+type ReadableType7 string
+
+const (
+ // ReadableType7ClosedListEntityExtractor ...
+ ReadableType7ClosedListEntityExtractor ReadableType7 = "Closed List Entity Extractor"
+ // ReadableType7CompositeEntityExtractor ...
+ ReadableType7CompositeEntityExtractor ReadableType7 = "Composite Entity Extractor"
+ // ReadableType7EntityExtractor ...
+ ReadableType7EntityExtractor ReadableType7 = "Entity Extractor"
+ // ReadableType7HierarchicalChildEntityExtractor ...
+ ReadableType7HierarchicalChildEntityExtractor ReadableType7 = "Hierarchical Child Entity Extractor"
+ // ReadableType7HierarchicalEntityExtractor ...
+ ReadableType7HierarchicalEntityExtractor ReadableType7 = "Hierarchical Entity Extractor"
+ // ReadableType7IntentClassifier ...
+ ReadableType7IntentClassifier ReadableType7 = "Intent Classifier"
+ // ReadableType7PatternAnyEntityExtractor ...
+ ReadableType7PatternAnyEntityExtractor ReadableType7 = "Pattern.Any Entity Extractor"
+ // ReadableType7PrebuiltEntityExtractor ...
+ ReadableType7PrebuiltEntityExtractor ReadableType7 = "Prebuilt Entity Extractor"
+ // ReadableType7RegexEntityExtractor ...
+ ReadableType7RegexEntityExtractor ReadableType7 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType7Values returns an array of possible values for the ReadableType7 const type.
+func PossibleReadableType7Values() []ReadableType7 {
+ return []ReadableType7{ReadableType7ClosedListEntityExtractor, ReadableType7CompositeEntityExtractor, ReadableType7EntityExtractor, ReadableType7HierarchicalChildEntityExtractor, ReadableType7HierarchicalEntityExtractor, ReadableType7IntentClassifier, ReadableType7PatternAnyEntityExtractor, ReadableType7PrebuiltEntityExtractor, ReadableType7RegexEntityExtractor}
+}
+
+// ReadableType8 enumerates the values for readable type 8.
+type ReadableType8 string
+
+const (
+ // ReadableType8ClosedListEntityExtractor ...
+ ReadableType8ClosedListEntityExtractor ReadableType8 = "Closed List Entity Extractor"
+ // ReadableType8CompositeEntityExtractor ...
+ ReadableType8CompositeEntityExtractor ReadableType8 = "Composite Entity Extractor"
+ // ReadableType8EntityExtractor ...
+ ReadableType8EntityExtractor ReadableType8 = "Entity Extractor"
+ // ReadableType8HierarchicalChildEntityExtractor ...
+ ReadableType8HierarchicalChildEntityExtractor ReadableType8 = "Hierarchical Child Entity Extractor"
+ // ReadableType8HierarchicalEntityExtractor ...
+ ReadableType8HierarchicalEntityExtractor ReadableType8 = "Hierarchical Entity Extractor"
+ // ReadableType8IntentClassifier ...
+ ReadableType8IntentClassifier ReadableType8 = "Intent Classifier"
+ // ReadableType8PatternAnyEntityExtractor ...
+ ReadableType8PatternAnyEntityExtractor ReadableType8 = "Pattern.Any Entity Extractor"
+ // ReadableType8PrebuiltEntityExtractor ...
+ ReadableType8PrebuiltEntityExtractor ReadableType8 = "Prebuilt Entity Extractor"
+ // ReadableType8RegexEntityExtractor ...
+ ReadableType8RegexEntityExtractor ReadableType8 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType8Values returns an array of possible values for the ReadableType8 const type.
+func PossibleReadableType8Values() []ReadableType8 {
+ return []ReadableType8{ReadableType8ClosedListEntityExtractor, ReadableType8CompositeEntityExtractor, ReadableType8EntityExtractor, ReadableType8HierarchicalChildEntityExtractor, ReadableType8HierarchicalEntityExtractor, ReadableType8IntentClassifier, ReadableType8PatternAnyEntityExtractor, ReadableType8PrebuiltEntityExtractor, ReadableType8RegexEntityExtractor}
+}
+
+// ReadableType9 enumerates the values for readable type 9.
+type ReadableType9 string
+
+const (
+ // ReadableType9ClosedListEntityExtractor ...
+ ReadableType9ClosedListEntityExtractor ReadableType9 = "Closed List Entity Extractor"
+ // ReadableType9CompositeEntityExtractor ...
+ ReadableType9CompositeEntityExtractor ReadableType9 = "Composite Entity Extractor"
+ // ReadableType9EntityExtractor ...
+ ReadableType9EntityExtractor ReadableType9 = "Entity Extractor"
+ // ReadableType9HierarchicalChildEntityExtractor ...
+ ReadableType9HierarchicalChildEntityExtractor ReadableType9 = "Hierarchical Child Entity Extractor"
+ // ReadableType9HierarchicalEntityExtractor ...
+ ReadableType9HierarchicalEntityExtractor ReadableType9 = "Hierarchical Entity Extractor"
+ // ReadableType9IntentClassifier ...
+ ReadableType9IntentClassifier ReadableType9 = "Intent Classifier"
+ // ReadableType9PatternAnyEntityExtractor ...
+ ReadableType9PatternAnyEntityExtractor ReadableType9 = "Pattern.Any Entity Extractor"
+ // ReadableType9PrebuiltEntityExtractor ...
+ ReadableType9PrebuiltEntityExtractor ReadableType9 = "Prebuilt Entity Extractor"
+ // ReadableType9RegexEntityExtractor ...
+ ReadableType9RegexEntityExtractor ReadableType9 = "Regex Entity Extractor"
+)
+
+// PossibleReadableType9Values returns an array of possible values for the ReadableType9 const type.
+func PossibleReadableType9Values() []ReadableType9 {
+ return []ReadableType9{ReadableType9ClosedListEntityExtractor, ReadableType9CompositeEntityExtractor, ReadableType9EntityExtractor, ReadableType9HierarchicalChildEntityExtractor, ReadableType9HierarchicalEntityExtractor, ReadableType9IntentClassifier, ReadableType9PatternAnyEntityExtractor, ReadableType9PrebuiltEntityExtractor, ReadableType9RegexEntityExtractor}
}
// Status enumerates the values for status.
@@ -351,21 +570,23 @@ type ClosedList struct {
Name *string `json:"name,omitempty"`
// SubLists - Sublists for the feature.
SubLists *[]SubClosedList `json:"subLists,omitempty"`
+ Roles *[]string `json:"roles,omitempty"`
}
// ClosedListEntityExtractor closed List Entity Extractor.
type ClosedListEntityExtractor struct {
autorest.Response `json:"-"`
- // SubLists - List of sub-lists.
- SubLists *[]SubClosedListResponse `json:"subLists,omitempty"`
// ID - The ID of the Entity Model.
ID *uuid.UUID `json:"id,omitempty"`
// Name - Name of the Entity Model.
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
- // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
- ReadableType ReadableType `json:"readableType,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType4EntityExtractor', 'ReadableType4HierarchicalEntityExtractor', 'ReadableType4HierarchicalChildEntityExtractor', 'ReadableType4CompositeEntityExtractor', 'ReadableType4ClosedListEntityExtractor', 'ReadableType4PrebuiltEntityExtractor', 'ReadableType4IntentClassifier', 'ReadableType4PatternAnyEntityExtractor', 'ReadableType4RegexEntityExtractor'
+ ReadableType ReadableType4 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ // SubLists - List of sub-lists.
+ SubLists *[]SubClosedListResponse `json:"subLists,omitempty"`
}
// ClosedListModelCreateObject object model for creating a closed list.
@@ -404,16 +625,17 @@ type CompositeChildModelCreateObject struct {
// CompositeEntityExtractor a Composite Entity Extractor.
type CompositeEntityExtractor struct {
autorest.Response `json:"-"`
- // Children - List of child entities.
- Children *[]ChildEntity `json:"children,omitempty"`
// ID - The ID of the Entity Model.
ID *uuid.UUID `json:"id,omitempty"`
// Name - Name of the Entity Model.
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
- // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
- ReadableType ReadableType `json:"readableType,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType3EntityExtractor', 'ReadableType3HierarchicalEntityExtractor', 'ReadableType3HierarchicalChildEntityExtractor', 'ReadableType3CompositeEntityExtractor', 'ReadableType3ClosedListEntityExtractor', 'ReadableType3PrebuiltEntityExtractor', 'ReadableType3IntentClassifier', 'ReadableType3PatternAnyEntityExtractor', 'ReadableType3RegexEntityExtractor'
+ ReadableType ReadableType3 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ // Children - List of child entities.
+ Children *[]ChildEntity `json:"children,omitempty"`
}
// CompositeEntityModel a composite entity.
@@ -432,12 +654,13 @@ type CustomPrebuiltModel struct {
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
- // ReadableType - Possible values include: 'ReadableType3EntityExtractor', 'ReadableType3HierarchicalEntityExtractor', 'ReadableType3HierarchicalChildEntityExtractor', 'ReadableType3CompositeEntityExtractor', 'ReadableType3ClosedListEntityExtractor', 'ReadableType3PrebuiltEntityExtractor', 'ReadableType3IntentClassifier'
- ReadableType ReadableType3 `json:"readableType,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType7EntityExtractor', 'ReadableType7HierarchicalEntityExtractor', 'ReadableType7HierarchicalChildEntityExtractor', 'ReadableType7CompositeEntityExtractor', 'ReadableType7ClosedListEntityExtractor', 'ReadableType7PrebuiltEntityExtractor', 'ReadableType7IntentClassifier', 'ReadableType7PatternAnyEntityExtractor', 'ReadableType7RegexEntityExtractor'
+ ReadableType ReadableType7 `json:"readableType,omitempty"`
// CustomPrebuiltDomainName - The domain name.
CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
// CustomPrebuiltModelName - The intent name or entity name.
- CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
+ CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
}
// EndpointInfo the base class "ProductionOrStagingEndpointInfo" inherits from.
@@ -482,18 +705,19 @@ type EntitiesSuggestionExample struct {
// EntityExtractor entity Extractor.
type EntityExtractor struct {
autorest.Response `json:"-"`
- // CustomPrebuiltDomainName - The domain name.
- CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
- // CustomPrebuiltModelName - The intent name or entity name.
- CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
// ID - The ID of the Entity Model.
ID *uuid.UUID `json:"id,omitempty"`
// Name - Name of the Entity Model.
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
- // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
- ReadableType ReadableType `json:"readableType,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType8EntityExtractor', 'ReadableType8HierarchicalEntityExtractor', 'ReadableType8HierarchicalChildEntityExtractor', 'ReadableType8CompositeEntityExtractor', 'ReadableType8ClosedListEntityExtractor', 'ReadableType8PrebuiltEntityExtractor', 'ReadableType8IntentClassifier', 'ReadableType8PatternAnyEntityExtractor', 'ReadableType8RegexEntityExtractor'
+ ReadableType ReadableType8 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ // CustomPrebuiltDomainName - The domain name.
+ CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
+ // CustomPrebuiltModelName - The intent name or entity name.
+ CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
}
// EntityLabel defines the entity type and position of the extracted entity within the example.
@@ -516,6 +740,19 @@ type EntityLabelObject struct {
EndCharIndex *int32 `json:"endCharIndex,omitempty"`
}
+// EntityModelInfo an Entity Extractor model info.
+type EntityModelInfo struct {
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegexEntityExtractor'
+ ReadableType ReadableType `json:"readableType,omitempty"`
+}
+
// EntityPrediction a suggested entity.
type EntityPrediction struct {
// EntityName - The entity's name
@@ -528,6 +765,27 @@ type EntityPrediction struct {
Phrase *string `json:"phrase,omitempty"`
}
+// EntityRole entity extractor role
+type EntityRole struct {
+ autorest.Response `json:"-"`
+ // ID - The entity role ID.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - The entity role name.
+ Name *string `json:"name,omitempty"`
+}
+
+// EntityRoleCreateObject object model for creating an entity role.
+type EntityRoleCreateObject struct {
+ // Name - The entity role name.
+ Name *string `json:"name,omitempty"`
+}
+
+// EntityRoleUpdateObject object model for updating an entity role.
+type EntityRoleUpdateObject struct {
+ // Name - The entity role name.
+ Name *string `json:"name,omitempty"`
+}
+
// ErrorResponse error response when invoking an operation on the API.
type ErrorResponse struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -557,6 +815,27 @@ type ExampleLabelObject struct {
IntentName *string `json:"intentName,omitempty"`
}
+// ExplicitListItem explicit list item
+type ExplicitListItem struct {
+ autorest.Response `json:"-"`
+ // ID - The explicit list item ID.
+ ID *int64 `json:"id,omitempty"`
+ // ExplicitListItem - The explicit list item value.
+ ExplicitListItem *string `json:"explicitListItem,omitempty"`
+}
+
+// ExplicitListItemCreateObject object model for creating an explicit list item.
+type ExplicitListItemCreateObject struct {
+ // ExplicitListItem - The explicit list item.
+ ExplicitListItem *string `json:"explicitListItem,omitempty"`
+}
+
+// ExplicitListItemUpdateObject model object for updating an explicit list item.
+type ExplicitListItemUpdateObject struct {
+ // ExplicitListItem - The explicit list item.
+ ExplicitListItem *string `json:"explicitListItem,omitempty"`
+}
+
// FeatureInfoObject the base class Features-related response objects inherit from.
type FeatureInfoObject struct {
// ID - A six-digit ID used for Features.
@@ -579,8 +858,8 @@ type HierarchicalChildEntity struct {
autorest.Response `json:"-"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
- // ReadableType - Possible values include: 'ReadableType2EntityExtractor', 'ReadableType2HierarchicalEntityExtractor', 'ReadableType2HierarchicalChildEntityExtractor', 'ReadableType2CompositeEntityExtractor', 'ReadableType2ClosedListEntityExtractor', 'ReadableType2PrebuiltEntityExtractor', 'ReadableType2IntentClassifier'
- ReadableType ReadableType2 `json:"readableType,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType6EntityExtractor', 'ReadableType6HierarchicalEntityExtractor', 'ReadableType6HierarchicalChildEntityExtractor', 'ReadableType6CompositeEntityExtractor', 'ReadableType6ClosedListEntityExtractor', 'ReadableType6PrebuiltEntityExtractor', 'ReadableType6IntentClassifier', 'ReadableType6PatternAnyEntityExtractor', 'ReadableType6RegexEntityExtractor'
+ ReadableType ReadableType6 `json:"readableType,omitempty"`
// ID - The ID (GUID) belonging to a child entity.
ID *uuid.UUID `json:"id,omitempty"`
// Name - The name of a child entity.
@@ -600,16 +879,17 @@ type HierarchicalChildModelUpdateObject struct {
// HierarchicalEntityExtractor hierarchical Entity Extractor.
type HierarchicalEntityExtractor struct {
autorest.Response `json:"-"`
- // Children - List of child entities.
- Children *[]ChildEntity `json:"children,omitempty"`
// ID - The ID of the Entity Model.
ID *uuid.UUID `json:"id,omitempty"`
// Name - Name of the Entity Model.
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
- // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
- ReadableType ReadableType `json:"readableType,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType2EntityExtractor', 'ReadableType2HierarchicalEntityExtractor', 'ReadableType2HierarchicalChildEntityExtractor', 'ReadableType2CompositeEntityExtractor', 'ReadableType2ClosedListEntityExtractor', 'ReadableType2PrebuiltEntityExtractor', 'ReadableType2IntentClassifier', 'ReadableType2PatternAnyEntityExtractor', 'ReadableType2RegexEntityExtractor'
+ ReadableType ReadableType2 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ // Children - List of child entities.
+ Children *[]ChildEntity `json:"children,omitempty"`
}
// HierarchicalEntityModel a Hierarchical Entity Extractor.
@@ -622,8 +902,10 @@ type HierarchicalEntityModel struct {
// HierarchicalModel ...
type HierarchicalModel struct {
- Name *string `json:"name,omitempty"`
- Children *[]string `json:"children,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Children *[]string `json:"children,omitempty"`
+ Inherits *PrebuiltDomainObject `json:"inherits,omitempty"`
+ Roles *[]string `json:"roles,omitempty"`
}
// Int32 ...
@@ -645,7 +927,7 @@ type IntentClassifier struct {
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
- // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
+ // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegexEntityExtractor'
ReadableType ReadableType `json:"readableType,omitempty"`
}
@@ -792,6 +1074,18 @@ type ListEntityExtractor struct {
Value *[]EntityExtractor `json:"value,omitempty"`
}
+// ListEntityRole ...
+type ListEntityRole struct {
+ autorest.Response `json:"-"`
+ Value *[]EntityRole `json:"value,omitempty"`
+}
+
+// ListExplicitListItem ...
+type ListExplicitListItem struct {
+ autorest.Response `json:"-"`
+ Value *[]ExplicitListItem `json:"value,omitempty"`
+}
+
// ListHierarchicalEntityExtractor ...
type ListHierarchicalEntityExtractor struct {
autorest.Response `json:"-"`
@@ -828,6 +1122,18 @@ type ListModelTrainingInfo struct {
Value *[]ModelTrainingInfo `json:"value,omitempty"`
}
+// ListPatternAnyEntityExtractor ...
+type ListPatternAnyEntityExtractor struct {
+ autorest.Response `json:"-"`
+ Value *[]PatternAnyEntityExtractor `json:"value,omitempty"`
+}
+
+// ListPatternRuleInfo ...
+type ListPatternRuleInfo struct {
+ autorest.Response `json:"-"`
+ Value *[]PatternRuleInfo `json:"value,omitempty"`
+}
+
// ListPhraseListFeatureInfo ...
type ListPhraseListFeatureInfo struct {
autorest.Response `json:"-"`
@@ -846,6 +1152,12 @@ type ListPrebuiltEntityExtractor struct {
Value *[]PrebuiltEntityExtractor `json:"value,omitempty"`
}
+// ListRegexEntityExtractor ...
+type ListRegexEntityExtractor struct {
+ autorest.Response `json:"-"`
+ Value *[]RegexEntityExtractor `json:"value,omitempty"`
+}
+
// ListString ...
type ListString struct {
autorest.Response `json:"-"`
@@ -881,16 +1193,22 @@ type LuisApp struct {
Intents *[]HierarchicalModel `json:"intents,omitempty"`
// Entities - List of entities.
Entities *[]HierarchicalModel `json:"entities,omitempty"`
- // BingEntities - List of prebuilt intents.
- BingEntities *[]string `json:"bing_entities,omitempty"`
// ClosedLists - List of closed lists.
ClosedLists *[]ClosedList `json:"closedLists,omitempty"`
// Composites - List of composite entities.
Composites *[]HierarchicalModel `json:"composites,omitempty"`
+ // PatternAnyEntities - List of Pattern.Any entities.
+ PatternAnyEntities *[]PatternAny `json:"patternAnyEntities,omitempty"`
+ // RegexEntities - List of regular expression entities.
+ RegexEntities *[]RegexEntity `json:"regex_entities,omitempty"`
+ // PrebuiltEntities - List of prebuilt entities.
+ PrebuiltEntities *[]PrebuiltEntity `json:"prebuiltEntities,omitempty"`
// RegexFeatures - List of pattern features.
RegexFeatures *[]JSONRegexFeature `json:"regex_features,omitempty"`
// ModelFeatures - List of model features.
ModelFeatures *[]JSONModelFeature `json:"model_features,omitempty"`
+ // Patterns - List of patterns.
+ Patterns *[]PatternRule `json:"patterns,omitempty"`
// Utterances - List of sample utterances.
Utterances *[]JSONUtterance `json:"utterances,omitempty"`
}
@@ -916,21 +1234,30 @@ func (la LuisApp) MarshalJSON() ([]byte, error) {
if la.Entities != nil {
objectMap["entities"] = la.Entities
}
- if la.BingEntities != nil {
- objectMap["bing_entities"] = la.BingEntities
- }
if la.ClosedLists != nil {
objectMap["closedLists"] = la.ClosedLists
}
if la.Composites != nil {
objectMap["composites"] = la.Composites
}
+ if la.PatternAnyEntities != nil {
+ objectMap["patternAnyEntities"] = la.PatternAnyEntities
+ }
+ if la.RegexEntities != nil {
+ objectMap["regex_entities"] = la.RegexEntities
+ }
+ if la.PrebuiltEntities != nil {
+ objectMap["prebuiltEntities"] = la.PrebuiltEntities
+ }
if la.RegexFeatures != nil {
objectMap["regex_features"] = la.RegexFeatures
}
if la.ModelFeatures != nil {
objectMap["model_features"] = la.ModelFeatures
}
+ if la.Patterns != nil {
+ objectMap["patterns"] = la.Patterns
+ }
if la.Utterances != nil {
objectMap["utterances"] = la.Utterances
}
@@ -954,12 +1281,21 @@ type ModelInfo struct {
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
- // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
+ // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegexEntityExtractor'
ReadableType ReadableType `json:"readableType,omitempty"`
}
// ModelInfoResponse an application model info.
type ModelInfoResponse struct {
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType1EntityExtractor', 'ReadableType1HierarchicalEntityExtractor', 'ReadableType1HierarchicalChildEntityExtractor', 'ReadableType1CompositeEntityExtractor', 'ReadableType1ClosedListEntityExtractor', 'ReadableType1PrebuiltEntityExtractor', 'ReadableType1IntentClassifier', 'ReadableType1PatternAnyEntityExtractor', 'ReadableType1RegexEntityExtractor'
+ ReadableType ReadableType1 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
// Children - List of child entities.
Children *[]ChildEntity `json:"children,omitempty"`
// SubLists - List of sub-lists.
@@ -968,14 +1304,9 @@ type ModelInfoResponse struct {
CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
// CustomPrebuiltModelName - The intent name or entity name.
CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
- // ID - The ID of the Entity Model.
- ID *uuid.UUID `json:"id,omitempty"`
- // Name - Name of the Entity Model.
- Name *string `json:"name,omitempty"`
- // TypeID - The type ID of the Entity Model.
- TypeID *int32 `json:"typeId,omitempty"`
- // ReadableType - Possible values include: 'ReadableType1EntityExtractor', 'ReadableType1HierarchicalEntityExtractor', 'ReadableType1HierarchicalChildEntityExtractor', 'ReadableType1CompositeEntityExtractor', 'ReadableType1ClosedListEntityExtractor', 'ReadableType1PrebuiltEntityExtractor', 'ReadableType1IntentClassifier'
- ReadableType ReadableType1 `json:"readableType,omitempty"`
+ // RegexPattern - The Regex entity pattern.
+ RegexPattern *string `json:"regexPattern,omitempty"`
+ ExplicitList *[]ExplicitListItem `json:"explicitList,omitempty"`
}
// ModelTrainingDetails model Training Details.
@@ -1020,6 +1351,44 @@ type OperationStatus struct {
Message *string `json:"message,omitempty"`
}
+// PatternAny pattern.Any Entity Extractor.
+type PatternAny struct {
+ Name *string `json:"name,omitempty"`
+ ExplicitList *[]string `json:"explicitList,omitempty"`
+ Roles *[]string `json:"roles,omitempty"`
+}
+
+// PatternAnyEntityExtractor pattern.Any Entity Extractor.
+type PatternAnyEntityExtractor struct {
+ autorest.Response `json:"-"`
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType10EntityExtractor', 'ReadableType10HierarchicalEntityExtractor', 'ReadableType10HierarchicalChildEntityExtractor', 'ReadableType10CompositeEntityExtractor', 'ReadableType10ClosedListEntityExtractor', 'ReadableType10PrebuiltEntityExtractor', 'ReadableType10IntentClassifier', 'ReadableType10PatternAnyEntityExtractor', 'ReadableType10RegexEntityExtractor'
+ ReadableType ReadableType10 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ ExplicitList *[]ExplicitListItem `json:"explicitList,omitempty"`
+}
+
+// PatternAnyModelCreateObject model object for creating a Pattern.Any entity model.
+type PatternAnyModelCreateObject struct {
+ // Name - The model name.
+ Name *string `json:"name,omitempty"`
+ // ExplicitList - The Pattern.Any explicit list.
+ ExplicitList *[]string `json:"explicitList,omitempty"`
+}
+
+// PatternAnyModelUpdateObject model object for updating a Pattern.Any entity model.
+type PatternAnyModelUpdateObject struct {
+ // Name - The model name.
+ Name *string `json:"name,omitempty"`
+ // ExplicitList - The Pattern.Any explicit list.
+ ExplicitList *[]string `json:"explicitList,omitempty"`
+}
+
// PatternCreateObject object model for creating a Pattern feature.
type PatternCreateObject struct {
// Pattern - The Regular Expression to match.
@@ -1040,6 +1409,43 @@ type PatternFeatureInfo struct {
IsActive *bool `json:"isActive,omitempty"`
}
+// PatternRule pattern
+type PatternRule struct {
+ // Pattern - The pattern text.
+ Pattern *string `json:"pattern,omitempty"`
+ // Intent - The intent's name where the pattern belongs to.
+ Intent *string `json:"intent,omitempty"`
+}
+
+// PatternRuleCreateObject object model for creating a pattern
+type PatternRuleCreateObject struct {
+ // Pattern - The pattern text.
+ Pattern *string `json:"pattern,omitempty"`
+ // Intent - The intent's name which the pattern belongs to.
+ Intent *string `json:"intent,omitempty"`
+}
+
+// PatternRuleInfo pattern rule
+type PatternRuleInfo struct {
+ autorest.Response `json:"-"`
+ // ID - The pattern ID.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Pattern - The pattern text.
+ Pattern *string `json:"pattern,omitempty"`
+ // Intent - The intent's name where the pattern belongs to.
+ Intent *string `json:"intent,omitempty"`
+}
+
+// PatternRuleUpdateObject object model for updating a pattern.
+type PatternRuleUpdateObject struct {
+ // ID - The pattern ID.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Pattern - The pattern text.
+ Pattern *string `json:"pattern,omitempty"`
+ // Intent - The intent's name which the pattern belongs to.
+ Intent *string `json:"intent,omitempty"`
+}
+
// PatternUpdateObject object model for updating an existing Pattern feature.
type PatternUpdateObject struct {
// Pattern - The Regular Expression to match.
@@ -1148,6 +1554,18 @@ type PrebuiltDomainModelCreateObject struct {
ModelName *string `json:"modelName,omitempty"`
}
+// PrebuiltDomainObject ...
+type PrebuiltDomainObject struct {
+ DomainName *string `json:"domain_name,omitempty"`
+ ModelName *string `json:"model_name,omitempty"`
+}
+
+// PrebuiltEntity prebuilt Entity Extractor.
+type PrebuiltEntity struct {
+ Name *string `json:"name,omitempty"`
+ Roles *[]string `json:"roles,omitempty"`
+}
+
// PrebuiltEntityExtractor prebuilt Entity Extractor.
type PrebuiltEntityExtractor struct {
autorest.Response `json:"-"`
@@ -1157,8 +1575,9 @@ type PrebuiltEntityExtractor struct {
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
- // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
- ReadableType ReadableType `json:"readableType,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType5EntityExtractor', 'ReadableType5HierarchicalEntityExtractor', 'ReadableType5HierarchicalChildEntityExtractor', 'ReadableType5CompositeEntityExtractor', 'ReadableType5ClosedListEntityExtractor', 'ReadableType5PrebuiltEntityExtractor', 'ReadableType5IntentClassifier', 'ReadableType5PatternAnyEntityExtractor', 'ReadableType5RegexEntityExtractor'
+ ReadableType ReadableType5 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
}
// ProductionOrStagingEndpointInfo ...
@@ -1186,6 +1605,45 @@ type ReadCloser struct {
Value *io.ReadCloser `json:"value,omitempty"`
}
+// RegexEntity regular Expression Entity Extractor.
+type RegexEntity struct {
+ Name *string `json:"name,omitempty"`
+ RegexPattern *string `json:"regexPattern,omitempty"`
+ Roles *[]string `json:"roles,omitempty"`
+}
+
+// RegexEntityExtractor regex Entity Extractor.
+type RegexEntityExtractor struct {
+ autorest.Response `json:"-"`
+ // ID - The ID of the Entity Model.
+ ID *uuid.UUID `json:"id,omitempty"`
+ // Name - Name of the Entity Model.
+ Name *string `json:"name,omitempty"`
+ // TypeID - The type ID of the Entity Model.
+ TypeID *int32 `json:"typeId,omitempty"`
+ // ReadableType - Possible values include: 'ReadableType9EntityExtractor', 'ReadableType9HierarchicalEntityExtractor', 'ReadableType9HierarchicalChildEntityExtractor', 'ReadableType9CompositeEntityExtractor', 'ReadableType9ClosedListEntityExtractor', 'ReadableType9PrebuiltEntityExtractor', 'ReadableType9IntentClassifier', 'ReadableType9PatternAnyEntityExtractor', 'ReadableType9RegexEntityExtractor'
+ ReadableType ReadableType9 `json:"readableType,omitempty"`
+ Roles *[]EntityRole `json:"roles,omitempty"`
+ // RegexPattern - The Regex entity pattern.
+ RegexPattern *string `json:"regexPattern,omitempty"`
+}
+
+// RegexModelCreateObject model object for creating a regex entity model.
+type RegexModelCreateObject struct {
+ // RegexPattern - The regex entity pattern.
+ RegexPattern *string `json:"regexPattern,omitempty"`
+ // Name - The model name.
+ Name *string `json:"name,omitempty"`
+}
+
+// RegexModelUpdateObject model object for updating a regex entity model.
+type RegexModelUpdateObject struct {
+ // RegexPattern - The regex entity pattern.
+ RegexPattern *string `json:"regexPattern,omitempty"`
+ // Name - The model name.
+ Name *string `json:"name,omitempty"`
+}
+
// SetString ...
type SetString struct {
autorest.Response `json:"-"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/programmatic/pattern.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/programmatic/pattern.go
new file mode 100644
index 000000000..fc6e4a7d9
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/programmatic/pattern.go
@@ -0,0 +1,642 @@
+package programmatic
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// PatternClient is the client for the Pattern methods of the Programmatic service.
+type PatternClient struct {
+ BaseClient
+}
+
+// NewPatternClient creates an instance of the PatternClient client.
+func NewPatternClient(azureRegion AzureRegions) PatternClient {
+ return PatternClient{New(azureRegion)}
+}
+
+// AddPattern sends the add pattern request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// pattern - the input pattern.
+func (client PatternClient) AddPattern(ctx context.Context, appID uuid.UUID, versionID string, pattern PatternRuleCreateObject) (result PatternRuleInfo, err error) {
+ req, err := client.AddPatternPreparer(ctx, appID, versionID, pattern)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "AddPattern", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddPatternSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "AddPattern", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddPatternResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "AddPattern", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddPatternPreparer prepares the AddPattern request.
+func (client PatternClient) AddPatternPreparer(ctx context.Context, appID uuid.UUID, versionID string, pattern PatternRuleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrule", pathParameters),
+ autorest.WithJSON(pattern))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddPatternSender sends the AddPattern request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) AddPatternSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddPatternResponder handles the response to the AddPattern request. The method always
+// closes the http.Response Body.
+func (client PatternClient) AddPatternResponder(resp *http.Response) (result PatternRuleInfo, 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
+}
+
+// BatchAddPatterns sends the batch add patterns request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// patterns - a JSON array containing patterns.
+func (client PatternClient) BatchAddPatterns(ctx context.Context, appID uuid.UUID, versionID string, patterns []PatternRuleCreateObject) (result ListPatternRuleInfo, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: patterns,
+ Constraints: []validation.Constraint{{Target: "patterns", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("programmatic.PatternClient", "BatchAddPatterns", err.Error())
+ }
+
+ req, err := client.BatchAddPatternsPreparer(ctx, appID, versionID, patterns)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "BatchAddPatterns", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.BatchAddPatternsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "BatchAddPatterns", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.BatchAddPatternsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "BatchAddPatterns", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// BatchAddPatternsPreparer prepares the BatchAddPatterns request.
+func (client PatternClient) BatchAddPatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, patterns []PatternRuleCreateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters),
+ autorest.WithJSON(patterns))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// BatchAddPatternsSender sends the BatchAddPatterns request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) BatchAddPatternsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// BatchAddPatternsResponder handles the response to the BatchAddPatterns request. The method always
+// closes the http.Response Body.
+func (client PatternClient) BatchAddPatternsResponder(resp *http.Response) (result ListPatternRuleInfo, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeletePattern sends the delete pattern request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// patternID - the pattern ID.
+func (client PatternClient) DeletePattern(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID) (result OperationStatus, err error) {
+ req, err := client.DeletePatternPreparer(ctx, appID, versionID, patternID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "DeletePattern", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeletePatternSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "DeletePattern", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeletePatternResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "DeletePattern", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePatternPreparer prepares the DeletePattern request.
+func (client PatternClient) DeletePatternPreparer(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "patternId": autorest.Encode("path", patternID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules/{patternId}", pathParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeletePatternSender sends the DeletePattern request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) DeletePatternSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeletePatternResponder handles the response to the DeletePattern request. The method always
+// closes the http.Response Body.
+func (client PatternClient) DeletePatternResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeletePatterns sends the delete patterns request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// patternIds - the patterns IDs.
+func (client PatternClient) DeletePatterns(ctx context.Context, appID uuid.UUID, versionID string, patternIds []uuid.UUID) (result OperationStatus, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: patternIds,
+ Constraints: []validation.Constraint{{Target: "patternIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("programmatic.PatternClient", "DeletePatterns", err.Error())
+ }
+
+ req, err := client.DeletePatternsPreparer(ctx, appID, versionID, patternIds)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "DeletePatterns", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeletePatternsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "DeletePatterns", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeletePatternsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "DeletePatterns", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePatternsPreparer prepares the DeletePatterns request.
+func (client PatternClient) DeletePatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, patternIds []uuid.UUID) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsDelete(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters),
+ autorest.WithJSON(patternIds))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeletePatternsSender sends the DeletePatterns request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) DeletePatternsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeletePatternsResponder handles the response to the DeletePatterns request. The method always
+// closes the http.Response Body.
+func (client PatternClient) DeletePatternsResponder(resp *http.Response) (result OperationStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetIntentPatterns sends the get intent patterns request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// intentID - the intent classifier ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client PatternClient) GetIntentPatterns(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, skip *int32, take *int32) (result ListPatternRuleInfo, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("programmatic.PatternClient", "GetIntentPatterns", err.Error())
+ }
+
+ req, err := client.GetIntentPatternsPreparer(ctx, appID, versionID, intentID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "GetIntentPatterns", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetIntentPatternsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "GetIntentPatterns", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetIntentPatternsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "GetIntentPatterns", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetIntentPatternsPreparer prepares the GetIntentPatterns request.
+func (client PatternClient) GetIntentPatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "intentId": autorest.Encode("path", intentID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/patternrules", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetIntentPatternsSender sends the GetIntentPatterns request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) GetIntentPatternsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetIntentPatternsResponder handles the response to the GetIntentPatterns request. The method always
+// closes the http.Response Body.
+func (client PatternClient) GetIntentPatternsResponder(resp *http.Response) (result ListPatternRuleInfo, 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
+}
+
+// GetPatterns sends the get patterns request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// skip - the number of entries to skip. Default value is 0.
+// take - the number of entries to return. Maximum page size is 500. Default is 100.
+func (client PatternClient) GetPatterns(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPatternRuleInfo, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}},
+ {TargetValue: take,
+ Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: 500, Chain: nil},
+ {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("programmatic.PatternClient", "GetPatterns", err.Error())
+ }
+
+ req, err := client.GetPatternsPreparer(ctx, appID, versionID, skip, take)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "GetPatterns", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPatternsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "GetPatterns", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPatternsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "GetPatterns", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPatternsPreparer prepares the GetPatterns request.
+func (client PatternClient) GetPatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ queryParameters := map[string]interface{}{}
+ if skip != nil {
+ queryParameters["skip"] = autorest.Encode("query", *skip)
+ } else {
+ queryParameters["skip"] = autorest.Encode("query", 0)
+ }
+ if take != nil {
+ queryParameters["take"] = autorest.Encode("query", *take)
+ } else {
+ queryParameters["take"] = autorest.Encode("query", 100)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPatternsSender sends the GetPatterns request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) GetPatternsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetPatternsResponder handles the response to the GetPatterns request. The method always
+// closes the http.Response Body.
+func (client PatternClient) GetPatternsResponder(resp *http.Response) (result ListPatternRuleInfo, 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
+}
+
+// UpdatePattern sends the update pattern request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// patternID - the pattern ID.
+// pattern - an object representing a pattern.
+func (client PatternClient) UpdatePattern(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID, pattern PatternRuleUpdateObject) (result PatternRuleInfo, err error) {
+ req, err := client.UpdatePatternPreparer(ctx, appID, versionID, patternID, pattern)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "UpdatePattern", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdatePatternSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "UpdatePattern", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdatePatternResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "UpdatePattern", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePatternPreparer prepares the UpdatePattern request.
+func (client PatternClient) UpdatePatternPreparer(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID, pattern PatternRuleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "patternId": autorest.Encode("path", patternID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules/{patternId}", pathParameters),
+ autorest.WithJSON(pattern))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdatePatternSender sends the UpdatePattern request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) UpdatePatternSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdatePatternResponder handles the response to the UpdatePattern request. The method always
+// closes the http.Response Body.
+func (client PatternClient) UpdatePatternResponder(resp *http.Response) (result PatternRuleInfo, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdatePatterns sends the update patterns request.
+// Parameters:
+// appID - the application ID.
+// versionID - the version ID.
+// patterns - an array represents the patterns.
+func (client PatternClient) UpdatePatterns(ctx context.Context, appID uuid.UUID, versionID string, patterns []PatternRuleUpdateObject) (result ListPatternRuleInfo, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: patterns,
+ Constraints: []validation.Constraint{{Target: "patterns", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("programmatic.PatternClient", "UpdatePatterns", err.Error())
+ }
+
+ req, err := client.UpdatePatternsPreparer(ctx, appID, versionID, patterns)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "UpdatePatterns", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdatePatternsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "UpdatePatterns", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdatePatternsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "programmatic.PatternClient", "UpdatePatterns", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePatternsPreparer prepares the UpdatePatterns request.
+func (client PatternClient) UpdatePatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, patterns []PatternRuleUpdateObject) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "AzureRegion": client.AzureRegion,
+ }
+
+ pathParameters := map[string]interface{}{
+ "appId": autorest.Encode("path", appID),
+ "versionId": autorest.Encode("path", versionID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/luis/api/v2.0", urlParameters),
+ autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters),
+ autorest.WithJSON(patterns))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdatePatternsSender sends the UpdatePatterns request. The method will close the
+// http.Response Body if it receives an error.
+func (client PatternClient) UpdatePatternsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdatePatternsResponder handles the response to the UpdatePatterns request. The method always
+// closes the http.Response Body.
+func (client PatternClient) UpdatePatternsResponder(resp *http.Response) (result ListPatternRuleInfo, 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/services/cognitiveservices/v2.0/luis/runtime/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/runtime/models.go
index fef752e35..a97ba4f09 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/runtime/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/runtime/models.go
@@ -218,13 +218,13 @@ type LuisResult struct {
Entities *[]EntityModel `json:"entities,omitempty"`
// CompositeEntities - The composite entities extracted from the utterance.
CompositeEntities *[]CompositeEntityModel `json:"compositeEntities,omitempty"`
- Sentiment *Sentiment `json:"sentiment,omitempty"`
+ SentimentAnalysis *Sentiment `json:"sentimentAnalysis,omitempty"`
}
// Sentiment sentiment of the input utterance.
type Sentiment struct {
// Label - The polarity of the sentiment, can be positive, neutral or negative.
Label *string `json:"label,omitempty"`
- // Score - Score of the sentiment, ranges from 0 (most negative) to 1 (most negative).
+ // Score - Score of the sentiment, ranges from 0 (most negative) to 1 (most positive).
Score *float64 `json:"score,omitempty"`
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/models.go
index 5e0c9ee49..bc0307490 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/models.go
@@ -1530,12 +1530,11 @@ type VirtualMachineExtensionProperties struct {
// long-running operation.
type VirtualMachineExtensionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+func (future *VirtualMachineExtensionsCreateOrUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1543,34 +1542,15 @@ func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client Virtual
return
}
if !done {
- return vme, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vme, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vme, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1579,12 +1559,11 @@ func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client Virtual
// operation.
type VirtualMachineExtensionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineExtensionsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineExtensionsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1592,34 +1571,15 @@ func (future VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineE
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1628,12 +1588,11 @@ func (future VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineE
// operation.
type VirtualMachineExtensionsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+func (future *VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1641,34 +1600,15 @@ func (future VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineE
return
}
if !done {
- return vme, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vme, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.UpdateResponder(vme.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vme, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2767,12 +2707,11 @@ type VirtualMachineScaleSetProperties struct {
// long-running operation.
type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
+func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2780,34 +2719,15 @@ func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualM
return
}
if !done {
- return vmss, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmss, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
+ vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vmss, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2816,12 +2736,11 @@ func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualM
// long-running operation.
type VirtualMachineScaleSetsDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2829,34 +2748,15 @@ func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2865,12 +2765,11 @@ func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachi
// operation.
type VirtualMachineScaleSetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2878,34 +2777,15 @@ func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineSc
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2914,12 +2794,11 @@ func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineSc
// long-running operation.
type VirtualMachineScaleSetsDeleteInstancesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeleteInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeleteInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2927,34 +2806,15 @@ func (future VirtualMachineScaleSetsDeleteInstancesFuture) Result(client Virtual
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteInstancesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteInstancesResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteInstancesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2985,12 +2845,11 @@ type VirtualMachineScaleSetSkuCapacity struct {
// operation.
type VirtualMachineScaleSetsPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2998,34 +2857,15 @@ func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachine
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3034,12 +2874,11 @@ func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachine
// operation.
type VirtualMachineScaleSetsReimageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3047,34 +2886,15 @@ func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3083,12 +2903,11 @@ func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineS
// operation.
type VirtualMachineScaleSetsRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3096,34 +2915,15 @@ func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3132,12 +2932,11 @@ func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineS
// operation.
type VirtualMachineScaleSetsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3145,34 +2944,15 @@ func (future VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineSca
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3189,12 +2969,11 @@ type VirtualMachineScaleSetStorageProfile struct {
// long-running operation.
type VirtualMachineScaleSetsUpdateInstancesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsUpdateInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsUpdateInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3202,34 +2981,15 @@ func (future VirtualMachineScaleSetsUpdateInstancesFuture) Result(client Virtual
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.UpdateInstancesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.UpdateInstancesResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.UpdateInstancesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3585,12 +3345,11 @@ type VirtualMachineScaleSetVMProperties struct {
// long-running operation.
type VirtualMachineScaleSetVMsDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3598,34 +3357,15 @@ func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMac
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3634,12 +3374,11 @@ func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMac
// operation.
type VirtualMachineScaleSetVMsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3647,34 +3386,15 @@ func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachine
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3683,12 +3403,11 @@ func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachine
// long-running operation.
type VirtualMachineScaleSetVMsPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3696,34 +3415,15 @@ func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3732,12 +3432,11 @@ func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachi
// long-running operation.
type VirtualMachineScaleSetVMsReimageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3745,34 +3444,15 @@ func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachin
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3781,12 +3461,11 @@ func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachin
// long-running operation.
type VirtualMachineScaleSetVMsRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3794,34 +3473,15 @@ func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachin
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3830,12 +3490,11 @@ func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachin
// operation.
type VirtualMachineScaleSetVMsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3843,34 +3502,15 @@ func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3879,12 +3519,11 @@ func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineS
// operation.
type VirtualMachinesCaptureFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
+func (future *VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3892,34 +3531,15 @@ func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return vmcr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmcr, err = client.CaptureResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent {
+ vmcr, err = client.CaptureResponder(vmcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", resp, "Failure sending request")
- return
- }
- vmcr, err = client.CaptureResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3928,12 +3548,11 @@ func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
+func (future *VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3941,34 +3560,15 @@ func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesC
return
}
if !done {
- return VM, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- VM, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
+ VM, err = client.CreateOrUpdateResponder(VM.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- VM, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3977,12 +3577,11 @@ func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesC
// operation.
type VirtualMachinesDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3990,34 +3589,15 @@ func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClien
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4026,12 +3606,11 @@ func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClien
// operation.
type VirtualMachinesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4039,34 +3618,15 @@ func (future VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4098,12 +3658,11 @@ type VirtualMachineSizeListResult struct {
// operation.
type VirtualMachinesPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4111,34 +3670,15 @@ func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4147,12 +3687,11 @@ func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesRedeployFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4160,34 +3699,15 @@ func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RedeployResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RedeployResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RedeployResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4196,12 +3716,11 @@ func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesRestartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4209,34 +3728,15 @@ func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4244,12 +3744,11 @@ func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient)
// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VirtualMachinesStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4257,34 +3756,15 @@ func (future VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (o
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachineextensions.go
index 4898d8a3a..9eb03a669 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachineextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachineextensions.go
@@ -88,15 +88,17 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -306,15 +310,17 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context,
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachines.go
index 3e7992d95..22d818240 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachines.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachines.go
@@ -96,15 +96,17 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc
// CaptureSender sends the Capture request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future VirtualMachinesCaptureFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -191,15 +193,17 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -261,15 +265,17 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future VirtualMachinesDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -330,15 +336,17 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future VirtualMachinesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -790,15 +798,17 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future VirtualMachinesPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -859,15 +869,17 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour
// RedeploySender sends the Redeploy request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future VirtualMachinesRedeployFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -928,15 +940,17 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RestartSender(req *http.Request) (future VirtualMachinesRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -997,15 +1011,17 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) StartSender(req *http.Request) (future VirtualMachinesStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesets.go
index c97cef40e..aacbeca5d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesets.go
@@ -100,15 +100,17 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetsDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -245,15 +249,17 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -323,15 +329,17 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.
// DeleteInstancesSender sends the DeleteInstances request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Request) (future VirtualMachineScaleSetsDeleteInstancesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -814,15 +822,17 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetsPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -883,15 +893,17 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context,
// ReimageSender sends the Reimage request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetsReimageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -958,15 +970,17 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context,
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetsRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1033,15 +1047,17 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1111,15 +1127,17 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.
// UpdateInstancesSender sends the UpdateInstances request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Request) (future VirtualMachineScaleSetsUpdateInstancesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesetvms.go
index 35edaf564..e6d227303 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesetvms.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesetvms.go
@@ -87,15 +87,17 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetVMsDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -475,15 +479,17 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetVMsPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -546,15 +552,17 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex
// ReimageSender sends the Reimage request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -617,15 +625,17 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetVMsRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -688,15 +698,17 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context,
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetVMsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/models.go
index d7a6fd315..2a8bcf1d2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/models.go
@@ -1579,12 +1579,11 @@ type VirtualMachineExtensionProperties struct {
// long-running operation.
type VirtualMachineExtensionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+func (future *VirtualMachineExtensionsCreateOrUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1592,34 +1591,15 @@ func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client Virtual
return
}
if !done {
- return vme, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vme, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vme, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1628,12 +1608,11 @@ func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client Virtual
// operation.
type VirtualMachineExtensionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineExtensionsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineExtensionsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1641,34 +1620,15 @@ func (future VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineE
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1684,12 +1644,11 @@ type VirtualMachineExtensionsListResult struct {
// operation.
type VirtualMachineExtensionsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+func (future *VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1697,34 +1656,15 @@ func (future VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineE
return
}
if !done {
- return vme, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vme, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.UpdateResponder(vme.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vme, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2861,12 +2801,11 @@ type VirtualMachineScaleSetProperties struct {
// long-running operation.
type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
+func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2874,34 +2813,15 @@ func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualM
return
}
if !done {
- return vmss, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmss, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
+ vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vmss, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2910,12 +2830,11 @@ func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualM
// long-running operation.
type VirtualMachineScaleSetsDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2923,34 +2842,15 @@ func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2959,12 +2859,11 @@ func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachi
// operation.
type VirtualMachineScaleSetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2972,34 +2871,15 @@ func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineSc
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3008,12 +2888,11 @@ func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineSc
// long-running operation.
type VirtualMachineScaleSetsDeleteInstancesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeleteInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeleteInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3021,34 +2900,15 @@ func (future VirtualMachineScaleSetsDeleteInstancesFuture) Result(client Virtual
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteInstancesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteInstancesResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteInstancesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3079,12 +2939,11 @@ type VirtualMachineScaleSetSkuCapacity struct {
// operation.
type VirtualMachineScaleSetsPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3092,34 +2951,15 @@ func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachine
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3128,12 +2968,11 @@ func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachine
// operation.
type VirtualMachineScaleSetsReimageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3141,34 +2980,15 @@ func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3177,12 +2997,11 @@ func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineS
// operation.
type VirtualMachineScaleSetsRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3190,34 +3009,15 @@ func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3226,12 +3026,11 @@ func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineS
// operation.
type VirtualMachineScaleSetsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3239,34 +3038,15 @@ func (future VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineSca
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3283,12 +3063,11 @@ type VirtualMachineScaleSetStorageProfile struct {
// long-running operation.
type VirtualMachineScaleSetsUpdateInstancesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsUpdateInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsUpdateInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3296,34 +3075,15 @@ func (future VirtualMachineScaleSetsUpdateInstancesFuture) Result(client Virtual
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.UpdateInstancesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.UpdateInstancesResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.UpdateInstancesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3681,12 +3441,11 @@ type VirtualMachineScaleSetVMProperties struct {
// long-running operation.
type VirtualMachineScaleSetVMsDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3694,34 +3453,15 @@ func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMac
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3730,12 +3470,11 @@ func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMac
// operation.
type VirtualMachineScaleSetVMsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3743,34 +3482,15 @@ func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachine
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3779,12 +3499,11 @@ func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachine
// long-running operation.
type VirtualMachineScaleSetVMsPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3792,34 +3511,15 @@ func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3828,12 +3528,11 @@ func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachi
// long-running operation.
type VirtualMachineScaleSetVMsReimageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3841,34 +3540,15 @@ func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachin
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3877,12 +3557,11 @@ func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachin
// long-running operation.
type VirtualMachineScaleSetVMsRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3890,34 +3569,15 @@ func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachin
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3926,12 +3586,11 @@ func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachin
// operation.
type VirtualMachineScaleSetVMsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3939,34 +3598,15 @@ func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3975,12 +3615,11 @@ func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineS
// operation.
type VirtualMachinesCaptureFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
+func (future *VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3988,34 +3627,15 @@ func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return vmcr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmcr, err = client.CaptureResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent {
+ vmcr, err = client.CaptureResponder(vmcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", resp, "Failure sending request")
- return
- }
- vmcr, err = client.CaptureResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4024,12 +3644,11 @@ func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
+func (future *VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4037,34 +3656,15 @@ func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesC
return
}
if !done {
- return VM, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- VM, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
+ VM, err = client.CreateOrUpdateResponder(VM.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- VM, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4073,12 +3673,11 @@ func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesC
// operation.
type VirtualMachinesDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4086,34 +3685,15 @@ func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClien
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4122,12 +3702,11 @@ func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClien
// operation.
type VirtualMachinesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4135,34 +3714,15 @@ func (future VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4194,12 +3754,11 @@ type VirtualMachineSizeListResult struct {
// operation.
type VirtualMachinesPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4207,34 +3766,15 @@ func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4243,12 +3783,11 @@ func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesRedeployFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4256,34 +3795,15 @@ func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RedeployResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RedeployResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RedeployResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4292,12 +3812,11 @@ func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesRestartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4305,34 +3824,15 @@ func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4340,12 +3840,11 @@ func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient)
// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VirtualMachinesStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4353,34 +3852,15 @@ func (future VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (o
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachineextensions.go
index 6c3411bb1..1fa2bde73 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachineextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachineextensions.go
@@ -88,15 +88,17 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -306,15 +310,17 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context,
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachines.go
index 11ad1ebda..959f1d41b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachines.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachines.go
@@ -96,15 +96,17 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc
// CaptureSender sends the Capture request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future VirtualMachinesCaptureFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -191,15 +193,17 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -261,15 +265,17 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future VirtualMachinesDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -330,15 +336,17 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future VirtualMachinesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -861,15 +869,17 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future VirtualMachinesPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -930,15 +940,17 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour
// RedeploySender sends the Redeploy request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future VirtualMachinesRedeployFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -999,15 +1011,17 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RestartSender(req *http.Request) (future VirtualMachinesRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1068,15 +1082,17 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) StartSender(req *http.Request) (future VirtualMachinesStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesets.go
index 57249b9fe..64fc56c99 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesets.go
@@ -100,15 +100,17 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetsDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -245,15 +249,17 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -323,15 +329,17 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.
// DeleteInstancesSender sends the DeleteInstances request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Request) (future VirtualMachineScaleSetsDeleteInstancesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -814,15 +822,17 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetsPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -883,15 +893,17 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context,
// ReimageSender sends the Reimage request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetsReimageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -958,15 +970,17 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context,
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetsRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1033,15 +1047,17 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1111,15 +1127,17 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.
// UpdateInstancesSender sends the UpdateInstances request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Request) (future VirtualMachineScaleSetsUpdateInstancesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesetvms.go
index fa3815090..d9f4c743a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesetvms.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesetvms.go
@@ -87,15 +87,17 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetVMsDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -475,15 +479,17 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetVMsPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -546,15 +552,17 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex
// ReimageSender sends the Reimage request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -617,15 +625,17 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetVMsRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -688,15 +698,17 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context,
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetVMsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/containerservices.go
index 4d8683691..b16788bfa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/containerservices.go
@@ -119,15 +119,17 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context
// 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) (future ContainerServicesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -191,15 +193,17 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour
// 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) (future ContainerServicesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/disks.go
index b6fa7284a..5063cb96b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/disks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/disks.go
@@ -110,15 +110,17 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
// 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) (future DisksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -181,15 +183,17 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName
// 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) (future DisksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -330,15 +334,17 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup
// 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) (future DisksGrantAccessFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -584,15 +590,17 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou
// 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) (future DisksRevokeAccessFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -658,15 +666,17 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName
// 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) (future DisksUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/images.go
index 19a15461a..9ce8f99da 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/images.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/images.go
@@ -96,15 +96,17 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future ImagesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -165,15 +167,17 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/models.go
index 1e0066d7d..8779d02e0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/models.go
@@ -1298,12 +1298,11 @@ type ContainerServiceProperties struct {
// operation.
type ContainerServicesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesCreateOrUpdateFuture) Result(client ContainerServicesClient) (cs ContainerService, err error) {
+func (future *ContainerServicesCreateOrUpdateFuture) Result(client ContainerServicesClient) (cs ContainerService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1311,34 +1310,15 @@ func (future ContainerServicesCreateOrUpdateFuture) Result(client ContainerServi
return
}
if !done {
- return cs, azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cs, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- cs, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1347,12 +1327,11 @@ func (future ContainerServicesCreateOrUpdateFuture) Result(client ContainerServi
// operation.
type ContainerServicesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesDeleteFuture) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
+func (future *ContainerServicesDeleteFuture) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1360,35 +1339,10 @@ func (future ContainerServicesDeleteFuture) Result(client ContainerServicesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1766,12 +1720,11 @@ type DiskProperties struct {
// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err error) {
+func (future *DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1779,34 +1732,15 @@ func (future DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1814,12 +1748,11 @@ func (future DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err
// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksDeleteFuture) Result(client DisksClient) (osr OperationStatusResponse, err error) {
+func (future *DisksDeleteFuture) Result(client DisksClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1827,34 +1760,15 @@ func (future DisksDeleteFuture) Result(client DisksClient) (osr OperationStatusR
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1862,12 +1776,11 @@ func (future DisksDeleteFuture) Result(client DisksClient) (osr OperationStatusR
// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksGrantAccessFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksGrantAccessFuture) Result(client DisksClient) (au AccessURI, err error) {
+func (future *DisksGrantAccessFuture) Result(client DisksClient) (au AccessURI, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1875,34 +1788,15 @@ func (future DisksGrantAccessFuture) Result(client DisksClient) (au AccessURI, e
return
}
if !done {
- return au, azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- au, err = client.GrantAccessResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
+ au, err = client.GrantAccessResponder(au.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", resp, "Failure sending request")
- return
- }
- au, err = client.GrantAccessResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1918,12 +1812,11 @@ type DiskSku struct {
// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksRevokeAccessFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksRevokeAccessFuture) Result(client DisksClient) (osr OperationStatusResponse, err error) {
+func (future *DisksRevokeAccessFuture) Result(client DisksClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1931,34 +1824,15 @@ func (future DisksRevokeAccessFuture) Result(client DisksClient) (osr OperationS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RevokeAccessResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RevokeAccessResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RevokeAccessResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1966,12 +1840,11 @@ func (future DisksRevokeAccessFuture) Result(client DisksClient) (osr OperationS
// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksUpdateFuture) Result(client DisksClient) (d Disk, err error) {
+func (future *DisksUpdateFuture) Result(client DisksClient) (d Disk, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1979,34 +1852,15 @@ func (future DisksUpdateFuture) Result(client DisksClient) (d Disk, err error) {
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.UpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2397,12 +2251,11 @@ type ImageReference struct {
// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImagesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, err error) {
+func (future *ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2410,34 +2263,15 @@ func (future ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, e
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2445,12 +2279,11 @@ func (future ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, e
// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImagesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ImagesDeleteFuture) Result(client ImagesClient) (osr OperationStatusResponse, err error) {
+func (future *ImagesDeleteFuture) Result(client ImagesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2458,34 +2291,15 @@ func (future ImagesDeleteFuture) Result(client ImagesClient) (osr OperationStatu
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3776,12 +3590,11 @@ func (page SnapshotListPage) Values() []Snapshot {
// operation.
type SnapshotsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) {
+func (future *SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3789,34 +3602,15 @@ func (future SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s Sn
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3824,12 +3618,11 @@ func (future SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s Sn
// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SnapshotsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsDeleteFuture) Result(client SnapshotsClient) (osr OperationStatusResponse, err error) {
+func (future *SnapshotsDeleteFuture) Result(client SnapshotsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3837,34 +3630,15 @@ func (future SnapshotsDeleteFuture) Result(client SnapshotsClient) (osr Operatio
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3872,12 +3646,11 @@ func (future SnapshotsDeleteFuture) Result(client SnapshotsClient) (osr Operatio
// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SnapshotsGrantAccessFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsGrantAccessFuture) Result(client SnapshotsClient) (au AccessURI, err error) {
+func (future *SnapshotsGrantAccessFuture) Result(client SnapshotsClient) (au AccessURI, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3885,34 +3658,15 @@ func (future SnapshotsGrantAccessFuture) Result(client SnapshotsClient) (au Acce
return
}
if !done {
- return au, azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- au, err = client.GrantAccessResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
+ au, err = client.GrantAccessResponder(au.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", resp, "Failure sending request")
- return
- }
- au, err = client.GrantAccessResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3921,12 +3675,11 @@ func (future SnapshotsGrantAccessFuture) Result(client SnapshotsClient) (au Acce
// operation.
type SnapshotsRevokeAccessFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsRevokeAccessFuture) Result(client SnapshotsClient) (osr OperationStatusResponse, err error) {
+func (future *SnapshotsRevokeAccessFuture) Result(client SnapshotsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3934,34 +3687,15 @@ func (future SnapshotsRevokeAccessFuture) Result(client SnapshotsClient) (osr Op
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RevokeAccessResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RevokeAccessResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RevokeAccessResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3969,12 +3703,11 @@ func (future SnapshotsRevokeAccessFuture) Result(client SnapshotsClient) (osr Op
// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SnapshotsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) {
+func (future *SnapshotsUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3982,34 +3715,15 @@ func (future SnapshotsUpdateFuture) Result(client SnapshotsClient) (s Snapshot,
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4717,12 +4431,11 @@ type VirtualMachineExtensionProperties struct {
// long-running operation.
type VirtualMachineExtensionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+func (future *VirtualMachineExtensionsCreateOrUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4730,34 +4443,15 @@ func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client Virtual
return
}
if !done {
- return vme, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vme, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vme, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4766,12 +4460,11 @@ func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client Virtual
// operation.
type VirtualMachineExtensionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineExtensionsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineExtensionsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4779,34 +4472,15 @@ func (future VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineE
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4822,12 +4496,11 @@ type VirtualMachineExtensionsListResult struct {
// operation.
type VirtualMachineExtensionsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+func (future *VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4835,34 +4508,15 @@ func (future VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineE
return
}
if !done {
- return vme, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vme, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.UpdateResponder(vme.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vme, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5615,12 +5269,11 @@ type VirtualMachineScaleSetExtensionProperties struct {
// a long-running operation.
type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
+func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5628,34 +5281,15 @@ func (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vmsse, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmsse, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
+ vmsse, err = client.CreateOrUpdateResponder(vmsse.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vmsse, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5664,12 +5298,11 @@ func (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualMachineScaleSetExtensionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetExtensionsDeleteFuture) Result(client VirtualMachineScaleSetExtensionsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetExtensionsDeleteFuture) Result(client VirtualMachineScaleSetExtensionsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5677,34 +5310,15 @@ func (future VirtualMachineScaleSetExtensionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6358,12 +5972,11 @@ type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct {
// long-running operation.
type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetRollingUpgradesCancelFuture) Result(client VirtualMachineScaleSetRollingUpgradesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) Result(client VirtualMachineScaleSetRollingUpgradesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6371,34 +5984,15 @@ func (future VirtualMachineScaleSetRollingUpgradesCancelFuture) Result(client Vi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.CancelResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.CancelResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.CancelResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6407,12 +6001,11 @@ func (future VirtualMachineScaleSetRollingUpgradesCancelFuture) Result(client Vi
// results of a long-running operation.
type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) Result(client VirtualMachineScaleSetRollingUpgradesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) Result(client VirtualMachineScaleSetRollingUpgradesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6420,34 +6013,15 @@ func (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) Result(c
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartOSUpgradeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartOSUpgradeResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartOSUpgradeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6456,12 +6030,11 @@ func (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) Result(c
// long-running operation.
type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
+func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6469,34 +6042,15 @@ func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualM
return
}
if !done {
- return vmss, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmss, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
+ vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vmss, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6505,12 +6059,11 @@ func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualM
// long-running operation.
type VirtualMachineScaleSetsDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6518,34 +6071,15 @@ func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6554,12 +6088,11 @@ func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachi
// operation.
type VirtualMachineScaleSetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6567,34 +6100,15 @@ func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineSc
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6603,12 +6117,11 @@ func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineSc
// long-running operation.
type VirtualMachineScaleSetsDeleteInstancesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeleteInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeleteInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6616,34 +6129,15 @@ func (future VirtualMachineScaleSetsDeleteInstancesFuture) Result(client Virtual
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteInstancesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteInstancesResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteInstancesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6674,12 +6168,11 @@ type VirtualMachineScaleSetSkuCapacity struct {
// operation.
type VirtualMachineScaleSetsPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6687,34 +6180,15 @@ func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachine
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6723,12 +6197,11 @@ func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachine
// long-running operation.
type VirtualMachineScaleSetsReimageAllFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6736,34 +6209,15 @@ func (future VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageAllResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageAllResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6772,12 +6226,11 @@ func (future VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachi
// operation.
type VirtualMachineScaleSetsReimageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6785,34 +6238,15 @@ func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6821,12 +6255,11 @@ func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineS
// operation.
type VirtualMachineScaleSetsRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6834,34 +6267,15 @@ func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6870,12 +6284,11 @@ func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineS
// operation.
type VirtualMachineScaleSetsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6883,34 +6296,15 @@ func (future VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineSca
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6929,12 +6323,11 @@ type VirtualMachineScaleSetStorageProfile struct {
// operation.
type VirtualMachineScaleSetsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
+func (future *VirtualMachineScaleSetsUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6942,34 +6335,15 @@ func (future VirtualMachineScaleSetsUpdateFuture) Result(client VirtualMachineSc
return
}
if !done {
- return vmss, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmss, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
+ vmss, err = client.UpdateResponder(vmss.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vmss, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6978,12 +6352,11 @@ func (future VirtualMachineScaleSetsUpdateFuture) Result(client VirtualMachineSc
// long-running operation.
type VirtualMachineScaleSetsUpdateInstancesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsUpdateInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsUpdateInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6991,34 +6364,15 @@ func (future VirtualMachineScaleSetsUpdateInstancesFuture) Result(client Virtual
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.UpdateInstancesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.UpdateInstancesResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.UpdateInstancesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7777,12 +7131,11 @@ type VirtualMachineScaleSetVMProperties struct {
// long-running operation.
type VirtualMachineScaleSetVMsDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7790,34 +7143,15 @@ func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMac
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7826,12 +7160,11 @@ func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMac
// operation.
type VirtualMachineScaleSetVMsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7839,34 +7172,15 @@ func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachine
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7875,12 +7189,11 @@ func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachine
// long-running operation.
type VirtualMachineScaleSetVMsPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7888,34 +7201,15 @@ func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7924,12 +7218,11 @@ func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachi
// long-running operation.
type VirtualMachineScaleSetVMsReimageAllFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7937,34 +7230,15 @@ func (future VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMac
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageAllResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageAllResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7973,12 +7247,11 @@ func (future VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMac
// long-running operation.
type VirtualMachineScaleSetVMsReimageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7986,34 +7259,15 @@ func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachin
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8022,12 +7276,11 @@ func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachin
// long-running operation.
type VirtualMachineScaleSetVMsRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8035,34 +7288,15 @@ func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachin
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8071,12 +7305,11 @@ func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachin
// operation.
type VirtualMachineScaleSetVMsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8084,34 +7317,15 @@ func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8120,12 +7334,11 @@ func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineS
// operation.
type VirtualMachinesCaptureFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
+func (future *VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8133,34 +7346,15 @@ func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return vmcr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmcr, err = client.CaptureResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent {
+ vmcr, err = client.CaptureResponder(vmcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", resp, "Failure sending request")
- return
- }
- vmcr, err = client.CaptureResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8169,12 +7363,11 @@ func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient)
// long-running operation.
type VirtualMachinesConvertToManagedDisksFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8182,34 +7375,15 @@ func (future VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMa
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ConvertToManagedDisksResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ConvertToManagedDisksResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ConvertToManagedDisksResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8218,12 +7392,11 @@ func (future VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMa
// operation.
type VirtualMachinesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
+func (future *VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8231,34 +7404,15 @@ func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesC
return
}
if !done {
- return VM, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- VM, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
+ VM, err = client.CreateOrUpdateResponder(VM.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- VM, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8267,12 +7421,11 @@ func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesC
// operation.
type VirtualMachinesDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8280,34 +7433,15 @@ func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClien
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8316,12 +7450,11 @@ func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClien
// operation.
type VirtualMachinesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8329,34 +7462,15 @@ func (future VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8388,12 +7502,11 @@ type VirtualMachineSizeListResult struct {
// long-running operation.
type VirtualMachinesPerformMaintenanceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesPerformMaintenanceFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesPerformMaintenanceFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8401,34 +7514,15 @@ func (future VirtualMachinesPerformMaintenanceFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PerformMaintenanceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PerformMaintenanceResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PerformMaintenanceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8437,12 +7531,11 @@ func (future VirtualMachinesPerformMaintenanceFuture) Result(client VirtualMachi
// operation.
type VirtualMachinesPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8450,34 +7543,15 @@ func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8486,12 +7560,11 @@ func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesRedeployFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8499,34 +7572,15 @@ func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RedeployResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RedeployResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RedeployResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8535,12 +7589,11 @@ func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesRestartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8548,34 +7601,15 @@ func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8584,12 +7618,11 @@ func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesRunCommandFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesRunCommandFuture) Result(client VirtualMachinesClient) (rcr RunCommandResult, err error) {
+func (future *VirtualMachinesRunCommandFuture) Result(client VirtualMachinesClient) (rcr RunCommandResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8597,34 +7630,15 @@ func (future VirtualMachinesRunCommandFuture) Result(client VirtualMachinesClien
return
}
if !done {
- return rcr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rcr, err = client.RunCommandResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
+ rcr, err = client.RunCommandResponder(rcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", resp, "Failure sending request")
- return
- }
- rcr, err = client.RunCommandResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8632,12 +7646,11 @@ func (future VirtualMachinesRunCommandFuture) Result(client VirtualMachinesClien
// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VirtualMachinesStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8645,34 +7658,15 @@ func (future VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (o
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/snapshots.go
index d6ad2b07a..fb6a1dd4d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/snapshots.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/snapshots.go
@@ -109,15 +109,17 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour
// 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) (future SnapshotsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -179,15 +181,17 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN
// 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) (future SnapshotsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -326,15 +330,17 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG
// 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) (future SnapshotsGrantAccessFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -579,15 +585,17 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource
// 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) (future SnapshotsRevokeAccessFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -652,15 +660,17 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN
// 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) (future SnapshotsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go
index 8ce1aa4cb..706fa9d66 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go
@@ -88,15 +88,17 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -306,15 +310,17 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context,
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachines.go
index 03767b27a..12e854121 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachines.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachines.go
@@ -96,15 +96,17 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc
// CaptureSender sends the Capture request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future VirtualMachinesCaptureFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -166,15 +168,17 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Co
// ConvertToManagedDisksSender sends the ConvertToManagedDisks request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Request) (future VirtualMachinesConvertToManagedDisksFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -259,15 +263,17 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -329,15 +335,17 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future VirtualMachinesDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -398,15 +406,17 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future VirtualMachinesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -995,15 +1005,17 @@ func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Conte
// 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) (future VirtualMachinesPerformMaintenanceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1065,15 +1077,17 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future VirtualMachinesPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1134,15 +1148,17 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour
// RedeploySender sends the Redeploy request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future VirtualMachinesRedeployFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1203,15 +1219,17 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RestartSender(req *http.Request) (future VirtualMachinesRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1281,15 +1299,17 @@ func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, reso
// 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) (future VirtualMachinesRunCommandFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1350,15 +1370,17 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) StartSender(req *http.Request) (future VirtualMachinesStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go
index f2061ef52..f6008c53c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go
@@ -89,15 +89,17 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx
// 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) (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,15 +162,17 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.
// 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) (future VirtualMachineScaleSetExtensionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go
index 272ea153a..2345784e9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go
@@ -85,15 +85,17 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con
// 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) (future VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -222,15 +224,17 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer
// 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) (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go
index fb7b4c0c0..5262b0c6b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go
@@ -110,15 +110,17 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -186,15 +188,17 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetsDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -255,15 +259,17 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -333,15 +339,17 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.
// DeleteInstancesSender sends the DeleteInstances request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Request) (future VirtualMachineScaleSetsDeleteInstancesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -824,15 +832,17 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetsPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -899,15 +909,17 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context,
// ReimageSender sends the Reimage request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetsReimageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -975,15 +987,17 @@ func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Conte
// ReimageAllSender sends the ReimageAll request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetsReimageAllFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1050,15 +1064,17 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context,
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetsRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1125,15 +1141,17 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1197,15 +1215,17 @@ func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context,
// 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) (future VirtualMachineScaleSetsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1275,15 +1295,17 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.
// UpdateInstancesSender sends the UpdateInstances request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Request) (future VirtualMachineScaleSetsUpdateInstancesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go
index cf60605bc..85ed4920f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go
@@ -87,15 +87,17 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetVMsDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -475,15 +479,17 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetVMsPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -546,15 +552,17 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex
// ReimageSender sends the Reimage request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -618,15 +626,17 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Con
// ReimageAllSender sends the ReimageAll request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageAllFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -689,15 +699,17 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetVMsRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -760,15 +772,17 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context,
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetVMsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/containerservices.go
index 4d8683691..b16788bfa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/containerservices.go
@@ -119,15 +119,17 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context
// 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) (future ContainerServicesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -191,15 +193,17 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour
// 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) (future ContainerServicesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/disks.go
index f4478cebd..cdc570377 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/disks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/disks.go
@@ -110,15 +110,17 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
// 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) (future DisksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -181,28 +183,29 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName
// 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) (future DisksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// 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) {
+func (client DisksClient) DeleteResponder(resp *http.Response) (result autorest.Response, 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}
+ result.Response = resp
return
}
@@ -330,15 +333,17 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup
// 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) (future DisksGrantAccessFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -584,28 +589,29 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou
// 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) (future DisksRevokeAccessFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// 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) {
+func (client DisksClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, 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}
+ result.Response = resp
return
}
@@ -658,15 +664,17 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName
// 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) (future DisksUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/images.go
index 7fca07ba8..d50a784b7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/images.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/images.go
@@ -86,15 +86,17 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future ImagesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -482,15 +486,17 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/loganalytics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/loganalytics.go
index c1c32b001..a309e61ab 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/loganalytics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/loganalytics.go
@@ -92,15 +92,17 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context
// ExportRequestRateByIntervalSender sends the ExportRequestRateByInterval request. The method will close the
// http.Response Body if it receives an error.
func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Request) (future LogAnalyticsExportRequestRateByIntervalFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con
// ExportThrottledRequestsSender sends the ExportThrottledRequests request. The method will close the
// http.Response Body if it receives an error.
func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request) (future LogAnalyticsExportThrottledRequestsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/models.go
index 9cccb2b85..f4efc7509 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/models.go
@@ -967,84 +967,6 @@ func PossibleVirtualMachineSizeTypesValues() []VirtualMachineSizeTypes {
// AccessURI a disk access SAS uri.
type AccessURI struct {
autorest.Response `json:"-"`
- // AccessURIOutput - Operation output data (raw JSON)
- *AccessURIOutput `json:"properties,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for AccessURI.
-func (au AccessURI) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if au.AccessURIOutput != nil {
- objectMap["properties"] = au.AccessURIOutput
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for AccessURI struct.
-func (au *AccessURI) UnmarshalJSON(body []byte) error {
- var m map[string]*json.RawMessage
- err := json.Unmarshal(body, &m)
- if err != nil {
- return err
- }
- for k, v := range m {
- switch k {
- case "properties":
- if v != nil {
- var accessURIOutput AccessURIOutput
- err = json.Unmarshal(*v, &accessURIOutput)
- if err != nil {
- return err
- }
- au.AccessURIOutput = &accessURIOutput
- }
- }
- }
-
- return nil
-}
-
-// AccessURIOutput azure properties, including output.
-type AccessURIOutput struct {
- // AccessURIRaw - Operation output data (raw JSON)
- *AccessURIRaw `json:"output,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for AccessURIOutput.
-func (auo AccessURIOutput) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if auo.AccessURIRaw != nil {
- objectMap["output"] = auo.AccessURIRaw
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for AccessURIOutput struct.
-func (auo *AccessURIOutput) UnmarshalJSON(body []byte) error {
- var m map[string]*json.RawMessage
- err := json.Unmarshal(body, &m)
- if err != nil {
- return err
- }
- for k, v := range m {
- switch k {
- case "output":
- if v != nil {
- var accessURIRaw AccessURIRaw
- err = json.Unmarshal(*v, &accessURIRaw)
- if err != nil {
- return err
- }
- auo.AccessURIRaw = &accessURIRaw
- }
- }
- }
-
- return nil
-}
-
-// AccessURIRaw this object gets 'bubbled up' through flattening.
-type AccessURIRaw struct {
// AccessSAS - A SAS uri for accessing a disk.
AccessSAS *string `json:"accessSAS,omitempty"`
}
@@ -1093,6 +1015,12 @@ type APIErrorBase struct {
Message *string `json:"message,omitempty"`
}
+// AutoOSUpgradePolicy the configuration parameters used for performing automatic OS upgrade.
+type AutoOSUpgradePolicy struct {
+ // DisableAutoRollback - Whether OS image rollback feature should be disabled. Default value is false.
+ DisableAutoRollback *bool `json:"disableAutoRollback,omitempty"`
+}
+
// AvailabilitySet 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
@@ -1615,12 +1543,11 @@ type ContainerServiceProperties struct {
// operation.
type ContainerServicesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesCreateOrUpdateFuture) Result(client ContainerServicesClient) (cs ContainerService, err error) {
+func (future *ContainerServicesCreateOrUpdateFuture) Result(client ContainerServicesClient) (cs ContainerService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1628,34 +1555,15 @@ func (future ContainerServicesCreateOrUpdateFuture) Result(client ContainerServi
return
}
if !done {
- return cs, azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cs, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- cs, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1664,12 +1572,11 @@ func (future ContainerServicesCreateOrUpdateFuture) Result(client ContainerServi
// operation.
type ContainerServicesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesDeleteFuture) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
+func (future *ContainerServicesDeleteFuture) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1677,35 +1584,10 @@ func (future ContainerServicesDeleteFuture) Result(client ContainerServicesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1774,7 +1656,7 @@ type DataDisk struct {
Caching CachingTypes `json:"caching,omitempty"`
// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
- // CreateOption - Specifies how the virtual machine should be created.
Possible values are:
**Attach** This value is used when you are using a specialized disk to create the virtual machine.
**FromImage** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
+ // CreateOption - Specifies how the virtual machine should be created.
Possible values are:
**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.
**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
// DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
@@ -2085,12 +1967,11 @@ type DiskProperties struct {
// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err error) {
+func (future *DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2098,34 +1979,15 @@ func (future DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2133,12 +1995,11 @@ func (future DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err
// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksDeleteFuture) Result(client DisksClient) (osr OperationStatusResponse, err error) {
+func (future *DisksDeleteFuture) Result(client DisksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2146,47 +2007,21 @@ func (future DisksDeleteFuture) Result(client DisksClient) (osr OperationStatusR
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksGrantAccessFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksGrantAccessFuture) Result(client DisksClient) (au AccessURI, err error) {
+func (future *DisksGrantAccessFuture) Result(client DisksClient) (au AccessURI, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2194,34 +2029,15 @@ func (future DisksGrantAccessFuture) Result(client DisksClient) (au AccessURI, e
return
}
if !done {
- return au, azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- au, err = client.GrantAccessResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
+ au, err = client.GrantAccessResponder(au.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", resp, "Failure sending request")
- return
- }
- au, err = client.GrantAccessResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2237,12 +2053,11 @@ type DiskSku struct {
// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksRevokeAccessFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksRevokeAccessFuture) Result(client DisksClient) (osr OperationStatusResponse, err error) {
+func (future *DisksRevokeAccessFuture) Result(client DisksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2250,47 +2065,21 @@ func (future DisksRevokeAccessFuture) Result(client DisksClient) (osr OperationS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RevokeAccessResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RevokeAccessResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksUpdateFuture) Result(client DisksClient) (d Disk, err error) {
+func (future *DisksUpdateFuture) Result(client DisksClient) (d Disk, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2298,34 +2087,15 @@ func (future DisksUpdateFuture) Result(client DisksClient) (d Disk, err error) {
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.UpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2716,12 +2486,11 @@ type ImageReference struct {
// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImagesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, err error) {
+func (future *ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2729,34 +2498,15 @@ func (future ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, e
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2764,12 +2514,11 @@ func (future ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, e
// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImagesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ImagesDeleteFuture) Result(client ImagesClient) (osr OperationStatusResponse, err error) {
+func (future *ImagesDeleteFuture) Result(client ImagesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2777,34 +2526,15 @@ func (future ImagesDeleteFuture) Result(client ImagesClient) (osr OperationStatu
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2822,12 +2552,11 @@ type ImageStorageProfile struct {
// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImagesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ImagesUpdateFuture) Result(client ImagesClient) (i Image, err error) {
+func (future *ImagesUpdateFuture) Result(client ImagesClient) (i Image, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2835,34 +2564,15 @@ func (future ImagesUpdateFuture) Result(client ImagesClient) (i Image, err error
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.UpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3104,12 +2814,11 @@ type ListVirtualMachineImageResource struct {
// long-running operation.
type LogAnalyticsExportRequestRateByIntervalFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LogAnalyticsExportRequestRateByIntervalFuture) Result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
+func (future *LogAnalyticsExportRequestRateByIntervalFuture) Result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3117,34 +2826,15 @@ func (future LogAnalyticsExportRequestRateByIntervalFuture) Result(client LogAna
return
}
if !done {
- return laor, azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- laor, err = client.ExportRequestRateByIntervalResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
+ laor, err = client.ExportRequestRateByIntervalResponder(laor.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", laor.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", resp, "Failure sending request")
- return
- }
- laor, err = client.ExportRequestRateByIntervalResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3153,12 +2843,11 @@ func (future LogAnalyticsExportRequestRateByIntervalFuture) Result(client LogAna
// long-running operation.
type LogAnalyticsExportThrottledRequestsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LogAnalyticsExportThrottledRequestsFuture) Result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
+func (future *LogAnalyticsExportThrottledRequestsFuture) Result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3166,34 +2855,15 @@ func (future LogAnalyticsExportThrottledRequestsFuture) Result(client LogAnalyti
return
}
if !done {
- return laor, azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- laor, err = client.ExportThrottledRequestsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
+ laor, err = client.ExportThrottledRequestsResponder(laor.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", laor.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", resp, "Failure sending request")
- return
- }
- laor, err = client.ExportThrottledRequestsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3451,7 +3121,7 @@ type OSDisk struct {
Caching CachingTypes `json:"caching,omitempty"`
// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
- // CreateOption - Specifies how the virtual machine should be created.
Possible values are:
**Attach** This value is used when you are using a specialized disk to create the virtual machine.
**FromImage** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
+ // CreateOption - Specifies how the virtual machine should be created.
Possible values are:
**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.
**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
// DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
@@ -3760,32 +3430,13 @@ func (page ResourceSkusResultPage) Values() []ResourceSku {
return *page.rsr.Value
}
-// ResourceUpdate the Resource model definition.
-type ResourceUpdate struct {
- // Tags - Resource tags
- Tags map[string]*string `json:"tags"`
- Sku *DiskSku `json:"sku,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ResourceUpdate.
-func (ru ResourceUpdate) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ru.Tags != nil {
- objectMap["tags"] = ru.Tags
- }
- if ru.Sku != nil {
- objectMap["sku"] = ru.Sku
- }
- return json.Marshal(objectMap)
-}
-
-// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation
+// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation.
type RollbackStatusInfo struct {
// SuccessfullyRolledbackInstanceCount - The number of instances which have been successfully rolled back.
SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty"`
// FailedRolledbackInstanceCount - The number of instances which failed to rollback.
FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty"`
- // RollbackError - Error Details if OS rollback failed.
+ // RollbackError - Error details if OS rollback failed.
RollbackError *APIError `json:"rollbackError,omitempty"`
}
@@ -4478,12 +4129,11 @@ func (page SnapshotListPage) Values() []Snapshot {
// operation.
type SnapshotsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) {
+func (future *SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4491,34 +4141,15 @@ func (future SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s Sn
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4526,12 +4157,11 @@ func (future SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s Sn
// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SnapshotsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsDeleteFuture) Result(client SnapshotsClient) (osr OperationStatusResponse, err error) {
+func (future *SnapshotsDeleteFuture) Result(client SnapshotsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4539,47 +4169,21 @@ func (future SnapshotsDeleteFuture) Result(client SnapshotsClient) (osr Operatio
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SnapshotsGrantAccessFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsGrantAccessFuture) Result(client SnapshotsClient) (au AccessURI, err error) {
+func (future *SnapshotsGrantAccessFuture) Result(client SnapshotsClient) (au AccessURI, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4587,34 +4191,15 @@ func (future SnapshotsGrantAccessFuture) Result(client SnapshotsClient) (au Acce
return
}
if !done {
- return au, azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- au, err = client.GrantAccessResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
+ au, err = client.GrantAccessResponder(au.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", resp, "Failure sending request")
- return
- }
- au, err = client.GrantAccessResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4631,12 +4216,11 @@ type SnapshotSku struct {
// operation.
type SnapshotsRevokeAccessFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsRevokeAccessFuture) Result(client SnapshotsClient) (osr OperationStatusResponse, err error) {
+func (future *SnapshotsRevokeAccessFuture) Result(client SnapshotsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4644,47 +4228,21 @@ func (future SnapshotsRevokeAccessFuture) Result(client SnapshotsClient) (osr Op
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RevokeAccessResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RevokeAccessResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SnapshotsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) {
+func (future *SnapshotsUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4692,34 +4250,15 @@ func (future SnapshotsUpdateFuture) Result(client SnapshotsClient) (s Snapshot,
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4729,7 +4268,7 @@ type SnapshotUpdate struct {
*DiskUpdateProperties `json:"properties,omitempty"`
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
- Sku *DiskSku `json:"sku,omitempty"`
+ Sku *SnapshotSku `json:"sku,omitempty"`
}
// MarshalJSON is the custom marshaler for SnapshotUpdate.
@@ -4776,7 +4315,7 @@ func (su *SnapshotUpdate) UnmarshalJSON(body []byte) error {
}
case "sku":
if v != nil {
- var sku DiskSku
+ var sku SnapshotSku
err = json.Unmarshal(*v, &sku)
if err != nil {
return err
@@ -4908,6 +4447,8 @@ type UpgradePolicy struct {
RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"`
// AutomaticOSUpgrade - Whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the image becomes available.
AutomaticOSUpgrade *bool `json:"automaticOSUpgrade,omitempty"`
+ // AutoOSUpgradePolicy - Configuration parameters used for performing automatic OS Upgrade.
+ AutoOSUpgradePolicy *AutoOSUpgradePolicy `json:"autoOSUpgradePolicy,omitempty"`
}
// Usage describes Compute Resource Usage.
@@ -5479,12 +5020,11 @@ type VirtualMachineExtensionProperties struct {
// long-running operation.
type VirtualMachineExtensionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+func (future *VirtualMachineExtensionsCreateOrUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5492,34 +5032,15 @@ func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client Virtual
return
}
if !done {
- return vme, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vme, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vme, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5528,12 +5049,11 @@ func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client Virtual
// operation.
type VirtualMachineExtensionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineExtensionsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineExtensionsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5541,34 +5061,15 @@ func (future VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineE
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5584,12 +5085,11 @@ type VirtualMachineExtensionsListResult struct {
// operation.
type VirtualMachineExtensionsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+func (future *VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5597,34 +5097,15 @@ func (future VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineE
return
}
if !done {
- return vme, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vme, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.UpdateResponder(vme.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vme, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6387,12 +5868,11 @@ type VirtualMachineScaleSetExtensionProperties struct {
// a long-running operation.
type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
+func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6400,34 +5880,15 @@ func (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vmsse, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmsse, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
+ vmsse, err = client.CreateOrUpdateResponder(vmsse.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vmsse, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6436,12 +5897,11 @@ func (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualMachineScaleSetExtensionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetExtensionsDeleteFuture) Result(client VirtualMachineScaleSetExtensionsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetExtensionsDeleteFuture) Result(client VirtualMachineScaleSetExtensionsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6449,34 +5909,15 @@ func (future VirtualMachineScaleSetExtensionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7121,7 +6562,7 @@ type VirtualMachineScaleSetOSDisk struct {
Caching CachingTypes `json:"caching,omitempty"`
// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
- // CreateOption - Specifies how the virtual machines in the scale set should be created.
The only allowed value is: **FromImage** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
+ // CreateOption - Specifies how the virtual machines in the scale set should be created.
The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
// OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.
Possible values are:
**Windows**
**Linux**. Possible values include: 'Windows', 'Linux'
OsType OperatingSystemTypes `json:"osType,omitempty"`
@@ -7244,12 +6685,11 @@ type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct {
// long-running operation.
type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetRollingUpgradesCancelFuture) Result(client VirtualMachineScaleSetRollingUpgradesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) Result(client VirtualMachineScaleSetRollingUpgradesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7257,34 +6697,15 @@ func (future VirtualMachineScaleSetRollingUpgradesCancelFuture) Result(client Vi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.CancelResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.CancelResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.CancelResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7293,12 +6714,11 @@ func (future VirtualMachineScaleSetRollingUpgradesCancelFuture) Result(client Vi
// results of a long-running operation.
type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) Result(client VirtualMachineScaleSetRollingUpgradesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) Result(client VirtualMachineScaleSetRollingUpgradesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7306,34 +6726,15 @@ func (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) Result(c
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartOSUpgradeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartOSUpgradeResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartOSUpgradeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7342,12 +6743,11 @@ func (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) Result(c
// long-running operation.
type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
+func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7355,34 +6755,15 @@ func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualM
return
}
if !done {
- return vmss, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmss, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
+ vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vmss, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7391,12 +6772,11 @@ func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualM
// long-running operation.
type VirtualMachineScaleSetsDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7404,34 +6784,15 @@ func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7440,12 +6801,11 @@ func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachi
// operation.
type VirtualMachineScaleSetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7453,34 +6813,15 @@ func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineSc
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7489,12 +6830,11 @@ func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineSc
// long-running operation.
type VirtualMachineScaleSetsDeleteInstancesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeleteInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeleteInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7502,34 +6842,15 @@ func (future VirtualMachineScaleSetsDeleteInstancesFuture) Result(client Virtual
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteInstancesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteInstancesResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteInstancesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7560,12 +6881,11 @@ type VirtualMachineScaleSetSkuCapacity struct {
// long-running operation.
type VirtualMachineScaleSetsPerformMaintenanceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsPerformMaintenanceFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7573,34 +6893,15 @@ func (future VirtualMachineScaleSetsPerformMaintenanceFuture) Result(client Virt
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PerformMaintenanceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PerformMaintenanceResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PerformMaintenanceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7609,12 +6910,11 @@ func (future VirtualMachineScaleSetsPerformMaintenanceFuture) Result(client Virt
// operation.
type VirtualMachineScaleSetsPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7622,34 +6922,15 @@ func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachine
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7658,12 +6939,11 @@ func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachine
// operation.
type VirtualMachineScaleSetsRedeployFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsRedeployFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsRedeployFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7671,34 +6951,15 @@ func (future VirtualMachineScaleSetsRedeployFuture) Result(client VirtualMachine
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RedeployResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RedeployResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RedeployResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7707,12 +6968,11 @@ func (future VirtualMachineScaleSetsRedeployFuture) Result(client VirtualMachine
// long-running operation.
type VirtualMachineScaleSetsReimageAllFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7720,34 +6980,15 @@ func (future VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageAllResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageAllResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7756,12 +6997,11 @@ func (future VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachi
// operation.
type VirtualMachineScaleSetsReimageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7769,34 +7009,15 @@ func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7805,12 +7026,11 @@ func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineS
// operation.
type VirtualMachineScaleSetsRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7818,34 +7038,15 @@ func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7854,12 +7055,11 @@ func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineS
// operation.
type VirtualMachineScaleSetsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7867,34 +7067,15 @@ func (future VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineSca
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7913,12 +7094,11 @@ type VirtualMachineScaleSetStorageProfile struct {
// operation.
type VirtualMachineScaleSetsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
+func (future *VirtualMachineScaleSetsUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7926,34 +7106,15 @@ func (future VirtualMachineScaleSetsUpdateFuture) Result(client VirtualMachineSc
return
}
if !done {
- return vmss, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmss, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
+ vmss, err = client.UpdateResponder(vmss.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vmss, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7962,12 +7123,11 @@ func (future VirtualMachineScaleSetsUpdateFuture) Result(client VirtualMachineSc
// long-running operation.
type VirtualMachineScaleSetsUpdateInstancesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsUpdateInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsUpdateInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7975,34 +7135,15 @@ func (future VirtualMachineScaleSetsUpdateInstancesFuture) Result(client Virtual
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.UpdateInstancesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.UpdateInstancesResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.UpdateInstancesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8771,12 +7912,11 @@ type VirtualMachineScaleSetVMProperties struct {
// long-running operation.
type VirtualMachineScaleSetVMsDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8784,34 +7924,15 @@ func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMac
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8820,12 +7941,11 @@ func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMac
// operation.
type VirtualMachineScaleSetVMsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8833,34 +7953,15 @@ func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachine
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8869,12 +7970,11 @@ func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachine
// long-running operation.
type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsPerformMaintenanceFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8882,34 +7982,15 @@ func (future VirtualMachineScaleSetVMsPerformMaintenanceFuture) Result(client Vi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PerformMaintenanceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PerformMaintenanceResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PerformMaintenanceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8918,12 +7999,11 @@ func (future VirtualMachineScaleSetVMsPerformMaintenanceFuture) Result(client Vi
// long-running operation.
type VirtualMachineScaleSetVMsPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8931,34 +8011,15 @@ func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8967,12 +8028,11 @@ func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachi
// long-running operation.
type VirtualMachineScaleSetVMsRedeployFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsRedeployFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsRedeployFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8980,34 +8040,15 @@ func (future VirtualMachineScaleSetVMsRedeployFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RedeployResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RedeployResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RedeployResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9016,12 +8057,11 @@ func (future VirtualMachineScaleSetVMsRedeployFuture) Result(client VirtualMachi
// long-running operation.
type VirtualMachineScaleSetVMsReimageAllFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9029,34 +8069,15 @@ func (future VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMac
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageAllResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageAllResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9065,12 +8086,11 @@ func (future VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMac
// long-running operation.
type VirtualMachineScaleSetVMsReimageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9078,34 +8098,15 @@ func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachin
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9114,12 +8115,11 @@ func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachin
// long-running operation.
type VirtualMachineScaleSetVMsRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9127,34 +8127,15 @@ func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachin
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9163,12 +8144,11 @@ func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachin
// operation.
type VirtualMachineScaleSetVMsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9176,34 +8156,15 @@ func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9212,12 +8173,11 @@ func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineS
// operation.
type VirtualMachineScaleSetVMsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsUpdateFuture) Result(client VirtualMachineScaleSetVMsClient) (vmssv VirtualMachineScaleSetVM, err error) {
+func (future *VirtualMachineScaleSetVMsUpdateFuture) Result(client VirtualMachineScaleSetVMsClient) (vmssv VirtualMachineScaleSetVM, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9225,34 +8185,15 @@ func (future VirtualMachineScaleSetVMsUpdateFuture) Result(client VirtualMachine
return
}
if !done {
- return vmssv, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmssv, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmssv.Response.Response, err = future.GetResult(sender); err == nil && vmssv.Response.Response.StatusCode != http.StatusNoContent {
+ vmssv, err = client.UpdateResponder(vmssv.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", vmssv.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vmssv, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9261,12 +8202,11 @@ func (future VirtualMachineScaleSetVMsUpdateFuture) Result(client VirtualMachine
// operation.
type VirtualMachinesCaptureFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
+func (future *VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9274,34 +8214,15 @@ func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return vmcr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmcr, err = client.CaptureResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent {
+ vmcr, err = client.CaptureResponder(vmcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", resp, "Failure sending request")
- return
- }
- vmcr, err = client.CaptureResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9310,12 +8231,11 @@ func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient)
// long-running operation.
type VirtualMachinesConvertToManagedDisksFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9323,34 +8243,15 @@ func (future VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMa
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ConvertToManagedDisksResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ConvertToManagedDisksResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ConvertToManagedDisksResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9359,12 +8260,11 @@ func (future VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMa
// operation.
type VirtualMachinesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
+func (future *VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9372,34 +8272,15 @@ func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesC
return
}
if !done {
- return VM, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- VM, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
+ VM, err = client.CreateOrUpdateResponder(VM.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- VM, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9408,12 +8289,11 @@ func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesC
// operation.
type VirtualMachinesDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9421,34 +8301,15 @@ func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClien
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9457,12 +8318,11 @@ func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClien
// operation.
type VirtualMachinesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9470,34 +8330,15 @@ func (future VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9529,12 +8370,11 @@ type VirtualMachineSizeListResult struct {
// long-running operation.
type VirtualMachinesPerformMaintenanceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesPerformMaintenanceFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesPerformMaintenanceFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9542,34 +8382,15 @@ func (future VirtualMachinesPerformMaintenanceFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PerformMaintenanceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PerformMaintenanceResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PerformMaintenanceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9578,12 +8399,11 @@ func (future VirtualMachinesPerformMaintenanceFuture) Result(client VirtualMachi
// operation.
type VirtualMachinesPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9591,34 +8411,15 @@ func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9627,12 +8428,11 @@ func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesRedeployFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9640,34 +8440,15 @@ func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RedeployResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RedeployResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RedeployResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9676,12 +8457,11 @@ func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesRestartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9689,34 +8469,15 @@ func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9725,12 +8486,11 @@ func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesRunCommandFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesRunCommandFuture) Result(client VirtualMachinesClient) (rcr RunCommandResult, err error) {
+func (future *VirtualMachinesRunCommandFuture) Result(client VirtualMachinesClient) (rcr RunCommandResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9738,34 +8498,15 @@ func (future VirtualMachinesRunCommandFuture) Result(client VirtualMachinesClien
return
}
if !done {
- return rcr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rcr, err = client.RunCommandResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
+ rcr, err = client.RunCommandResponder(rcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", resp, "Failure sending request")
- return
- }
- rcr, err = client.RunCommandResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9773,12 +8514,11 @@ func (future VirtualMachinesRunCommandFuture) Result(client VirtualMachinesClien
// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VirtualMachinesStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9786,34 +8526,15 @@ func (future VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (o
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9831,12 +8552,11 @@ type VirtualMachineStatusCodeCount struct {
// operation.
type VirtualMachinesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
+func (future *VirtualMachinesUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9844,34 +8564,15 @@ func (future VirtualMachinesUpdateFuture) Result(client VirtualMachinesClient) (
return
}
if !done {
- return VM, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- VM, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
+ VM, err = client.UpdateResponder(VM.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- VM, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/snapshots.go
index b27bb8471..b87359354 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/snapshots.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/snapshots.go
@@ -109,15 +109,17 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour
// 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) (future SnapshotsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -179,28 +181,29 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN
// 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) (future SnapshotsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// 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) {
+func (client SnapshotsClient) DeleteResponder(resp *http.Response) (result autorest.Response, 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}
+ result.Response = resp
return
}
@@ -326,15 +329,17 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG
// 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) (future SnapshotsGrantAccessFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -579,28 +584,29 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource
// 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) (future SnapshotsRevokeAccessFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// 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) {
+func (client SnapshotsClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, 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}
+ result.Response = resp
return
}
@@ -652,15 +658,17 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN
// 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) (future SnapshotsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachineextensions.go
index 92836f825..8c5d964fe 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachineextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachineextensions.go
@@ -88,15 +88,17 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -306,15 +310,17 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context,
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachines.go
index aea8c147e..ab8234321 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachines.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachines.go
@@ -96,15 +96,17 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc
// CaptureSender sends the Capture request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future VirtualMachinesCaptureFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -166,15 +168,17 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Co
// ConvertToManagedDisksSender sends the ConvertToManagedDisks request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Request) (future VirtualMachinesConvertToManagedDisksFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -259,15 +263,17 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -329,15 +335,17 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future VirtualMachinesDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -398,15 +406,17 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future VirtualMachinesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -995,15 +1005,17 @@ func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Conte
// 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) (future VirtualMachinesPerformMaintenanceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1065,15 +1077,17 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future VirtualMachinesPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1134,15 +1148,17 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour
// RedeploySender sends the Redeploy request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future VirtualMachinesRedeployFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1203,15 +1219,17 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RestartSender(req *http.Request) (future VirtualMachinesRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1281,15 +1299,17 @@ func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, reso
// 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) (future VirtualMachinesRunCommandFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1350,15 +1370,17 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) StartSender(req *http.Request) (future VirtualMachinesStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1422,15 +1444,17 @@ func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resource
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future VirtualMachinesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetextensions.go
index 52534066e..4ebd68c00 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetextensions.go
@@ -89,15 +89,17 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx
// 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) (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,15 +162,17 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.
// 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) (future VirtualMachineScaleSetExtensionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetrollingupgrades.go
index 6723537f1..aa23ddb93 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetrollingupgrades.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -85,15 +85,17 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con
// 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) (future VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -222,15 +224,17 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer
// 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) (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go
index 60a971a95..dc742f64f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go
@@ -110,15 +110,17 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -186,15 +188,17 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetsDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -255,15 +259,17 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -333,15 +339,17 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.
// DeleteInstancesSender sends the DeleteInstances request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Request) (future VirtualMachineScaleSetsDeleteInstancesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -988,15 +996,17 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx conte
// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetsPerformMaintenanceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1064,15 +1074,17 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetsPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1139,15 +1151,17 @@ func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context
// RedeploySender sends the Redeploy request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetsRedeployFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1214,15 +1228,17 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context,
// ReimageSender sends the Reimage request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetsReimageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1290,15 +1306,17 @@ func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Conte
// ReimageAllSender sends the ReimageAll request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetsReimageAllFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1365,15 +1383,17 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context,
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetsRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1440,15 +1460,17 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1512,15 +1534,17 @@ func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context,
// 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) (future VirtualMachineScaleSetsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1590,15 +1614,17 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.
// UpdateInstancesSender sends the UpdateInstances request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Request) (future VirtualMachineScaleSetsUpdateInstancesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetvms.go
index 916c50572..e8ec06789 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetvms.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetvms.go
@@ -88,15 +88,17 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetVMsDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -475,15 +479,17 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx con
// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -547,15 +553,17 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetVMsPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -618,15 +626,17 @@ func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Conte
// RedeploySender sends the Redeploy request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetVMsRedeployFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -689,15 +699,17 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex
// ReimageSender sends the Reimage request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -761,15 +773,17 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Con
// ReimageAllSender sends the ReimageAll request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageAllFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -832,15 +846,17 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetVMsRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -903,15 +919,17 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context,
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetVMsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -998,15 +1016,17 @@ func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/client.go
index 8fdda610a..195726329 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/client.go
@@ -21,7 +21,10 @@ package consumption
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
)
const (
@@ -49,3 +52,68 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
SubscriptionID: subscriptionID,
}
}
+
+// GetBalancesByBillingAccount gets the balances for a scope by billingAccountId. Balances are available via this API
+// only for May 1, 2014 or later.
+// Parameters:
+// billingAccountID - billingAccount ID
+func (client BaseClient) GetBalancesByBillingAccount(ctx context.Context, billingAccountID string) (result Balance, err error) {
+ req, err := client.GetBalancesByBillingAccountPreparer(ctx, billingAccountID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.BaseClient", "GetBalancesByBillingAccount", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetBalancesByBillingAccountSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.BaseClient", "GetBalancesByBillingAccount", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetBalancesByBillingAccountResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.BaseClient", "GetBalancesByBillingAccount", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetBalancesByBillingAccountPreparer prepares the GetBalancesByBillingAccount request.
+func (client BaseClient) GetBalancesByBillingAccountPreparer(ctx context.Context, billingAccountID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "billingAccountId": autorest.Encode("path", billingAccountID),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetBalancesByBillingAccountSender sends the GetBalancesByBillingAccount request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) GetBalancesByBillingAccountSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetBalancesByBillingAccountResponder handles the response to the GetBalancesByBillingAccount request. The method always
+// closes the http.Response Body.
+func (client BaseClient) GetBalancesByBillingAccountResponder(resp *http.Response) (result Balance, 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/services/consumption/mgmt/2018-03-31/consumption/costtags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/costtags.go
index 3432354e1..7932dab9c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/costtags.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/costtags.go
@@ -44,7 +44,7 @@ func NewCostTagsClientWithBaseURI(baseURI string, subscriptionID string) CostTag
// requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get
// operation. Create operation does not require eTag.
// Parameters:
-// billingAccountID - azure Billing Account ID.
+// billingAccountID - billingAccount ID
// parameters - parameters supplied to the Create cost tags operation.
func (client CostTagsClient) CreateOrUpdate(ctx context.Context, billingAccountID string, parameters CostTags) (result CostTags, err error) {
req, err := client.CreateOrUpdatePreparer(ctx, billingAccountID, parameters)
@@ -83,7 +83,7 @@ func (client CostTagsClient) CreateOrUpdatePreparer(ctx context.Context, billing
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/providers/Microsoft.CostManagement/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/costTags", pathParameters),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/costTags", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
@@ -111,7 +111,7 @@ func (client CostTagsClient) CreateOrUpdateResponder(resp *http.Response) (resul
// Get get cost tags for a billing account.
// Parameters:
-// billingAccountID - azure Billing Account ID.
+// billingAccountID - billingAccount ID
func (client CostTagsClient) Get(ctx context.Context, billingAccountID string) (result CostTags, err error) {
req, err := client.GetPreparer(ctx, billingAccountID)
if err != nil {
@@ -148,7 +148,7 @@ func (client CostTagsClient) GetPreparer(ctx context.Context, billingAccountID s
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/providers/Microsoft.CostManagement/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/costTags", pathParameters),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/costTags", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/getbalancesbybillingaccount.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/getbalancesbybillingaccount.go
new file mode 100644
index 000000000..f1822148b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/getbalancesbybillingaccount.go
@@ -0,0 +1,108 @@
+package consumption
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// GetBalancesByBillingAccountClient is the consumption management client provides access to consumption resources for
+// Azure Enterprise Subscriptions.
+type GetBalancesByBillingAccountClient struct {
+ BaseClient
+}
+
+// NewGetBalancesByBillingAccountClient creates an instance of the GetBalancesByBillingAccountClient client.
+func NewGetBalancesByBillingAccountClient(subscriptionID string) GetBalancesByBillingAccountClient {
+ return NewGetBalancesByBillingAccountClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGetBalancesByBillingAccountClientWithBaseURI creates an instance of the GetBalancesByBillingAccountClient client.
+func NewGetBalancesByBillingAccountClientWithBaseURI(baseURI string, subscriptionID string) GetBalancesByBillingAccountClient {
+ return GetBalancesByBillingAccountClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// ByBillingPeriod gets the balances for a scope by billing period and billingAccountId. Balances are available via
+// this API only for May 1, 2014 or later.
+// Parameters:
+// billingAccountID - billingAccount ID
+// billingPeriodName - billing Period Name.
+func (client GetBalancesByBillingAccountClient) ByBillingPeriod(ctx context.Context, billingAccountID string, billingPeriodName string) (result Balance, err error) {
+ req, err := client.ByBillingPeriodPreparer(ctx, billingAccountID, billingPeriodName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.GetBalancesByBillingAccountClient", "ByBillingPeriod", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ByBillingPeriodSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.GetBalancesByBillingAccountClient", "ByBillingPeriod", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ByBillingPeriodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.GetBalancesByBillingAccountClient", "ByBillingPeriod", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ByBillingPeriodPreparer prepares the ByBillingPeriod request.
+func (client GetBalancesByBillingAccountClient) ByBillingPeriodPreparer(ctx context.Context, billingAccountID string, billingPeriodName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "billingAccountId": autorest.Encode("path", billingAccountID),
+ "billingPeriodName": autorest.Encode("path", billingPeriodName),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ByBillingPeriodSender sends the ByBillingPeriod request. The method will close the
+// http.Response Body if it receives an error.
+func (client GetBalancesByBillingAccountClient) ByBillingPeriodSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ByBillingPeriodResponder handles the response to the ByBillingPeriod request. The method always
+// closes the http.Response Body.
+func (client GetBalancesByBillingAccountClient) ByBillingPeriodResponder(resp *http.Response) (result Balance, 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/services/consumption/mgmt/2018-03-31/consumption/marketplaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/marketplaces.go
index 4d24b76a1..88950ed6d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/marketplaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/marketplaces.go
@@ -41,8 +41,8 @@ func NewMarketplacesClientWithBaseURI(baseURI string, subscriptionID string) Mar
return MarketplacesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// List lists the marketplaces for a scope by subscriptionId. Marketplaces are available via this API only for May 1,
-// 2014 or later.
+// List lists the marketplaces for a scope by subscriptionId and current billing period. Marketplaces are available via
+// this API only for May 1, 2014 or later.
// Parameters:
// filter - may be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc
// time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/marketplacesbybillingaccount.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/marketplacesbybillingaccount.go
new file mode 100644
index 000000000..6d44b3066
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/marketplacesbybillingaccount.go
@@ -0,0 +1,281 @@
+package consumption
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// MarketplacesByBillingAccountClient is the consumption management client provides access to consumption resources for
+// Azure Enterprise Subscriptions.
+type MarketplacesByBillingAccountClient struct {
+ BaseClient
+}
+
+// NewMarketplacesByBillingAccountClient creates an instance of the MarketplacesByBillingAccountClient client.
+func NewMarketplacesByBillingAccountClient(subscriptionID string) MarketplacesByBillingAccountClient {
+ return NewMarketplacesByBillingAccountClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewMarketplacesByBillingAccountClientWithBaseURI creates an instance of the MarketplacesByBillingAccountClient
+// client.
+func NewMarketplacesByBillingAccountClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesByBillingAccountClient {
+ return MarketplacesByBillingAccountClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List lists the marketplaces for a scope by billingAccountId and current billing period. Marketplaces are available
+// via this API only for May 1, 2014 or later.
+// Parameters:
+// billingAccountID - billingAccount ID
+// filter - may be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc
+// time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
+// 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+// top - may be used to limit the number of results to the most recent N marketplaces.
+// skiptoken - 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.
+func (client MarketplacesByBillingAccountClient) List(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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.NewError("consumption.MarketplacesByBillingAccountClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, billingAccountID, filter, top, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByBillingAccountClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.mlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByBillingAccountClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.mlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByBillingAccountClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client MarketplacesByBillingAccountClient) ListPreparer(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "billingAccountId": autorest.Encode("path", billingAccountID),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/marketplaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client MarketplacesByBillingAccountClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client MarketplacesByBillingAccountClient) ListResponder(resp *http.Response) (result MarketplacesListResult, 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 MarketplacesByBillingAccountClient) listNextResults(lastResults MarketplacesListResult) (result MarketplacesListResult, err error) {
+ req, err := lastResults.marketplacesListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "consumption.MarketplacesByBillingAccountClient", "listNextResults", 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, "consumption.MarketplacesByBillingAccountClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByBillingAccountClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client MarketplacesByBillingAccountClient) ListComplete(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error) {
+ result.page, err = client.List(ctx, billingAccountID, filter, top, skiptoken)
+ return
+}
+
+// ListByBillingPeriod lists the marketplaces for a scope by billing period and billingAccountId. Marketplaces are
+// available via this API only for May 1, 2014 or later.
+// Parameters:
+// billingAccountID - billingAccount ID
+// billingPeriodName - billing Period Name.
+// filter - may be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc
+// time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
+// 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+// top - may be used to limit the number of results to the most recent N marketplaces.
+// skiptoken - 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.
+func (client MarketplacesByBillingAccountClient) ListByBillingPeriod(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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.NewError("consumption.MarketplacesByBillingAccountClient", "ListByBillingPeriod", err.Error())
+ }
+
+ result.fn = client.listByBillingPeriodNextResults
+ req, err := client.ListByBillingPeriodPreparer(ctx, billingAccountID, billingPeriodName, filter, top, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByBillingAccountClient", "ListByBillingPeriod", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByBillingPeriodSender(req)
+ if err != nil {
+ result.mlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByBillingAccountClient", "ListByBillingPeriod", resp, "Failure sending request")
+ return
+ }
+
+ result.mlr, err = client.ListByBillingPeriodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByBillingAccountClient", "ListByBillingPeriod", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
+func (client MarketplacesByBillingAccountClient) ListByBillingPeriodPreparer(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "billingAccountId": autorest.Encode("path", billingAccountID),
+ "billingPeriodName": autorest.Encode("path", billingPeriodName),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the
+// http.Response Body if it receives an error.
+func (client MarketplacesByBillingAccountClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always
+// closes the http.Response Body.
+func (client MarketplacesByBillingAccountClient) ListByBillingPeriodResponder(resp *http.Response) (result MarketplacesListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByBillingPeriodNextResults retrieves the next set of results, if any.
+func (client MarketplacesByBillingAccountClient) listByBillingPeriodNextResults(lastResults MarketplacesListResult) (result MarketplacesListResult, err error) {
+ req, err := lastResults.marketplacesListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "consumption.MarketplacesByBillingAccountClient", "listByBillingPeriodNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByBillingPeriodSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "consumption.MarketplacesByBillingAccountClient", "listByBillingPeriodNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByBillingPeriodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByBillingAccountClient", "listByBillingPeriodNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
+func (client MarketplacesByBillingAccountClient) ListByBillingPeriodComplete(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error) {
+ result.page, err = client.ListByBillingPeriod(ctx, billingAccountID, billingPeriodName, filter, top, skiptoken)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/marketplacesbydepartment.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/marketplacesbydepartment.go
new file mode 100644
index 000000000..285d88103
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/marketplacesbydepartment.go
@@ -0,0 +1,280 @@
+package consumption
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// MarketplacesByDepartmentClient is the consumption management client provides access to consumption resources for
+// Azure Enterprise Subscriptions.
+type MarketplacesByDepartmentClient struct {
+ BaseClient
+}
+
+// NewMarketplacesByDepartmentClient creates an instance of the MarketplacesByDepartmentClient client.
+func NewMarketplacesByDepartmentClient(subscriptionID string) MarketplacesByDepartmentClient {
+ return NewMarketplacesByDepartmentClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewMarketplacesByDepartmentClientWithBaseURI creates an instance of the MarketplacesByDepartmentClient client.
+func NewMarketplacesByDepartmentClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesByDepartmentClient {
+ return MarketplacesByDepartmentClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List lists the marketplaces for a scope by departmentId and current billing period. Marketplaces are available via
+// this API only for May 1, 2014 or later.
+// Parameters:
+// departmentID - department ID
+// filter - may be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc
+// time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
+// 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+// top - may be used to limit the number of results to the most recent N marketplaces.
+// skiptoken - 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.
+func (client MarketplacesByDepartmentClient) List(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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.NewError("consumption.MarketplacesByDepartmentClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, departmentID, filter, top, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByDepartmentClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.mlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByDepartmentClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.mlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByDepartmentClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client MarketplacesByDepartmentClient) ListPreparer(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "departmentId": autorest.Encode("path", departmentID),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Consumption/marketplaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client MarketplacesByDepartmentClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client MarketplacesByDepartmentClient) ListResponder(resp *http.Response) (result MarketplacesListResult, 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 MarketplacesByDepartmentClient) listNextResults(lastResults MarketplacesListResult) (result MarketplacesListResult, err error) {
+ req, err := lastResults.marketplacesListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "consumption.MarketplacesByDepartmentClient", "listNextResults", 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, "consumption.MarketplacesByDepartmentClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByDepartmentClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client MarketplacesByDepartmentClient) ListComplete(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error) {
+ result.page, err = client.List(ctx, departmentID, filter, top, skiptoken)
+ return
+}
+
+// ListByBillingPeriod lists the marketplaces for a scope by billing period and departmentId. Marketplaces are
+// available via this API only for May 1, 2014 or later.
+// Parameters:
+// departmentID - department ID
+// billingPeriodName - billing Period Name.
+// filter - may be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc
+// time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
+// 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+// top - may be used to limit the number of results to the most recent N marketplaces.
+// skiptoken - 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.
+func (client MarketplacesByDepartmentClient) ListByBillingPeriod(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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.NewError("consumption.MarketplacesByDepartmentClient", "ListByBillingPeriod", err.Error())
+ }
+
+ result.fn = client.listByBillingPeriodNextResults
+ req, err := client.ListByBillingPeriodPreparer(ctx, departmentID, billingPeriodName, filter, top, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByDepartmentClient", "ListByBillingPeriod", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByBillingPeriodSender(req)
+ if err != nil {
+ result.mlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByDepartmentClient", "ListByBillingPeriod", resp, "Failure sending request")
+ return
+ }
+
+ result.mlr, err = client.ListByBillingPeriodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByDepartmentClient", "ListByBillingPeriod", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
+func (client MarketplacesByDepartmentClient) ListByBillingPeriodPreparer(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "billingPeriodName": autorest.Encode("path", billingPeriodName),
+ "departmentId": autorest.Encode("path", departmentID),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the
+// http.Response Body if it receives an error.
+func (client MarketplacesByDepartmentClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always
+// closes the http.Response Body.
+func (client MarketplacesByDepartmentClient) ListByBillingPeriodResponder(resp *http.Response) (result MarketplacesListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByBillingPeriodNextResults retrieves the next set of results, if any.
+func (client MarketplacesByDepartmentClient) listByBillingPeriodNextResults(lastResults MarketplacesListResult) (result MarketplacesListResult, err error) {
+ req, err := lastResults.marketplacesListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "consumption.MarketplacesByDepartmentClient", "listByBillingPeriodNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByBillingPeriodSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "consumption.MarketplacesByDepartmentClient", "listByBillingPeriodNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByBillingPeriodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByDepartmentClient", "listByBillingPeriodNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
+func (client MarketplacesByDepartmentClient) ListByBillingPeriodComplete(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error) {
+ result.page, err = client.ListByBillingPeriod(ctx, departmentID, billingPeriodName, filter, top, skiptoken)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/marketplacesbyenrollmentaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/marketplacesbyenrollmentaccounts.go
new file mode 100644
index 000000000..2f1e8de5d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/marketplacesbyenrollmentaccounts.go
@@ -0,0 +1,281 @@
+package consumption
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// MarketplacesByEnrollmentAccountsClient is the consumption management client provides access to consumption resources
+// for Azure Enterprise Subscriptions.
+type MarketplacesByEnrollmentAccountsClient struct {
+ BaseClient
+}
+
+// NewMarketplacesByEnrollmentAccountsClient creates an instance of the MarketplacesByEnrollmentAccountsClient client.
+func NewMarketplacesByEnrollmentAccountsClient(subscriptionID string) MarketplacesByEnrollmentAccountsClient {
+ return NewMarketplacesByEnrollmentAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewMarketplacesByEnrollmentAccountsClientWithBaseURI creates an instance of the
+// MarketplacesByEnrollmentAccountsClient client.
+func NewMarketplacesByEnrollmentAccountsClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesByEnrollmentAccountsClient {
+ return MarketplacesByEnrollmentAccountsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List lists the marketplaces for a scope by enrollmentAccountId and current billing period. Marketplaces are
+// available via this API only for May 1, 2014 or later.
+// Parameters:
+// enrollmentAccountID - enrollmentAccount ID
+// filter - may be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc
+// time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
+// 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+// top - may be used to limit the number of results to the most recent N marketplaces.
+// skiptoken - 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.
+func (client MarketplacesByEnrollmentAccountsClient) List(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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.NewError("consumption.MarketplacesByEnrollmentAccountsClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, enrollmentAccountID, filter, top, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByEnrollmentAccountsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.mlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByEnrollmentAccountsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.mlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByEnrollmentAccountsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client MarketplacesByEnrollmentAccountsClient) ListPreparer(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "enrollmentAccountId": autorest.Encode("path", enrollmentAccountID),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Consumption/marketplaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client MarketplacesByEnrollmentAccountsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client MarketplacesByEnrollmentAccountsClient) ListResponder(resp *http.Response) (result MarketplacesListResult, 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 MarketplacesByEnrollmentAccountsClient) listNextResults(lastResults MarketplacesListResult) (result MarketplacesListResult, err error) {
+ req, err := lastResults.marketplacesListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "consumption.MarketplacesByEnrollmentAccountsClient", "listNextResults", 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, "consumption.MarketplacesByEnrollmentAccountsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByEnrollmentAccountsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client MarketplacesByEnrollmentAccountsClient) ListComplete(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error) {
+ result.page, err = client.List(ctx, enrollmentAccountID, filter, top, skiptoken)
+ return
+}
+
+// ListByBillingPeriod lists the marketplaces for a scope by billing period and enrollmentAccountId. Marketplaces are
+// available via this API only for May 1, 2014 or later.
+// Parameters:
+// enrollmentAccountID - enrollmentAccount ID
+// billingPeriodName - billing Period Name.
+// filter - may be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc
+// time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
+// 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+// top - may be used to limit the number of results to the most recent N marketplaces.
+// skiptoken - 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.
+func (client MarketplacesByEnrollmentAccountsClient) ListByBillingPeriod(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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.NewError("consumption.MarketplacesByEnrollmentAccountsClient", "ListByBillingPeriod", err.Error())
+ }
+
+ result.fn = client.listByBillingPeriodNextResults
+ req, err := client.ListByBillingPeriodPreparer(ctx, enrollmentAccountID, billingPeriodName, filter, top, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByEnrollmentAccountsClient", "ListByBillingPeriod", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByBillingPeriodSender(req)
+ if err != nil {
+ result.mlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByEnrollmentAccountsClient", "ListByBillingPeriod", resp, "Failure sending request")
+ return
+ }
+
+ result.mlr, err = client.ListByBillingPeriodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByEnrollmentAccountsClient", "ListByBillingPeriod", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
+func (client MarketplacesByEnrollmentAccountsClient) ListByBillingPeriodPreparer(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "billingPeriodName": autorest.Encode("path", billingPeriodName),
+ "enrollmentAccountId": autorest.Encode("path", enrollmentAccountID),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the
+// http.Response Body if it receives an error.
+func (client MarketplacesByEnrollmentAccountsClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always
+// closes the http.Response Body.
+func (client MarketplacesByEnrollmentAccountsClient) ListByBillingPeriodResponder(resp *http.Response) (result MarketplacesListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByBillingPeriodNextResults retrieves the next set of results, if any.
+func (client MarketplacesByEnrollmentAccountsClient) listByBillingPeriodNextResults(lastResults MarketplacesListResult) (result MarketplacesListResult, err error) {
+ req, err := lastResults.marketplacesListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "consumption.MarketplacesByEnrollmentAccountsClient", "listByBillingPeriodNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByBillingPeriodSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "consumption.MarketplacesByEnrollmentAccountsClient", "listByBillingPeriodNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByBillingPeriodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.MarketplacesByEnrollmentAccountsClient", "listByBillingPeriodNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
+func (client MarketplacesByEnrollmentAccountsClient) ListByBillingPeriodComplete(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error) {
+ result.page, err = client.ListByBillingPeriod(ctx, enrollmentAccountID, billingPeriodName, filter, top, skiptoken)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/models.go
index 64d81eec3..20f431852 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/models.go
@@ -27,6 +27,23 @@ import (
"net/http"
)
+// BillingFrequency enumerates the values for billing frequency.
+type BillingFrequency string
+
+const (
+ // Month ...
+ Month BillingFrequency = "Month"
+ // Quarter ...
+ Quarter BillingFrequency = "Quarter"
+ // Year ...
+ Year BillingFrequency = "Year"
+)
+
+// PossibleBillingFrequencyValues returns an array of possible values for the BillingFrequency const type.
+func PossibleBillingFrequencyValues() []BillingFrequency {
+ return []BillingFrequency{Month, Quarter, Year}
+}
+
// CategoryType enumerates the values for category type.
type CategoryType string
@@ -91,6 +108,151 @@ func PossibleTimeGrainTypeValues() []TimeGrainType {
return []TimeGrainType{Annually, Monthly, Quarterly}
}
+// Balance a balance resource.
+type Balance struct {
+ autorest.Response `json:"-"`
+ *BalanceProperties `json:"properties,omitempty"`
+ // ID - Resource Id.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Balance.
+func (b Balance) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if b.BalanceProperties != nil {
+ objectMap["properties"] = b.BalanceProperties
+ }
+ if b.ID != nil {
+ objectMap["id"] = b.ID
+ }
+ if b.Name != nil {
+ objectMap["name"] = b.Name
+ }
+ if b.Type != nil {
+ objectMap["type"] = b.Type
+ }
+ if b.Tags != nil {
+ objectMap["tags"] = b.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Balance struct.
+func (b *Balance) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var balanceProperties BalanceProperties
+ err = json.Unmarshal(*v, &balanceProperties)
+ if err != nil {
+ return err
+ }
+ b.BalanceProperties = &balanceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ b.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ b.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ b.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ b.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// BalanceProperties the properties of the balance.
+type BalanceProperties struct {
+ // Currency - The ISO currency in which the meter is charged, for example, USD.
+ Currency *string `json:"currency,omitempty"`
+ // BeginningBalance - The beginning balance for the billing period.
+ BeginningBalance *decimal.Decimal `json:"beginningBalance,omitempty"`
+ // EndingBalance - The ending balance for the billing period (for open periods this will be updated daily).
+ EndingBalance *decimal.Decimal `json:"endingBalance,omitempty"`
+ // NewPurchases - Total new purchase amount.
+ NewPurchases *decimal.Decimal `json:"newPurchases,omitempty"`
+ // Adjustments - Total adjustment amount.
+ Adjustments *decimal.Decimal `json:"adjustments,omitempty"`
+ // Utilized - Total Commitment usage.
+ Utilized *decimal.Decimal `json:"utilized,omitempty"`
+ // ServiceOverage - Overage for Azure services.
+ ServiceOverage *decimal.Decimal `json:"serviceOverage,omitempty"`
+ // ChargesBilledSeparately - Charges Billed separately.
+ ChargesBilledSeparately *decimal.Decimal `json:"chargesBilledSeparately,omitempty"`
+ // TotalOverage - serviceOverage + chargesBilledSeparately.
+ TotalOverage *decimal.Decimal `json:"totalOverage,omitempty"`
+ // TotalUsage - Azure service commitment + total Overage.
+ TotalUsage *decimal.Decimal `json:"totalUsage,omitempty"`
+ // AzureMarketplaceServiceCharges - Total charges for Azure Marketplace.
+ AzureMarketplaceServiceCharges *decimal.Decimal `json:"azureMarketplaceServiceCharges,omitempty"`
+ // BillingFrequency - The billing frequency. Possible values include: 'Month', 'Quarter', 'Year'
+ BillingFrequency BillingFrequency `json:"billingFrequency,omitempty"`
+ // PriceHidden - Price is hidden or not.
+ PriceHidden *bool `json:"priceHidden,omitempty"`
+ // NewPurchasesDetails - List of new purchases.
+ NewPurchasesDetails *[]BalancePropertiesNewPurchasesDetailsItem `json:"newPurchasesDetails,omitempty"`
+ // AdjustmentDetails - List of Adjustments (Promo credit, SIE credit etc.).
+ AdjustmentDetails *[]BalancePropertiesAdjustmentDetailsItem `json:"adjustmentDetails,omitempty"`
+}
+
+// BalancePropertiesAdjustmentDetailsItem ...
+type BalancePropertiesAdjustmentDetailsItem struct {
+ // Name - the name of new adjustment.
+ Name *string `json:"name,omitempty"`
+ // Value - the value of new adjustment.
+ Value *decimal.Decimal `json:"value,omitempty"`
+}
+
+// BalancePropertiesNewPurchasesDetailsItem ...
+type BalancePropertiesNewPurchasesDetailsItem struct {
+ // Name - the name of new purchase.
+ Name *string `json:"name,omitempty"`
+ // Value - the value of new purchase.
+ Value *decimal.Decimal `json:"value,omitempty"`
+}
+
// Budget a budget resource.
type Budget struct {
autorest.Response `json:"-"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/tags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/tags.go
index 1e08ebe22..8289530e6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/tags.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/tags.go
@@ -42,7 +42,7 @@ func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient
// Get get all available tag keys for a billing account.
// Parameters:
-// billingAccountID - azure Billing Account ID.
+// billingAccountID - billingAccount ID
func (client TagsClient) Get(ctx context.Context, billingAccountID string) (result Tags, err error) {
req, err := client.GetPreparer(ctx, billingAccountID)
if err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/usagedetails.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/usagedetails.go
index 3a98a7791..f1afc09a1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/usagedetails.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/usagedetails.go
@@ -41,8 +41,8 @@ func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) Usa
return UsageDetailsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// List lists the usage details for a scope by billing period. Usage details are available via this API only for May 1,
-// 2014 or later.
+// List lists the usage details for a scope by current billing period. Usage details are available via this API only
+// for May 1, 2014 or later.
// Parameters:
// expand - may be used to expand the properties/additionalProperties or properties/meterDetails within a list
// of usage details. By default, these fields are not included when listing usage details.
@@ -54,7 +54,7 @@ func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) Usa
// 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 - may be used to limit the number of results to the most recent N usageDetails.
-// apply - oData apply expression to aggregatie usageDetails by tags or (tags and properties/usageStart)
+// apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart)
func (client UsageDetailsClient) List(ctx context.Context, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultPage, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: top,
@@ -178,7 +178,7 @@ func (client UsageDetailsClient) ListComplete(ctx context.Context, expand string
// time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
// 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key
// value pair string where key and value is separated by a colon (:).
-// apply - oData apply expression to aggregatie usageDetails by tags or (tags and properties/usageStart) for
+// apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart) for
// specified billing period
// skiptoken - 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
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbybillingaccount.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbybillingaccount.go
new file mode 100644
index 000000000..c04755baa
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbybillingaccount.go
@@ -0,0 +1,302 @@
+package consumption
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// UsageDetailsByBillingAccountClient is the consumption management client provides access to consumption resources for
+// Azure Enterprise Subscriptions.
+type UsageDetailsByBillingAccountClient struct {
+ BaseClient
+}
+
+// NewUsageDetailsByBillingAccountClient creates an instance of the UsageDetailsByBillingAccountClient client.
+func NewUsageDetailsByBillingAccountClient(subscriptionID string) UsageDetailsByBillingAccountClient {
+ return NewUsageDetailsByBillingAccountClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewUsageDetailsByBillingAccountClientWithBaseURI creates an instance of the UsageDetailsByBillingAccountClient
+// client.
+func NewUsageDetailsByBillingAccountClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsByBillingAccountClient {
+ return UsageDetailsByBillingAccountClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List lists the usage details by billingAccountId for a scope by current billing period. Usage details are available
+// via this API only for May 1, 2014 or later.
+// Parameters:
+// billingAccountID - billingAccount ID
+// expand - may be used to expand the properties/additionalProperties or properties/meterDetails within a list
+// of usage details. By default, these fields are not included when listing usage details.
+// filter - may be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc
+// time), properties/resourceGroup, properties/instanceName, properties/instanceId or tags. The filter supports
+// 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a
+// key value pair string where key and value is separated by a colon (:).
+// skiptoken - 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 - may be used to limit the number of results to the most recent N usageDetails.
+// apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart)
+func (client UsageDetailsByBillingAccountClient) List(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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.NewError("consumption.UsageDetailsByBillingAccountClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, billingAccountID, expand, filter, skiptoken, top, apply)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByBillingAccountClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.udlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByBillingAccountClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.udlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByBillingAccountClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client UsageDetailsByBillingAccountClient) ListPreparer(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "billingAccountId": autorest.Encode("path", billingAccountID),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(apply) > 0 {
+ queryParameters["$apply"] = autorest.Encode("query", apply)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/usageDetails", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client UsageDetailsByBillingAccountClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client UsageDetailsByBillingAccountClient) ListResponder(resp *http.Response) (result UsageDetailsListResult, 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 UsageDetailsByBillingAccountClient) listNextResults(lastResults UsageDetailsListResult) (result UsageDetailsListResult, err error) {
+ req, err := lastResults.usageDetailsListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "consumption.UsageDetailsByBillingAccountClient", "listNextResults", 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, "consumption.UsageDetailsByBillingAccountClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByBillingAccountClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client UsageDetailsByBillingAccountClient) ListComplete(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultIterator, err error) {
+ result.page, err = client.List(ctx, billingAccountID, expand, filter, skiptoken, top, apply)
+ return
+}
+
+// ListByBillingPeriod lists the usage details based on billingAccountId for a scope by billing period. Usage details
+// are available via this API only for May 1, 2014 or later.
+// Parameters:
+// billingAccountID - billingAccount ID
+// billingPeriodName - billing Period Name.
+// expand - may be used to expand the properties/additionalProperties or properties/meterDetails within a list
+// of usage details. By default, these fields are not included when listing usage details.
+// filter - may be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc
+// time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
+// 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key
+// value pair string where key and value is separated by a colon (:).
+// apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart) for
+// specified billing period
+// skiptoken - 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 - may be used to limit the number of results to the most recent N usageDetails.
+func (client UsageDetailsByBillingAccountClient) ListByBillingPeriod(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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.NewError("consumption.UsageDetailsByBillingAccountClient", "ListByBillingPeriod", err.Error())
+ }
+
+ result.fn = client.listByBillingPeriodNextResults
+ req, err := client.ListByBillingPeriodPreparer(ctx, billingAccountID, billingPeriodName, expand, filter, apply, skiptoken, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByBillingAccountClient", "ListByBillingPeriod", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByBillingPeriodSender(req)
+ if err != nil {
+ result.udlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByBillingAccountClient", "ListByBillingPeriod", resp, "Failure sending request")
+ return
+ }
+
+ result.udlr, err = client.ListByBillingPeriodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByBillingAccountClient", "ListByBillingPeriod", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
+func (client UsageDetailsByBillingAccountClient) ListByBillingPeriodPreparer(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "billingAccountId": autorest.Encode("path", billingAccountID),
+ "billingPeriodName": autorest.Encode("path", billingPeriodName),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(apply) > 0 {
+ queryParameters["$apply"] = autorest.Encode("query", apply)
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the
+// http.Response Body if it receives an error.
+func (client UsageDetailsByBillingAccountClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always
+// closes the http.Response Body.
+func (client UsageDetailsByBillingAccountClient) ListByBillingPeriodResponder(resp *http.Response) (result UsageDetailsListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByBillingPeriodNextResults retrieves the next set of results, if any.
+func (client UsageDetailsByBillingAccountClient) listByBillingPeriodNextResults(lastResults UsageDetailsListResult) (result UsageDetailsListResult, err error) {
+ req, err := lastResults.usageDetailsListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "consumption.UsageDetailsByBillingAccountClient", "listByBillingPeriodNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByBillingPeriodSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "consumption.UsageDetailsByBillingAccountClient", "listByBillingPeriodNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByBillingPeriodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByBillingAccountClient", "listByBillingPeriodNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
+func (client UsageDetailsByBillingAccountClient) ListByBillingPeriodComplete(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultIterator, err error) {
+ result.page, err = client.ListByBillingPeriod(ctx, billingAccountID, billingPeriodName, expand, filter, apply, skiptoken, top)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbydepartment.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbydepartment.go
new file mode 100644
index 000000000..205dbdecd
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbydepartment.go
@@ -0,0 +1,301 @@
+package consumption
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// UsageDetailsByDepartmentClient is the consumption management client provides access to consumption resources for
+// Azure Enterprise Subscriptions.
+type UsageDetailsByDepartmentClient struct {
+ BaseClient
+}
+
+// NewUsageDetailsByDepartmentClient creates an instance of the UsageDetailsByDepartmentClient client.
+func NewUsageDetailsByDepartmentClient(subscriptionID string) UsageDetailsByDepartmentClient {
+ return NewUsageDetailsByDepartmentClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewUsageDetailsByDepartmentClientWithBaseURI creates an instance of the UsageDetailsByDepartmentClient client.
+func NewUsageDetailsByDepartmentClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsByDepartmentClient {
+ return UsageDetailsByDepartmentClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List lists the usage details by departmentId for a scope by current billing period. Usage details are available via
+// this API only for May 1, 2014 or later.
+// Parameters:
+// departmentID - department ID
+// expand - may be used to expand the properties/additionalProperties or properties/meterDetails within a list
+// of usage details. By default, these fields are not included when listing usage details.
+// filter - may be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc
+// time), properties/resourceGroup, properties/instanceName, properties/instanceId or tags. The filter supports
+// 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a
+// key value pair string where key and value is separated by a colon (:).
+// skiptoken - 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 - may be used to limit the number of results to the most recent N usageDetails.
+// apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart)
+func (client UsageDetailsByDepartmentClient) List(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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.NewError("consumption.UsageDetailsByDepartmentClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, departmentID, expand, filter, skiptoken, top, apply)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByDepartmentClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.udlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByDepartmentClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.udlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByDepartmentClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client UsageDetailsByDepartmentClient) ListPreparer(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "departmentId": autorest.Encode("path", departmentID),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(apply) > 0 {
+ queryParameters["$apply"] = autorest.Encode("query", apply)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Consumption/usageDetails", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client UsageDetailsByDepartmentClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client UsageDetailsByDepartmentClient) ListResponder(resp *http.Response) (result UsageDetailsListResult, 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 UsageDetailsByDepartmentClient) listNextResults(lastResults UsageDetailsListResult) (result UsageDetailsListResult, err error) {
+ req, err := lastResults.usageDetailsListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "consumption.UsageDetailsByDepartmentClient", "listNextResults", 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, "consumption.UsageDetailsByDepartmentClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByDepartmentClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client UsageDetailsByDepartmentClient) ListComplete(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultIterator, err error) {
+ result.page, err = client.List(ctx, departmentID, expand, filter, skiptoken, top, apply)
+ return
+}
+
+// ListByBillingPeriod lists the usage details based on departmentId for a scope by billing period. Usage details are
+// available via this API only for May 1, 2014 or later.
+// Parameters:
+// departmentID - department ID
+// billingPeriodName - billing Period Name.
+// expand - may be used to expand the properties/additionalProperties or properties/meterDetails within a list
+// of usage details. By default, these fields are not included when listing usage details.
+// filter - may be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc
+// time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
+// 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key
+// value pair string where key and value is separated by a colon (:).
+// apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart) for
+// specified billing period
+// skiptoken - 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 - may be used to limit the number of results to the most recent N usageDetails.
+func (client UsageDetailsByDepartmentClient) ListByBillingPeriod(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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.NewError("consumption.UsageDetailsByDepartmentClient", "ListByBillingPeriod", err.Error())
+ }
+
+ result.fn = client.listByBillingPeriodNextResults
+ req, err := client.ListByBillingPeriodPreparer(ctx, departmentID, billingPeriodName, expand, filter, apply, skiptoken, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByDepartmentClient", "ListByBillingPeriod", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByBillingPeriodSender(req)
+ if err != nil {
+ result.udlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByDepartmentClient", "ListByBillingPeriod", resp, "Failure sending request")
+ return
+ }
+
+ result.udlr, err = client.ListByBillingPeriodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByDepartmentClient", "ListByBillingPeriod", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
+func (client UsageDetailsByDepartmentClient) ListByBillingPeriodPreparer(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "billingPeriodName": autorest.Encode("path", billingPeriodName),
+ "departmentId": autorest.Encode("path", departmentID),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(apply) > 0 {
+ queryParameters["$apply"] = autorest.Encode("query", apply)
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the
+// http.Response Body if it receives an error.
+func (client UsageDetailsByDepartmentClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always
+// closes the http.Response Body.
+func (client UsageDetailsByDepartmentClient) ListByBillingPeriodResponder(resp *http.Response) (result UsageDetailsListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByBillingPeriodNextResults retrieves the next set of results, if any.
+func (client UsageDetailsByDepartmentClient) listByBillingPeriodNextResults(lastResults UsageDetailsListResult) (result UsageDetailsListResult, err error) {
+ req, err := lastResults.usageDetailsListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "consumption.UsageDetailsByDepartmentClient", "listByBillingPeriodNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByBillingPeriodSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "consumption.UsageDetailsByDepartmentClient", "listByBillingPeriodNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByBillingPeriodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByDepartmentClient", "listByBillingPeriodNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
+func (client UsageDetailsByDepartmentClient) ListByBillingPeriodComplete(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultIterator, err error) {
+ result.page, err = client.ListByBillingPeriod(ctx, departmentID, billingPeriodName, expand, filter, apply, skiptoken, top)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbyenrollmentaccount.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbyenrollmentaccount.go
new file mode 100644
index 000000000..26aef9a07
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbyenrollmentaccount.go
@@ -0,0 +1,302 @@
+package consumption
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// UsageDetailsByEnrollmentAccountClient is the consumption management client provides access to consumption resources
+// for Azure Enterprise Subscriptions.
+type UsageDetailsByEnrollmentAccountClient struct {
+ BaseClient
+}
+
+// NewUsageDetailsByEnrollmentAccountClient creates an instance of the UsageDetailsByEnrollmentAccountClient client.
+func NewUsageDetailsByEnrollmentAccountClient(subscriptionID string) UsageDetailsByEnrollmentAccountClient {
+ return NewUsageDetailsByEnrollmentAccountClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewUsageDetailsByEnrollmentAccountClientWithBaseURI creates an instance of the UsageDetailsByEnrollmentAccountClient
+// client.
+func NewUsageDetailsByEnrollmentAccountClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsByEnrollmentAccountClient {
+ return UsageDetailsByEnrollmentAccountClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List lists the usage details by enrollmentAccountId for a scope by current billing period. Usage details are
+// available via this API only for May 1, 2014 or later.
+// Parameters:
+// enrollmentAccountID - enrollmentAccount ID
+// expand - may be used to expand the properties/additionalProperties or properties/meterDetails within a list
+// of usage details. By default, these fields are not included when listing usage details.
+// filter - may be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc
+// time), properties/resourceGroup, properties/instanceName, properties/instanceId or tags. The filter supports
+// 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a
+// key value pair string where key and value is separated by a colon (:).
+// skiptoken - 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 - may be used to limit the number of results to the most recent N usageDetails.
+// apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart)
+func (client UsageDetailsByEnrollmentAccountClient) List(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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.NewError("consumption.UsageDetailsByEnrollmentAccountClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, enrollmentAccountID, expand, filter, skiptoken, top, apply)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByEnrollmentAccountClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.udlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByEnrollmentAccountClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.udlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByEnrollmentAccountClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client UsageDetailsByEnrollmentAccountClient) ListPreparer(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "enrollmentAccountId": autorest.Encode("path", enrollmentAccountID),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(apply) > 0 {
+ queryParameters["$apply"] = autorest.Encode("query", apply)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Consumption/usageDetails", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client UsageDetailsByEnrollmentAccountClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client UsageDetailsByEnrollmentAccountClient) ListResponder(resp *http.Response) (result UsageDetailsListResult, 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 UsageDetailsByEnrollmentAccountClient) listNextResults(lastResults UsageDetailsListResult) (result UsageDetailsListResult, err error) {
+ req, err := lastResults.usageDetailsListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "consumption.UsageDetailsByEnrollmentAccountClient", "listNextResults", 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, "consumption.UsageDetailsByEnrollmentAccountClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByEnrollmentAccountClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client UsageDetailsByEnrollmentAccountClient) ListComplete(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultIterator, err error) {
+ result.page, err = client.List(ctx, enrollmentAccountID, expand, filter, skiptoken, top, apply)
+ return
+}
+
+// ListByBillingPeriod lists the usage details based on enrollmentAccountId for a scope by billing period. Usage
+// details are available via this API only for May 1, 2014 or later.
+// Parameters:
+// enrollmentAccountID - enrollmentAccount ID
+// billingPeriodName - billing Period Name.
+// expand - may be used to expand the properties/additionalProperties or properties/meterDetails within a list
+// of usage details. By default, these fields are not included when listing usage details.
+// filter - may be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc
+// time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
+// 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key
+// value pair string where key and value is separated by a colon (:).
+// apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart) for
+// specified billing period
+// skiptoken - 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 - may be used to limit the number of results to the most recent N usageDetails.
+func (client UsageDetailsByEnrollmentAccountClient) ListByBillingPeriod(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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.NewError("consumption.UsageDetailsByEnrollmentAccountClient", "ListByBillingPeriod", err.Error())
+ }
+
+ result.fn = client.listByBillingPeriodNextResults
+ req, err := client.ListByBillingPeriodPreparer(ctx, enrollmentAccountID, billingPeriodName, expand, filter, apply, skiptoken, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByEnrollmentAccountClient", "ListByBillingPeriod", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByBillingPeriodSender(req)
+ if err != nil {
+ result.udlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByEnrollmentAccountClient", "ListByBillingPeriod", resp, "Failure sending request")
+ return
+ }
+
+ result.udlr, err = client.ListByBillingPeriodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByEnrollmentAccountClient", "ListByBillingPeriod", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
+func (client UsageDetailsByEnrollmentAccountClient) ListByBillingPeriodPreparer(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "billingPeriodName": autorest.Encode("path", billingPeriodName),
+ "enrollmentAccountId": autorest.Encode("path", enrollmentAccountID),
+ }
+
+ const APIVersion = "2018-03-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(apply) > 0 {
+ queryParameters["$apply"] = autorest.Encode("query", apply)
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the
+// http.Response Body if it receives an error.
+func (client UsageDetailsByEnrollmentAccountClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always
+// closes the http.Response Body.
+func (client UsageDetailsByEnrollmentAccountClient) ListByBillingPeriodResponder(resp *http.Response) (result UsageDetailsListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByBillingPeriodNextResults retrieves the next set of results, if any.
+func (client UsageDetailsByEnrollmentAccountClient) listByBillingPeriodNextResults(lastResults UsageDetailsListResult) (result UsageDetailsListResult, err error) {
+ req, err := lastResults.usageDetailsListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "consumption.UsageDetailsByEnrollmentAccountClient", "listByBillingPeriodNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByBillingPeriodSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "consumption.UsageDetailsByEnrollmentAccountClient", "listByBillingPeriodNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByBillingPeriodResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.UsageDetailsByEnrollmentAccountClient", "listByBillingPeriodNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
+func (client UsageDetailsByEnrollmentAccountClient) ListByBillingPeriodComplete(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultIterator, err error) {
+ result.page, err = client.ListByBillingPeriod(ctx, enrollmentAccountID, billingPeriodName, expand, filter, apply, skiptoken, top)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/client.go
new file mode 100644
index 000000000..1bd8c604a
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/client.go
@@ -0,0 +1,51 @@
+// Package consumption implements the Azure ARM Consumption service API version 2018-05-31.
+//
+// Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
+package consumption
+
+// 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 Consumption
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Consumption.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/forecasts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/forecasts.go
new file mode 100644
index 000000000..1f3303f0c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/forecasts.go
@@ -0,0 +1,110 @@
+package consumption
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ForecastsClient is the consumption management client provides access to consumption resources for Azure Enterprise
+// Subscriptions.
+type ForecastsClient struct {
+ BaseClient
+}
+
+// NewForecastsClient creates an instance of the ForecastsClient client.
+func NewForecastsClient(subscriptionID string) ForecastsClient {
+ return NewForecastsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewForecastsClientWithBaseURI creates an instance of the ForecastsClient client.
+func NewForecastsClientWithBaseURI(baseURI string, subscriptionID string) ForecastsClient {
+ return ForecastsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List lists the forecast charges by subscriptionId.
+// Parameters:
+// filter - may be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or
+// properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support
+// 'ne', 'or', or 'not'.
+func (client ForecastsClient) List(ctx context.Context, filter string) (result ForecastsListResult, err error) {
+ req, err := client.ListPreparer(ctx, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.ForecastsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.ForecastsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.ForecastsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ForecastsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-31"
+ 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("/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/forecasts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ForecastsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ForecastsClient) ListResponder(resp *http.Response) (result ForecastsListResult, 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/services/consumption/mgmt/2018-05-31/consumption/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/models.go
new file mode 100644
index 000000000..9b5909d7c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/models.go
@@ -0,0 +1,366 @@
+package consumption
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/to"
+ "github.com/shopspring/decimal"
+ "net/http"
+)
+
+// Bound enumerates the values for bound.
+type Bound string
+
+const (
+ // Lower ...
+ Lower Bound = "Lower"
+ // Upper ...
+ Upper Bound = "Upper"
+)
+
+// PossibleBoundValues returns an array of possible values for the Bound const type.
+func PossibleBoundValues() []Bound {
+ return []Bound{Lower, Upper}
+}
+
+// ChargeType enumerates the values for charge type.
+type ChargeType string
+
+const (
+ // ChargeTypeActual ...
+ ChargeTypeActual ChargeType = "Actual"
+ // ChargeTypeForecast ...
+ ChargeTypeForecast ChargeType = "Forecast"
+)
+
+// PossibleChargeTypeValues returns an array of possible values for the ChargeType const type.
+func PossibleChargeTypeValues() []ChargeType {
+ return []ChargeType{ChargeTypeActual, ChargeTypeForecast}
+}
+
+// Grain enumerates the values for grain.
+type Grain string
+
+const (
+ // Daily ...
+ Daily Grain = "Daily"
+ // Monthly ...
+ Monthly Grain = "Monthly"
+ // Yearly ...
+ Yearly Grain = "Yearly"
+)
+
+// PossibleGrainValues returns an array of possible values for the Grain const type.
+func PossibleGrainValues() []Grain {
+ return []Grain{Daily, Monthly, Yearly}
+}
+
+// ErrorDetails the details of the error.
+type ErrorDetails struct {
+ // Code - Error code.
+ Code *string `json:"code,omitempty"`
+ // Message - Error message indicating why the operation failed.
+ Message *string `json:"message,omitempty"`
+}
+
+// ErrorResponse 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 - The details of the error.
+ Error *ErrorDetails `json:"error,omitempty"`
+}
+
+// Forecast a forecast resource.
+type Forecast struct {
+ *ForecastProperties `json:"properties,omitempty"`
+ // ID - Resource Id.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Forecast.
+func (f Forecast) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if f.ForecastProperties != nil {
+ objectMap["properties"] = f.ForecastProperties
+ }
+ if f.ID != nil {
+ objectMap["id"] = f.ID
+ }
+ if f.Name != nil {
+ objectMap["name"] = f.Name
+ }
+ if f.Type != nil {
+ objectMap["type"] = f.Type
+ }
+ if f.Tags != nil {
+ objectMap["tags"] = f.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Forecast struct.
+func (f *Forecast) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var forecastProperties ForecastProperties
+ err = json.Unmarshal(*v, &forecastProperties)
+ if err != nil {
+ return err
+ }
+ f.ForecastProperties = &forecastProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ f.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ f.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ f.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ f.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ForecastProperties the properties of the forecast charge.
+type ForecastProperties struct {
+ // UsageDate - The usage date of the forecast.
+ UsageDate *string `json:"usageDate,omitempty"`
+ // Grain - The granularity of forecast. Possible values include: 'Daily', 'Monthly', 'Yearly'
+ Grain Grain `json:"grain,omitempty"`
+ // Charge - The amount of charge
+ Charge *decimal.Decimal `json:"charge,omitempty"`
+ // Currency - The ISO currency in which the meter is charged, for example, USD.
+ Currency *string `json:"currency,omitempty"`
+ // ChargeType - The type of the charge. Could be actual or forecast. Possible values include: 'ChargeTypeActual', 'ChargeTypeForecast'
+ ChargeType ChargeType `json:"chargeType,omitempty"`
+ // ConfidenceLevels - The details about the forecast confidence levels. This is populated only when chargeType is Forecast.
+ ConfidenceLevels *[]ForecastPropertiesConfidenceLevelsItem `json:"confidenceLevels,omitempty"`
+}
+
+// ForecastPropertiesConfidenceLevelsItem ...
+type ForecastPropertiesConfidenceLevelsItem struct {
+ // Percentage - The percentage level of the confidence
+ Percentage *decimal.Decimal `json:"percentage,omitempty"`
+ // Bound - The boundary of the percentage, values could be 'Upper' or 'Lower'. Possible values include: 'Upper', 'Lower'
+ Bound Bound `json:"bound,omitempty"`
+ // Value - The amount of forecast within the percentage level
+ Value *decimal.Decimal `json:"value,omitempty"`
+}
+
+// ForecastsListResult result of listing forecasts. It contains a list of available forecasts.
+type ForecastsListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of forecasts.
+ Value *[]Forecast `json:"value,omitempty"`
+}
+
+// Operation a Consumption REST API operation.
+type Operation struct {
+ // Name - Operation name: {provider}/{resource}/{operation}.
+ Name *string `json:"name,omitempty"`
+ // Display - The object that represents the operation.
+ Display *OperationDisplay `json:"display,omitempty"`
+}
+
+// OperationDisplay the object that represents the operation.
+type OperationDisplay struct {
+ // Provider - Service provider: Microsoft.Consumption.
+ Provider *string `json:"provider,omitempty"`
+ // Resource - Resource on which the operation is performed: UsageDetail, etc.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - Operation type: Read, write, delete, etc.
+ Operation *string `json:"operation,omitempty"`
+}
+
+// OperationListResult 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 - List of consumption operations supported by the Microsoft.Consumption resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+ // NextLink - URL to get the next set of operation list results if there are any.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// OperationListResultIterator provides access to a complete listing of Operation values.
+type OperationListResultIterator struct {
+ i int
+ page OperationListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OperationListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OperationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OperationListResultIterator) Response() OperationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OperationListResultIterator) Value() Operation {
+ if !iter.page.NotDone() {
+ return Operation{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (olr OperationListResult) IsEmpty() bool {
+ return olr.Value == nil || len(*olr.Value) == 0
+}
+
+// operationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+ if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(olr.NextLink)))
+}
+
+// OperationListResultPage contains a page of Operation values.
+type OperationListResultPage struct {
+ fn func(OperationListResult) (OperationListResult, error)
+ olr OperationListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OperationListResultPage) Next() error {
+ next, err := page.fn(page.olr)
+ if err != nil {
+ return err
+ }
+ page.olr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OperationListResultPage) NotDone() bool {
+ return !page.olr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OperationListResultPage) Response() OperationListResult {
+ return page.olr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OperationListResultPage) Values() []Operation {
+ if page.olr.IsEmpty() {
+ return nil
+ }
+ return *page.olr.Value
+}
+
+// Resource the Resource model definition.
+type Resource struct {
+ // ID - Resource Id.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.ID != nil {
+ objectMap["id"] = r.ID
+ }
+ if r.Name != nil {
+ objectMap["name"] = r.Name
+ }
+ if r.Type != nil {
+ objectMap["type"] = r.Type
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ return json.Marshal(objectMap)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/operations.go
new file mode 100644
index 000000000..c615723fe
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/operations.go
@@ -0,0 +1,127 @@
+package consumption
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// OperationsClient is the consumption management client provides access to consumption resources for Azure Enterprise
+// Subscriptions.
+type OperationsClient struct {
+ BaseClient
+}
+
+// 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(ctx context.Context) (result OperationListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.olr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "consumption.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.olr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-05-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Consumption/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// 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, "consumption.OperationsClient", "listNextResults", 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, "consumption.OperationsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "consumption.OperationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/version.go
new file mode 100644
index 000000000..33df0efd9
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2018-05-31/consumption/version.go
@@ -0,0 +1,30 @@
+package consumption
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " consumption/2018-05-31"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroups.go
index d8e167188..aad2a5013 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroups.go
@@ -99,15 +99,17 @@ func (client ContainerGroupsClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (future ContainerGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-04-01/containerinstance/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-04-01/containerinstance/models.go
index 8a95c8ffd..01563f151 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-04-01/containerinstance/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-04-01/containerinstance/models.go
@@ -440,12 +440,11 @@ type ContainerGroupPropertiesInstanceView struct {
// operation.
type ContainerGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerGroupsCreateOrUpdateFuture) Result(client ContainerGroupsClient) (cg ContainerGroup, err error) {
+func (future *ContainerGroupsCreateOrUpdateFuture) Result(client ContainerGroupsClient) (cg ContainerGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -453,34 +452,15 @@ func (future ContainerGroupsCreateOrUpdateFuture) Result(client ContainerGroupsC
return
}
if !done {
- return cg, azure.NewAsyncOpIncompleteError("containerinstance.ContainerGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerinstance.ContainerGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cg.Response.Response, err = future.GetResult(sender); err == nil && cg.Response.Response.StatusCode != http.StatusNoContent {
+ cg, err = client.CreateOrUpdateResponder(cg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsCreateOrUpdateFuture", "Result", cg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- cg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/client.go
new file mode 100644
index 000000000..b494c2a07
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/client.go
@@ -0,0 +1,51 @@
+// Package containerinstance implements the Azure ARM Containerinstance service API version 2018-04-01.
+//
+//
+package containerinstance
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "github.com/Azure/go-autorest/autorest"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Containerinstance
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Containerinstance.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go
new file mode 100644
index 000000000..aad2a5013
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go
@@ -0,0 +1,521 @@
+package containerinstance
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// ContainerGroupsClient is the client for the ContainerGroups methods of the Containerinstance service.
+type ContainerGroupsClient struct {
+ BaseClient
+}
+
+// NewContainerGroupsClient creates an instance of the ContainerGroupsClient client.
+func NewContainerGroupsClient(subscriptionID string) ContainerGroupsClient {
+ return NewContainerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client.
+func NewContainerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupsClient {
+ return ContainerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update container groups with specified configurations.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// containerGroupName - the name of the container group.
+// containerGroup - the properties of the container group to be created or updated.
+func (client ContainerGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, containerGroupName string, containerGroup ContainerGroup) (result ContainerGroupsCreateOrUpdateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: containerGroup,
+ Constraints: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.Containers", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "containerGroup.ContainerGroupProperties.IPAddress", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.IPAddress.Ports", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "containerGroup.ContainerGroupProperties.IPAddress.Type", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("containerinstance.ContainerGroupsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, containerGroupName, containerGroup)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ContainerGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, containerGroupName string, containerGroup ContainerGroup) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "containerGroupName": autorest.Encode("path", containerGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", pathParameters),
+ autorest.WithJSON(containerGroup),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (future ContainerGroupsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ContainerGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// containerGroupName - the name of the container group.
+func (client ContainerGroupsClient) Delete(ctx context.Context, resourceGroupName string, containerGroupName string) (result ContainerGroup, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, containerGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ContainerGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, containerGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "containerGroupName": autorest.Encode("path", containerGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.ContainerInstance/containerGroups/{containerGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ContainerGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ContainerGroupsClient) DeleteResponder(resp *http.Response) (result ContainerGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Get 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// containerGroupName - the name of the container group.
+func (client ContainerGroupsClient) Get(ctx context.Context, resourceGroupName string, containerGroupName string) (result ContainerGroup, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, containerGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ContainerGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, containerGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "containerGroupName": autorest.Encode("path", containerGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.ContainerInstance/containerGroups/{containerGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ContainerGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ContainerGroupsClient) GetResponder(resp *http.Response) (result ContainerGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List get 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(ctx context.Context) (result ContainerGroupListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.cglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.cglr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ContainerGroupsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ContainerGroupsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ContainerGroupsClient) ListResponder(resp *http.Response) (result ContainerGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client ContainerGroupsClient) listNextResults(lastResults ContainerGroupListResult) (result ContainerGroupListResult, err error) {
+ req, err := lastResults.containerGroupListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ContainerGroupsClient) ListComplete(ctx context.Context) (result ContainerGroupListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ContainerGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ContainerGroupListResultPage, err error) {
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.cglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.cglr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ContainerGroupsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.ContainerInstance/containerGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client ContainerGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client ContainerGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result ContainerGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client ContainerGroupsClient) listByResourceGroupNextResults(lastResults ContainerGroupListResult) (result ContainerGroupListResult, err error) {
+ req, err := lastResults.containerGroupListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ContainerGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ContainerGroupListResultIterator, err error) {
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// Update updates container group tags with specified values.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// containerGroupName - the name of the container group.
+// resource - the container group resource with just the tags to be updated.
+func (client ContainerGroupsClient) Update(ctx context.Context, resourceGroupName string, containerGroupName string, resource Resource) (result ContainerGroup, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, containerGroupName, resource)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client ContainerGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, containerGroupName string, resource Resource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "containerGroupName": autorest.Encode("path", containerGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", pathParameters),
+ autorest.WithJSON(resource),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client ContainerGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client ContainerGroupsClient) UpdateResponder(resp *http.Response) (result ContainerGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroupusage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroupusage.go
new file mode 100644
index 000000000..4e9f5b52c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroupusage.go
@@ -0,0 +1,105 @@
+package containerinstance
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ContainerGroupUsageClient is the client for the ContainerGroupUsage methods of the Containerinstance service.
+type ContainerGroupUsageClient struct {
+ BaseClient
+}
+
+// NewContainerGroupUsageClient creates an instance of the ContainerGroupUsageClient client.
+func NewContainerGroupUsageClient(subscriptionID string) ContainerGroupUsageClient {
+ return NewContainerGroupUsageClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewContainerGroupUsageClientWithBaseURI creates an instance of the ContainerGroupUsageClient client.
+func NewContainerGroupUsageClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupUsageClient {
+ return ContainerGroupUsageClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List get the usage for a subscription
+// Parameters:
+// location - the identifier for the physical azure location.
+func (client ContainerGroupUsageClient) List(ctx context.Context, location string) (result UsageListResult, err error) {
+ req, err := client.ListPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupUsageClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupUsageClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupUsageClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ContainerGroupUsageClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ContainerGroupUsageClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ContainerGroupUsageClient) ListResponder(resp *http.Response) (result UsageListResult, 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/services/containerinstance/mgmt/2018-06-01/containerinstance/containerlogs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containerlogs.go
new file mode 100644
index 000000000..0b975f928
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containerlogs.go
@@ -0,0 +1,114 @@
+package containerinstance
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ContainerLogsClient is the client for the ContainerLogs methods of the Containerinstance service.
+type ContainerLogsClient struct {
+ BaseClient
+}
+
+// NewContainerLogsClient creates an instance of the ContainerLogsClient client.
+func NewContainerLogsClient(subscriptionID string) ContainerLogsClient {
+ return NewContainerLogsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewContainerLogsClientWithBaseURI creates an instance of the ContainerLogsClient client.
+func NewContainerLogsClientWithBaseURI(baseURI string, subscriptionID string) ContainerLogsClient {
+ return ContainerLogsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List get the logs for a specified container instance in a specified resource group and container group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// containerGroupName - the name of the container group.
+// containerName - the name of the container instance.
+// tail - 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(ctx context.Context, resourceGroupName string, containerGroupName string, containerName string, tail *int32) (result Logs, err error) {
+ req, err := client.ListPreparer(ctx, resourceGroupName, containerGroupName, containerName, tail)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerLogsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerLogsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerLogsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ContainerLogsClient) ListPreparer(ctx context.Context, resourceGroupName string, containerGroupName string, containerName string, tail *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "containerGroupName": autorest.Encode("path", containerGroupName),
+ "containerName": autorest.Encode("path", containerName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if tail != nil {
+ queryParameters["tail"] = autorest.Encode("query", *tail)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/logs", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ContainerLogsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ContainerLogsClient) ListResponder(resp *http.Response) (result Logs, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/models.go
new file mode 100644
index 000000000..01563f151
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/models.go
@@ -0,0 +1,751 @@
+package containerinstance
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "net/http"
+)
+
+// ContainerGroupNetworkProtocol enumerates the values for container group network protocol.
+type ContainerGroupNetworkProtocol string
+
+const (
+ // TCP ...
+ TCP ContainerGroupNetworkProtocol = "TCP"
+ // UDP ...
+ UDP ContainerGroupNetworkProtocol = "UDP"
+)
+
+// PossibleContainerGroupNetworkProtocolValues returns an array of possible values for the ContainerGroupNetworkProtocol const type.
+func PossibleContainerGroupNetworkProtocolValues() []ContainerGroupNetworkProtocol {
+ return []ContainerGroupNetworkProtocol{TCP, UDP}
+}
+
+// ContainerGroupRestartPolicy enumerates the values for container group restart policy.
+type ContainerGroupRestartPolicy string
+
+const (
+ // Always ...
+ Always ContainerGroupRestartPolicy = "Always"
+ // Never ...
+ Never ContainerGroupRestartPolicy = "Never"
+ // OnFailure ...
+ OnFailure ContainerGroupRestartPolicy = "OnFailure"
+)
+
+// PossibleContainerGroupRestartPolicyValues returns an array of possible values for the ContainerGroupRestartPolicy const type.
+func PossibleContainerGroupRestartPolicyValues() []ContainerGroupRestartPolicy {
+ return []ContainerGroupRestartPolicy{Always, Never, OnFailure}
+}
+
+// ContainerNetworkProtocol enumerates the values for container network protocol.
+type ContainerNetworkProtocol string
+
+const (
+ // ContainerNetworkProtocolTCP ...
+ ContainerNetworkProtocolTCP ContainerNetworkProtocol = "TCP"
+ // ContainerNetworkProtocolUDP ...
+ ContainerNetworkProtocolUDP ContainerNetworkProtocol = "UDP"
+)
+
+// PossibleContainerNetworkProtocolValues returns an array of possible values for the ContainerNetworkProtocol const type.
+func PossibleContainerNetworkProtocolValues() []ContainerNetworkProtocol {
+ return []ContainerNetworkProtocol{ContainerNetworkProtocolTCP, ContainerNetworkProtocolUDP}
+}
+
+// OperatingSystemTypes enumerates the values for operating system types.
+type OperatingSystemTypes string
+
+const (
+ // Linux ...
+ Linux OperatingSystemTypes = "Linux"
+ // Windows ...
+ Windows OperatingSystemTypes = "Windows"
+)
+
+// PossibleOperatingSystemTypesValues returns an array of possible values for the OperatingSystemTypes const type.
+func PossibleOperatingSystemTypesValues() []OperatingSystemTypes {
+ return []OperatingSystemTypes{Linux, Windows}
+}
+
+// OperationsOrigin enumerates the values for operations origin.
+type OperationsOrigin string
+
+const (
+ // System ...
+ System OperationsOrigin = "System"
+ // User ...
+ User OperationsOrigin = "User"
+)
+
+// PossibleOperationsOriginValues returns an array of possible values for the OperationsOrigin const type.
+func PossibleOperationsOriginValues() []OperationsOrigin {
+ return []OperationsOrigin{System, User}
+}
+
+// AzureFileVolume the properties of the Azure File volume. Azure File shares are mounted as volumes.
+type AzureFileVolume struct {
+ // ShareName - The name of the Azure File share to be mounted as a volume.
+ ShareName *string `json:"shareName,omitempty"`
+ // ReadOnly - The flag indicating whether the Azure File shared mounted as a volume is read-only.
+ ReadOnly *bool `json:"readOnly,omitempty"`
+ // StorageAccountName - The name of the storage account that contains the Azure File share.
+ StorageAccountName *string `json:"storageAccountName,omitempty"`
+ // StorageAccountKey - The storage account access key used to access the Azure File share.
+ StorageAccountKey *string `json:"storageAccountKey,omitempty"`
+}
+
+// Container a container instance.
+type Container struct {
+ // Name - The user-provided name of the container instance.
+ Name *string `json:"name,omitempty"`
+ // ContainerProperties - The properties of the container instance.
+ *ContainerProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Container.
+func (c Container) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if c.Name != nil {
+ objectMap["name"] = c.Name
+ }
+ if c.ContainerProperties != nil {
+ objectMap["properties"] = c.ContainerProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Container struct.
+func (c *Container) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ c.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var containerProperties ContainerProperties
+ err = json.Unmarshal(*v, &containerProperties)
+ if err != nil {
+ return err
+ }
+ c.ContainerProperties = &containerProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// ContainerExecRequest the start container exec request.
+type ContainerExecRequest struct {
+ // Command - The command to be executed.
+ Command *string `json:"command,omitempty"`
+ // TerminalSize - The size of the terminal.
+ TerminalSize *ContainerExecRequestTerminalSize `json:"terminalSize,omitempty"`
+}
+
+// ContainerExecRequestTerminalSize the size of the terminal.
+type ContainerExecRequestTerminalSize struct {
+ // Row - The row size of the terminal
+ Row *int32 `json:"row,omitempty"`
+ // Column - The column size of the terminal
+ Column *int32 `json:"column,omitempty"`
+}
+
+// ContainerExecResponse the information for the container exec command.
+type ContainerExecResponse struct {
+ autorest.Response `json:"-"`
+ // WebSocketURI - The uri for the exec websocket.
+ WebSocketURI *string `json:"webSocketUri,omitempty"`
+ // Password - The password to start the exec command.
+ Password *string `json:"password,omitempty"`
+}
+
+// ContainerGroup a container group.
+type ContainerGroup struct {
+ autorest.Response `json:"-"`
+ *ContainerGroupProperties `json:"properties,omitempty"`
+ // ID - The resource id.
+ ID *string `json:"id,omitempty"`
+ // Name - The resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - The resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - The resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - The resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ContainerGroup.
+func (cg ContainerGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cg.ContainerGroupProperties != nil {
+ objectMap["properties"] = cg.ContainerGroupProperties
+ }
+ if cg.ID != nil {
+ objectMap["id"] = cg.ID
+ }
+ if cg.Name != nil {
+ objectMap["name"] = cg.Name
+ }
+ if cg.Type != nil {
+ objectMap["type"] = cg.Type
+ }
+ if cg.Location != nil {
+ objectMap["location"] = cg.Location
+ }
+ if cg.Tags != nil {
+ objectMap["tags"] = cg.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ContainerGroup struct.
+func (cg *ContainerGroup) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var containerGroupProperties ContainerGroupProperties
+ err = json.Unmarshal(*v, &containerGroupProperties)
+ if err != nil {
+ return err
+ }
+ cg.ContainerGroupProperties = &containerGroupProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ cg.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cg.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cg.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ cg.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ cg.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ContainerGroupListResult the container group list response that contains the container group properties.
+type ContainerGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of container groups.
+ Value *[]ContainerGroup `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of container groups.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ContainerGroupListResultIterator provides access to a complete listing of ContainerGroup values.
+type ContainerGroupListResultIterator struct {
+ i int
+ page ContainerGroupListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ContainerGroupListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ContainerGroupListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ContainerGroupListResultIterator) Response() ContainerGroupListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ContainerGroupListResultIterator) Value() ContainerGroup {
+ if !iter.page.NotDone() {
+ return ContainerGroup{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (cglr ContainerGroupListResult) IsEmpty() bool {
+ return cglr.Value == nil || len(*cglr.Value) == 0
+}
+
+// containerGroupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (cglr ContainerGroupListResult) containerGroupListResultPreparer() (*http.Request, error) {
+ if cglr.NextLink == nil || len(to.String(cglr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(cglr.NextLink)))
+}
+
+// ContainerGroupListResultPage contains a page of ContainerGroup values.
+type ContainerGroupListResultPage struct {
+ fn func(ContainerGroupListResult) (ContainerGroupListResult, error)
+ cglr ContainerGroupListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ContainerGroupListResultPage) Next() error {
+ next, err := page.fn(page.cglr)
+ if err != nil {
+ return err
+ }
+ page.cglr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ContainerGroupListResultPage) NotDone() bool {
+ return !page.cglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ContainerGroupListResultPage) Response() ContainerGroupListResult {
+ return page.cglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ContainerGroupListResultPage) Values() []ContainerGroup {
+ if page.cglr.IsEmpty() {
+ return nil
+ }
+ return *page.cglr.Value
+}
+
+// ContainerGroupProperties ...
+type ContainerGroupProperties struct {
+ // ProvisioningState - The provisioning state of the container group. This only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // Containers - The containers within the container group.
+ Containers *[]Container `json:"containers,omitempty"`
+ // ImageRegistryCredentials - The image registry credentials by which the container group is created from.
+ ImageRegistryCredentials *[]ImageRegistryCredential `json:"imageRegistryCredentials,omitempty"`
+ // RestartPolicy - Restart policy for all containers within the container group.
+ // - `Always` Always restart
+ // - `OnFailure` Restart on failure
+ // - `Never` Never restart
+ // . Possible values include: 'Always', 'OnFailure', 'Never'
+ RestartPolicy ContainerGroupRestartPolicy `json:"restartPolicy,omitempty"`
+ // IPAddress - The IP address type of the container group.
+ IPAddress *IPAddress `json:"ipAddress,omitempty"`
+ // OsType - The operating system type required by the containers in the container group. Possible values include: 'Windows', 'Linux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // Volumes - The list of volumes that can be mounted by containers in this container group.
+ Volumes *[]Volume `json:"volumes,omitempty"`
+ // InstanceView - The instance view of the container group. Only valid in response.
+ InstanceView *ContainerGroupPropertiesInstanceView `json:"instanceView,omitempty"`
+}
+
+// ContainerGroupPropertiesInstanceView the instance view of the container group. Only valid in response.
+type ContainerGroupPropertiesInstanceView struct {
+ // Events - The events of this container group.
+ Events *[]Event `json:"events,omitempty"`
+ // State - The state of the container group. Only valid in response.
+ State *string `json:"state,omitempty"`
+}
+
+// ContainerGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ContainerGroupsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ContainerGroupsCreateOrUpdateFuture) Result(client ContainerGroupsClient) (cg ContainerGroup, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerinstance.ContainerGroupsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cg.Response.Response, err = future.GetResult(sender); err == nil && cg.Response.Response.StatusCode != http.StatusNoContent {
+ cg, err = client.CreateOrUpdateResponder(cg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsCreateOrUpdateFuture", "Result", cg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ContainerPort the port exposed on the container instance.
+type ContainerPort struct {
+ // Protocol - The protocol associated with the port. Possible values include: 'ContainerNetworkProtocolTCP', 'ContainerNetworkProtocolUDP'
+ Protocol ContainerNetworkProtocol `json:"protocol,omitempty"`
+ // Port - The port number exposed within the container group.
+ Port *int32 `json:"port,omitempty"`
+}
+
+// ContainerProperties the container instance properties.
+type ContainerProperties struct {
+ // Image - The name of the image used to create the container instance.
+ Image *string `json:"image,omitempty"`
+ // Command - The commands to execute within the container instance in exec form.
+ Command *[]string `json:"command,omitempty"`
+ // Ports - The exposed ports on the container instance.
+ Ports *[]ContainerPort `json:"ports,omitempty"`
+ // EnvironmentVariables - The environment variables to set in the container instance.
+ EnvironmentVariables *[]EnvironmentVariable `json:"environmentVariables,omitempty"`
+ // InstanceView - The instance view of the container instance. Only valid in response.
+ InstanceView *ContainerPropertiesInstanceView `json:"instanceView,omitempty"`
+ // Resources - The resource requirements of the container instance.
+ Resources *ResourceRequirements `json:"resources,omitempty"`
+ // VolumeMounts - The volume mounts available to the container instance.
+ VolumeMounts *[]VolumeMount `json:"volumeMounts,omitempty"`
+}
+
+// ContainerPropertiesInstanceView the instance view of the container instance. Only valid in response.
+type ContainerPropertiesInstanceView struct {
+ // RestartCount - The number of times that the container instance has been restarted.
+ RestartCount *int32 `json:"restartCount,omitempty"`
+ // CurrentState - Current container instance state.
+ CurrentState *ContainerState `json:"currentState,omitempty"`
+ // PreviousState - Previous container instance state.
+ PreviousState *ContainerState `json:"previousState,omitempty"`
+ // Events - The events of the container instance.
+ Events *[]Event `json:"events,omitempty"`
+}
+
+// ContainerState the container instance state.
+type ContainerState struct {
+ // State - The state of the container instance.
+ State *string `json:"state,omitempty"`
+ // StartTime - The date-time when the container instance state started.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // ExitCode - The container instance exit codes correspond to those from the `docker run` command.
+ ExitCode *int32 `json:"exitCode,omitempty"`
+ // FinishTime - The date-time when the container instance state finished.
+ FinishTime *date.Time `json:"finishTime,omitempty"`
+ // DetailStatus - The human-readable status of the container instance state.
+ DetailStatus *string `json:"detailStatus,omitempty"`
+}
+
+// EnvironmentVariable the environment variable to set within the container instance.
+type EnvironmentVariable struct {
+ // Name - The name of the environment variable.
+ Name *string `json:"name,omitempty"`
+ // Value - The value of the environment variable.
+ Value *string `json:"value,omitempty"`
+}
+
+// Event a container group or container instance event.
+type Event struct {
+ // Count - The count of the event.
+ Count *int32 `json:"count,omitempty"`
+ // FirstTimestamp - The date-time of the earliest logged event.
+ FirstTimestamp *date.Time `json:"firstTimestamp,omitempty"`
+ // LastTimestamp - The date-time of the latest logged event.
+ LastTimestamp *date.Time `json:"lastTimestamp,omitempty"`
+ // Name - The event name.
+ Name *string `json:"name,omitempty"`
+ // Message - The event message.
+ Message *string `json:"message,omitempty"`
+ // Type - The event type.
+ Type *string `json:"type,omitempty"`
+}
+
+// GitRepoVolume represents a volume that is populated with the contents of a git repository
+type GitRepoVolume struct {
+ // Directory - Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.
+ Directory *string `json:"directory,omitempty"`
+ // Repository - Repository URL
+ Repository *string `json:"repository,omitempty"`
+ // Revision - Commit hash for the specified revision.
+ Revision *string `json:"revision,omitempty"`
+}
+
+// ImageRegistryCredential image registry credential.
+type ImageRegistryCredential struct {
+ // Server - The Docker image registry server without a protocol such as "http" and "https".
+ Server *string `json:"server,omitempty"`
+ // Username - The username for the private registry.
+ Username *string `json:"username,omitempty"`
+ // Password - The password for the private registry.
+ Password *string `json:"password,omitempty"`
+}
+
+// IPAddress IP address for the container group.
+type IPAddress struct {
+ // Ports - The list of ports exposed on the container group.
+ Ports *[]Port `json:"ports,omitempty"`
+ // Type - Specifies if the IP is exposed to the public internet.
+ Type *string `json:"type,omitempty"`
+ // IP - The IP exposed to the public internet.
+ IP *string `json:"ip,omitempty"`
+ // DNSNameLabel - The Dns name label for the IP.
+ DNSNameLabel *string `json:"dnsNameLabel,omitempty"`
+ // Fqdn - The FQDN for the IP.
+ Fqdn *string `json:"fqdn,omitempty"`
+}
+
+// Logs the logs.
+type Logs struct {
+ autorest.Response `json:"-"`
+ // Content - The content of the log.
+ Content *string `json:"content,omitempty"`
+}
+
+// Operation an operation for Azure Container Instance service.
+type Operation struct {
+ // Name - The name of the operation.
+ Name *string `json:"name,omitempty"`
+ // Display - The display information of the operation.
+ Display *OperationDisplay `json:"display,omitempty"`
+ // Origin - The intended executor of the operation. Possible values include: 'User', 'System'
+ Origin OperationsOrigin `json:"origin,omitempty"`
+}
+
+// OperationDisplay the display information of the operation.
+type OperationDisplay struct {
+ // Provider - The name of the provider of the operation.
+ Provider *string `json:"provider,omitempty"`
+ // Resource - The name of the resource type of the operation.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - The friendly name of the operation.
+ Operation *string `json:"operation,omitempty"`
+ // Description - The description of the operation.
+ Description *string `json:"description,omitempty"`
+}
+
+// OperationListResult the operation list response that contains all operations for Azure Container Instance
+// service.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of operations.
+ Value *[]Operation `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of operations.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// Port the port exposed on the container group.
+type Port struct {
+ // Protocol - The protocol associated with the port. Possible values include: 'TCP', 'UDP'
+ Protocol ContainerGroupNetworkProtocol `json:"protocol,omitempty"`
+ // Port - The port number.
+ Port *int32 `json:"port,omitempty"`
+}
+
+// Resource the Resource model definition.
+type Resource struct {
+ // ID - The resource id.
+ ID *string `json:"id,omitempty"`
+ // Name - The resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - The resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - The resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - The resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.ID != nil {
+ objectMap["id"] = r.ID
+ }
+ if r.Name != nil {
+ objectMap["name"] = r.Name
+ }
+ if r.Type != nil {
+ objectMap["type"] = r.Type
+ }
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// ResourceLimits the resource limits.
+type ResourceLimits struct {
+ // MemoryInGB - The memory limit in GB of this container instance.
+ MemoryInGB *float64 `json:"memoryInGB,omitempty"`
+ // CPU - The CPU limit of this container instance.
+ CPU *float64 `json:"cpu,omitempty"`
+}
+
+// ResourceRequests the resource requests.
+type ResourceRequests struct {
+ // MemoryInGB - The memory request in GB of this container instance.
+ MemoryInGB *float64 `json:"memoryInGB,omitempty"`
+ // CPU - The CPU request of this container instance.
+ CPU *float64 `json:"cpu,omitempty"`
+}
+
+// ResourceRequirements the resource requirements.
+type ResourceRequirements struct {
+ // Requests - The resource requests of this container instance.
+ Requests *ResourceRequests `json:"requests,omitempty"`
+ // Limits - The resource limits of this container instance.
+ Limits *ResourceLimits `json:"limits,omitempty"`
+}
+
+// Usage a single usage result
+type Usage struct {
+ // Unit - Unit of the usage result
+ Unit *string `json:"unit,omitempty"`
+ // CurrentValue - The current usage of the resource
+ CurrentValue *int32 `json:"currentValue,omitempty"`
+ // Limit - The maximum permitted usage of the resource.
+ Limit *int32 `json:"limit,omitempty"`
+ // Name - The name object of the resource
+ Name *UsageName `json:"name,omitempty"`
+}
+
+// UsageListResult the response containing the usage data
+type UsageListResult struct {
+ autorest.Response `json:"-"`
+ Value *[]Usage `json:"value,omitempty"`
+}
+
+// UsageName the name object of the resource
+type UsageName struct {
+ // Value - The name of the resource
+ Value *string `json:"value,omitempty"`
+ // LocalizedValue - The localized name of the resource
+ LocalizedValue *string `json:"localizedValue,omitempty"`
+}
+
+// Volume the properties of the volume.
+type Volume struct {
+ // Name - The name of the volume.
+ Name *string `json:"name,omitempty"`
+ // AzureFile - The Azure File volume.
+ AzureFile *AzureFileVolume `json:"azureFile,omitempty"`
+ // EmptyDir - The empty directory volume.
+ EmptyDir interface{} `json:"emptyDir,omitempty"`
+ // Secret - The secret volume.
+ Secret map[string]*string `json:"secret"`
+ // GitRepo - The git repo volume.
+ GitRepo *GitRepoVolume `json:"gitRepo,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Volume.
+func (vVar Volume) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vVar.Name != nil {
+ objectMap["name"] = vVar.Name
+ }
+ if vVar.AzureFile != nil {
+ objectMap["azureFile"] = vVar.AzureFile
+ }
+ objectMap["emptyDir"] = vVar.EmptyDir
+ if vVar.Secret != nil {
+ objectMap["secret"] = vVar.Secret
+ }
+ if vVar.GitRepo != nil {
+ objectMap["gitRepo"] = vVar.GitRepo
+ }
+ return json.Marshal(objectMap)
+}
+
+// VolumeMount the properties of the volume mount.
+type VolumeMount struct {
+ // Name - The name of the volume mount.
+ Name *string `json:"name,omitempty"`
+ // MountPath - The path within the container where the volume should be mounted. Must not contain colon (:).
+ MountPath *string `json:"mountPath,omitempty"`
+ // ReadOnly - The flag indicating whether the volume mount is read-only.
+ ReadOnly *bool `json:"readOnly,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/operations.go
new file mode 100644
index 000000000..559a24c8f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/operations.go
@@ -0,0 +1,98 @@
+package containerinstance
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "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 Containerinstance service.
+type OperationsClient struct {
+ BaseClient
+}
+
+// NewOperationsClient creates an instance of the OperationsClient client.
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List list the operations for Azure Container Instance service.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.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, "containerinstance.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ContainerInstance/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// 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/services/containerinstance/mgmt/2018-06-01/containerinstance/startcontainer.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/startcontainer.go
new file mode 100644
index 000000000..2a4a4c550
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/startcontainer.go
@@ -0,0 +1,113 @@
+package containerinstance
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// StartContainerClient is the client for the StartContainer methods of the Containerinstance service.
+type StartContainerClient struct {
+ BaseClient
+}
+
+// NewStartContainerClient creates an instance of the StartContainerClient client.
+func NewStartContainerClient(subscriptionID string) StartContainerClient {
+ return NewStartContainerClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewStartContainerClientWithBaseURI creates an instance of the StartContainerClient client.
+func NewStartContainerClientWithBaseURI(baseURI string, subscriptionID string) StartContainerClient {
+ return StartContainerClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// LaunchExec starts the exec command for a specified container instance in a specified resource group and container
+// group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// containerGroupName - the name of the container group.
+// containerName - the name of the container instance.
+// containerExecRequest - the request for the exec command.
+func (client StartContainerClient) LaunchExec(ctx context.Context, resourceGroupName string, containerGroupName string, containerName string, containerExecRequest ContainerExecRequest) (result ContainerExecResponse, err error) {
+ req, err := client.LaunchExecPreparer(ctx, resourceGroupName, containerGroupName, containerName, containerExecRequest)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.StartContainerClient", "LaunchExec", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.LaunchExecSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerinstance.StartContainerClient", "LaunchExec", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.LaunchExecResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.StartContainerClient", "LaunchExec", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// LaunchExecPreparer prepares the LaunchExec request.
+func (client StartContainerClient) LaunchExecPreparer(ctx context.Context, resourceGroupName string, containerGroupName string, containerName string, containerExecRequest ContainerExecRequest) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "containerGroupName": autorest.Encode("path", containerGroupName),
+ "containerName": autorest.Encode("path", containerName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/exec", pathParameters),
+ autorest.WithJSON(containerExecRequest),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// LaunchExecSender sends the LaunchExec request. The method will close the
+// http.Response Body if it receives an error.
+func (client StartContainerClient) LaunchExecSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// LaunchExecResponder handles the response to the LaunchExec request. The method always
+// closes the http.Response Body.
+func (client StartContainerClient) LaunchExecResponder(resp *http.Response) (result ContainerExecResponse, 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/services/containerinstance/mgmt/2018-06-01/containerinstance/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/version.go
new file mode 100644
index 000000000..df5d7da41
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/version.go
@@ -0,0 +1,30 @@
+package containerinstance
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " containerinstance/2018-04-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-03-01/containerregistry/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-03-01/containerregistry/models.go
index 32c517f03..a81ab2438 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-03-01/containerregistry/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-03-01/containerregistry/models.go
@@ -200,12 +200,11 @@ type RegenerateCredentialParameters struct {
// RegistriesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RegistriesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegistriesCreateFuture) Result(client RegistriesClient) (r Registry, err error) {
+func (future *RegistriesCreateFuture) Result(client RegistriesClient) (r Registry, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -213,34 +212,15 @@ func (future RegistriesCreateFuture) Result(client RegistriesClient) (r Registry
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("containerregistry.RegistriesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-03-01/containerregistry/registries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-03-01/containerregistry/registries.go
index 9291498c6..dfca43072 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-03-01/containerregistry/registries.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-03-01/containerregistry/registries.go
@@ -183,15 +183,17 @@ func (client RegistriesClient) CreatePreparer(ctx context.Context, resourceGroup
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) CreateSender(req *http.Request) (future RegistriesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/models.go
index 4b1626011..dd8ff4482 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/models.go
@@ -551,12 +551,11 @@ type RegenerateCredentialParameters struct {
// RegistriesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RegistriesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegistriesCreateFuture) Result(client RegistriesClient) (r Registry, err error) {
+func (future *RegistriesCreateFuture) Result(client RegistriesClient) (r Registry, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -564,34 +563,15 @@ func (future RegistriesCreateFuture) Result(client RegistriesClient) (r Registry
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("containerregistry.RegistriesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -599,12 +579,11 @@ func (future RegistriesCreateFuture) Result(client RegistriesClient) (r Registry
// RegistriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RegistriesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegistriesDeleteFuture) Result(client RegistriesClient) (ar autorest.Response, err error) {
+func (future *RegistriesDeleteFuture) Result(client RegistriesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -612,35 +591,10 @@ func (future RegistriesDeleteFuture) Result(client RegistriesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.RegistriesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -648,12 +602,11 @@ func (future RegistriesDeleteFuture) Result(client RegistriesClient) (ar autores
// operation.
type RegistriesImportImageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegistriesImportImageFuture) Result(client RegistriesClient) (ar autorest.Response, err error) {
+func (future *RegistriesImportImageFuture) Result(client RegistriesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -661,47 +614,21 @@ func (future RegistriesImportImageFuture) Result(client RegistriesClient) (ar au
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.RegistriesImportImageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ImportImageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesImportImageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesImportImageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesImportImageFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ImportImageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesImportImageFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// RegistriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RegistriesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegistriesUpdateFuture) Result(client RegistriesClient) (r Registry, err error) {
+func (future *RegistriesUpdateFuture) Result(client RegistriesClient) (r Registry, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -709,34 +636,15 @@ func (future RegistriesUpdateFuture) Result(client RegistriesClient) (r Registry
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("containerregistry.RegistriesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.UpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1336,12 +1244,11 @@ type ReplicationProperties struct {
// ReplicationsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ReplicationsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationsCreateFuture) Result(client ReplicationsClient) (r Replication, err error) {
+func (future *ReplicationsCreateFuture) Result(client ReplicationsClient) (r Replication, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1349,34 +1256,15 @@ func (future ReplicationsCreateFuture) Result(client ReplicationsClient) (r Repl
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1384,12 +1272,11 @@ func (future ReplicationsCreateFuture) Result(client ReplicationsClient) (r Repl
// ReplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ReplicationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationsDeleteFuture) Result(client ReplicationsClient) (ar autorest.Response, err error) {
+func (future *ReplicationsDeleteFuture) Result(client ReplicationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1397,47 +1284,21 @@ func (future ReplicationsDeleteFuture) Result(client ReplicationsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ReplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ReplicationsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationsUpdateFuture) Result(client ReplicationsClient) (r Replication, err error) {
+func (future *ReplicationsUpdateFuture) Result(client ReplicationsClient) (r Replication, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1445,34 +1306,15 @@ func (future ReplicationsUpdateFuture) Result(client ReplicationsClient) (r Repl
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.UpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1957,12 +1799,11 @@ func (wpup WebhookPropertiesUpdateParameters) MarshalJSON() ([]byte, error) {
// WebhooksCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WebhooksCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, err error) {
+func (future *WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1970,34 +1811,15 @@ func (future WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, err
return
}
if !done {
- return w, azure.NewAsyncOpIncompleteError("containerregistry.WebhooksCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- w, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent {
+ w, err = client.CreateResponder(w.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", w.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- w, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2005,12 +1827,11 @@ func (future WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, err
// WebhooksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WebhooksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WebhooksDeleteFuture) Result(client WebhooksClient) (ar autorest.Response, err error) {
+func (future *WebhooksDeleteFuture) Result(client WebhooksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2018,47 +1839,21 @@ func (future WebhooksDeleteFuture) Result(client WebhooksClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.WebhooksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// WebhooksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WebhooksUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WebhooksUpdateFuture) Result(client WebhooksClient) (w Webhook, err error) {
+func (future *WebhooksUpdateFuture) Result(client WebhooksClient) (w Webhook, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2066,34 +1861,15 @@ func (future WebhooksUpdateFuture) Result(client WebhooksClient) (w Webhook, err
return
}
if !done {
- return w, azure.NewAsyncOpIncompleteError("containerregistry.WebhooksUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- w, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent {
+ w, err = client.UpdateResponder(w.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", w.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- w, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go
index e341c0e62..f42f4eb47 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go
@@ -179,15 +179,17 @@ func (client RegistriesClient) CreatePreparer(ctx context.Context, resourceGroup
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) CreateSender(req *http.Request) (future RegistriesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -256,15 +258,17 @@ func (client RegistriesClient) DeletePreparer(ctx context.Context, resourceGroup
// 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) (future RegistriesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -415,15 +419,17 @@ func (client RegistriesClient) ImportImagePreparer(ctx context.Context, resource
// ImportImageSender sends the ImportImage request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) ImportImageSender(req *http.Request) (future RegistriesImportImageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -906,15 +912,17 @@ func (client RegistriesClient) UpdatePreparer(ctx context.Context, resourceGroup
// 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) (future RegistriesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/replications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/replications.go
index dc05abe72..0fdc10204 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/replications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/replications.go
@@ -101,15 +101,17 @@ func (client ReplicationsClient) CreatePreparer(ctx context.Context, resourceGro
// 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) (future ReplicationsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -184,15 +186,17 @@ func (client ReplicationsClient) DeletePreparer(ctx context.Context, resourceGro
// 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) (future ReplicationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -453,15 +457,17 @@ func (client ReplicationsClient) UpdatePreparer(ctx context.Context, resourceGro
// 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) (future ReplicationsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/webhooks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/webhooks.go
index 33b67fa2a..09120fdb0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/webhooks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/webhooks.go
@@ -107,15 +107,17 @@ func (client WebhooksClient) CreatePreparer(ctx context.Context, resourceGroupNa
// 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) (future WebhooksCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -190,15 +192,17 @@ func (client WebhooksClient) DeletePreparer(ctx context.Context, resourceGroupNa
// 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) (future WebhooksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -730,15 +734,17 @@ func (client WebhooksClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// 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) (future WebhooksUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-03-30/containerservice/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-03-30/containerservice/containerservices.go
index 94bc93a3b..f536f0a74 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-03-30/containerservice/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-03-30/containerservice/containerservices.go
@@ -111,15 +111,17 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context
// 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) (future ContainerServicesCreateOrUpdateFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -183,15 +185,17 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour
// 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) (future ContainerServicesDeleteFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-03-30/containerservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-03-30/containerservice/models.go
index 19befa535..48a98e303 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-03-30/containerservice/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-03-30/containerservice/models.go
@@ -271,12 +271,11 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error {
// long-running operation.
type ContainerServicesCreateOrUpdateFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) {
+func (future *ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -284,34 +283,15 @@ func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerS
return
}
if !done {
- return cs, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cs, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", cs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure sending request")
- return
- }
- cs, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure responding to request")
}
return
}
@@ -320,12 +300,11 @@ func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerS
// operation.
type ContainerServicesDeleteFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
+func (future *ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -333,35 +312,10 @@ func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-09-30/containerservice/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-09-30/containerservice/containerservices.go
index 1888572f4..9c85974cf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-09-30/containerservice/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-09-30/containerservice/containerservices.go
@@ -119,15 +119,17 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context
// 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) (future ContainerServicesCreateOrUpdateFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -191,15 +193,17 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour
// 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) (future ContainerServicesDeleteFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-09-30/containerservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-09-30/containerservice/models.go
index 4f2527478..329190a74 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-09-30/containerservice/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2016-09-30/containerservice/models.go
@@ -276,12 +276,11 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error {
// long-running operation.
type ContainerServicesCreateOrUpdateFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) {
+func (future *ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -289,34 +288,15 @@ func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerS
return
}
if !done {
- return cs, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cs, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", cs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure sending request")
- return
- }
- cs, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure responding to request")
}
return
}
@@ -325,12 +305,11 @@ func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerS
// operation.
type ContainerServicesDeleteFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
+func (future *ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -338,35 +317,10 @@ func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-01-31/containerservice/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-01-31/containerservice/containerservices.go
index 68135fcdf..88d0e3c85 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-01-31/containerservice/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-01-31/containerservice/containerservices.go
@@ -119,15 +119,17 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context
// 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) (future ContainerServicesCreateOrUpdateFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -191,15 +193,17 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour
// 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) (future ContainerServicesDeleteFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-01-31/containerservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-01-31/containerservice/models.go
index 5b38b3670..9f81f25c2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-01-31/containerservice/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-01-31/containerservice/models.go
@@ -276,12 +276,11 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error {
// long-running operation.
type ContainerServicesCreateOrUpdateFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) {
+func (future *ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -289,34 +288,15 @@ func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerS
return
}
if !done {
- return cs, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cs, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", cs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure sending request")
- return
- }
- cs, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure responding to request")
}
return
}
@@ -325,12 +305,11 @@ func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerS
// operation.
type ContainerServicesDeleteFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
+func (future *ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -338,35 +317,10 @@ func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-07-01/containerservice/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-07-01/containerservice/containerservices.go
index 9d26d5589..b44a4511d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-07-01/containerservice/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-07-01/containerservice/containerservices.go
@@ -122,15 +122,17 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context
// 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) (future ContainerServicesCreateOrUpdateFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -194,15 +196,17 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour
// 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) (future ContainerServicesDeleteFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-07-01/containerservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-07-01/containerservice/models.go
index 8460df02c..3942f3c4c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-07-01/containerservice/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-07-01/containerservice/models.go
@@ -80,8 +80,6 @@ func PossibleStorageProfileTypesValues() []StorageProfileTypes {
type VMSizeTypes string
const (
- // StandardA0 ...
- StandardA0 VMSizeTypes = "Standard_A0"
// StandardA1 ...
StandardA1 VMSizeTypes = "Standard_A1"
// StandardA10 ...
@@ -118,10 +116,6 @@ const (
StandardA8V2 VMSizeTypes = "Standard_A8_v2"
// StandardA9 ...
StandardA9 VMSizeTypes = "Standard_A9"
- // StandardB1ms ...
- StandardB1ms VMSizeTypes = "Standard_B1ms"
- // StandardB1s ...
- StandardB1s VMSizeTypes = "Standard_B1s"
// StandardB2ms ...
StandardB2ms VMSizeTypes = "Standard_B2ms"
// StandardB2s ...
@@ -438,7 +432,7 @@ const (
// PossibleVMSizeTypesValues returns an array of possible values for the VMSizeTypes const type.
func PossibleVMSizeTypesValues() []VMSizeTypes {
- return []VMSizeTypes{StandardA0, StandardA1, StandardA10, StandardA11, StandardA1V2, StandardA2, StandardA2mV2, StandardA2V2, StandardA3, StandardA4, StandardA4mV2, StandardA4V2, StandardA5, StandardA6, StandardA7, StandardA8, StandardA8mV2, StandardA8V2, StandardA9, StandardB1ms, StandardB1s, StandardB2ms, StandardB2s, StandardB4ms, StandardB8ms, StandardD1, StandardD11, StandardD11V2, StandardD11V2Promo, StandardD12, StandardD12V2, StandardD12V2Promo, StandardD13, StandardD13V2, StandardD13V2Promo, StandardD14, StandardD14V2, StandardD14V2Promo, StandardD15V2, StandardD16sV3, StandardD16V3, StandardD1V2, StandardD2, StandardD2sV3, StandardD2V2, StandardD2V2Promo, StandardD2V3, StandardD3, StandardD32sV3, StandardD32V3, StandardD3V2, StandardD3V2Promo, StandardD4, StandardD4sV3, StandardD4V2, StandardD4V2Promo, StandardD4V3, StandardD5V2, StandardD5V2Promo, StandardD64sV3, StandardD64V3, StandardD8sV3, StandardD8V3, StandardDS1, StandardDS11, StandardDS11V2, StandardDS11V2Promo, StandardDS12, StandardDS12V2, StandardDS12V2Promo, StandardDS13, StandardDS132V2, StandardDS134V2, StandardDS13V2, StandardDS13V2Promo, StandardDS14, StandardDS144V2, StandardDS148V2, StandardDS14V2, StandardDS14V2Promo, StandardDS15V2, StandardDS1V2, StandardDS2, StandardDS2V2, StandardDS2V2Promo, StandardDS3, StandardDS3V2, StandardDS3V2Promo, StandardDS4, StandardDS4V2, StandardDS4V2Promo, StandardDS5V2, StandardDS5V2Promo, StandardE16sV3, StandardE16V3, StandardE2sV3, StandardE2V3, StandardE3216sV3, StandardE328sV3, StandardE32sV3, StandardE32V3, StandardE4sV3, StandardE4V3, StandardE6416sV3, StandardE6432sV3, StandardE64sV3, StandardE64V3, StandardE8sV3, StandardE8V3, StandardF1, StandardF16, StandardF16s, StandardF16sV2, StandardF1s, StandardF2, StandardF2s, StandardF2sV2, StandardF32sV2, StandardF4, StandardF4s, StandardF4sV2, StandardF64sV2, StandardF72sV2, StandardF8, StandardF8s, StandardF8sV2, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS44, StandardGS48, StandardGS5, StandardGS516, StandardGS58, StandardH16, StandardH16m, StandardH16mr, StandardH16r, StandardH8, StandardH8m, StandardL16s, StandardL32s, StandardL4s, StandardL8s, StandardM12832ms, StandardM12864ms, StandardM128ms, StandardM128s, StandardM6416ms, StandardM6432ms, StandardM64ms, StandardM64s, StandardNC12, StandardNC12sV2, StandardNC12sV3, StandardNC24, StandardNC24r, StandardNC24rsV2, StandardNC24rsV3, StandardNC24sV2, StandardNC24sV3, StandardNC6, StandardNC6sV2, StandardNC6sV3, StandardND12s, StandardND24rs, StandardND24s, StandardND6s, StandardNV12, StandardNV24, StandardNV6}
+ return []VMSizeTypes{StandardA1, StandardA10, StandardA11, StandardA1V2, StandardA2, StandardA2mV2, StandardA2V2, StandardA3, StandardA4, StandardA4mV2, StandardA4V2, StandardA5, StandardA6, StandardA7, StandardA8, StandardA8mV2, StandardA8V2, StandardA9, StandardB2ms, StandardB2s, StandardB4ms, StandardB8ms, StandardD1, StandardD11, StandardD11V2, StandardD11V2Promo, StandardD12, StandardD12V2, StandardD12V2Promo, StandardD13, StandardD13V2, StandardD13V2Promo, StandardD14, StandardD14V2, StandardD14V2Promo, StandardD15V2, StandardD16sV3, StandardD16V3, StandardD1V2, StandardD2, StandardD2sV3, StandardD2V2, StandardD2V2Promo, StandardD2V3, StandardD3, StandardD32sV3, StandardD32V3, StandardD3V2, StandardD3V2Promo, StandardD4, StandardD4sV3, StandardD4V2, StandardD4V2Promo, StandardD4V3, StandardD5V2, StandardD5V2Promo, StandardD64sV3, StandardD64V3, StandardD8sV3, StandardD8V3, StandardDS1, StandardDS11, StandardDS11V2, StandardDS11V2Promo, StandardDS12, StandardDS12V2, StandardDS12V2Promo, StandardDS13, StandardDS132V2, StandardDS134V2, StandardDS13V2, StandardDS13V2Promo, StandardDS14, StandardDS144V2, StandardDS148V2, StandardDS14V2, StandardDS14V2Promo, StandardDS15V2, StandardDS1V2, StandardDS2, StandardDS2V2, StandardDS2V2Promo, StandardDS3, StandardDS3V2, StandardDS3V2Promo, StandardDS4, StandardDS4V2, StandardDS4V2Promo, StandardDS5V2, StandardDS5V2Promo, StandardE16sV3, StandardE16V3, StandardE2sV3, StandardE2V3, StandardE3216sV3, StandardE328sV3, StandardE32sV3, StandardE32V3, StandardE4sV3, StandardE4V3, StandardE6416sV3, StandardE6432sV3, StandardE64sV3, StandardE64V3, StandardE8sV3, StandardE8V3, StandardF1, StandardF16, StandardF16s, StandardF16sV2, StandardF1s, StandardF2, StandardF2s, StandardF2sV2, StandardF32sV2, StandardF4, StandardF4s, StandardF4sV2, StandardF64sV2, StandardF72sV2, StandardF8, StandardF8s, StandardF8sV2, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS44, StandardGS48, StandardGS5, StandardGS516, StandardGS58, StandardH16, StandardH16m, StandardH16mr, StandardH16r, StandardH8, StandardH8m, StandardL16s, StandardL32s, StandardL4s, StandardL8s, StandardM12832ms, StandardM12864ms, StandardM128ms, StandardM128s, StandardM6416ms, StandardM6432ms, StandardM64ms, StandardM64s, StandardNC12, StandardNC12sV2, StandardNC12sV3, StandardNC24, StandardNC24r, StandardNC24rsV2, StandardNC24rsV3, StandardNC24sV2, StandardNC24sV3, StandardNC6, StandardNC6sV2, StandardNC6sV3, StandardND12s, StandardND24rs, StandardND24s, StandardND6s, StandardNV12, StandardNV24, StandardNV6}
}
// AgentPoolProfile profile for the container service agent pool.
@@ -447,7 +441,7 @@ type AgentPoolProfile struct {
Name *string `json:"name,omitempty"`
// Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
Count *int32 `json:"count,omitempty"`
- // VMSize - Size of agent VMs. Possible values include: 'StandardA0', 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB1ms', 'StandardB1s', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
+ // VMSize - Size of agent VMs. Possible values include: 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
VMSize VMSizeTypes `json:"vmSize,omitempty"`
// OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
@@ -579,12 +573,11 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error {
// long-running operation.
type ContainerServicesCreateOrUpdateFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) {
+func (future *ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -592,34 +585,15 @@ func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerS
return
}
if !done {
- return cs, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cs, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", cs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure sending request")
- return
- }
- cs, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure responding to request")
}
return
}
@@ -628,12 +602,11 @@ func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerS
// operation.
type ContainerServicesDeleteFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
+func (future *ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -641,35 +614,10 @@ func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -811,7 +759,7 @@ type MasterProfile struct {
Count *int32 `json:"count,omitempty"`
// DNSPrefix - DNS prefix to be used to create the FQDN for the master pool.
DNSPrefix *string `json:"dnsPrefix,omitempty"`
- // VMSize - Size of agent VMs. Possible values include: 'StandardA0', 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB1ms', 'StandardB1s', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
+ // VMSize - Size of agent VMs. Possible values include: 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
VMSize VMSizeTypes `json:"vmSize,omitempty"`
// OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice/containerservices.go
index 9d26d5589..b44a4511d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice/containerservices.go
@@ -122,15 +122,17 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context
// 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) (future ContainerServicesCreateOrUpdateFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -194,15 +196,17 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour
// 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) (future ContainerServicesDeleteFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice/managedclusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice/managedclusters.go
index 1e03bc6dc..bdfb8e22e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice/managedclusters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice/managedclusters.go
@@ -108,15 +108,17 @@ func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future ManagedClustersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -177,15 +179,17 @@ func (client ManagedClustersClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedClustersClient) DeleteSender(req *http.Request) (future ManagedClustersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -268,8 +272,77 @@ func (client ManagedClustersClient) GetResponder(resp *http.Response) (result Ma
return
}
-// GetAccessProfiles gets the accessProfile for the specified role name of the managed cluster with a specified
-// resource group and name.
+// GetAccessProfile gets the accessProfile for the specified role name of the managed cluster with a specified resource
+// group and name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// roleName - the name of the role for managed cluster accessProfile resource.
+func (client ManagedClustersClient) GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result ManagedClusterAccessProfile, err error) {
+ req, err := client.GetAccessProfilePreparer(ctx, resourceGroupName, resourceName, roleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAccessProfileSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAccessProfileResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetAccessProfilePreparer prepares the GetAccessProfile request.
+func (client ManagedClustersClient) GetAccessProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "roleName": autorest.Encode("path", roleName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-08-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAccessProfileSender sends the GetAccessProfile request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) GetAccessProfileSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetAccessProfileResponder handles the response to the GetAccessProfile request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) GetAccessProfileResponder(resp *http.Response) (result ManagedClusterAccessProfile, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAccessProfiles use ManagedClusters_GetAccessProfile instead.
// Parameters:
// resourceGroupName - the name of the resource group.
// resourceName - the name of the managed cluster resource.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice/models.go
index a2d2440d5..f391ff672 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice/models.go
@@ -80,8 +80,6 @@ func PossibleStorageProfileTypesValues() []StorageProfileTypes {
type VMSizeTypes string
const (
- // StandardA0 ...
- StandardA0 VMSizeTypes = "Standard_A0"
// StandardA1 ...
StandardA1 VMSizeTypes = "Standard_A1"
// StandardA10 ...
@@ -118,10 +116,6 @@ const (
StandardA8V2 VMSizeTypes = "Standard_A8_v2"
// StandardA9 ...
StandardA9 VMSizeTypes = "Standard_A9"
- // StandardB1ms ...
- StandardB1ms VMSizeTypes = "Standard_B1ms"
- // StandardB1s ...
- StandardB1s VMSizeTypes = "Standard_B1s"
// StandardB2ms ...
StandardB2ms VMSizeTypes = "Standard_B2ms"
// StandardB2s ...
@@ -438,7 +432,7 @@ const (
// PossibleVMSizeTypesValues returns an array of possible values for the VMSizeTypes const type.
func PossibleVMSizeTypesValues() []VMSizeTypes {
- return []VMSizeTypes{StandardA0, StandardA1, StandardA10, StandardA11, StandardA1V2, StandardA2, StandardA2mV2, StandardA2V2, StandardA3, StandardA4, StandardA4mV2, StandardA4V2, StandardA5, StandardA6, StandardA7, StandardA8, StandardA8mV2, StandardA8V2, StandardA9, StandardB1ms, StandardB1s, StandardB2ms, StandardB2s, StandardB4ms, StandardB8ms, StandardD1, StandardD11, StandardD11V2, StandardD11V2Promo, StandardD12, StandardD12V2, StandardD12V2Promo, StandardD13, StandardD13V2, StandardD13V2Promo, StandardD14, StandardD14V2, StandardD14V2Promo, StandardD15V2, StandardD16sV3, StandardD16V3, StandardD1V2, StandardD2, StandardD2sV3, StandardD2V2, StandardD2V2Promo, StandardD2V3, StandardD3, StandardD32sV3, StandardD32V3, StandardD3V2, StandardD3V2Promo, StandardD4, StandardD4sV3, StandardD4V2, StandardD4V2Promo, StandardD4V3, StandardD5V2, StandardD5V2Promo, StandardD64sV3, StandardD64V3, StandardD8sV3, StandardD8V3, StandardDS1, StandardDS11, StandardDS11V2, StandardDS11V2Promo, StandardDS12, StandardDS12V2, StandardDS12V2Promo, StandardDS13, StandardDS132V2, StandardDS134V2, StandardDS13V2, StandardDS13V2Promo, StandardDS14, StandardDS144V2, StandardDS148V2, StandardDS14V2, StandardDS14V2Promo, StandardDS15V2, StandardDS1V2, StandardDS2, StandardDS2V2, StandardDS2V2Promo, StandardDS3, StandardDS3V2, StandardDS3V2Promo, StandardDS4, StandardDS4V2, StandardDS4V2Promo, StandardDS5V2, StandardDS5V2Promo, StandardE16sV3, StandardE16V3, StandardE2sV3, StandardE2V3, StandardE3216sV3, StandardE328sV3, StandardE32sV3, StandardE32V3, StandardE4sV3, StandardE4V3, StandardE6416sV3, StandardE6432sV3, StandardE64sV3, StandardE64V3, StandardE8sV3, StandardE8V3, StandardF1, StandardF16, StandardF16s, StandardF16sV2, StandardF1s, StandardF2, StandardF2s, StandardF2sV2, StandardF32sV2, StandardF4, StandardF4s, StandardF4sV2, StandardF64sV2, StandardF72sV2, StandardF8, StandardF8s, StandardF8sV2, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS44, StandardGS48, StandardGS5, StandardGS516, StandardGS58, StandardH16, StandardH16m, StandardH16mr, StandardH16r, StandardH8, StandardH8m, StandardL16s, StandardL32s, StandardL4s, StandardL8s, StandardM12832ms, StandardM12864ms, StandardM128ms, StandardM128s, StandardM6416ms, StandardM6432ms, StandardM64ms, StandardM64s, StandardNC12, StandardNC12sV2, StandardNC12sV3, StandardNC24, StandardNC24r, StandardNC24rsV2, StandardNC24rsV3, StandardNC24sV2, StandardNC24sV3, StandardNC6, StandardNC6sV2, StandardNC6sV3, StandardND12s, StandardND24rs, StandardND24s, StandardND6s, StandardNV12, StandardNV24, StandardNV6}
+ return []VMSizeTypes{StandardA1, StandardA10, StandardA11, StandardA1V2, StandardA2, StandardA2mV2, StandardA2V2, StandardA3, StandardA4, StandardA4mV2, StandardA4V2, StandardA5, StandardA6, StandardA7, StandardA8, StandardA8mV2, StandardA8V2, StandardA9, StandardB2ms, StandardB2s, StandardB4ms, StandardB8ms, StandardD1, StandardD11, StandardD11V2, StandardD11V2Promo, StandardD12, StandardD12V2, StandardD12V2Promo, StandardD13, StandardD13V2, StandardD13V2Promo, StandardD14, StandardD14V2, StandardD14V2Promo, StandardD15V2, StandardD16sV3, StandardD16V3, StandardD1V2, StandardD2, StandardD2sV3, StandardD2V2, StandardD2V2Promo, StandardD2V3, StandardD3, StandardD32sV3, StandardD32V3, StandardD3V2, StandardD3V2Promo, StandardD4, StandardD4sV3, StandardD4V2, StandardD4V2Promo, StandardD4V3, StandardD5V2, StandardD5V2Promo, StandardD64sV3, StandardD64V3, StandardD8sV3, StandardD8V3, StandardDS1, StandardDS11, StandardDS11V2, StandardDS11V2Promo, StandardDS12, StandardDS12V2, StandardDS12V2Promo, StandardDS13, StandardDS132V2, StandardDS134V2, StandardDS13V2, StandardDS13V2Promo, StandardDS14, StandardDS144V2, StandardDS148V2, StandardDS14V2, StandardDS14V2Promo, StandardDS15V2, StandardDS1V2, StandardDS2, StandardDS2V2, StandardDS2V2Promo, StandardDS3, StandardDS3V2, StandardDS3V2Promo, StandardDS4, StandardDS4V2, StandardDS4V2Promo, StandardDS5V2, StandardDS5V2Promo, StandardE16sV3, StandardE16V3, StandardE2sV3, StandardE2V3, StandardE3216sV3, StandardE328sV3, StandardE32sV3, StandardE32V3, StandardE4sV3, StandardE4V3, StandardE6416sV3, StandardE6432sV3, StandardE64sV3, StandardE64V3, StandardE8sV3, StandardE8V3, StandardF1, StandardF16, StandardF16s, StandardF16sV2, StandardF1s, StandardF2, StandardF2s, StandardF2sV2, StandardF32sV2, StandardF4, StandardF4s, StandardF4sV2, StandardF64sV2, StandardF72sV2, StandardF8, StandardF8s, StandardF8sV2, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS44, StandardGS48, StandardGS5, StandardGS516, StandardGS58, StandardH16, StandardH16m, StandardH16mr, StandardH16r, StandardH8, StandardH8m, StandardL16s, StandardL32s, StandardL4s, StandardL8s, StandardM12832ms, StandardM12864ms, StandardM128ms, StandardM128s, StandardM6416ms, StandardM6432ms, StandardM64ms, StandardM64s, StandardNC12, StandardNC12sV2, StandardNC12sV3, StandardNC24, StandardNC24r, StandardNC24rsV2, StandardNC24rsV3, StandardNC24sV2, StandardNC24sV3, StandardNC6, StandardNC6sV2, StandardNC6sV3, StandardND12s, StandardND24rs, StandardND24s, StandardND6s, StandardNV12, StandardNV24, StandardNV6}
}
// AccessProfile profile for enabling a user to access a managed cluster.
@@ -453,7 +447,7 @@ type AgentPoolProfile struct {
Name *string `json:"name,omitempty"`
// Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
Count *int32 `json:"count,omitempty"`
- // VMSize - Size of agent VMs. Possible values include: 'StandardA0', 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB1ms', 'StandardB1s', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
+ // VMSize - Size of agent VMs. Possible values include: 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
VMSize VMSizeTypes `json:"vmSize,omitempty"`
// OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
@@ -585,12 +579,11 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error {
// long-running operation.
type ContainerServicesCreateOrUpdateFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) {
+func (future *ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -598,34 +591,15 @@ func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerS
return
}
if !done {
- return cs, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cs, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", cs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure sending request")
- return
- }
- cs, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure responding to request")
}
return
}
@@ -634,12 +608,11 @@ func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerS
// operation.
type ContainerServicesDeleteFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
+func (future *ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -647,35 +620,10 @@ func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1167,12 +1115,11 @@ type ManagedClusterProperties struct {
// operation.
type ManagedClustersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) {
+func (future *ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1180,34 +1127,15 @@ func (future ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersC
return
}
if !done {
- return mc, azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent {
+ mc, err = client.CreateOrUpdateResponder(mc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", mc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- mc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1216,12 +1144,11 @@ func (future ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersC
// operation.
type ManagedClustersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedClustersDeleteFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) {
+func (future *ManagedClustersDeleteFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1229,35 +1156,10 @@ func (future ManagedClustersDeleteFuture) Result(client ManagedClustersClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1357,7 +1259,7 @@ type MasterProfile struct {
Count *int32 `json:"count,omitempty"`
// DNSPrefix - DNS prefix to be used to create the FQDN for the master pool.
DNSPrefix *string `json:"dnsPrefix,omitempty"`
- // VMSize - Size of agent VMs. Possible values include: 'StandardA0', 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB1ms', 'StandardB1s', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
+ // VMSize - Size of agent VMs. Possible values include: 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
VMSize VMSizeTypes `json:"vmSize,omitempty"`
// OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-09-30/containerservice/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-09-30/containerservice/containerservices.go
index 317b63851..4a3dda6f5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-09-30/containerservice/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-09-30/containerservice/containerservices.go
@@ -122,15 +122,17 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context
// 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) (future ContainerServicesCreateOrUpdateFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -194,15 +196,17 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour
// 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) (future ContainerServicesDeleteFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-09-30/containerservice/managedclusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-09-30/containerservice/managedclusters.go
index 1e03bc6dc..bdfb8e22e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-09-30/containerservice/managedclusters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-09-30/containerservice/managedclusters.go
@@ -108,15 +108,17 @@ func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future ManagedClustersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -177,15 +179,17 @@ func (client ManagedClustersClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedClustersClient) DeleteSender(req *http.Request) (future ManagedClustersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -268,8 +272,77 @@ func (client ManagedClustersClient) GetResponder(resp *http.Response) (result Ma
return
}
-// GetAccessProfiles gets the accessProfile for the specified role name of the managed cluster with a specified
-// resource group and name.
+// GetAccessProfile gets the accessProfile for the specified role name of the managed cluster with a specified resource
+// group and name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// roleName - the name of the role for managed cluster accessProfile resource.
+func (client ManagedClustersClient) GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result ManagedClusterAccessProfile, err error) {
+ req, err := client.GetAccessProfilePreparer(ctx, resourceGroupName, resourceName, roleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAccessProfileSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAccessProfileResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetAccessProfilePreparer prepares the GetAccessProfile request.
+func (client ManagedClustersClient) GetAccessProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "roleName": autorest.Encode("path", roleName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-08-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAccessProfileSender sends the GetAccessProfile request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) GetAccessProfileSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetAccessProfileResponder handles the response to the GetAccessProfile request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) GetAccessProfileResponder(resp *http.Response) (result ManagedClusterAccessProfile, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAccessProfiles use ManagedClusters_GetAccessProfile instead.
// Parameters:
// resourceGroupName - the name of the resource group.
// resourceName - the name of the managed cluster resource.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-09-30/containerservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-09-30/containerservice/models.go
index 82b6808bd..91c646f72 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-09-30/containerservice/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-09-30/containerservice/models.go
@@ -80,8 +80,6 @@ func PossibleStorageProfileTypesValues() []StorageProfileTypes {
type VMSizeTypes string
const (
- // StandardA0 ...
- StandardA0 VMSizeTypes = "Standard_A0"
// StandardA1 ...
StandardA1 VMSizeTypes = "Standard_A1"
// StandardA10 ...
@@ -118,10 +116,6 @@ const (
StandardA8V2 VMSizeTypes = "Standard_A8_v2"
// StandardA9 ...
StandardA9 VMSizeTypes = "Standard_A9"
- // StandardB1ms ...
- StandardB1ms VMSizeTypes = "Standard_B1ms"
- // StandardB1s ...
- StandardB1s VMSizeTypes = "Standard_B1s"
// StandardB2ms ...
StandardB2ms VMSizeTypes = "Standard_B2ms"
// StandardB2s ...
@@ -438,7 +432,7 @@ const (
// PossibleVMSizeTypesValues returns an array of possible values for the VMSizeTypes const type.
func PossibleVMSizeTypesValues() []VMSizeTypes {
- return []VMSizeTypes{StandardA0, StandardA1, StandardA10, StandardA11, StandardA1V2, StandardA2, StandardA2mV2, StandardA2V2, StandardA3, StandardA4, StandardA4mV2, StandardA4V2, StandardA5, StandardA6, StandardA7, StandardA8, StandardA8mV2, StandardA8V2, StandardA9, StandardB1ms, StandardB1s, StandardB2ms, StandardB2s, StandardB4ms, StandardB8ms, StandardD1, StandardD11, StandardD11V2, StandardD11V2Promo, StandardD12, StandardD12V2, StandardD12V2Promo, StandardD13, StandardD13V2, StandardD13V2Promo, StandardD14, StandardD14V2, StandardD14V2Promo, StandardD15V2, StandardD16sV3, StandardD16V3, StandardD1V2, StandardD2, StandardD2sV3, StandardD2V2, StandardD2V2Promo, StandardD2V3, StandardD3, StandardD32sV3, StandardD32V3, StandardD3V2, StandardD3V2Promo, StandardD4, StandardD4sV3, StandardD4V2, StandardD4V2Promo, StandardD4V3, StandardD5V2, StandardD5V2Promo, StandardD64sV3, StandardD64V3, StandardD8sV3, StandardD8V3, StandardDS1, StandardDS11, StandardDS11V2, StandardDS11V2Promo, StandardDS12, StandardDS12V2, StandardDS12V2Promo, StandardDS13, StandardDS132V2, StandardDS134V2, StandardDS13V2, StandardDS13V2Promo, StandardDS14, StandardDS144V2, StandardDS148V2, StandardDS14V2, StandardDS14V2Promo, StandardDS15V2, StandardDS1V2, StandardDS2, StandardDS2V2, StandardDS2V2Promo, StandardDS3, StandardDS3V2, StandardDS3V2Promo, StandardDS4, StandardDS4V2, StandardDS4V2Promo, StandardDS5V2, StandardDS5V2Promo, StandardE16sV3, StandardE16V3, StandardE2sV3, StandardE2V3, StandardE3216sV3, StandardE328sV3, StandardE32sV3, StandardE32V3, StandardE4sV3, StandardE4V3, StandardE6416sV3, StandardE6432sV3, StandardE64sV3, StandardE64V3, StandardE8sV3, StandardE8V3, StandardF1, StandardF16, StandardF16s, StandardF16sV2, StandardF1s, StandardF2, StandardF2s, StandardF2sV2, StandardF32sV2, StandardF4, StandardF4s, StandardF4sV2, StandardF64sV2, StandardF72sV2, StandardF8, StandardF8s, StandardF8sV2, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS44, StandardGS48, StandardGS5, StandardGS516, StandardGS58, StandardH16, StandardH16m, StandardH16mr, StandardH16r, StandardH8, StandardH8m, StandardL16s, StandardL32s, StandardL4s, StandardL8s, StandardM12832ms, StandardM12864ms, StandardM128ms, StandardM128s, StandardM6416ms, StandardM6432ms, StandardM64ms, StandardM64s, StandardNC12, StandardNC12sV2, StandardNC12sV3, StandardNC24, StandardNC24r, StandardNC24rsV2, StandardNC24rsV3, StandardNC24sV2, StandardNC24sV3, StandardNC6, StandardNC6sV2, StandardNC6sV3, StandardND12s, StandardND24rs, StandardND24s, StandardND6s, StandardNV12, StandardNV24, StandardNV6}
+ return []VMSizeTypes{StandardA1, StandardA10, StandardA11, StandardA1V2, StandardA2, StandardA2mV2, StandardA2V2, StandardA3, StandardA4, StandardA4mV2, StandardA4V2, StandardA5, StandardA6, StandardA7, StandardA8, StandardA8mV2, StandardA8V2, StandardA9, StandardB2ms, StandardB2s, StandardB4ms, StandardB8ms, StandardD1, StandardD11, StandardD11V2, StandardD11V2Promo, StandardD12, StandardD12V2, StandardD12V2Promo, StandardD13, StandardD13V2, StandardD13V2Promo, StandardD14, StandardD14V2, StandardD14V2Promo, StandardD15V2, StandardD16sV3, StandardD16V3, StandardD1V2, StandardD2, StandardD2sV3, StandardD2V2, StandardD2V2Promo, StandardD2V3, StandardD3, StandardD32sV3, StandardD32V3, StandardD3V2, StandardD3V2Promo, StandardD4, StandardD4sV3, StandardD4V2, StandardD4V2Promo, StandardD4V3, StandardD5V2, StandardD5V2Promo, StandardD64sV3, StandardD64V3, StandardD8sV3, StandardD8V3, StandardDS1, StandardDS11, StandardDS11V2, StandardDS11V2Promo, StandardDS12, StandardDS12V2, StandardDS12V2Promo, StandardDS13, StandardDS132V2, StandardDS134V2, StandardDS13V2, StandardDS13V2Promo, StandardDS14, StandardDS144V2, StandardDS148V2, StandardDS14V2, StandardDS14V2Promo, StandardDS15V2, StandardDS1V2, StandardDS2, StandardDS2V2, StandardDS2V2Promo, StandardDS3, StandardDS3V2, StandardDS3V2Promo, StandardDS4, StandardDS4V2, StandardDS4V2Promo, StandardDS5V2, StandardDS5V2Promo, StandardE16sV3, StandardE16V3, StandardE2sV3, StandardE2V3, StandardE3216sV3, StandardE328sV3, StandardE32sV3, StandardE32V3, StandardE4sV3, StandardE4V3, StandardE6416sV3, StandardE6432sV3, StandardE64sV3, StandardE64V3, StandardE8sV3, StandardE8V3, StandardF1, StandardF16, StandardF16s, StandardF16sV2, StandardF1s, StandardF2, StandardF2s, StandardF2sV2, StandardF32sV2, StandardF4, StandardF4s, StandardF4sV2, StandardF64sV2, StandardF72sV2, StandardF8, StandardF8s, StandardF8sV2, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS44, StandardGS48, StandardGS5, StandardGS516, StandardGS58, StandardH16, StandardH16m, StandardH16mr, StandardH16r, StandardH8, StandardH8m, StandardL16s, StandardL32s, StandardL4s, StandardL8s, StandardM12832ms, StandardM12864ms, StandardM128ms, StandardM128s, StandardM6416ms, StandardM6432ms, StandardM64ms, StandardM64s, StandardNC12, StandardNC12sV2, StandardNC12sV3, StandardNC24, StandardNC24r, StandardNC24rsV2, StandardNC24rsV3, StandardNC24sV2, StandardNC24sV3, StandardNC6, StandardNC6sV2, StandardNC6sV3, StandardND12s, StandardND24rs, StandardND24s, StandardND6s, StandardNV12, StandardNV24, StandardNV6}
}
// AccessProfile profile for enabling a user to access a managed cluster.
@@ -453,7 +447,7 @@ type AgentPoolProfile struct {
Name *string `json:"name,omitempty"`
// Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
Count *int32 `json:"count,omitempty"`
- // VMSize - Size of agent VMs. Possible values include: 'StandardA0', 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB1ms', 'StandardB1s', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
+ // VMSize - Size of agent VMs. Possible values include: 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
VMSize VMSizeTypes `json:"vmSize,omitempty"`
// OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
@@ -585,12 +579,11 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error {
// long-running operation.
type ContainerServicesCreateOrUpdateFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) {
+func (future *ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -598,34 +591,15 @@ func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerS
return
}
if !done {
- return cs, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cs, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", cs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure sending request")
- return
- }
- cs, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure responding to request")
}
return
}
@@ -634,12 +608,11 @@ func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerS
// operation.
type ContainerServicesDeleteFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
+func (future *ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -647,35 +620,10 @@ func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1167,12 +1115,11 @@ type ManagedClusterProperties struct {
// operation.
type ManagedClustersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) {
+func (future *ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1180,34 +1127,15 @@ func (future ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersC
return
}
if !done {
- return mc, azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent {
+ mc, err = client.CreateOrUpdateResponder(mc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", mc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- mc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1216,12 +1144,11 @@ func (future ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersC
// operation.
type ManagedClustersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedClustersDeleteFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) {
+func (future *ManagedClustersDeleteFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1229,35 +1156,10 @@ func (future ManagedClustersDeleteFuture) Result(client ManagedClustersClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1357,7 +1259,7 @@ type MasterProfile struct {
Count *int32 `json:"count,omitempty"`
// DNSPrefix - DNS prefix to be used to create the FQDN for the master pool.
DNSPrefix *string `json:"dnsPrefix,omitempty"`
- // VMSize - Size of agent VMs. Possible values include: 'StandardA0', 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB1ms', 'StandardB1s', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
+ // VMSize - Size of agent VMs. Possible values include: 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
VMSize VMSizeTypes `json:"vmSize,omitempty"`
// OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go
index ca3c1b24d..99a223b4b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go
@@ -184,15 +184,17 @@ func (client DatabaseAccountsClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DatabaseAccountsClient) CreateOrUpdateSender(req *http.Request) (future DatabaseAccountsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -264,15 +266,17 @@ func (client DatabaseAccountsClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DatabaseAccountsClient) DeleteSender(req *http.Request) (future DatabaseAccountsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -350,15 +354,17 @@ func (client DatabaseAccountsClient) FailoverPriorityChangePreparer(ctx context.
// FailoverPriorityChangeSender sends the FailoverPriorityChange request. The method will close the
// http.Response Body if it receives an error.
func (client DatabaseAccountsClient) FailoverPriorityChangeSender(req *http.Request) (future DatabaseAccountsFailoverPriorityChangeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1064,6 +1070,178 @@ func (client DatabaseAccountsClient) ListUsagesResponder(resp *http.Response) (r
return
}
+// OfflineRegion offline the specified region for the specified Azure Cosmos DB database account.
+// Parameters:
+// resourceGroupName - name of an Azure resource group.
+// accountName - cosmos DB database account name.
+// regionParameterForOffline - cosmos DB region to offline for the database account.
+func (client DatabaseAccountsClient) OfflineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOffline RegionForOnlineOffline) (result DatabaseAccountsOfflineRegionFuture, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: regionParameterForOffline,
+ Constraints: []validation.Constraint{{Target: "regionParameterForOffline.Region", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("documentdb.DatabaseAccountsClient", "OfflineRegion", err.Error())
+ }
+
+ req, err := client.OfflineRegionPreparer(ctx, resourceGroupName, accountName, regionParameterForOffline)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "OfflineRegion", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.OfflineRegionSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "OfflineRegion", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// OfflineRegionPreparer prepares the OfflineRegion request.
+func (client DatabaseAccountsClient) OfflineRegionPreparer(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOffline RegionForOnlineOffline) (*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 = "2015-04-08"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion", pathParameters),
+ autorest.WithJSON(regionParameterForOffline),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// OfflineRegionSender sends the OfflineRegion request. The method will close the
+// http.Response Body if it receives an error.
+func (client DatabaseAccountsClient) OfflineRegionSender(req *http.Request) (future DatabaseAccountsOfflineRegionFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// OfflineRegionResponder handles the response to the OfflineRegion request. The method always
+// closes the http.Response Body.
+func (client DatabaseAccountsClient) OfflineRegionResponder(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
+}
+
+// OnlineRegion online the specified region for the specified Azure Cosmos DB database account.
+// Parameters:
+// resourceGroupName - name of an Azure resource group.
+// accountName - cosmos DB database account name.
+// regionParameterForOnline - cosmos DB region to online for the database account.
+func (client DatabaseAccountsClient) OnlineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOnline RegionForOnlineOffline) (result DatabaseAccountsOnlineRegionFuture, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: regionParameterForOnline,
+ Constraints: []validation.Constraint{{Target: "regionParameterForOnline.Region", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("documentdb.DatabaseAccountsClient", "OnlineRegion", err.Error())
+ }
+
+ req, err := client.OnlineRegionPreparer(ctx, resourceGroupName, accountName, regionParameterForOnline)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "OnlineRegion", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.OnlineRegionSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "OnlineRegion", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// OnlineRegionPreparer prepares the OnlineRegion request.
+func (client DatabaseAccountsClient) OnlineRegionPreparer(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOnline RegionForOnlineOffline) (*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 = "2015-04-08"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion", pathParameters),
+ autorest.WithJSON(regionParameterForOnline),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// OnlineRegionSender sends the OnlineRegion request. The method will close the
+// http.Response Body if it receives an error.
+func (client DatabaseAccountsClient) OnlineRegionSender(req *http.Request) (future DatabaseAccountsOnlineRegionFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// OnlineRegionResponder handles the response to the OnlineRegion request. The method always
+// closes the http.Response Body.
+func (client DatabaseAccountsClient) OnlineRegionResponder(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
+}
+
// Patch patches the properties of an existing Azure Cosmos DB database account.
// Parameters:
// resourceGroupName - name of an Azure resource group.
@@ -1122,15 +1300,17 @@ func (client DatabaseAccountsClient) PatchPreparer(ctx context.Context, resource
// PatchSender sends the Patch request. The method will close the
// http.Response Body if it receives an error.
func (client DatabaseAccountsClient) PatchSender(req *http.Request) (future DatabaseAccountsPatchFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1205,15 +1385,17 @@ func (client DatabaseAccountsClient) RegenerateKeyPreparer(ctx context.Context,
// RegenerateKeySender sends the RegenerateKey request. The method will close the
// http.Response Body if it receives an error.
func (client DatabaseAccountsClient) RegenerateKeySender(req *http.Request) (future DatabaseAccountsRegenerateKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/models.go
index e831e0925..a882a5a2e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/models.go
@@ -607,12 +607,11 @@ type DatabaseAccountRegenerateKeyParameters struct {
// operation.
type DatabaseAccountsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabaseAccountsCreateOrUpdateFuture) Result(client DatabaseAccountsClient) (da DatabaseAccount, err error) {
+func (future *DatabaseAccountsCreateOrUpdateFuture) Result(client DatabaseAccountsClient) (da DatabaseAccount, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -620,34 +619,15 @@ func (future DatabaseAccountsCreateOrUpdateFuture) Result(client DatabaseAccount
return
}
if !done {
- return da, azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- da, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent {
+ da, err = client.CreateOrUpdateResponder(da.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", da.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- da, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -656,12 +636,11 @@ func (future DatabaseAccountsCreateOrUpdateFuture) Result(client DatabaseAccount
// operation.
type DatabaseAccountsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabaseAccountsDeleteFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
+func (future *DatabaseAccountsDeleteFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -669,35 +648,10 @@ func (future DatabaseAccountsDeleteFuture) Result(client DatabaseAccountsClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -705,12 +659,11 @@ func (future DatabaseAccountsDeleteFuture) Result(client DatabaseAccountsClient)
// long-running operation.
type DatabaseAccountsFailoverPriorityChangeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabaseAccountsFailoverPriorityChangeFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
+func (future *DatabaseAccountsFailoverPriorityChangeFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -718,35 +671,10 @@ func (future DatabaseAccountsFailoverPriorityChangeFuture) Result(client Databas
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsFailoverPriorityChangeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.FailoverPriorityChangeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsFailoverPriorityChangeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsFailoverPriorityChangeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsFailoverPriorityChangeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.FailoverPriorityChangeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsFailoverPriorityChangeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -758,16 +686,61 @@ type DatabaseAccountsListResult struct {
Value *[]DatabaseAccount `json:"value,omitempty"`
}
-// DatabaseAccountsPatchFuture an abstraction for monitoring and retrieving the results of a long-running
+// DatabaseAccountsOfflineRegionFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
-type DatabaseAccountsPatchFuture struct {
+type DatabaseAccountsOfflineRegionFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabaseAccountsPatchFuture) Result(client DatabaseAccountsClient) (da DatabaseAccount, err error) {
+func (future *DatabaseAccountsOfflineRegionFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsOfflineRegionFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsOfflineRegionFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// DatabaseAccountsOnlineRegionFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type DatabaseAccountsOnlineRegionFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *DatabaseAccountsOnlineRegionFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsOnlineRegionFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsOnlineRegionFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// DatabaseAccountsPatchFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type DatabaseAccountsPatchFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *DatabaseAccountsPatchFuture) Result(client DatabaseAccountsClient) (da DatabaseAccount, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -775,34 +748,15 @@ func (future DatabaseAccountsPatchFuture) Result(client DatabaseAccountsClient)
return
}
if !done {
- return da, azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsPatchFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- da, err = client.PatchResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsPatchFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsPatchFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent {
+ da, err = client.PatchResponder(da.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsPatchFuture", "Result", da.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsPatchFuture", "Result", resp, "Failure sending request")
- return
- }
- da, err = client.PatchResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsPatchFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -811,12 +765,11 @@ func (future DatabaseAccountsPatchFuture) Result(client DatabaseAccountsClient)
// operation.
type DatabaseAccountsRegenerateKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabaseAccountsRegenerateKeyFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
+func (future *DatabaseAccountsRegenerateKeyFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -824,38 +777,21 @@ func (future DatabaseAccountsRegenerateKeyFuture) Result(client DatabaseAccounts
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsRegenerateKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RegenerateKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsRegenerateKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsRegenerateKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsRegenerateKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RegenerateKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsRegenerateKeyFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
+// ErrorResponse error Response.
+type ErrorResponse struct {
+ // Code - Error code.
+ Code *string `json:"code,omitempty"`
+ // Message - Error message indicating why the operation failed.
+ Message *string `json:"message,omitempty"`
+}
+
// FailoverPolicies the list of new failover policies for the failover priority change.
type FailoverPolicies struct {
// FailoverPolicies - List of failover policies.
@@ -1189,6 +1125,12 @@ type PercentileMetricValue struct {
Total *float64 `json:"total,omitempty"`
}
+// RegionForOnlineOffline cosmos DB region to online or offline.
+type RegionForOnlineOffline struct {
+ // Region - Cosmos DB region, with spaces between words and each word capitalized.
+ Region *string `json:"region,omitempty"`
+}
+
// Resource a database account resource.
type Resource struct {
// ID - The unique resource identifier of the database account.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/connectors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/connectors.go
index ad9dfecc2..a7f473c6f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/connectors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/connectors.go
@@ -102,15 +102,17 @@ func (client ConnectorsClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectorsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -173,15 +175,17 @@ func (client ConnectorsClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectorsClient) DeleteSender(req *http.Request) (future ConnectorsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/hubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/hubs.go
index 7e4c6490c..f1e9c655d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/hubs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/hubs.go
@@ -177,15 +177,17 @@ func (client HubsClient) DeletePreparer(ctx context.Context, resourceGroupName s
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client HubsClient) DeleteSender(req *http.Request) (future HubsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/interactions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/interactions.go
index 5acaf21c2..cc38a0c2e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/interactions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/interactions.go
@@ -99,15 +99,17 @@ func (client InteractionsClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InteractionsClient) CreateOrUpdateSender(req *http.Request) (future InteractionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/kpi.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/kpi.go
index 3341fe0d4..d95ea0c77 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/kpi.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/kpi.go
@@ -109,15 +109,17 @@ func (client KpiClient) CreateOrUpdatePreparer(ctx context.Context, resourceGrou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client KpiClient) CreateOrUpdateSender(req *http.Request) (future KpiCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -180,15 +182,17 @@ func (client KpiClient) DeletePreparer(ctx context.Context, resourceGroupName st
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client KpiClient) DeleteSender(req *http.Request) (future KpiDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/links.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/links.go
index f30c17fe4..865ef4fd5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/links.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/links.go
@@ -105,15 +105,17 @@ func (client LinksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LinksClient) CreateOrUpdateSender(req *http.Request) (future LinksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/models.go
index c03d48bff..b00af911c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/models.go
@@ -1134,12 +1134,11 @@ func (crf *ConnectorResourceFormat) UnmarshalJSON(body []byte) error {
// operation.
type ConnectorsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectorsCreateOrUpdateFuture) Result(client ConnectorsClient) (crf ConnectorResourceFormat, err error) {
+func (future *ConnectorsCreateOrUpdateFuture) Result(client ConnectorsClient) (crf ConnectorResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1147,34 +1146,15 @@ func (future ConnectorsCreateOrUpdateFuture) Result(client ConnectorsClient) (cr
return
}
if !done {
- return crf, azure.NewAsyncOpIncompleteError("customerinsights.ConnectorsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.ConnectorsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crf.Response.Response, err = future.GetResult(sender); err == nil && crf.Response.Response.StatusCode != http.StatusNoContent {
+ crf, err = client.CreateOrUpdateResponder(crf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsCreateOrUpdateFuture", "Result", crf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- crf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1182,12 +1162,11 @@ func (future ConnectorsCreateOrUpdateFuture) Result(client ConnectorsClient) (cr
// ConnectorsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ConnectorsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectorsDeleteFuture) Result(client ConnectorsClient) (ar autorest.Response, err error) {
+func (future *ConnectorsDeleteFuture) Result(client ConnectorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1195,35 +1174,10 @@ func (future ConnectorsDeleteFuture) Result(client ConnectorsClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("customerinsights.ConnectorsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.ConnectorsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1766,12 +1720,11 @@ type HubPropertiesFormat struct {
// HubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type HubsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future HubsDeleteFuture) Result(client HubsClient) (ar autorest.Response, err error) {
+func (future *HubsDeleteFuture) Result(client HubsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1779,35 +1732,10 @@ func (future HubsDeleteFuture) Result(client HubsClient) (ar autorest.Response,
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("customerinsights.HubsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.HubsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.HubsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.HubsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.HubsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2009,12 +1937,11 @@ func (irf *InteractionResourceFormat) UnmarshalJSON(body []byte) error {
// operation.
type InteractionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InteractionsCreateOrUpdateFuture) Result(client InteractionsClient) (irf InteractionResourceFormat, err error) {
+func (future *InteractionsCreateOrUpdateFuture) Result(client InteractionsClient) (irf InteractionResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2022,34 +1949,15 @@ func (future InteractionsCreateOrUpdateFuture) Result(client InteractionsClient)
return
}
if !done {
- return irf, azure.NewAsyncOpIncompleteError("customerinsights.InteractionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- irf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.InteractionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.InteractionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if irf.Response.Response, err = future.GetResult(sender); err == nil && irf.Response.Response.StatusCode != http.StatusNoContent {
+ irf, err = client.CreateOrUpdateResponder(irf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.InteractionsCreateOrUpdateFuture", "Result", irf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.InteractionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- irf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.InteractionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2412,12 +2320,11 @@ type KpiAlias struct {
// KpiCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type KpiCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future KpiCreateOrUpdateFuture) Result(client KpiClient) (krf KpiResourceFormat, err error) {
+func (future *KpiCreateOrUpdateFuture) Result(client KpiClient) (krf KpiResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2425,34 +2332,15 @@ func (future KpiCreateOrUpdateFuture) Result(client KpiClient) (krf KpiResourceF
return
}
if !done {
- return krf, azure.NewAsyncOpIncompleteError("customerinsights.KpiCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- krf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.KpiCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.KpiCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if krf.Response.Response, err = future.GetResult(sender); err == nil && krf.Response.Response.StatusCode != http.StatusNoContent {
+ krf, err = client.CreateOrUpdateResponder(krf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.KpiCreateOrUpdateFuture", "Result", krf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.KpiCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- krf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.KpiCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2565,12 +2453,11 @@ func (kd KpiDefinition) MarshalJSON() ([]byte, error) {
// KpiDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type KpiDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future KpiDeleteFuture) Result(client KpiClient) (ar autorest.Response, err error) {
+func (future *KpiDeleteFuture) Result(client KpiClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2578,35 +2465,10 @@ func (future KpiDeleteFuture) Result(client KpiClient) (ar autorest.Response, er
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("customerinsights.KpiDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.KpiDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.KpiDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.KpiDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.KpiDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3093,12 +2955,11 @@ func (lrf *LinkResourceFormat) UnmarshalJSON(body []byte) error {
// LinksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LinksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LinksCreateOrUpdateFuture) Result(client LinksClient) (lrf LinkResourceFormat, err error) {
+func (future *LinksCreateOrUpdateFuture) Result(client LinksClient) (lrf LinkResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3106,34 +2967,15 @@ func (future LinksCreateOrUpdateFuture) Result(client LinksClient) (lrf LinkReso
return
}
if !done {
- return lrf, azure.NewAsyncOpIncompleteError("customerinsights.LinksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lrf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.LinksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.LinksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lrf.Response.Response, err = future.GetResult(sender); err == nil && lrf.Response.Response.StatusCode != http.StatusNoContent {
+ lrf, err = client.CreateOrUpdateResponder(lrf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.LinksCreateOrUpdateFuture", "Result", lrf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.LinksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lrf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.LinksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3565,12 +3407,11 @@ func (prf *ProfileResourceFormat) UnmarshalJSON(body []byte) error {
// operation.
type ProfilesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesCreateOrUpdateFuture) Result(client ProfilesClient) (prf ProfileResourceFormat, err error) {
+func (future *ProfilesCreateOrUpdateFuture) Result(client ProfilesClient) (prf ProfileResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3578,34 +3419,15 @@ func (future ProfilesCreateOrUpdateFuture) Result(client ProfilesClient) (prf Pr
return
}
if !done {
- return prf, azure.NewAsyncOpIncompleteError("customerinsights.ProfilesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- prf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ProfilesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.ProfilesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if prf.Response.Response, err = future.GetResult(sender); err == nil && prf.Response.Response.StatusCode != http.StatusNoContent {
+ prf, err = client.CreateOrUpdateResponder(prf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.ProfilesCreateOrUpdateFuture", "Result", prf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ProfilesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- prf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ProfilesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3613,12 +3435,11 @@ func (future ProfilesCreateOrUpdateFuture) Result(client ProfilesClient) (prf Pr
// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
+func (future *ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3626,35 +3447,10 @@ func (future ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("customerinsights.ProfilesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ProfilesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.ProfilesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ProfilesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ProfilesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4137,12 +3933,11 @@ func (rlrf *RelationshipLinkResourceFormat) UnmarshalJSON(body []byte) error {
// operation.
type RelationshipLinksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RelationshipLinksCreateOrUpdateFuture) Result(client RelationshipLinksClient) (rlrf RelationshipLinkResourceFormat, err error) {
+func (future *RelationshipLinksCreateOrUpdateFuture) Result(client RelationshipLinksClient) (rlrf RelationshipLinkResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4150,34 +3945,15 @@ func (future RelationshipLinksCreateOrUpdateFuture) Result(client RelationshipLi
return
}
if !done {
- return rlrf, azure.NewAsyncOpIncompleteError("customerinsights.RelationshipLinksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rlrf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.RelationshipLinksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rlrf.Response.Response, err = future.GetResult(sender); err == nil && rlrf.Response.Response.StatusCode != http.StatusNoContent {
+ rlrf, err = client.CreateOrUpdateResponder(rlrf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksCreateOrUpdateFuture", "Result", rlrf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rlrf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4186,12 +3962,11 @@ func (future RelationshipLinksCreateOrUpdateFuture) Result(client RelationshipLi
// operation.
type RelationshipLinksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RelationshipLinksDeleteFuture) Result(client RelationshipLinksClient) (ar autorest.Response, err error) {
+func (future *RelationshipLinksDeleteFuture) Result(client RelationshipLinksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4199,35 +3974,10 @@ func (future RelationshipLinksDeleteFuture) Result(client RelationshipLinksClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("customerinsights.RelationshipLinksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.RelationshipLinksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4418,12 +4168,11 @@ func (rrf *RelationshipResourceFormat) UnmarshalJSON(body []byte) error {
// operation.
type RelationshipsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RelationshipsCreateOrUpdateFuture) Result(client RelationshipsClient) (rrf RelationshipResourceFormat, err error) {
+func (future *RelationshipsCreateOrUpdateFuture) Result(client RelationshipsClient) (rrf RelationshipResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4431,34 +4180,15 @@ func (future RelationshipsCreateOrUpdateFuture) Result(client RelationshipsClien
return
}
if !done {
- return rrf, azure.NewAsyncOpIncompleteError("customerinsights.RelationshipsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rrf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.RelationshipsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rrf.Response.Response, err = future.GetResult(sender); err == nil && rrf.Response.Response.StatusCode != http.StatusNoContent {
+ rrf, err = client.CreateOrUpdateResponder(rrf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsCreateOrUpdateFuture", "Result", rrf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rrf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4466,12 +4196,11 @@ func (future RelationshipsCreateOrUpdateFuture) Result(client RelationshipsClien
// RelationshipsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RelationshipsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RelationshipsDeleteFuture) Result(client RelationshipsClient) (ar autorest.Response, err error) {
+func (future *RelationshipsDeleteFuture) Result(client RelationshipsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4479,35 +4208,10 @@ func (future RelationshipsDeleteFuture) Result(client RelationshipsClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("customerinsights.RelationshipsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.RelationshipsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4887,12 +4591,11 @@ func (rarf *RoleAssignmentResourceFormat) UnmarshalJSON(body []byte) error {
// operation.
type RoleAssignmentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoleAssignmentsCreateOrUpdateFuture) Result(client RoleAssignmentsClient) (rarf RoleAssignmentResourceFormat, err error) {
+func (future *RoleAssignmentsCreateOrUpdateFuture) Result(client RoleAssignmentsClient) (rarf RoleAssignmentResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4900,34 +4603,15 @@ func (future RoleAssignmentsCreateOrUpdateFuture) Result(client RoleAssignmentsC
return
}
if !done {
- return rarf, azure.NewAsyncOpIncompleteError("customerinsights.RoleAssignmentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rarf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RoleAssignmentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.RoleAssignmentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rarf.Response.Response, err = future.GetResult(sender); err == nil && rarf.Response.Response.StatusCode != http.StatusNoContent {
+ rarf, err = client.CreateOrUpdateResponder(rarf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.RoleAssignmentsCreateOrUpdateFuture", "Result", rarf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RoleAssignmentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rarf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RoleAssignmentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/profiles.go
index 105bb2d20..09a260b08 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/profiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/profiles.go
@@ -99,15 +99,17 @@ func (client ProfilesClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) CreateOrUpdateSender(req *http.Request) (future ProfilesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/relationshiplinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/relationshiplinks.go
index 30982c6e2..ae021d872 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/relationshiplinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/relationshiplinks.go
@@ -106,15 +106,17 @@ func (client RelationshipLinksClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RelationshipLinksClient) CreateOrUpdateSender(req *http.Request) (future RelationshipLinksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -177,15 +179,17 @@ func (client RelationshipLinksClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RelationshipLinksClient) DeleteSender(req *http.Request) (future RelationshipLinksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/relationships.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/relationships.go
index fdf8887d2..172fab247 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/relationships.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/relationships.go
@@ -104,15 +104,17 @@ func (client RelationshipsClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RelationshipsClient) CreateOrUpdateSender(req *http.Request) (future RelationshipsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -175,15 +177,17 @@ func (client RelationshipsClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RelationshipsClient) DeleteSender(req *http.Request) (future RelationshipsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/roleassignments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/roleassignments.go
index 1ff0db798..371134f2a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/roleassignments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights/roleassignments.go
@@ -102,15 +102,17 @@ func (client RoleAssignmentsClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoleAssignmentsClient) CreateOrUpdateSender(req *http.Request) (future RoleAssignmentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/connectors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/connectors.go
index 96a496fb4..194ece491 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/connectors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/connectors.go
@@ -102,15 +102,17 @@ func (client ConnectorsClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectorsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -173,15 +175,17 @@ func (client ConnectorsClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectorsClient) DeleteSender(req *http.Request) (future ConnectorsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/hubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/hubs.go
index 1f37a3854..b7a57ac29 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/hubs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/hubs.go
@@ -177,15 +177,17 @@ func (client HubsClient) DeletePreparer(ctx context.Context, resourceGroupName s
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client HubsClient) DeleteSender(req *http.Request) (future HubsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/interactions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/interactions.go
index bc776e461..6f4885494 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/interactions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/interactions.go
@@ -99,15 +99,17 @@ func (client InteractionsClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InteractionsClient) CreateOrUpdateSender(req *http.Request) (future InteractionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/kpi.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/kpi.go
index 6b397835f..a6ed03f0a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/kpi.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/kpi.go
@@ -109,15 +109,17 @@ func (client KpiClient) CreateOrUpdatePreparer(ctx context.Context, resourceGrou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client KpiClient) CreateOrUpdateSender(req *http.Request) (future KpiCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -180,15 +182,17 @@ func (client KpiClient) DeletePreparer(ctx context.Context, resourceGroupName st
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client KpiClient) DeleteSender(req *http.Request) (future KpiDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/links.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/links.go
index f76e96e75..cf37cf849 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/links.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/links.go
@@ -105,15 +105,17 @@ func (client LinksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LinksClient) CreateOrUpdateSender(req *http.Request) (future LinksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/models.go
index 519a5f9dd..0b75f0ce4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/models.go
@@ -1241,12 +1241,11 @@ func (crf *ConnectorResourceFormat) UnmarshalJSON(body []byte) error {
// operation.
type ConnectorsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectorsCreateOrUpdateFuture) Result(client ConnectorsClient) (crf ConnectorResourceFormat, err error) {
+func (future *ConnectorsCreateOrUpdateFuture) Result(client ConnectorsClient) (crf ConnectorResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1254,34 +1253,15 @@ func (future ConnectorsCreateOrUpdateFuture) Result(client ConnectorsClient) (cr
return
}
if !done {
- return crf, azure.NewAsyncOpIncompleteError("customerinsights.ConnectorsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.ConnectorsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crf.Response.Response, err = future.GetResult(sender); err == nil && crf.Response.Response.StatusCode != http.StatusNoContent {
+ crf, err = client.CreateOrUpdateResponder(crf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsCreateOrUpdateFuture", "Result", crf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- crf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1289,12 +1269,11 @@ func (future ConnectorsCreateOrUpdateFuture) Result(client ConnectorsClient) (cr
// ConnectorsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ConnectorsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectorsDeleteFuture) Result(client ConnectorsClient) (ar autorest.Response, err error) {
+func (future *ConnectorsDeleteFuture) Result(client ConnectorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1302,35 +1281,10 @@ func (future ConnectorsDeleteFuture) Result(client ConnectorsClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("customerinsights.ConnectorsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.ConnectorsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ConnectorsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1873,12 +1827,11 @@ type HubPropertiesFormat struct {
// HubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type HubsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future HubsDeleteFuture) Result(client HubsClient) (ar autorest.Response, err error) {
+func (future *HubsDeleteFuture) Result(client HubsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1886,35 +1839,10 @@ func (future HubsDeleteFuture) Result(client HubsClient) (ar autorest.Response,
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("customerinsights.HubsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.HubsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.HubsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.HubsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.HubsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2116,12 +2044,11 @@ func (irf *InteractionResourceFormat) UnmarshalJSON(body []byte) error {
// operation.
type InteractionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InteractionsCreateOrUpdateFuture) Result(client InteractionsClient) (irf InteractionResourceFormat, err error) {
+func (future *InteractionsCreateOrUpdateFuture) Result(client InteractionsClient) (irf InteractionResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2129,34 +2056,15 @@ func (future InteractionsCreateOrUpdateFuture) Result(client InteractionsClient)
return
}
if !done {
- return irf, azure.NewAsyncOpIncompleteError("customerinsights.InteractionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- irf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.InteractionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.InteractionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if irf.Response.Response, err = future.GetResult(sender); err == nil && irf.Response.Response.StatusCode != http.StatusNoContent {
+ irf, err = client.CreateOrUpdateResponder(irf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.InteractionsCreateOrUpdateFuture", "Result", irf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.InteractionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- irf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.InteractionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2519,12 +2427,11 @@ type KpiAlias struct {
// KpiCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type KpiCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future KpiCreateOrUpdateFuture) Result(client KpiClient) (krf KpiResourceFormat, err error) {
+func (future *KpiCreateOrUpdateFuture) Result(client KpiClient) (krf KpiResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2532,34 +2439,15 @@ func (future KpiCreateOrUpdateFuture) Result(client KpiClient) (krf KpiResourceF
return
}
if !done {
- return krf, azure.NewAsyncOpIncompleteError("customerinsights.KpiCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- krf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.KpiCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.KpiCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if krf.Response.Response, err = future.GetResult(sender); err == nil && krf.Response.Response.StatusCode != http.StatusNoContent {
+ krf, err = client.CreateOrUpdateResponder(krf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.KpiCreateOrUpdateFuture", "Result", krf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.KpiCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- krf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.KpiCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2672,12 +2560,11 @@ func (kd KpiDefinition) MarshalJSON() ([]byte, error) {
// KpiDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type KpiDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future KpiDeleteFuture) Result(client KpiClient) (ar autorest.Response, err error) {
+func (future *KpiDeleteFuture) Result(client KpiClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2685,35 +2572,10 @@ func (future KpiDeleteFuture) Result(client KpiClient) (ar autorest.Response, er
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("customerinsights.KpiDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.KpiDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.KpiDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.KpiDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.KpiDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3210,12 +3072,11 @@ func (lrf *LinkResourceFormat) UnmarshalJSON(body []byte) error {
// LinksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LinksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LinksCreateOrUpdateFuture) Result(client LinksClient) (lrf LinkResourceFormat, err error) {
+func (future *LinksCreateOrUpdateFuture) Result(client LinksClient) (lrf LinkResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3223,34 +3084,15 @@ func (future LinksCreateOrUpdateFuture) Result(client LinksClient) (lrf LinkReso
return
}
if !done {
- return lrf, azure.NewAsyncOpIncompleteError("customerinsights.LinksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lrf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.LinksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.LinksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lrf.Response.Response, err = future.GetResult(sender); err == nil && lrf.Response.Response.StatusCode != http.StatusNoContent {
+ lrf, err = client.CreateOrUpdateResponder(lrf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.LinksCreateOrUpdateFuture", "Result", lrf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.LinksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lrf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.LinksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3836,12 +3678,11 @@ func (prf *PredictionResourceFormat) UnmarshalJSON(body []byte) error {
// operation.
type PredictionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PredictionsCreateOrUpdateFuture) Result(client PredictionsClient) (prf PredictionResourceFormat, err error) {
+func (future *PredictionsCreateOrUpdateFuture) Result(client PredictionsClient) (prf PredictionResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3849,34 +3690,15 @@ func (future PredictionsCreateOrUpdateFuture) Result(client PredictionsClient) (
return
}
if !done {
- return prf, azure.NewAsyncOpIncompleteError("customerinsights.PredictionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- prf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.PredictionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.PredictionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if prf.Response.Response, err = future.GetResult(sender); err == nil && prf.Response.Response.StatusCode != http.StatusNoContent {
+ prf, err = client.CreateOrUpdateResponder(prf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.PredictionsCreateOrUpdateFuture", "Result", prf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.PredictionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- prf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.PredictionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3884,12 +3706,11 @@ func (future PredictionsCreateOrUpdateFuture) Result(client PredictionsClient) (
// PredictionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PredictionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PredictionsDeleteFuture) Result(client PredictionsClient) (ar autorest.Response, err error) {
+func (future *PredictionsDeleteFuture) Result(client PredictionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3897,35 +3718,10 @@ func (future PredictionsDeleteFuture) Result(client PredictionsClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("customerinsights.PredictionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.PredictionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.PredictionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.PredictionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.PredictionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4176,12 +3972,11 @@ func (prf *ProfileResourceFormat) UnmarshalJSON(body []byte) error {
// operation.
type ProfilesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesCreateOrUpdateFuture) Result(client ProfilesClient) (prf ProfileResourceFormat, err error) {
+func (future *ProfilesCreateOrUpdateFuture) Result(client ProfilesClient) (prf ProfileResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4189,34 +3984,15 @@ func (future ProfilesCreateOrUpdateFuture) Result(client ProfilesClient) (prf Pr
return
}
if !done {
- return prf, azure.NewAsyncOpIncompleteError("customerinsights.ProfilesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- prf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ProfilesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.ProfilesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if prf.Response.Response, err = future.GetResult(sender); err == nil && prf.Response.Response.StatusCode != http.StatusNoContent {
+ prf, err = client.CreateOrUpdateResponder(prf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.ProfilesCreateOrUpdateFuture", "Result", prf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ProfilesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- prf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ProfilesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4224,12 +4000,11 @@ func (future ProfilesCreateOrUpdateFuture) Result(client ProfilesClient) (prf Pr
// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
+func (future *ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4237,35 +4012,10 @@ func (future ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("customerinsights.ProfilesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ProfilesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.ProfilesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ProfilesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.ProfilesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4748,12 +4498,11 @@ func (rlrf *RelationshipLinkResourceFormat) UnmarshalJSON(body []byte) error {
// operation.
type RelationshipLinksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RelationshipLinksCreateOrUpdateFuture) Result(client RelationshipLinksClient) (rlrf RelationshipLinkResourceFormat, err error) {
+func (future *RelationshipLinksCreateOrUpdateFuture) Result(client RelationshipLinksClient) (rlrf RelationshipLinkResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4761,34 +4510,15 @@ func (future RelationshipLinksCreateOrUpdateFuture) Result(client RelationshipLi
return
}
if !done {
- return rlrf, azure.NewAsyncOpIncompleteError("customerinsights.RelationshipLinksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rlrf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.RelationshipLinksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rlrf.Response.Response, err = future.GetResult(sender); err == nil && rlrf.Response.Response.StatusCode != http.StatusNoContent {
+ rlrf, err = client.CreateOrUpdateResponder(rlrf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksCreateOrUpdateFuture", "Result", rlrf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rlrf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4797,12 +4527,11 @@ func (future RelationshipLinksCreateOrUpdateFuture) Result(client RelationshipLi
// operation.
type RelationshipLinksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RelationshipLinksDeleteFuture) Result(client RelationshipLinksClient) (ar autorest.Response, err error) {
+func (future *RelationshipLinksDeleteFuture) Result(client RelationshipLinksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4810,35 +4539,10 @@ func (future RelationshipLinksDeleteFuture) Result(client RelationshipLinksClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("customerinsights.RelationshipLinksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.RelationshipLinksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipLinksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5029,12 +4733,11 @@ func (rrf *RelationshipResourceFormat) UnmarshalJSON(body []byte) error {
// operation.
type RelationshipsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RelationshipsCreateOrUpdateFuture) Result(client RelationshipsClient) (rrf RelationshipResourceFormat, err error) {
+func (future *RelationshipsCreateOrUpdateFuture) Result(client RelationshipsClient) (rrf RelationshipResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5042,34 +4745,15 @@ func (future RelationshipsCreateOrUpdateFuture) Result(client RelationshipsClien
return
}
if !done {
- return rrf, azure.NewAsyncOpIncompleteError("customerinsights.RelationshipsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rrf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.RelationshipsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rrf.Response.Response, err = future.GetResult(sender); err == nil && rrf.Response.Response.StatusCode != http.StatusNoContent {
+ rrf, err = client.CreateOrUpdateResponder(rrf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsCreateOrUpdateFuture", "Result", rrf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rrf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5077,12 +4761,11 @@ func (future RelationshipsCreateOrUpdateFuture) Result(client RelationshipsClien
// RelationshipsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RelationshipsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RelationshipsDeleteFuture) Result(client RelationshipsClient) (ar autorest.Response, err error) {
+func (future *RelationshipsDeleteFuture) Result(client RelationshipsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5090,35 +4773,10 @@ func (future RelationshipsDeleteFuture) Result(client RelationshipsClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("customerinsights.RelationshipsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.RelationshipsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RelationshipsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5498,12 +5156,11 @@ func (rarf *RoleAssignmentResourceFormat) UnmarshalJSON(body []byte) error {
// operation.
type RoleAssignmentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoleAssignmentsCreateOrUpdateFuture) Result(client RoleAssignmentsClient) (rarf RoleAssignmentResourceFormat, err error) {
+func (future *RoleAssignmentsCreateOrUpdateFuture) Result(client RoleAssignmentsClient) (rarf RoleAssignmentResourceFormat, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5511,34 +5168,15 @@ func (future RoleAssignmentsCreateOrUpdateFuture) Result(client RoleAssignmentsC
return
}
if !done {
- return rarf, azure.NewAsyncOpIncompleteError("customerinsights.RoleAssignmentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rarf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RoleAssignmentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("customerinsights.RoleAssignmentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rarf.Response.Response, err = future.GetResult(sender); err == nil && rarf.Response.Response.StatusCode != http.StatusNoContent {
+ rarf, err = client.CreateOrUpdateResponder(rarf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "customerinsights.RoleAssignmentsCreateOrUpdateFuture", "Result", rarf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RoleAssignmentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rarf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "customerinsights.RoleAssignmentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/predictions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/predictions.go
index 5a4f6a991..cb2f43eed 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/predictions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/predictions.go
@@ -112,15 +112,17 @@ func (client PredictionsClient) CreateOrUpdatePreparer(ctx context.Context, reso
// 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) (future PredictionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -183,15 +185,17 @@ func (client PredictionsClient) DeletePreparer(ctx context.Context, resourceGrou
// 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) (future PredictionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/profiles.go
index d32119ca0..97c456bd6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/profiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/profiles.go
@@ -99,15 +99,17 @@ func (client ProfilesClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) CreateOrUpdateSender(req *http.Request) (future ProfilesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/relationshiplinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/relationshiplinks.go
index 7cb9ff7d8..93f045923 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/relationshiplinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/relationshiplinks.go
@@ -106,15 +106,17 @@ func (client RelationshipLinksClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RelationshipLinksClient) CreateOrUpdateSender(req *http.Request) (future RelationshipLinksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -177,15 +179,17 @@ func (client RelationshipLinksClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RelationshipLinksClient) DeleteSender(req *http.Request) (future RelationshipLinksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/relationships.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/relationships.go
index 07d1fee24..9f454110d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/relationships.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/relationships.go
@@ -104,15 +104,17 @@ func (client RelationshipsClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RelationshipsClient) CreateOrUpdateSender(req *http.Request) (future RelationshipsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -175,15 +177,17 @@ func (client RelationshipsClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RelationshipsClient) DeleteSender(req *http.Request) (future RelationshipsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/roleassignments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/roleassignments.go
index 086a56d9a..12787bfab 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/roleassignments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-04-26/customerinsights/roleassignments.go
@@ -102,15 +102,17 @@ func (client RoleAssignmentsClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoleAssignmentsClient) CreateOrUpdateSender(req *http.Request) (future RoleAssignmentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/databox/mgmt/2018-01-01/databox/jobs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/databox/mgmt/2018-01-01/databox/jobs.go
index c49c517cf..2307b31fb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/databox/mgmt/2018-01-01/databox/jobs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/databox/mgmt/2018-01-01/databox/jobs.go
@@ -273,15 +273,17 @@ func (client JobsClient) CreatePreparer(ctx context.Context, resourceGroupName s
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client JobsClient) CreateSender(req *http.Request) (future JobsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1013,15 +1015,17 @@ func (client JobsClient) UpdatePreparer(ctx context.Context, resourceGroupName s
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client JobsClient) UpdateSender(req *http.Request) (future JobsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/databox/mgmt/2018-01-01/databox/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/databox/mgmt/2018-01-01/databox/models.go
index 3ff739faf..b7a88a68b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/databox/mgmt/2018-01-01/databox/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/databox/mgmt/2018-01-01/databox/models.go
@@ -1468,12 +1468,11 @@ func (jrup *JobResourceUpdateParameter) UnmarshalJSON(body []byte) error {
// JobsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobsCreateFuture) Result(client JobsClient) (jr JobResource, err error) {
+func (future *JobsCreateFuture) Result(client JobsClient) (jr JobResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1481,34 +1480,15 @@ func (future JobsCreateFuture) Result(client JobsClient) (jr JobResource, err er
return
}
if !done {
- return jr, azure.NewAsyncOpIncompleteError("databox.JobsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- jr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "databox.JobsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("databox.JobsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if jr.Response.Response, err = future.GetResult(sender); err == nil && jr.Response.Response.StatusCode != http.StatusNoContent {
+ jr, err = client.CreateResponder(jr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "databox.JobsCreateFuture", "Result", jr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "databox.JobsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- jr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "databox.JobsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1626,12 +1606,11 @@ type JobStages struct {
// JobsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobsUpdateFuture) Result(client JobsClient) (jr JobResource, err error) {
+func (future *JobsUpdateFuture) Result(client JobsClient) (jr JobResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1639,34 +1618,15 @@ func (future JobsUpdateFuture) Result(client JobsClient) (jr JobResource, err er
return
}
if !done {
- return jr, azure.NewAsyncOpIncompleteError("databox.JobsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- jr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "databox.JobsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("databox.JobsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if jr.Response.Response, err = future.GetResult(sender); err == nil && jr.Response.Response.StatusCode != http.StatusNoContent {
+ jr, err = client.UpdateResponder(jr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "databox.JobsUpdateFuture", "Result", jr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "databox.JobsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- jr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "databox.JobsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/models.go
index 6e6dc7aeb..afd951e35 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/models.go
@@ -87,7 +87,128 @@ type ErrorResponse struct {
Error *ErrorInfo `json:"error,omitempty"`
}
-// Resource ...
+// Operation REST API operation
+type Operation struct {
+ // Name - Operation name: {provider}/{resource}/{operation}
+ Name *string `json:"name,omitempty"`
+ // Display - The object that represents the operation.
+ Display *OperationDisplay `json:"display,omitempty"`
+}
+
+// OperationDisplay the object that represents the operation.
+type OperationDisplay struct {
+ // Provider - Service provider: Microsoft.ResourceProvider
+ Provider *string `json:"provider,omitempty"`
+ // Resource - Resource on which the operation is performed.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - Operation type: Read, write, delete, etc.
+ Operation *string `json:"operation,omitempty"`
+}
+
+// OperationListResult 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 - List of Resource Provider operations supported by the Resource Provider resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+ // NextLink - URL to get the next set of operation list results if there are any.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// OperationListResultIterator provides access to a complete listing of Operation values.
+type OperationListResultIterator struct {
+ i int
+ page OperationListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OperationListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OperationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OperationListResultIterator) Response() OperationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OperationListResultIterator) Value() Operation {
+ if !iter.page.NotDone() {
+ return Operation{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (olr OperationListResult) IsEmpty() bool {
+ return olr.Value == nil || len(*olr.Value) == 0
+}
+
+// operationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+ if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(olr.NextLink)))
+}
+
+// OperationListResultPage contains a page of Operation values.
+type OperationListResultPage struct {
+ fn func(OperationListResult) (OperationListResult, error)
+ olr OperationListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OperationListResultPage) Next() error {
+ next, err := page.fn(page.olr)
+ if err != nil {
+ return err
+ }
+ page.olr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OperationListResultPage) NotDone() bool {
+ return !page.olr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OperationListResultPage) Response() OperationListResult {
+ return page.olr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OperationListResultPage) Values() []Operation {
+ if page.olr.IsEmpty() {
+ return nil
+ }
+ return *page.olr.Value
+}
+
+// Resource the core properties of ARM resources
type Resource struct {
// ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
@@ -392,12 +513,11 @@ type WorkspaceProviderAuthorization struct {
// operation.
type WorkspacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WorkspacesCreateOrUpdateFuture) Result(client WorkspacesClient) (w Workspace, err error) {
+func (future *WorkspacesCreateOrUpdateFuture) Result(client WorkspacesClient) (w Workspace, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -405,34 +525,15 @@ func (future WorkspacesCreateOrUpdateFuture) Result(client WorkspacesClient) (w
return
}
if !done {
- return w, azure.NewAsyncOpIncompleteError("databricks.WorkspacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- w, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "databricks.WorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("databricks.WorkspacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent {
+ w, err = client.CreateOrUpdateResponder(w.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "databricks.WorkspacesCreateOrUpdateFuture", "Result", w.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "databricks.WorkspacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- w, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "databricks.WorkspacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -440,12 +541,11 @@ func (future WorkspacesCreateOrUpdateFuture) Result(client WorkspacesClient) (w
// WorkspacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WorkspacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WorkspacesDeleteFuture) Result(client WorkspacesClient) (ar autorest.Response, err error) {
+func (future *WorkspacesDeleteFuture) Result(client WorkspacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -453,47 +553,21 @@ func (future WorkspacesDeleteFuture) Result(client WorkspacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("databricks.WorkspacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "databricks.WorkspacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("databricks.WorkspacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "databricks.WorkspacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "databricks.WorkspacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// WorkspacesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WorkspacesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WorkspacesUpdateFuture) Result(client WorkspacesClient) (w Workspace, err error) {
+func (future *WorkspacesUpdateFuture) Result(client WorkspacesClient) (w Workspace, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -501,34 +575,15 @@ func (future WorkspacesUpdateFuture) Result(client WorkspacesClient) (w Workspac
return
}
if !done {
- return w, azure.NewAsyncOpIncompleteError("databricks.WorkspacesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- w, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "databricks.WorkspacesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("databricks.WorkspacesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent {
+ w, err = client.UpdateResponder(w.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "databricks.WorkspacesUpdateFuture", "Result", w.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "databricks.WorkspacesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- w, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "databricks.WorkspacesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/operations.go
new file mode 100644
index 000000000..01aabe801
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/operations.go
@@ -0,0 +1,126 @@
+package databricks
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// OperationsClient is the ARM Databricks
+type OperationsClient struct {
+ BaseClient
+}
+
+// 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 RP operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "databricks.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.olr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "databricks.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.olr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "databricks.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Databricks/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// 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, "databricks.OperationsClient", "listNextResults", 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, "databricks.OperationsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "databricks.OperationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/workspaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/workspaces.go
index f39a06d30..a7ce2010a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/workspaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/workspaces.go
@@ -103,15 +103,17 @@ func (client WorkspacesClient) CreateOrUpdatePreparer(ctx context.Context, param
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client WorkspacesClient) CreateOrUpdateSender(req *http.Request) (future WorkspacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -183,15 +185,17 @@ func (client WorkspacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WorkspacesClient) DeleteSender(req *http.Request) (future WorkspacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -534,15 +538,17 @@ func (client WorkspacesClient) UpdatePreparer(ctx context.Context, parameters Wo
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client WorkspacesClient) UpdateSender(req *http.Request) (future WorkspacesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datacatalog/mgmt/2016-03-30/datacatalog/adccatalogs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datacatalog/mgmt/2016-03-30/datacatalog/adccatalogs.go
index 921d0b4ef..0e84dd5e8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datacatalog/mgmt/2016-03-30/datacatalog/adccatalogs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datacatalog/mgmt/2016-03-30/datacatalog/adccatalogs.go
@@ -173,15 +173,17 @@ func (client ADCCatalogsClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ADCCatalogsClient) DeleteSender(req *http.Request) (future ADCCatalogsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datacatalog/mgmt/2016-03-30/datacatalog/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datacatalog/mgmt/2016-03-30/datacatalog/models.go
index 6cc7b98a1..4d13a94a1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datacatalog/mgmt/2016-03-30/datacatalog/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datacatalog/mgmt/2016-03-30/datacatalog/models.go
@@ -21,7 +21,6 @@ import (
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
- "net/http"
)
// SkuType enumerates the values for sku type.
@@ -182,12 +181,11 @@ type ADCCatalogProperties struct {
// ADCCatalogsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ADCCatalogsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ADCCatalogsDeleteFuture) Result(client ADCCatalogsClient) (ar autorest.Response, err error) {
+func (future *ADCCatalogsDeleteFuture) Result(client ADCCatalogsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -195,35 +193,10 @@ func (future ADCCatalogsDeleteFuture) Result(client ADCCatalogsClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("datacatalog.ADCCatalogsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datacatalog.ADCCatalogsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datacatalog.ADCCatalogsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datacatalog.ADCCatalogsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datacatalog.ADCCatalogsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/activityruns.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/activityruns.go
index 4d1a8a319..61b83b6fd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/activityruns.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/activityruns.go
@@ -26,32 +26,32 @@ import (
"net/http"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ActivityRunsClient is the the Azure Data Factory V2 management API provides a RESTful set of web services that
// interact with Azure Data Factory V2 services.
type ActivityRunsClient struct {
BaseClient
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewActivityRunsClient creates an instance of the ActivityRunsClient client.
func NewActivityRunsClient(subscriptionID string) ActivityRunsClient {
return NewActivityRunsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewActivityRunsClientWithBaseURI creates an instance of the ActivityRunsClient client.
func NewActivityRunsClientWithBaseURI(baseURI string, subscriptionID string) ActivityRunsClient {
return ActivityRunsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByPipelineRun list activity runs based on input filter conditions.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. runID is the pipeline run
-// identifier. startTime is the start time of activity runs in ISO8601 format. endTime is the end time of activity
-// runs in ISO8601 format. status is the status of the pipeline run. activityName is the name of the activity.
-// linkedServiceName is the linked service name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// runID - the pipeline run identifier.
+// startTime - the start time of activity runs in ISO8601 format.
+// endTime - the end time of activity runs in ISO8601 format.
+// status - the status of the pipeline run.
+// activityName - the name of the activity.
+// linkedServiceName - the linked service name.
func (client ActivityRunsClient) ListByPipelineRun(ctx context.Context, resourceGroupName string, factoryName string, runID string, startTime date.Time, endTime date.Time, status string, activityName string, linkedServiceName string) (result ActivityRunsListResponsePage, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -91,7 +91,6 @@ func (client ActivityRunsClient) ListByPipelineRun(ctx context.Context, resource
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByPipelineRunPreparer prepares the ListByPipelineRun request.
func (client ActivityRunsClient) ListByPipelineRunPreparer(ctx context.Context, resourceGroupName string, factoryName string, runID string, startTime date.Time, endTime date.Time, status string, activityName string, linkedServiceName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -125,7 +124,6 @@ func (client ActivityRunsClient) ListByPipelineRunPreparer(ctx context.Context,
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByPipelineRunSender sends the ListByPipelineRun request. The method will close the
// http.Response Body if it receives an error.
func (client ActivityRunsClient) ListByPipelineRunSender(req *http.Request) (*http.Response, error) {
@@ -133,7 +131,6 @@ func (client ActivityRunsClient) ListByPipelineRunSender(req *http.Request) (*ht
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByPipelineRunResponder handles the response to the ListByPipelineRun request. The method always
// closes the http.Response Body.
func (client ActivityRunsClient) ListByPipelineRunResponder(resp *http.Response) (result ActivityRunsListResponse, err error) {
@@ -168,7 +165,6 @@ func (client ActivityRunsClient) listByPipelineRunNextResults(lastResults Activi
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByPipelineRunComplete enumerates all values, automatically crossing page boundaries as required.
func (client ActivityRunsClient) ListByPipelineRunComplete(ctx context.Context, resourceGroupName string, factoryName string, runID string, startTime date.Time, endTime date.Time, status string, activityName string, linkedServiceName string) (result ActivityRunsListResponseIterator, err error) {
result.page, err = client.ListByPipelineRun(ctx, resourceGroupName, factoryName, runID, startTime, endTime, status, activityName, linkedServiceName)
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/client.go
index dce588e04..ed83664c3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/client.go
@@ -30,7 +30,6 @@ const (
DefaultBaseURI = "https://management.azure.com"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BaseClient is the base client for Datafactory.
type BaseClient struct {
autorest.Client
@@ -38,13 +37,11 @@ type BaseClient struct {
SubscriptionID string
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// New creates an instance of the BaseClient client.
func New(subscriptionID string) BaseClient {
return NewWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewWithBaseURI creates an instance of the BaseClient client.
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return BaseClient{
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/datasets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/datasets.go
index a4e9e7b45..4c70492d2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/datasets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/datasets.go
@@ -25,31 +25,30 @@ import (
"net/http"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatasetsClient is the the Azure Data Factory V2 management API provides a RESTful set of web services that interact
// with Azure Data Factory V2 services.
type DatasetsClient struct {
BaseClient
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewDatasetsClient creates an instance of the DatasetsClient client.
func NewDatasetsClient(subscriptionID string) DatasetsClient {
return NewDatasetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewDatasetsClientWithBaseURI creates an instance of the DatasetsClient client.
func NewDatasetsClientWithBaseURI(baseURI string, subscriptionID string) DatasetsClient {
return DatasetsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdate creates or updates a dataset.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. datasetName is the dataset name.
-// dataset is dataset resource definition. ifMatch is eTag of the dataset entity. Should only be specified for
-// update, for which it should match existing entity or can be * for unconditional update.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// datasetName - the dataset name.
+// dataset - dataset resource definition.
+// ifMatch - eTag of the dataset entity. Should only be specified for update, for which it should match
+// existing entity or can be * for unconditional update.
func (client DatasetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, factoryName string, datasetName string, dataset DatasetResource, ifMatch string) (result DatasetResource, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -95,7 +94,6 @@ func (client DatasetsClient) CreateOrUpdate(ctx context.Context, resourceGroupNa
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client DatasetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, factoryName string, datasetName string, dataset DatasetResource, ifMatch string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -124,7 +122,6 @@ func (client DatasetsClient) CreateOrUpdatePreparer(ctx context.Context, resourc
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DatasetsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
@@ -132,7 +129,6 @@ func (client DatasetsClient) CreateOrUpdateSender(req *http.Request) (*http.Resp
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client DatasetsClient) CreateOrUpdateResponder(resp *http.Response) (result DatasetResource, err error) {
@@ -146,10 +142,11 @@ func (client DatasetsClient) CreateOrUpdateResponder(resp *http.Response) (resul
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Delete deletes a dataset.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. datasetName is the dataset name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// datasetName - the dataset name.
func (client DatasetsClient) Delete(ctx context.Context, resourceGroupName string, factoryName string, datasetName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -188,7 +185,6 @@ func (client DatasetsClient) Delete(ctx context.Context, resourceGroupName strin
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeletePreparer prepares the Delete request.
func (client DatasetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, factoryName string, datasetName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -211,7 +207,6 @@ func (client DatasetsClient) DeletePreparer(ctx context.Context, resourceGroupNa
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DatasetsClient) DeleteSender(req *http.Request) (*http.Response, error) {
@@ -219,7 +214,6 @@ func (client DatasetsClient) DeleteSender(req *http.Request) (*http.Response, er
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client DatasetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
@@ -232,10 +226,11 @@ func (client DatasetsClient) DeleteResponder(resp *http.Response) (result autore
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Get gets a dataset.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. datasetName is the dataset name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// datasetName - the dataset name.
func (client DatasetsClient) Get(ctx context.Context, resourceGroupName string, factoryName string, datasetName string) (result DatasetResource, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -274,7 +269,6 @@ func (client DatasetsClient) Get(ctx context.Context, resourceGroupName string,
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetPreparer prepares the Get request.
func (client DatasetsClient) GetPreparer(ctx context.Context, resourceGroupName string, factoryName string, datasetName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -297,7 +291,6 @@ func (client DatasetsClient) GetPreparer(ctx context.Context, resourceGroupName
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client DatasetsClient) GetSender(req *http.Request) (*http.Response, error) {
@@ -305,7 +298,6 @@ func (client DatasetsClient) GetSender(req *http.Request) (*http.Response, error
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client DatasetsClient) GetResponder(resp *http.Response) (result DatasetResource, err error) {
@@ -319,10 +311,10 @@ func (client DatasetsClient) GetResponder(resp *http.Response) (result DatasetRe
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactory lists datasets.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
func (client DatasetsClient) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result DatasetListResponsePage, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -358,7 +350,6 @@ func (client DatasetsClient) ListByFactory(ctx context.Context, resourceGroupNam
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryPreparer prepares the ListByFactory request.
func (client DatasetsClient) ListByFactoryPreparer(ctx context.Context, resourceGroupName string, factoryName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -380,7 +371,6 @@ func (client DatasetsClient) ListByFactoryPreparer(ctx context.Context, resource
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactorySender sends the ListByFactory request. The method will close the
// http.Response Body if it receives an error.
func (client DatasetsClient) ListByFactorySender(req *http.Request) (*http.Response, error) {
@@ -388,7 +378,6 @@ func (client DatasetsClient) ListByFactorySender(req *http.Request) (*http.Respo
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryResponder handles the response to the ListByFactory request. The method always
// closes the http.Response Body.
func (client DatasetsClient) ListByFactoryResponder(resp *http.Response) (result DatasetListResponse, err error) {
@@ -423,7 +412,6 @@ func (client DatasetsClient) listByFactoryNextResults(lastResults DatasetListRes
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryComplete enumerates all values, automatically crossing page boundaries as required.
func (client DatasetsClient) ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result DatasetListResponseIterator, err error) {
result.page, err = client.ListByFactory(ctx, resourceGroupName, factoryName)
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/factories.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/factories.go
index 5b1c9ee8e..c927ed337 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/factories.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/factories.go
@@ -25,30 +25,27 @@ import (
"net/http"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FactoriesClient is the the Azure Data Factory V2 management API provides a RESTful set of web services that interact
// with Azure Data Factory V2 services.
type FactoriesClient struct {
BaseClient
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewFactoriesClient creates an instance of the FactoriesClient client.
func NewFactoriesClient(subscriptionID string) FactoriesClient {
return NewFactoriesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewFactoriesClientWithBaseURI creates an instance of the FactoriesClient client.
func NewFactoriesClientWithBaseURI(baseURI string, subscriptionID string) FactoriesClient {
return FactoriesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CancelPipelineRun cancel a pipeline run by its run ID.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. runID is the pipeline run
-// identifier.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// runID - the pipeline run identifier.
func (client FactoriesClient) CancelPipelineRun(ctx context.Context, resourceGroupName string, factoryName string, runID string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -83,7 +80,6 @@ func (client FactoriesClient) CancelPipelineRun(ctx context.Context, resourceGro
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CancelPipelineRunPreparer prepares the CancelPipelineRun request.
func (client FactoriesClient) CancelPipelineRunPreparer(ctx context.Context, resourceGroupName string, factoryName string, runID string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -106,7 +102,6 @@ func (client FactoriesClient) CancelPipelineRunPreparer(ctx context.Context, res
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CancelPipelineRunSender sends the CancelPipelineRun request. The method will close the
// http.Response Body if it receives an error.
func (client FactoriesClient) CancelPipelineRunSender(req *http.Request) (*http.Response, error) {
@@ -114,7 +109,6 @@ func (client FactoriesClient) CancelPipelineRunSender(req *http.Request) (*http.
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CancelPipelineRunResponder handles the response to the CancelPipelineRun request. The method always
// closes the http.Response Body.
func (client FactoriesClient) CancelPipelineRunResponder(resp *http.Response) (result autorest.Response, err error) {
@@ -127,11 +121,79 @@ func (client FactoriesClient) CancelPipelineRunResponder(resp *http.Response) (r
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
+// ConfigureFactoryRepo updates a factory's repo information.
+// Parameters:
+// locationID - the location identifier.
+// factoryRepoUpdate - update factory repo request definition.
+func (client FactoriesClient) ConfigureFactoryRepo(ctx context.Context, locationID string, factoryRepoUpdate FactoryRepoUpdate) (result Factory, err error) {
+ req, err := client.ConfigureFactoryRepoPreparer(ctx, locationID, factoryRepoUpdate)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "datafactory.FactoriesClient", "ConfigureFactoryRepo", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ConfigureFactoryRepoSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "datafactory.FactoriesClient", "ConfigureFactoryRepo", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ConfigureFactoryRepoResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "datafactory.FactoriesClient", "ConfigureFactoryRepo", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ConfigureFactoryRepoPreparer prepares the ConfigureFactoryRepo request.
+func (client FactoriesClient) ConfigureFactoryRepoPreparer(ctx context.Context, locationID string, factoryRepoUpdate FactoryRepoUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "locationId": autorest.Encode("path", locationID),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-09-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo", pathParameters),
+ autorest.WithJSON(factoryRepoUpdate),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ConfigureFactoryRepoSender sends the ConfigureFactoryRepo request. The method will close the
+// http.Response Body if it receives an error.
+func (client FactoriesClient) ConfigureFactoryRepoSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ConfigureFactoryRepoResponder handles the response to the ConfigureFactoryRepo request. The method always
+// closes the http.Response Body.
+func (client FactoriesClient) ConfigureFactoryRepoResponder(resp *http.Response) (result Factory, 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 factory.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. factory is factory resource
-// definition.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// factory - factory resource definition.
func (client FactoriesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, factoryName string, factory Factory) (result Factory, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -169,7 +231,6 @@ func (client FactoriesClient) CreateOrUpdate(ctx context.Context, resourceGroupN
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client FactoriesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, factoryName string, factory Factory) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -193,7 +254,6 @@ func (client FactoriesClient) CreateOrUpdatePreparer(ctx context.Context, resour
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client FactoriesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
@@ -201,7 +261,6 @@ func (client FactoriesClient) CreateOrUpdateSender(req *http.Request) (*http.Res
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client FactoriesClient) CreateOrUpdateResponder(resp *http.Response) (result Factory, err error) {
@@ -215,10 +274,10 @@ func (client FactoriesClient) CreateOrUpdateResponder(resp *http.Response) (resu
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Delete deletes a factory.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
func (client FactoriesClient) Delete(ctx context.Context, resourceGroupName string, factoryName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -253,7 +312,6 @@ func (client FactoriesClient) Delete(ctx context.Context, resourceGroupName stri
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeletePreparer prepares the Delete request.
func (client FactoriesClient) DeletePreparer(ctx context.Context, resourceGroupName string, factoryName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -275,7 +333,6 @@ func (client FactoriesClient) DeletePreparer(ctx context.Context, resourceGroupN
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client FactoriesClient) DeleteSender(req *http.Request) (*http.Response, error) {
@@ -283,7 +340,6 @@ func (client FactoriesClient) DeleteSender(req *http.Request) (*http.Response, e
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client FactoriesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
@@ -296,10 +352,10 @@ func (client FactoriesClient) DeleteResponder(resp *http.Response) (result autor
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Get gets a factory.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
func (client FactoriesClient) Get(ctx context.Context, resourceGroupName string, factoryName string) (result Factory, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -334,7 +390,6 @@ func (client FactoriesClient) Get(ctx context.Context, resourceGroupName string,
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetPreparer prepares the Get request.
func (client FactoriesClient) GetPreparer(ctx context.Context, resourceGroupName string, factoryName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -356,7 +411,6 @@ func (client FactoriesClient) GetPreparer(ctx context.Context, resourceGroupName
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client FactoriesClient) GetSender(req *http.Request) (*http.Response, error) {
@@ -364,7 +418,6 @@ func (client FactoriesClient) GetSender(req *http.Request) (*http.Response, erro
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client FactoriesClient) GetResponder(resp *http.Response) (result Factory, err error) {
@@ -378,7 +431,6 @@ func (client FactoriesClient) GetResponder(resp *http.Response) (result Factory,
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// List lists factories under the specified subscription.
func (client FactoriesClient) List(ctx context.Context) (result FactoryListResponsePage, err error) {
result.fn = client.listNextResults
@@ -403,7 +455,6 @@ func (client FactoriesClient) List(ctx context.Context) (result FactoryListRespo
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListPreparer prepares the List request.
func (client FactoriesClient) ListPreparer(ctx context.Context) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -423,7 +474,6 @@ func (client FactoriesClient) ListPreparer(ctx context.Context) (*http.Request,
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client FactoriesClient) ListSender(req *http.Request) (*http.Response, error) {
@@ -431,7 +481,6 @@ func (client FactoriesClient) ListSender(req *http.Request) (*http.Response, err
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListResponder handles the response to the List request. The method always
// closes the http.Response Body.
func (client FactoriesClient) ListResponder(resp *http.Response) (result FactoryListResponse, err error) {
@@ -466,17 +515,15 @@ func (client FactoriesClient) listNextResults(lastResults FactoryListResponse) (
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client FactoriesClient) ListComplete(ctx context.Context) (result FactoryListResponseIterator, err error) {
result.page, err = client.List(ctx)
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByResourceGroup lists factories.
-//
-// resourceGroupName is the resource group name.
+// Parameters:
+// resourceGroupName - the resource group name.
func (client FactoriesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result FactoryListResponsePage, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -508,7 +555,6 @@ func (client FactoriesClient) ListByResourceGroup(ctx context.Context, resourceG
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
func (client FactoriesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -529,7 +575,6 @@ func (client FactoriesClient) ListByResourceGroupPreparer(ctx context.Context, r
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client FactoriesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
@@ -537,7 +582,6 @@ func (client FactoriesClient) ListByResourceGroupSender(req *http.Request) (*htt
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
// closes the http.Response Body.
func (client FactoriesClient) ListByResourceGroupResponder(resp *http.Response) (result FactoryListResponse, err error) {
@@ -572,18 +616,17 @@ func (client FactoriesClient) listByResourceGroupNextResults(lastResults Factory
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client FactoriesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result FactoryListResponseIterator, err error) {
result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Update updates a factory.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. factoryUpdateParameters is the
-// parameters for updating a factory.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// factoryUpdateParameters - the parameters for updating a factory.
func (client FactoriesClient) Update(ctx context.Context, resourceGroupName string, factoryName string, factoryUpdateParameters FactoryUpdateParameters) (result Factory, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -618,7 +661,6 @@ func (client FactoriesClient) Update(ctx context.Context, resourceGroupName stri
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpdatePreparer prepares the Update request.
func (client FactoriesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, factoryName string, factoryUpdateParameters FactoryUpdateParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -642,7 +684,6 @@ func (client FactoriesClient) UpdatePreparer(ctx context.Context, resourceGroupN
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client FactoriesClient) UpdateSender(req *http.Request) (*http.Response, error) {
@@ -650,7 +691,6 @@ func (client FactoriesClient) UpdateSender(req *http.Request) (*http.Response, e
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
func (client FactoriesClient) UpdateResponder(resp *http.Response) (result Factory, err error) {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimenodes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimenodes.go
index d829d27bd..f4b9079be 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimenodes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimenodes.go
@@ -25,30 +25,28 @@ import (
"net/http"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeNodesClient is the the Azure Data Factory V2 management API provides a RESTful set of web services
// that interact with Azure Data Factory V2 services.
type IntegrationRuntimeNodesClient struct {
BaseClient
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewIntegrationRuntimeNodesClient creates an instance of the IntegrationRuntimeNodesClient client.
func NewIntegrationRuntimeNodesClient(subscriptionID string) IntegrationRuntimeNodesClient {
return NewIntegrationRuntimeNodesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewIntegrationRuntimeNodesClientWithBaseURI creates an instance of the IntegrationRuntimeNodesClient client.
func NewIntegrationRuntimeNodesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationRuntimeNodesClient {
return IntegrationRuntimeNodesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Delete deletes a self-hosted integration runtime node.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name. nodeName is the integration runtime node name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
+// nodeName - the integration runtime node name.
func (client IntegrationRuntimeNodesClient) Delete(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, nodeName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -91,7 +89,6 @@ func (client IntegrationRuntimeNodesClient) Delete(ctx context.Context, resource
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeletePreparer prepares the Delete request.
func (client IntegrationRuntimeNodesClient) DeletePreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, nodeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -115,7 +112,6 @@ func (client IntegrationRuntimeNodesClient) DeletePreparer(ctx context.Context,
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimeNodesClient) DeleteSender(req *http.Request) (*http.Response, error) {
@@ -123,7 +119,6 @@ func (client IntegrationRuntimeNodesClient) DeleteSender(req *http.Request) (*ht
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimeNodesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
@@ -136,11 +131,12 @@ func (client IntegrationRuntimeNodesClient) DeleteResponder(resp *http.Response)
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetIPAddress get the IP address of self-hosted integration runtime node.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name. nodeName is the integration runtime node name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
+// nodeName - the integration runtime node name.
func (client IntegrationRuntimeNodesClient) GetIPAddress(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, nodeName string) (result IntegrationRuntimeNodeIPAddress, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -183,7 +179,6 @@ func (client IntegrationRuntimeNodesClient) GetIPAddress(ctx context.Context, re
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetIPAddressPreparer prepares the GetIPAddress request.
func (client IntegrationRuntimeNodesClient) GetIPAddressPreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, nodeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -207,7 +202,6 @@ func (client IntegrationRuntimeNodesClient) GetIPAddressPreparer(ctx context.Con
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetIPAddressSender sends the GetIPAddress request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimeNodesClient) GetIPAddressSender(req *http.Request) (*http.Response, error) {
@@ -215,7 +209,6 @@ func (client IntegrationRuntimeNodesClient) GetIPAddressSender(req *http.Request
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetIPAddressResponder handles the response to the GetIPAddress request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimeNodesClient) GetIPAddressResponder(resp *http.Response) (result IntegrationRuntimeNodeIPAddress, err error) {
@@ -229,12 +222,13 @@ func (client IntegrationRuntimeNodesClient) GetIPAddressResponder(resp *http.Res
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Update updates a self-hosted integration runtime node.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name. nodeName is the integration runtime node name. updateIntegrationRuntimeNodeRequest is
-// the parameters for updating an integration runtime node.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
+// nodeName - the integration runtime node name.
+// updateIntegrationRuntimeNodeRequest - the parameters for updating an integration runtime node.
func (client IntegrationRuntimeNodesClient) Update(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, nodeName string, updateIntegrationRuntimeNodeRequest UpdateIntegrationRuntimeNodeRequest) (result SelfHostedIntegrationRuntimeNode, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -277,7 +271,6 @@ func (client IntegrationRuntimeNodesClient) Update(ctx context.Context, resource
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpdatePreparer prepares the Update request.
func (client IntegrationRuntimeNodesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, nodeName string, updateIntegrationRuntimeNodeRequest UpdateIntegrationRuntimeNodeRequest) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -303,7 +296,6 @@ func (client IntegrationRuntimeNodesClient) UpdatePreparer(ctx context.Context,
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimeNodesClient) UpdateSender(req *http.Request) (*http.Response, error) {
@@ -311,7 +303,6 @@ func (client IntegrationRuntimeNodesClient) UpdateSender(req *http.Request) (*ht
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimeNodesClient) UpdateResponder(resp *http.Response) (result SelfHostedIntegrationRuntimeNode, err error) {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimes.go
index bd3c2bc03..e3b35dfe7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimes.go
@@ -25,32 +25,30 @@ import (
"net/http"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimesClient is the the Azure Data Factory V2 management API provides a RESTful set of web services
// that interact with Azure Data Factory V2 services.
type IntegrationRuntimesClient struct {
BaseClient
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewIntegrationRuntimesClient creates an instance of the IntegrationRuntimesClient client.
func NewIntegrationRuntimesClient(subscriptionID string) IntegrationRuntimesClient {
return NewIntegrationRuntimesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewIntegrationRuntimesClientWithBaseURI creates an instance of the IntegrationRuntimesClient client.
func NewIntegrationRuntimesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationRuntimesClient {
return IntegrationRuntimesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdate creates or updates an integration runtime.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name. integrationRuntime is integration runtime resource definition. ifMatch is eTag of the
-// integration runtime entity. Should only be specified for update, for which it should match existing entity or
-// can be * for unconditional update.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
+// integrationRuntime - integration runtime resource definition.
+// ifMatch - eTag of the integration runtime entity. Should only be specified for update, for which it should
+// match existing entity or can be * for unconditional update.
func (client IntegrationRuntimesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, integrationRuntime IntegrationRuntimeResource, ifMatch string) (result IntegrationRuntimeResource, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -91,7 +89,6 @@ func (client IntegrationRuntimesClient) CreateOrUpdate(ctx context.Context, reso
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client IntegrationRuntimesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, integrationRuntime IntegrationRuntimeResource, ifMatch string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -120,7 +117,6 @@ func (client IntegrationRuntimesClient) CreateOrUpdatePreparer(ctx context.Conte
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
@@ -128,7 +124,6 @@ func (client IntegrationRuntimesClient) CreateOrUpdateSender(req *http.Request)
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) CreateOrUpdateResponder(resp *http.Response) (result IntegrationRuntimeResource, err error) {
@@ -142,11 +137,11 @@ func (client IntegrationRuntimesClient) CreateOrUpdateResponder(resp *http.Respo
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Delete deletes an integration runtime.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
func (client IntegrationRuntimesClient) Delete(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -185,7 +180,6 @@ func (client IntegrationRuntimesClient) Delete(ctx context.Context, resourceGrou
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeletePreparer prepares the Delete request.
func (client IntegrationRuntimesClient) DeletePreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -208,7 +202,6 @@ func (client IntegrationRuntimesClient) DeletePreparer(ctx context.Context, reso
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) DeleteSender(req *http.Request) (*http.Response, error) {
@@ -216,7 +209,6 @@ func (client IntegrationRuntimesClient) DeleteSender(req *http.Request) (*http.R
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
@@ -229,11 +221,11 @@ func (client IntegrationRuntimesClient) DeleteResponder(resp *http.Response) (re
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Get gets an integration runtime.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
func (client IntegrationRuntimesClient) Get(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result IntegrationRuntimeResource, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -272,7 +264,6 @@ func (client IntegrationRuntimesClient) Get(ctx context.Context, resourceGroupNa
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetPreparer prepares the Get request.
func (client IntegrationRuntimesClient) GetPreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -295,7 +286,6 @@ func (client IntegrationRuntimesClient) GetPreparer(ctx context.Context, resourc
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) GetSender(req *http.Request) (*http.Response, error) {
@@ -303,7 +293,6 @@ func (client IntegrationRuntimesClient) GetSender(req *http.Request) (*http.Resp
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) GetResponder(resp *http.Response) (result IntegrationRuntimeResource, err error) {
@@ -317,12 +306,12 @@ func (client IntegrationRuntimesClient) GetResponder(resp *http.Response) (resul
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetConnectionInfo gets the on-premises integration runtime connection information for encrypting the on-premises
// data source credentials.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
func (client IntegrationRuntimesClient) GetConnectionInfo(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result IntegrationRuntimeConnectionInfo, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -361,7 +350,6 @@ func (client IntegrationRuntimesClient) GetConnectionInfo(ctx context.Context, r
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetConnectionInfoPreparer prepares the GetConnectionInfo request.
func (client IntegrationRuntimesClient) GetConnectionInfoPreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -384,7 +372,6 @@ func (client IntegrationRuntimesClient) GetConnectionInfoPreparer(ctx context.Co
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetConnectionInfoSender sends the GetConnectionInfo request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) GetConnectionInfoSender(req *http.Request) (*http.Response, error) {
@@ -392,7 +379,6 @@ func (client IntegrationRuntimesClient) GetConnectionInfoSender(req *http.Reques
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetConnectionInfoResponder handles the response to the GetConnectionInfo request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) GetConnectionInfoResponder(resp *http.Response) (result IntegrationRuntimeConnectionInfo, err error) {
@@ -406,12 +392,12 @@ func (client IntegrationRuntimesClient) GetConnectionInfoResponder(resp *http.Re
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetMonitoringData get the integration runtime monitoring data, which includes the monitor data for all the nodes
// under this integration runtime.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
func (client IntegrationRuntimesClient) GetMonitoringData(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result IntegrationRuntimeMonitoringData, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -450,7 +436,6 @@ func (client IntegrationRuntimesClient) GetMonitoringData(ctx context.Context, r
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetMonitoringDataPreparer prepares the GetMonitoringData request.
func (client IntegrationRuntimesClient) GetMonitoringDataPreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -473,7 +458,6 @@ func (client IntegrationRuntimesClient) GetMonitoringDataPreparer(ctx context.Co
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetMonitoringDataSender sends the GetMonitoringData request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) GetMonitoringDataSender(req *http.Request) (*http.Response, error) {
@@ -481,7 +465,6 @@ func (client IntegrationRuntimesClient) GetMonitoringDataSender(req *http.Reques
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetMonitoringDataResponder handles the response to the GetMonitoringData request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) GetMonitoringDataResponder(resp *http.Response) (result IntegrationRuntimeMonitoringData, err error) {
@@ -495,11 +478,11 @@ func (client IntegrationRuntimesClient) GetMonitoringDataResponder(resp *http.Re
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetStatus gets detailed status information for an integration runtime.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
func (client IntegrationRuntimesClient) GetStatus(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result IntegrationRuntimeStatusResponse, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -538,7 +521,6 @@ func (client IntegrationRuntimesClient) GetStatus(ctx context.Context, resourceG
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetStatusPreparer prepares the GetStatus request.
func (client IntegrationRuntimesClient) GetStatusPreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -561,7 +543,6 @@ func (client IntegrationRuntimesClient) GetStatusPreparer(ctx context.Context, r
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetStatusSender sends the GetStatus request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) GetStatusSender(req *http.Request) (*http.Response, error) {
@@ -569,7 +550,6 @@ func (client IntegrationRuntimesClient) GetStatusSender(req *http.Request) (*htt
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetStatusResponder handles the response to the GetStatus request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) GetStatusResponder(resp *http.Response) (result IntegrationRuntimeStatusResponse, err error) {
@@ -583,11 +563,11 @@ func (client IntegrationRuntimesClient) GetStatusResponder(resp *http.Response)
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListAuthKeys retrieves the authentication keys for an integration runtime.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
func (client IntegrationRuntimesClient) ListAuthKeys(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result IntegrationRuntimeAuthKeys, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -626,7 +606,6 @@ func (client IntegrationRuntimesClient) ListAuthKeys(ctx context.Context, resour
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListAuthKeysPreparer prepares the ListAuthKeys request.
func (client IntegrationRuntimesClient) ListAuthKeysPreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -649,7 +628,6 @@ func (client IntegrationRuntimesClient) ListAuthKeysPreparer(ctx context.Context
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListAuthKeysSender sends the ListAuthKeys request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) ListAuthKeysSender(req *http.Request) (*http.Response, error) {
@@ -657,7 +635,6 @@ func (client IntegrationRuntimesClient) ListAuthKeysSender(req *http.Request) (*
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListAuthKeysResponder handles the response to the ListAuthKeys request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) ListAuthKeysResponder(resp *http.Response) (result IntegrationRuntimeAuthKeys, err error) {
@@ -671,10 +648,10 @@ func (client IntegrationRuntimesClient) ListAuthKeysResponder(resp *http.Respons
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactory lists integration runtimes.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
func (client IntegrationRuntimesClient) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result IntegrationRuntimeListResponsePage, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -710,7 +687,6 @@ func (client IntegrationRuntimesClient) ListByFactory(ctx context.Context, resou
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryPreparer prepares the ListByFactory request.
func (client IntegrationRuntimesClient) ListByFactoryPreparer(ctx context.Context, resourceGroupName string, factoryName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -732,7 +708,6 @@ func (client IntegrationRuntimesClient) ListByFactoryPreparer(ctx context.Contex
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactorySender sends the ListByFactory request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) ListByFactorySender(req *http.Request) (*http.Response, error) {
@@ -740,7 +715,6 @@ func (client IntegrationRuntimesClient) ListByFactorySender(req *http.Request) (
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryResponder handles the response to the ListByFactory request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) ListByFactoryResponder(resp *http.Response) (result IntegrationRuntimeListResponse, err error) {
@@ -775,19 +749,18 @@ func (client IntegrationRuntimesClient) listByFactoryNextResults(lastResults Int
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryComplete enumerates all values, automatically crossing page boundaries as required.
func (client IntegrationRuntimesClient) ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result IntegrationRuntimeListResponseIterator, err error) {
result.page, err = client.ListByFactory(ctx, resourceGroupName, factoryName)
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RegenerateAuthKey regenerates the authentication key for an integration runtime.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name. regenerateKeyParameters is the parameters for regenerating integration runtime
-// authentication key.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
+// regenerateKeyParameters - the parameters for regenerating integration runtime authentication key.
func (client IntegrationRuntimesClient) RegenerateAuthKey(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, regenerateKeyParameters IntegrationRuntimeRegenerateKeyParameters) (result IntegrationRuntimeAuthKeys, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -826,7 +799,6 @@ func (client IntegrationRuntimesClient) RegenerateAuthKey(ctx context.Context, r
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RegenerateAuthKeyPreparer prepares the RegenerateAuthKey request.
func (client IntegrationRuntimesClient) RegenerateAuthKeyPreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, regenerateKeyParameters IntegrationRuntimeRegenerateKeyParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -851,7 +823,6 @@ func (client IntegrationRuntimesClient) RegenerateAuthKeyPreparer(ctx context.Co
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RegenerateAuthKeySender sends the RegenerateAuthKey request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) RegenerateAuthKeySender(req *http.Request) (*http.Response, error) {
@@ -859,7 +830,6 @@ func (client IntegrationRuntimesClient) RegenerateAuthKeySender(req *http.Reques
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RegenerateAuthKeyResponder handles the response to the RegenerateAuthKey request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) RegenerateAuthKeyResponder(resp *http.Response) (result IntegrationRuntimeAuthKeys, err error) {
@@ -873,12 +843,12 @@ func (client IntegrationRuntimesClient) RegenerateAuthKeyResponder(resp *http.Re
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RemoveNode remove a node from integration runtime.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name. removeNodeParameters is the name of the node to be removed from an integration
-// runtime.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
+// removeNodeParameters - the name of the node to be removed from an integration runtime.
func (client IntegrationRuntimesClient) RemoveNode(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, removeNodeParameters IntegrationRuntimeRemoveNodeRequest) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -917,7 +887,6 @@ func (client IntegrationRuntimesClient) RemoveNode(ctx context.Context, resource
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RemoveNodePreparer prepares the RemoveNode request.
func (client IntegrationRuntimesClient) RemoveNodePreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, removeNodeParameters IntegrationRuntimeRemoveNodeRequest) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -942,7 +911,6 @@ func (client IntegrationRuntimesClient) RemoveNodePreparer(ctx context.Context,
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RemoveNodeSender sends the RemoveNode request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) RemoveNodeSender(req *http.Request) (*http.Response, error) {
@@ -950,7 +918,6 @@ func (client IntegrationRuntimesClient) RemoveNodeSender(req *http.Request) (*ht
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RemoveNodeResponder handles the response to the RemoveNode request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) RemoveNodeResponder(resp *http.Response) (result autorest.Response, err error) {
@@ -963,11 +930,11 @@ func (client IntegrationRuntimesClient) RemoveNodeResponder(resp *http.Response)
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Start starts a ManagedReserved type integration runtime.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
func (client IntegrationRuntimesClient) Start(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result IntegrationRuntimesStartFuture, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -1000,7 +967,6 @@ func (client IntegrationRuntimesClient) Start(ctx context.Context, resourceGroup
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StartPreparer prepares the Start request.
func (client IntegrationRuntimesClient) StartPreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -1023,7 +989,6 @@ func (client IntegrationRuntimesClient) StartPreparer(ctx context.Context, resou
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) StartSender(req *http.Request) (future IntegrationRuntimesStartFuture, err error) {
@@ -1039,7 +1004,6 @@ func (client IntegrationRuntimesClient) StartSender(req *http.Request) (future I
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StartResponder handles the response to the Start request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) StartResponder(resp *http.Response) (result IntegrationRuntimeStatusResponse, err error) {
@@ -1053,11 +1017,11 @@ func (client IntegrationRuntimesClient) StartResponder(resp *http.Response) (res
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Stop stops a ManagedReserved type integration runtime.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
func (client IntegrationRuntimesClient) Stop(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result IntegrationRuntimesStopFuture, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -1090,7 +1054,6 @@ func (client IntegrationRuntimesClient) Stop(ctx context.Context, resourceGroupN
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StopPreparer prepares the Stop request.
func (client IntegrationRuntimesClient) StopPreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -1113,7 +1076,6 @@ func (client IntegrationRuntimesClient) StopPreparer(ctx context.Context, resour
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) StopSender(req *http.Request) (future IntegrationRuntimesStopFuture, err error) {
@@ -1129,7 +1091,6 @@ func (client IntegrationRuntimesClient) StopSender(req *http.Request) (future In
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StopResponder handles the response to the Stop request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) StopResponder(resp *http.Response) (result autorest.Response, err error) {
@@ -1142,14 +1103,14 @@ func (client IntegrationRuntimesClient) StopResponder(resp *http.Response) (resu
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SyncCredentials force the integration runtime to synchronize credentials across integration runtime nodes, and this
// will override the credentials across all worker nodes with those available on the dispatcher node. If you already
// have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration
// runtime node than using this API directly.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
func (client IntegrationRuntimesClient) SyncCredentials(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -1188,7 +1149,6 @@ func (client IntegrationRuntimesClient) SyncCredentials(ctx context.Context, res
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SyncCredentialsPreparer prepares the SyncCredentials request.
func (client IntegrationRuntimesClient) SyncCredentialsPreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -1211,7 +1171,6 @@ func (client IntegrationRuntimesClient) SyncCredentialsPreparer(ctx context.Cont
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SyncCredentialsSender sends the SyncCredentials request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) SyncCredentialsSender(req *http.Request) (*http.Response, error) {
@@ -1219,7 +1178,6 @@ func (client IntegrationRuntimesClient) SyncCredentialsSender(req *http.Request)
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SyncCredentialsResponder handles the response to the SyncCredentials request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) SyncCredentialsResponder(resp *http.Response) (result autorest.Response, err error) {
@@ -1232,11 +1190,12 @@ func (client IntegrationRuntimesClient) SyncCredentialsResponder(resp *http.Resp
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Update updates an integration runtime.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name. updateIntegrationRuntimeRequest is the parameters for updating an integration runtime.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
+// updateIntegrationRuntimeRequest - the parameters for updating an integration runtime.
func (client IntegrationRuntimesClient) Update(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, updateIntegrationRuntimeRequest UpdateIntegrationRuntimeRequest) (result IntegrationRuntimeStatusResponse, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -1275,7 +1234,6 @@ func (client IntegrationRuntimesClient) Update(ctx context.Context, resourceGrou
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpdatePreparer prepares the Update request.
func (client IntegrationRuntimesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, updateIntegrationRuntimeRequest UpdateIntegrationRuntimeRequest) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -1300,7 +1258,6 @@ func (client IntegrationRuntimesClient) UpdatePreparer(ctx context.Context, reso
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) UpdateSender(req *http.Request) (*http.Response, error) {
@@ -1308,7 +1265,6 @@ func (client IntegrationRuntimesClient) UpdateSender(req *http.Request) (*http.R
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) UpdateResponder(resp *http.Response) (result IntegrationRuntimeStatusResponse, err error) {
@@ -1322,11 +1278,11 @@ func (client IntegrationRuntimesClient) UpdateResponder(resp *http.Response) (re
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Upgrade upgrade self-hosted integration runtime to latest version if availably.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. integrationRuntimeName is the
-// integration runtime name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// integrationRuntimeName - the integration runtime name.
func (client IntegrationRuntimesClient) Upgrade(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -1365,7 +1321,6 @@ func (client IntegrationRuntimesClient) Upgrade(ctx context.Context, resourceGro
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpgradePreparer prepares the Upgrade request.
func (client IntegrationRuntimesClient) UpgradePreparer(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -1388,7 +1343,6 @@ func (client IntegrationRuntimesClient) UpgradePreparer(ctx context.Context, res
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpgradeSender sends the Upgrade request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) UpgradeSender(req *http.Request) (*http.Response, error) {
@@ -1396,7 +1350,6 @@ func (client IntegrationRuntimesClient) UpgradeSender(req *http.Request) (*http.
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpgradeResponder handles the response to the Upgrade request. The method always
// closes the http.Response Body.
func (client IntegrationRuntimesClient) UpgradeResponder(resp *http.Response) (result autorest.Response, err error) {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/linkedservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/linkedservices.go
index 9ef54300a..9229baeb3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/linkedservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/linkedservices.go
@@ -25,32 +25,30 @@ import (
"net/http"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LinkedServicesClient is the the Azure Data Factory V2 management API provides a RESTful set of web services that
// interact with Azure Data Factory V2 services.
type LinkedServicesClient struct {
BaseClient
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewLinkedServicesClient creates an instance of the LinkedServicesClient client.
func NewLinkedServicesClient(subscriptionID string) LinkedServicesClient {
return NewLinkedServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewLinkedServicesClientWithBaseURI creates an instance of the LinkedServicesClient client.
func NewLinkedServicesClientWithBaseURI(baseURI string, subscriptionID string) LinkedServicesClient {
return LinkedServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdate creates or updates a linked service.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. linkedServiceName is the linked
-// service name. linkedService is linked service resource definition. ifMatch is eTag of the linkedService entity.
-// Should only be specified for update, for which it should match existing entity or can be * for unconditional
-// update.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// linkedServiceName - the linked service name.
+// linkedService - linked service resource definition.
+// ifMatch - eTag of the linkedService entity. Should only be specified for update, for which it should match
+// existing entity or can be * for unconditional update.
func (client LinkedServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, factoryName string, linkedServiceName string, linkedService LinkedServiceResource, ifMatch string) (result LinkedServiceResource, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -96,7 +94,6 @@ func (client LinkedServicesClient) CreateOrUpdate(ctx context.Context, resourceG
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client LinkedServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, factoryName string, linkedServiceName string, linkedService LinkedServiceResource, ifMatch string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -125,7 +122,6 @@ func (client LinkedServicesClient) CreateOrUpdatePreparer(ctx context.Context, r
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LinkedServicesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
@@ -133,7 +129,6 @@ func (client LinkedServicesClient) CreateOrUpdateSender(req *http.Request) (*htt
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client LinkedServicesClient) CreateOrUpdateResponder(resp *http.Response) (result LinkedServiceResource, err error) {
@@ -147,11 +142,11 @@ func (client LinkedServicesClient) CreateOrUpdateResponder(resp *http.Response)
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Delete deletes a linked service.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. linkedServiceName is the linked
-// service name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// linkedServiceName - the linked service name.
func (client LinkedServicesClient) Delete(ctx context.Context, resourceGroupName string, factoryName string, linkedServiceName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -190,7 +185,6 @@ func (client LinkedServicesClient) Delete(ctx context.Context, resourceGroupName
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeletePreparer prepares the Delete request.
func (client LinkedServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, factoryName string, linkedServiceName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -213,7 +207,6 @@ func (client LinkedServicesClient) DeletePreparer(ctx context.Context, resourceG
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LinkedServicesClient) DeleteSender(req *http.Request) (*http.Response, error) {
@@ -221,7 +214,6 @@ func (client LinkedServicesClient) DeleteSender(req *http.Request) (*http.Respon
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client LinkedServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
@@ -234,11 +226,11 @@ func (client LinkedServicesClient) DeleteResponder(resp *http.Response) (result
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Get gets a linked service.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. linkedServiceName is the linked
-// service name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// linkedServiceName - the linked service name.
func (client LinkedServicesClient) Get(ctx context.Context, resourceGroupName string, factoryName string, linkedServiceName string) (result LinkedServiceResource, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -277,7 +269,6 @@ func (client LinkedServicesClient) Get(ctx context.Context, resourceGroupName st
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetPreparer prepares the Get request.
func (client LinkedServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, factoryName string, linkedServiceName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -300,7 +291,6 @@ func (client LinkedServicesClient) GetPreparer(ctx context.Context, resourceGrou
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client LinkedServicesClient) GetSender(req *http.Request) (*http.Response, error) {
@@ -308,7 +298,6 @@ func (client LinkedServicesClient) GetSender(req *http.Request) (*http.Response,
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client LinkedServicesClient) GetResponder(resp *http.Response) (result LinkedServiceResource, err error) {
@@ -322,10 +311,10 @@ func (client LinkedServicesClient) GetResponder(resp *http.Response) (result Lin
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactory lists linked services.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
func (client LinkedServicesClient) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result LinkedServiceListResponsePage, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -361,7 +350,6 @@ func (client LinkedServicesClient) ListByFactory(ctx context.Context, resourceGr
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryPreparer prepares the ListByFactory request.
func (client LinkedServicesClient) ListByFactoryPreparer(ctx context.Context, resourceGroupName string, factoryName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -383,7 +371,6 @@ func (client LinkedServicesClient) ListByFactoryPreparer(ctx context.Context, re
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactorySender sends the ListByFactory request. The method will close the
// http.Response Body if it receives an error.
func (client LinkedServicesClient) ListByFactorySender(req *http.Request) (*http.Response, error) {
@@ -391,7 +378,6 @@ func (client LinkedServicesClient) ListByFactorySender(req *http.Request) (*http
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryResponder handles the response to the ListByFactory request. The method always
// closes the http.Response Body.
func (client LinkedServicesClient) ListByFactoryResponder(resp *http.Response) (result LinkedServiceListResponse, err error) {
@@ -426,7 +412,6 @@ func (client LinkedServicesClient) listByFactoryNextResults(lastResults LinkedSe
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryComplete enumerates all values, automatically crossing page boundaries as required.
func (client LinkedServicesClient) ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result LinkedServiceListResponseIterator, err error) {
result.page, err = client.ListByFactory(ctx, resourceGroupName, factoryName)
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/models.go
index 78ebe5695..27a8f9a76 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/models.go
@@ -27,7 +27,6 @@ import (
"net/http"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AuthenticationType enumerates the values for authentication type.
type AuthenticationType string
@@ -42,13 +41,11 @@ const (
AuthenticationTypeWebLinkedServiceTypeProperties AuthenticationType = "WebLinkedServiceTypeProperties"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleAuthenticationTypeValues returns an array of possible values for the AuthenticationType const type.
func PossibleAuthenticationTypeValues() []AuthenticationType {
return []AuthenticationType{AuthenticationTypeAnonymous, AuthenticationTypeBasic, AuthenticationTypeClientCertificate, AuthenticationTypeWebLinkedServiceTypeProperties}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AuthorizationType enumerates the values for authorization type.
type AuthorizationType string
@@ -61,13 +58,11 @@ const (
AuthorizationTypeRBAC AuthorizationType = "RBAC"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleAuthorizationTypeValues returns an array of possible values for the AuthorizationType const type.
func PossibleAuthorizationTypeValues() []AuthorizationType {
return []AuthorizationType{AuthorizationTypeKey, AuthorizationTypeLinkedIntegrationRuntimeProperties, AuthorizationTypeRBAC}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSearchIndexWriteBehaviorType enumerates the values for azure search index write behavior type.
type AzureSearchIndexWriteBehaviorType string
@@ -78,13 +73,11 @@ const (
Upload AzureSearchIndexWriteBehaviorType = "Upload"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleAzureSearchIndexWriteBehaviorTypeValues returns an array of possible values for the AzureSearchIndexWriteBehaviorType const type.
func PossibleAzureSearchIndexWriteBehaviorTypeValues() []AzureSearchIndexWriteBehaviorType {
return []AzureSearchIndexWriteBehaviorType{Merge, Upload}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CassandraSourceReadConsistencyLevels enumerates the values for cassandra source read consistency levels.
type CassandraSourceReadConsistencyLevels string
@@ -111,13 +104,11 @@ const (
TWO CassandraSourceReadConsistencyLevels = "TWO"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleCassandraSourceReadConsistencyLevelsValues returns an array of possible values for the CassandraSourceReadConsistencyLevels const type.
func PossibleCassandraSourceReadConsistencyLevelsValues() []CassandraSourceReadConsistencyLevels {
return []CassandraSourceReadConsistencyLevels{ALL, EACHQUORUM, LOCALONE, LOCALQUORUM, LOCALSERIAL, ONE, QUORUM, SERIAL, THREE, TWO}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CopyBehaviorType enumerates the values for copy behavior type.
type CopyBehaviorType string
@@ -130,13 +121,11 @@ const (
PreserveHierarchy CopyBehaviorType = "PreserveHierarchy"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleCopyBehaviorTypeValues returns an array of possible values for the CopyBehaviorType const type.
func PossibleCopyBehaviorTypeValues() []CopyBehaviorType {
return []CopyBehaviorType{FlattenHierarchy, MergeFiles, PreserveHierarchy}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatasetCompressionLevel enumerates the values for dataset compression level.
type DatasetCompressionLevel string
@@ -147,13 +136,11 @@ const (
Optimal DatasetCompressionLevel = "Optimal"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleDatasetCompressionLevelValues returns an array of possible values for the DatasetCompressionLevel const type.
func PossibleDatasetCompressionLevelValues() []DatasetCompressionLevel {
return []DatasetCompressionLevel{Fastest, Optimal}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DayOfWeek enumerates the values for day of week.
type DayOfWeek string
@@ -174,13 +161,11 @@ const (
Wednesday DayOfWeek = "Wednesday"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleDayOfWeekValues returns an array of possible values for the DayOfWeek const type.
func PossibleDayOfWeekValues() []DayOfWeek {
return []DayOfWeek{Friday, Monday, Saturday, Sunday, Thursday, Tuesday, Wednesday}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DaysOfWeek enumerates the values for days of week.
type DaysOfWeek string
@@ -201,13 +186,11 @@ const (
DaysOfWeekWednesday DaysOfWeek = "Wednesday"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleDaysOfWeekValues returns an array of possible values for the DaysOfWeek const type.
func PossibleDaysOfWeekValues() []DaysOfWeek {
return []DaysOfWeek{DaysOfWeekFriday, DaysOfWeekMonday, DaysOfWeekSaturday, DaysOfWeekSunday, DaysOfWeekThursday, DaysOfWeekTuesday, DaysOfWeekWednesday}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Db2AuthenticationType enumerates the values for db 2 authentication type.
type Db2AuthenticationType string
@@ -216,13 +199,11 @@ const (
Basic Db2AuthenticationType = "Basic"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleDb2AuthenticationTypeValues returns an array of possible values for the Db2AuthenticationType const type.
func PossibleDb2AuthenticationTypeValues() []Db2AuthenticationType {
return []Db2AuthenticationType{Basic}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DependencyCondition enumerates the values for dependency condition.
type DependencyCondition string
@@ -237,13 +218,11 @@ const (
Succeeded DependencyCondition = "Succeeded"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleDependencyConditionValues returns an array of possible values for the DependencyCondition const type.
func PossibleDependencyConditionValues() []DependencyCondition {
return []DependencyCondition{Completed, Failed, Skipped, Succeeded}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FtpAuthenticationType enumerates the values for ftp authentication type.
type FtpAuthenticationType string
@@ -254,13 +233,11 @@ const (
FtpAuthenticationTypeBasic FtpAuthenticationType = "Basic"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleFtpAuthenticationTypeValues returns an array of possible values for the FtpAuthenticationType const type.
func PossibleFtpAuthenticationTypeValues() []FtpAuthenticationType {
return []FtpAuthenticationType{FtpAuthenticationTypeAnonymous, FtpAuthenticationTypeBasic}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GoogleBigQueryAuthenticationType enumerates the values for google big query authentication type.
type GoogleBigQueryAuthenticationType string
@@ -271,13 +248,11 @@ const (
UserAuthentication GoogleBigQueryAuthenticationType = "UserAuthentication"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleGoogleBigQueryAuthenticationTypeValues returns an array of possible values for the GoogleBigQueryAuthenticationType const type.
func PossibleGoogleBigQueryAuthenticationTypeValues() []GoogleBigQueryAuthenticationType {
return []GoogleBigQueryAuthenticationType{ServiceAuthentication, UserAuthentication}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HBaseAuthenticationType enumerates the values for h base authentication type.
type HBaseAuthenticationType string
@@ -288,13 +263,11 @@ const (
HBaseAuthenticationTypeBasic HBaseAuthenticationType = "Basic"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleHBaseAuthenticationTypeValues returns an array of possible values for the HBaseAuthenticationType const type.
func PossibleHBaseAuthenticationTypeValues() []HBaseAuthenticationType {
return []HBaseAuthenticationType{HBaseAuthenticationTypeAnonymous, HBaseAuthenticationTypeBasic}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightActivityDebugInfoOption enumerates the values for hd insight activity debug info option.
type HDInsightActivityDebugInfoOption string
@@ -307,13 +280,11 @@ const (
None HDInsightActivityDebugInfoOption = "None"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleHDInsightActivityDebugInfoOptionValues returns an array of possible values for the HDInsightActivityDebugInfoOption const type.
func PossibleHDInsightActivityDebugInfoOptionValues() []HDInsightActivityDebugInfoOption {
return []HDInsightActivityDebugInfoOption{Always, Failure, None}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HiveAuthenticationType enumerates the values for hive authentication type.
type HiveAuthenticationType string
@@ -328,13 +299,11 @@ const (
WindowsAzureHDInsightService HiveAuthenticationType = "WindowsAzureHDInsightService"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleHiveAuthenticationTypeValues returns an array of possible values for the HiveAuthenticationType const type.
func PossibleHiveAuthenticationTypeValues() []HiveAuthenticationType {
return []HiveAuthenticationType{Anonymous, Username, UsernameAndPassword, WindowsAzureHDInsightService}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HiveServerType enumerates the values for hive server type.
type HiveServerType string
@@ -347,13 +316,11 @@ const (
HiveThriftServer HiveServerType = "HiveThriftServer"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleHiveServerTypeValues returns an array of possible values for the HiveServerType const type.
func PossibleHiveServerTypeValues() []HiveServerType {
return []HiveServerType{HiveServer1, HiveServer2, HiveThriftServer}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HiveThriftTransportProtocol enumerates the values for hive thrift transport protocol.
type HiveThriftTransportProtocol string
@@ -366,13 +333,11 @@ const (
SASL HiveThriftTransportProtocol = "SASL"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleHiveThriftTransportProtocolValues returns an array of possible values for the HiveThriftTransportProtocol const type.
func PossibleHiveThriftTransportProtocolValues() []HiveThriftTransportProtocol {
return []HiveThriftTransportProtocol{Binary, HTTP, SASL}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HTTPAuthenticationType enumerates the values for http authentication type.
type HTTPAuthenticationType string
@@ -389,13 +354,11 @@ const (
HTTPAuthenticationTypeWindows HTTPAuthenticationType = "Windows"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleHTTPAuthenticationTypeValues returns an array of possible values for the HTTPAuthenticationType const type.
func PossibleHTTPAuthenticationTypeValues() []HTTPAuthenticationType {
return []HTTPAuthenticationType{HTTPAuthenticationTypeAnonymous, HTTPAuthenticationTypeBasic, HTTPAuthenticationTypeClientCertificate, HTTPAuthenticationTypeDigest, HTTPAuthenticationTypeWindows}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ImpalaAuthenticationType enumerates the values for impala authentication type.
type ImpalaAuthenticationType string
@@ -408,13 +371,11 @@ const (
ImpalaAuthenticationTypeUsernameAndPassword ImpalaAuthenticationType = "UsernameAndPassword"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleImpalaAuthenticationTypeValues returns an array of possible values for the ImpalaAuthenticationType const type.
func PossibleImpalaAuthenticationTypeValues() []ImpalaAuthenticationType {
return []ImpalaAuthenticationType{ImpalaAuthenticationTypeAnonymous, ImpalaAuthenticationTypeSASLUsername, ImpalaAuthenticationTypeUsernameAndPassword}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeAuthKeyName enumerates the values for integration runtime auth key name.
type IntegrationRuntimeAuthKeyName string
@@ -425,13 +386,11 @@ const (
AuthKey2 IntegrationRuntimeAuthKeyName = "authKey2"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleIntegrationRuntimeAuthKeyNameValues returns an array of possible values for the IntegrationRuntimeAuthKeyName const type.
func PossibleIntegrationRuntimeAuthKeyNameValues() []IntegrationRuntimeAuthKeyName {
return []IntegrationRuntimeAuthKeyName{AuthKey1, AuthKey2}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeAutoUpdate enumerates the values for integration runtime auto update.
type IntegrationRuntimeAutoUpdate string
@@ -442,13 +401,11 @@ const (
On IntegrationRuntimeAutoUpdate = "On"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleIntegrationRuntimeAutoUpdateValues returns an array of possible values for the IntegrationRuntimeAutoUpdate const type.
func PossibleIntegrationRuntimeAutoUpdateValues() []IntegrationRuntimeAutoUpdate {
return []IntegrationRuntimeAutoUpdate{Off, On}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeEdition enumerates the values for integration runtime edition.
type IntegrationRuntimeEdition string
@@ -459,13 +416,11 @@ const (
Standard IntegrationRuntimeEdition = "Standard"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleIntegrationRuntimeEditionValues returns an array of possible values for the IntegrationRuntimeEdition const type.
func PossibleIntegrationRuntimeEditionValues() []IntegrationRuntimeEdition {
return []IntegrationRuntimeEdition{Enterprise, Standard}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeInternalChannelEncryptionMode enumerates the values for integration runtime internal
// channel encryption mode.
type IntegrationRuntimeInternalChannelEncryptionMode string
@@ -479,13 +434,11 @@ const (
SslEncrypted IntegrationRuntimeInternalChannelEncryptionMode = "SslEncrypted"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleIntegrationRuntimeInternalChannelEncryptionModeValues returns an array of possible values for the IntegrationRuntimeInternalChannelEncryptionMode const type.
func PossibleIntegrationRuntimeInternalChannelEncryptionModeValues() []IntegrationRuntimeInternalChannelEncryptionMode {
return []IntegrationRuntimeInternalChannelEncryptionMode{NotEncrypted, NotSet, SslEncrypted}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeLicenseType enumerates the values for integration runtime license type.
type IntegrationRuntimeLicenseType string
@@ -496,13 +449,11 @@ const (
LicenseIncluded IntegrationRuntimeLicenseType = "LicenseIncluded"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleIntegrationRuntimeLicenseTypeValues returns an array of possible values for the IntegrationRuntimeLicenseType const type.
func PossibleIntegrationRuntimeLicenseTypeValues() []IntegrationRuntimeLicenseType {
return []IntegrationRuntimeLicenseType{BasePrice, LicenseIncluded}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeSsisCatalogPricingTier enumerates the values for integration runtime ssis catalog pricing
// tier.
type IntegrationRuntimeSsisCatalogPricingTier string
@@ -518,13 +469,11 @@ const (
IntegrationRuntimeSsisCatalogPricingTierStandard IntegrationRuntimeSsisCatalogPricingTier = "Standard"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleIntegrationRuntimeSsisCatalogPricingTierValues returns an array of possible values for the IntegrationRuntimeSsisCatalogPricingTier const type.
func PossibleIntegrationRuntimeSsisCatalogPricingTierValues() []IntegrationRuntimeSsisCatalogPricingTier {
return []IntegrationRuntimeSsisCatalogPricingTier{IntegrationRuntimeSsisCatalogPricingTierBasic, IntegrationRuntimeSsisCatalogPricingTierPremium, IntegrationRuntimeSsisCatalogPricingTierPremiumRS, IntegrationRuntimeSsisCatalogPricingTierStandard}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeState enumerates the values for integration runtime state.
type IntegrationRuntimeState string
@@ -549,13 +498,11 @@ const (
Stopping IntegrationRuntimeState = "Stopping"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleIntegrationRuntimeStateValues returns an array of possible values for the IntegrationRuntimeState const type.
func PossibleIntegrationRuntimeStateValues() []IntegrationRuntimeState {
return []IntegrationRuntimeState{Initial, Limited, NeedRegistration, Offline, Online, Started, Starting, Stopped, Stopping}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeType enumerates the values for integration runtime type.
type IntegrationRuntimeType string
@@ -566,13 +513,11 @@ const (
SelfHosted IntegrationRuntimeType = "SelfHosted"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleIntegrationRuntimeTypeValues returns an array of possible values for the IntegrationRuntimeType const type.
func PossibleIntegrationRuntimeTypeValues() []IntegrationRuntimeType {
return []IntegrationRuntimeType{Managed, SelfHosted}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeUpdateResult enumerates the values for integration runtime update result.
type IntegrationRuntimeUpdateResult string
@@ -583,13 +528,11 @@ const (
Succeed IntegrationRuntimeUpdateResult = "Succeed"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleIntegrationRuntimeUpdateResultValues returns an array of possible values for the IntegrationRuntimeUpdateResult const type.
func PossibleIntegrationRuntimeUpdateResultValues() []IntegrationRuntimeUpdateResult {
return []IntegrationRuntimeUpdateResult{Fail, Succeed}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// JSONFormatFilePattern enumerates the values for json format file pattern.
type JSONFormatFilePattern string
@@ -600,13 +543,11 @@ const (
SetOfObjects JSONFormatFilePattern = "setOfObjects"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleJSONFormatFilePatternValues returns an array of possible values for the JSONFormatFilePattern const type.
func PossibleJSONFormatFilePatternValues() []JSONFormatFilePattern {
return []JSONFormatFilePattern{ArrayOfObjects, SetOfObjects}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ManagedIntegrationRuntimeNodeStatus enumerates the values for managed integration runtime node status.
type ManagedIntegrationRuntimeNodeStatus string
@@ -621,13 +562,11 @@ const (
ManagedIntegrationRuntimeNodeStatusUnavailable ManagedIntegrationRuntimeNodeStatus = "Unavailable"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleManagedIntegrationRuntimeNodeStatusValues returns an array of possible values for the ManagedIntegrationRuntimeNodeStatus const type.
func PossibleManagedIntegrationRuntimeNodeStatusValues() []ManagedIntegrationRuntimeNodeStatus {
return []ManagedIntegrationRuntimeNodeStatus{ManagedIntegrationRuntimeNodeStatusAvailable, ManagedIntegrationRuntimeNodeStatusRecycling, ManagedIntegrationRuntimeNodeStatusStarting, ManagedIntegrationRuntimeNodeStatusUnavailable}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MongoDbAuthenticationType enumerates the values for mongo db authentication type.
type MongoDbAuthenticationType string
@@ -638,13 +577,11 @@ const (
MongoDbAuthenticationTypeBasic MongoDbAuthenticationType = "Basic"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleMongoDbAuthenticationTypeValues returns an array of possible values for the MongoDbAuthenticationType const type.
func PossibleMongoDbAuthenticationTypeValues() []MongoDbAuthenticationType {
return []MongoDbAuthenticationType{MongoDbAuthenticationTypeAnonymous, MongoDbAuthenticationTypeBasic}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ODataAuthenticationType enumerates the values for o data authentication type.
type ODataAuthenticationType string
@@ -655,13 +592,11 @@ const (
ODataAuthenticationTypeBasic ODataAuthenticationType = "Basic"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleODataAuthenticationTypeValues returns an array of possible values for the ODataAuthenticationType const type.
func PossibleODataAuthenticationTypeValues() []ODataAuthenticationType {
return []ODataAuthenticationType{ODataAuthenticationTypeAnonymous, ODataAuthenticationTypeBasic}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ParameterType enumerates the values for parameter type.
type ParameterType string
@@ -682,13 +617,11 @@ const (
ParameterTypeString ParameterType = "String"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleParameterTypeValues returns an array of possible values for the ParameterType const type.
func PossibleParameterTypeValues() []ParameterType {
return []ParameterType{ParameterTypeArray, ParameterTypeBool, ParameterTypeFloat, ParameterTypeInt, ParameterTypeObject, ParameterTypeSecureString, ParameterTypeString}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PhoenixAuthenticationType enumerates the values for phoenix authentication type.
type PhoenixAuthenticationType string
@@ -701,13 +634,11 @@ const (
PhoenixAuthenticationTypeWindowsAzureHDInsightService PhoenixAuthenticationType = "WindowsAzureHDInsightService"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossiblePhoenixAuthenticationTypeValues returns an array of possible values for the PhoenixAuthenticationType const type.
func PossiblePhoenixAuthenticationTypeValues() []PhoenixAuthenticationType {
return []PhoenixAuthenticationType{PhoenixAuthenticationTypeAnonymous, PhoenixAuthenticationTypeUsernameAndPassword, PhoenixAuthenticationTypeWindowsAzureHDInsightService}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineRunQueryFilterOperand enumerates the values for pipeline run query filter operand.
type PipelineRunQueryFilterOperand string
@@ -722,13 +653,11 @@ const (
Status PipelineRunQueryFilterOperand = "Status"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossiblePipelineRunQueryFilterOperandValues returns an array of possible values for the PipelineRunQueryFilterOperand const type.
func PossiblePipelineRunQueryFilterOperandValues() []PipelineRunQueryFilterOperand {
return []PipelineRunQueryFilterOperand{PipelineName, RunEnd, RunStart, Status}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineRunQueryFilterOperator enumerates the values for pipeline run query filter operator.
type PipelineRunQueryFilterOperator string
@@ -743,13 +672,11 @@ const (
NotIn PipelineRunQueryFilterOperator = "NotIn"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossiblePipelineRunQueryFilterOperatorValues returns an array of possible values for the PipelineRunQueryFilterOperator const type.
func PossiblePipelineRunQueryFilterOperatorValues() []PipelineRunQueryFilterOperator {
return []PipelineRunQueryFilterOperator{Equals, In, NotEquals, NotIn}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineRunQueryOrder enumerates the values for pipeline run query order.
type PipelineRunQueryOrder string
@@ -760,13 +687,11 @@ const (
DESC PipelineRunQueryOrder = "DESC"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossiblePipelineRunQueryOrderValues returns an array of possible values for the PipelineRunQueryOrder const type.
func PossiblePipelineRunQueryOrderValues() []PipelineRunQueryOrder {
return []PipelineRunQueryOrder{ASC, DESC}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineRunQueryOrderByField enumerates the values for pipeline run query order by field.
type PipelineRunQueryOrderByField string
@@ -777,13 +702,11 @@ const (
PipelineRunQueryOrderByFieldRunStart PipelineRunQueryOrderByField = "RunStart"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossiblePipelineRunQueryOrderByFieldValues returns an array of possible values for the PipelineRunQueryOrderByField const type.
func PossiblePipelineRunQueryOrderByFieldValues() []PipelineRunQueryOrderByField {
return []PipelineRunQueryOrderByField{PipelineRunQueryOrderByFieldRunEnd, PipelineRunQueryOrderByFieldRunStart}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PolybaseSettingsRejectType enumerates the values for polybase settings reject type.
type PolybaseSettingsRejectType string
@@ -794,13 +717,11 @@ const (
Value PolybaseSettingsRejectType = "value"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossiblePolybaseSettingsRejectTypeValues returns an array of possible values for the PolybaseSettingsRejectType const type.
func PossiblePolybaseSettingsRejectTypeValues() []PolybaseSettingsRejectType {
return []PolybaseSettingsRejectType{Percentage, Value}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PrestoAuthenticationType enumerates the values for presto authentication type.
type PrestoAuthenticationType string
@@ -811,13 +732,11 @@ const (
PrestoAuthenticationTypeLDAP PrestoAuthenticationType = "LDAP"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossiblePrestoAuthenticationTypeValues returns an array of possible values for the PrestoAuthenticationType const type.
func PossiblePrestoAuthenticationTypeValues() []PrestoAuthenticationType {
return []PrestoAuthenticationType{PrestoAuthenticationTypeAnonymous, PrestoAuthenticationTypeLDAP}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RecurrenceFrequency enumerates the values for recurrence frequency.
type RecurrenceFrequency string
@@ -838,13 +757,11 @@ const (
Year RecurrenceFrequency = "Year"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleRecurrenceFrequencyValues returns an array of possible values for the RecurrenceFrequency const type.
func PossibleRecurrenceFrequencyValues() []RecurrenceFrequency {
return []RecurrenceFrequency{Day, Hour, Minute, Month, NotSpecified, Week, Year}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SalesforceSinkWriteBehavior enumerates the values for salesforce sink write behavior.
type SalesforceSinkWriteBehavior string
@@ -855,13 +772,11 @@ const (
Upsert SalesforceSinkWriteBehavior = "Upsert"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleSalesforceSinkWriteBehaviorValues returns an array of possible values for the SalesforceSinkWriteBehavior const type.
func PossibleSalesforceSinkWriteBehaviorValues() []SalesforceSinkWriteBehavior {
return []SalesforceSinkWriteBehavior{Insert, Upsert}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SalesforceSourceReadBehavior enumerates the values for salesforce source read behavior.
type SalesforceSourceReadBehavior string
@@ -872,13 +787,11 @@ const (
QueryAll SalesforceSourceReadBehavior = "QueryAll"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleSalesforceSourceReadBehaviorValues returns an array of possible values for the SalesforceSourceReadBehavior const type.
func PossibleSalesforceSourceReadBehaviorValues() []SalesforceSourceReadBehavior {
return []SalesforceSourceReadBehavior{Query, QueryAll}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapCloudForCustomerSinkWriteBehavior enumerates the values for sap cloud for customer sink write behavior.
type SapCloudForCustomerSinkWriteBehavior string
@@ -889,13 +802,11 @@ const (
SapCloudForCustomerSinkWriteBehaviorUpdate SapCloudForCustomerSinkWriteBehavior = "Update"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleSapCloudForCustomerSinkWriteBehaviorValues returns an array of possible values for the SapCloudForCustomerSinkWriteBehavior const type.
func PossibleSapCloudForCustomerSinkWriteBehaviorValues() []SapCloudForCustomerSinkWriteBehavior {
return []SapCloudForCustomerSinkWriteBehavior{SapCloudForCustomerSinkWriteBehaviorInsert, SapCloudForCustomerSinkWriteBehaviorUpdate}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapHanaAuthenticationType enumerates the values for sap hana authentication type.
type SapHanaAuthenticationType string
@@ -906,13 +817,11 @@ const (
SapHanaAuthenticationTypeWindows SapHanaAuthenticationType = "Windows"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleSapHanaAuthenticationTypeValues returns an array of possible values for the SapHanaAuthenticationType const type.
func PossibleSapHanaAuthenticationTypeValues() []SapHanaAuthenticationType {
return []SapHanaAuthenticationType{SapHanaAuthenticationTypeBasic, SapHanaAuthenticationTypeWindows}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SelfHostedIntegrationRuntimeNodeStatus enumerates the values for self hosted integration runtime node
// status.
type SelfHostedIntegrationRuntimeNodeStatus string
@@ -934,13 +843,11 @@ const (
SelfHostedIntegrationRuntimeNodeStatusUpgrading SelfHostedIntegrationRuntimeNodeStatus = "Upgrading"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleSelfHostedIntegrationRuntimeNodeStatusValues returns an array of possible values for the SelfHostedIntegrationRuntimeNodeStatus const type.
func PossibleSelfHostedIntegrationRuntimeNodeStatusValues() []SelfHostedIntegrationRuntimeNodeStatus {
return []SelfHostedIntegrationRuntimeNodeStatus{SelfHostedIntegrationRuntimeNodeStatusInitializeFailed, SelfHostedIntegrationRuntimeNodeStatusInitializing, SelfHostedIntegrationRuntimeNodeStatusLimited, SelfHostedIntegrationRuntimeNodeStatusNeedRegistration, SelfHostedIntegrationRuntimeNodeStatusOffline, SelfHostedIntegrationRuntimeNodeStatusOnline, SelfHostedIntegrationRuntimeNodeStatusUpgrading}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ServiceNowAuthenticationType enumerates the values for service now authentication type.
type ServiceNowAuthenticationType string
@@ -951,13 +858,11 @@ const (
ServiceNowAuthenticationTypeOAuth2 ServiceNowAuthenticationType = "OAuth2"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleServiceNowAuthenticationTypeValues returns an array of possible values for the ServiceNowAuthenticationType const type.
func PossibleServiceNowAuthenticationTypeValues() []ServiceNowAuthenticationType {
return []ServiceNowAuthenticationType{ServiceNowAuthenticationTypeBasic, ServiceNowAuthenticationTypeOAuth2}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SftpAuthenticationType enumerates the values for sftp authentication type.
type SftpAuthenticationType string
@@ -968,13 +873,11 @@ const (
SftpAuthenticationTypeSSHPublicKey SftpAuthenticationType = "SshPublicKey"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleSftpAuthenticationTypeValues returns an array of possible values for the SftpAuthenticationType const type.
func PossibleSftpAuthenticationTypeValues() []SftpAuthenticationType {
return []SftpAuthenticationType{SftpAuthenticationTypeBasic, SftpAuthenticationTypeSSHPublicKey}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SparkAuthenticationType enumerates the values for spark authentication type.
type SparkAuthenticationType string
@@ -989,13 +892,11 @@ const (
SparkAuthenticationTypeWindowsAzureHDInsightService SparkAuthenticationType = "WindowsAzureHDInsightService"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleSparkAuthenticationTypeValues returns an array of possible values for the SparkAuthenticationType const type.
func PossibleSparkAuthenticationTypeValues() []SparkAuthenticationType {
return []SparkAuthenticationType{SparkAuthenticationTypeAnonymous, SparkAuthenticationTypeUsername, SparkAuthenticationTypeUsernameAndPassword, SparkAuthenticationTypeWindowsAzureHDInsightService}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SparkServerType enumerates the values for spark server type.
type SparkServerType string
@@ -1008,13 +909,11 @@ const (
SparkThriftServer SparkServerType = "SparkThriftServer"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleSparkServerTypeValues returns an array of possible values for the SparkServerType const type.
func PossibleSparkServerTypeValues() []SparkServerType {
return []SparkServerType{SharkServer, SharkServer2, SparkThriftServer}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SparkThriftTransportProtocol enumerates the values for spark thrift transport protocol.
type SparkThriftTransportProtocol string
@@ -1027,13 +926,11 @@ const (
SparkThriftTransportProtocolSASL SparkThriftTransportProtocol = "SASL"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleSparkThriftTransportProtocolValues returns an array of possible values for the SparkThriftTransportProtocol const type.
func PossibleSparkThriftTransportProtocolValues() []SparkThriftTransportProtocol {
return []SparkThriftTransportProtocol{SparkThriftTransportProtocolBinary, SparkThriftTransportProtocolHTTP, SparkThriftTransportProtocolSASL}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SSISExecutionRuntime enumerates the values for ssis execution runtime.
type SSISExecutionRuntime string
@@ -1044,13 +941,11 @@ const (
X86 SSISExecutionRuntime = "x86"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleSSISExecutionRuntimeValues returns an array of possible values for the SSISExecutionRuntime const type.
func PossibleSSISExecutionRuntimeValues() []SSISExecutionRuntime {
return []SSISExecutionRuntime{X64, X86}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StoredProcedureParameterType enumerates the values for stored procedure parameter type.
type StoredProcedureParameterType string
@@ -1069,13 +964,11 @@ const (
String StoredProcedureParameterType = "String"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleStoredProcedureParameterTypeValues returns an array of possible values for the StoredProcedureParameterType const type.
func PossibleStoredProcedureParameterTypeValues() []StoredProcedureParameterType {
return []StoredProcedureParameterType{Boolean, Date, Decimal, GUID, Int, String}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SybaseAuthenticationType enumerates the values for sybase authentication type.
type SybaseAuthenticationType string
@@ -1086,13 +979,11 @@ const (
SybaseAuthenticationTypeWindows SybaseAuthenticationType = "Windows"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleSybaseAuthenticationTypeValues returns an array of possible values for the SybaseAuthenticationType const type.
func PossibleSybaseAuthenticationTypeValues() []SybaseAuthenticationType {
return []SybaseAuthenticationType{SybaseAuthenticationTypeBasic, SybaseAuthenticationTypeWindows}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TeradataAuthenticationType enumerates the values for teradata authentication type.
type TeradataAuthenticationType string
@@ -1103,13 +994,11 @@ const (
TeradataAuthenticationTypeWindows TeradataAuthenticationType = "Windows"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTeradataAuthenticationTypeValues returns an array of possible values for the TeradataAuthenticationType const type.
func PossibleTeradataAuthenticationTypeValues() []TeradataAuthenticationType {
return []TeradataAuthenticationType{TeradataAuthenticationTypeBasic, TeradataAuthenticationTypeWindows}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggerRunStatus enumerates the values for trigger run status.
type TriggerRunStatus string
@@ -1122,13 +1011,11 @@ const (
TriggerRunStatusSucceeded TriggerRunStatus = "Succeeded"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTriggerRunStatusValues returns an array of possible values for the TriggerRunStatus const type.
func PossibleTriggerRunStatusValues() []TriggerRunStatus {
return []TriggerRunStatus{TriggerRunStatusFailed, TriggerRunStatusInprogress, TriggerRunStatusSucceeded}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggerRuntimeState enumerates the values for trigger runtime state.
type TriggerRuntimeState string
@@ -1141,13 +1028,11 @@ const (
TriggerRuntimeStateStopped TriggerRuntimeState = "Stopped"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTriggerRuntimeStateValues returns an array of possible values for the TriggerRuntimeState const type.
func PossibleTriggerRuntimeStateValues() []TriggerRuntimeState {
return []TriggerRuntimeState{TriggerRuntimeStateDisabled, TriggerRuntimeStateStarted, TriggerRuntimeStateStopped}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TumblingWindowFrequency enumerates the values for tumbling window frequency.
type TumblingWindowFrequency string
@@ -1158,13 +1043,11 @@ const (
TumblingWindowFrequencyMinute TumblingWindowFrequency = "Minute"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTumblingWindowFrequencyValues returns an array of possible values for the TumblingWindowFrequency const type.
func PossibleTumblingWindowFrequencyValues() []TumblingWindowFrequency {
return []TumblingWindowFrequency{TumblingWindowFrequencyHour, TumblingWindowFrequencyMinute}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Type enumerates the values for type.
type Type string
@@ -1177,13 +1060,11 @@ const (
TypeSecureString Type = "SecureString"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTypeValues returns an array of possible values for the Type const type.
func PossibleTypeValues() []Type {
return []Type{TypeAzureKeyVaultSecret, TypeSecretBase, TypeSecureString}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TypeBasicActivity enumerates the values for type basic activity.
type TypeBasicActivity string
@@ -1240,13 +1121,11 @@ const (
TypeWebActivity TypeBasicActivity = "WebActivity"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTypeBasicActivityValues returns an array of possible values for the TypeBasicActivity const type.
func PossibleTypeBasicActivityValues() []TypeBasicActivity {
return []TypeBasicActivity{TypeActivity, TypeAzureMLBatchExecution, TypeAzureMLUpdateResource, TypeContainer, TypeCopy, TypeCustom, TypeDatabricksNotebook, TypeDataLakeAnalyticsUSQL, TypeExecutePipeline, TypeExecuteSSISPackage, TypeExecution, TypeFilter, TypeForEach, TypeGetMetadata, TypeHDInsightHive, TypeHDInsightMapReduce, TypeHDInsightPig, TypeHDInsightSpark, TypeHDInsightStreaming, TypeIfCondition, TypeLookup, TypeSQLServerStoredProcedure, TypeUntil, TypeWait, TypeWebActivity}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TypeBasicCopySink enumerates the values for type basic copy sink.
type TypeBasicCopySink string
@@ -1283,13 +1162,11 @@ const (
TypeSQLSink TypeBasicCopySink = "SqlSink"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTypeBasicCopySinkValues returns an array of possible values for the TypeBasicCopySink const type.
func PossibleTypeBasicCopySinkValues() []TypeBasicCopySink {
return []TypeBasicCopySink{TypeAzureDataLakeStoreSink, TypeAzureQueueSink, TypeAzureSearchIndexSink, TypeAzureTableSink, TypeBlobSink, TypeCopySink, TypeDocumentDbCollectionSink, TypeDynamicsSink, TypeFileSystemSink, TypeOdbcSink, TypeOracleSink, TypeSalesforceSink, TypeSapCloudForCustomerSink, TypeSQLDWSink, TypeSQLSink}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TypeBasicCopySource enumerates the values for type basic copy source.
type TypeBasicCopySource string
@@ -1398,13 +1275,11 @@ const (
TypeZohoSource TypeBasicCopySource = "ZohoSource"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTypeBasicCopySourceValues returns an array of possible values for the TypeBasicCopySource const type.
func PossibleTypeBasicCopySourceValues() []TypeBasicCopySource {
return []TypeBasicCopySource{TypeAmazonMWSSource, TypeAmazonRedshiftSource, TypeAzureDataLakeStoreSource, TypeAzureMySQLSource, TypeAzurePostgreSQLSource, TypeAzureTableSource, TypeBlobSource, TypeCassandraSource, TypeConcurSource, TypeCopySource, TypeCouchbaseSource, TypeDocumentDbCollectionSource, TypeDrillSource, TypeDynamicsSource, TypeEloquaSource, TypeFileSystemSource, TypeGoogleBigQuerySource, TypeGreenplumSource, TypeHBaseSource, TypeHdfsSource, TypeHiveSource, TypeHTTPSource, TypeHubspotSource, TypeImpalaSource, TypeJiraSource, TypeMagentoSource, TypeMariaDBSource, TypeMarketoSource, TypeMongoDbSource, TypeNetezzaSource, TypeOracleSource, TypePaypalSource, TypePhoenixSource, TypePrestoSource, TypeQuickBooksSource, TypeRelationalSource, TypeResponsysSource, TypeSalesforceMarketingCloudSource, TypeSalesforceSource, TypeSapCloudForCustomerSource, TypeSapEccSource, TypeServiceNowSource, TypeShopifySource, TypeSparkSource, TypeSQLDWSource, TypeSQLSource, TypeSquareSource, TypeVerticaSource, TypeWebSource, TypeXeroSource, TypeZohoSource}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TypeBasicCopyTranslator enumerates the values for type basic copy translator.
type TypeBasicCopyTranslator string
@@ -1415,13 +1290,11 @@ const (
TypeTabularTranslator TypeBasicCopyTranslator = "TabularTranslator"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTypeBasicCopyTranslatorValues returns an array of possible values for the TypeBasicCopyTranslator const type.
func PossibleTypeBasicCopyTranslatorValues() []TypeBasicCopyTranslator {
return []TypeBasicCopyTranslator{TypeCopyTranslator, TypeTabularTranslator}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TypeBasicDataset enumerates the values for type basic dataset.
type TypeBasicDataset string
@@ -1536,13 +1409,11 @@ const (
TypeZohoObject TypeBasicDataset = "ZohoObject"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTypeBasicDatasetValues returns an array of possible values for the TypeBasicDataset const type.
func PossibleTypeBasicDatasetValues() []TypeBasicDataset {
return []TypeBasicDataset{TypeAmazonMWSObject, TypeAmazonS3Object, TypeAzureBlob, TypeAzureDataLakeStoreFile, TypeAzureMySQLTable, TypeAzurePostgreSQLTable, TypeAzureSearchIndex, TypeAzureSQLDWTable, TypeAzureSQLTable, TypeAzureTable, TypeCassandraTable, TypeConcurObject, TypeCouchbaseTable, TypeCustomDataset, TypeDataset, TypeDocumentDbCollection, TypeDrillTable, TypeDynamicsEntity, TypeEloquaObject, TypeFileShare, TypeGoogleBigQueryObject, TypeGreenplumTable, TypeHBaseObject, TypeHiveObject, TypeHTTPFile, TypeHubspotObject, TypeImpalaObject, TypeJiraObject, TypeMagentoObject, TypeMariaDBTable, TypeMarketoObject, TypeMongoDbCollection, TypeNetezzaTable, TypeODataResource, TypeOracleTable, TypePaypalObject, TypePhoenixObject, TypePrestoObject, TypeQuickBooksObject, TypeRelationalTable, TypeResponsysObject, TypeSalesforceMarketingCloudObject, TypeSalesforceObject, TypeSapCloudForCustomerResource, TypeSapEccResource, TypeServiceNowObject, TypeShopifyObject, TypeSparkObject, TypeSQLServerTable, TypeSquareObject, TypeVerticaTable, TypeWebTable, TypeXeroObject, TypeZohoObject}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TypeBasicDatasetCompression enumerates the values for type basic dataset compression.
type TypeBasicDatasetCompression string
@@ -1559,13 +1430,11 @@ const (
TypeZipDeflate TypeBasicDatasetCompression = "ZipDeflate"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTypeBasicDatasetCompressionValues returns an array of possible values for the TypeBasicDatasetCompression const type.
func PossibleTypeBasicDatasetCompressionValues() []TypeBasicDatasetCompression {
return []TypeBasicDatasetCompression{TypeBZip2, TypeDatasetCompression, TypeDeflate, TypeGZip, TypeZipDeflate}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TypeBasicDatasetStorageFormat enumerates the values for type basic dataset storage format.
type TypeBasicDatasetStorageFormat string
@@ -1584,13 +1453,11 @@ const (
TypeTextFormat TypeBasicDatasetStorageFormat = "TextFormat"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTypeBasicDatasetStorageFormatValues returns an array of possible values for the TypeBasicDatasetStorageFormat const type.
func PossibleTypeBasicDatasetStorageFormatValues() []TypeBasicDatasetStorageFormat {
return []TypeBasicDatasetStorageFormat{TypeAvroFormat, TypeDatasetStorageFormat, TypeJSONFormat, TypeOrcFormat, TypeParquetFormat, TypeTextFormat}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TypeBasicIntegrationRuntime enumerates the values for type basic integration runtime.
type TypeBasicIntegrationRuntime string
@@ -1603,13 +1470,11 @@ const (
TypeSelfHosted TypeBasicIntegrationRuntime = "SelfHosted"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTypeBasicIntegrationRuntimeValues returns an array of possible values for the TypeBasicIntegrationRuntime const type.
func PossibleTypeBasicIntegrationRuntimeValues() []TypeBasicIntegrationRuntime {
return []TypeBasicIntegrationRuntime{TypeIntegrationRuntime, TypeManaged, TypeSelfHosted}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TypeBasicIntegrationRuntimeStatus enumerates the values for type basic integration runtime status.
type TypeBasicIntegrationRuntimeStatus string
@@ -1622,13 +1487,11 @@ const (
TypeBasicIntegrationRuntimeStatusTypeSelfHosted TypeBasicIntegrationRuntimeStatus = "SelfHosted"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTypeBasicIntegrationRuntimeStatusValues returns an array of possible values for the TypeBasicIntegrationRuntimeStatus const type.
func PossibleTypeBasicIntegrationRuntimeStatusValues() []TypeBasicIntegrationRuntimeStatus {
return []TypeBasicIntegrationRuntimeStatus{TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus, TypeBasicIntegrationRuntimeStatusTypeManaged, TypeBasicIntegrationRuntimeStatusTypeSelfHosted}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TypeBasicLinkedService enumerates the values for type basic linked service.
type TypeBasicLinkedService string
@@ -1777,13 +1640,11 @@ const (
TypeZoho TypeBasicLinkedService = "Zoho"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTypeBasicLinkedServiceValues returns an array of possible values for the TypeBasicLinkedService const type.
func PossibleTypeBasicLinkedServiceValues() []TypeBasicLinkedService {
return []TypeBasicLinkedService{TypeAmazonMWS, TypeAmazonRedshift, TypeAmazonS3, TypeAzureBatch, TypeAzureDatabricks, TypeAzureDataLakeAnalytics, TypeAzureDataLakeStore, TypeAzureKeyVault, TypeAzureML, TypeAzureMySQL, TypeAzurePostgreSQL, TypeAzureSearch, TypeAzureSQLDatabase, TypeAzureSQLDW, TypeAzureStorage, TypeCassandra, TypeConcur, TypeCosmosDb, TypeCouchbase, TypeCustomDataSource, TypeDb2, TypeDrill, TypeDynamics, TypeEloqua, TypeFileServer, TypeFtpServer, TypeGoogleBigQuery, TypeGreenplum, TypeHBase, TypeHdfs, TypeHDInsight, TypeHDInsightOnDemand, TypeHive, TypeHTTPServer, TypeHubspot, TypeImpala, TypeJira, TypeLinkedService, TypeMagento, TypeMariaDB, TypeMarketo, TypeMongoDb, TypeMySQL, TypeNetezza, TypeOData, TypeOdbc, TypeOracle, TypePaypal, TypePhoenix, TypePostgreSQL, TypePresto, TypeQuickBooks, TypeResponsys, TypeSalesforce, TypeSalesforceMarketingCloud, TypeSapBW, TypeSapCloudForCustomer, TypeSapEcc, TypeSapHana, TypeServiceNow, TypeSftp, TypeShopify, TypeSpark, TypeSQLServer, TypeSquare, TypeSybase, TypeTeradata, TypeVertica, TypeWeb, TypeXero, TypeZoho}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TypeBasicTrigger enumerates the values for type basic trigger.
type TypeBasicTrigger string
@@ -1800,13 +1661,11 @@ const (
TypeTumblingWindowTrigger TypeBasicTrigger = "TumblingWindowTrigger"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleTypeBasicTriggerValues returns an array of possible values for the TypeBasicTrigger const type.
func PossibleTypeBasicTriggerValues() []TypeBasicTrigger {
return []TypeBasicTrigger{TypeBlobTrigger, TypeMultiplePipelineTrigger, TypeScheduleTrigger, TypeTrigger, TypeTumblingWindowTrigger}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WebActivityMethod enumerates the values for web activity method.
type WebActivityMethod string
@@ -1821,13 +1680,11 @@ const (
PUT WebActivityMethod = "PUT"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PossibleWebActivityMethodValues returns an array of possible values for the WebActivityMethod const type.
func PossibleWebActivityMethodValues() []WebActivityMethod {
return []WebActivityMethod{DELETE, GET, POST, PUT}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicActivity a pipeline activity.
type BasicActivity interface {
AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool)
@@ -1859,7 +1716,6 @@ type BasicActivity interface {
AsActivity() (*Activity, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Activity a pipeline activity.
type Activity struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -2003,7 +1859,6 @@ func unmarshalBasicActivityArray(body []byte) ([]BasicActivity, error) {
return aArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for Activity.
func (a Activity) MarshalJSON() ([]byte, error) {
a.Type = TypeActivity
@@ -2026,175 +1881,146 @@ func (a Activity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for Activity.
func (a Activity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for Activity.
func (a Activity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for Activity.
func (a Activity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for Activity.
func (a Activity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for Activity.
func (a Activity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for Activity.
func (a Activity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for Activity.
func (a Activity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for Activity.
func (a Activity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for Activity.
func (a Activity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for Activity.
func (a Activity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for Activity.
func (a Activity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for Activity.
func (a Activity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for Activity.
func (a Activity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for Activity.
func (a Activity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for Activity.
func (a Activity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for Activity.
func (a Activity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for Activity.
func (a Activity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for Activity.
func (a Activity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for Activity.
func (a Activity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for Activity.
func (a Activity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for Activity.
func (a Activity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for Activity.
func (a Activity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for Activity.
func (a Activity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for Activity.
func (a Activity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for Activity.
func (a Activity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for Activity.
func (a Activity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for Activity.
func (a Activity) AsActivity() (*Activity, bool) {
return &a, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for Activity.
func (a Activity) AsBasicActivity() (BasicActivity, bool) {
return &a, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ActivityDependency activity dependency information.
type ActivityDependency struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -2205,7 +2031,6 @@ type ActivityDependency struct {
DependencyConditions *[]DependencyCondition `json:"dependencyConditions,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ActivityDependency.
func (ad ActivityDependency) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -2221,7 +2046,6 @@ func (ad ActivityDependency) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ActivityPolicy execution policy for an activity.
type ActivityPolicy struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -2236,7 +2060,6 @@ type ActivityPolicy struct {
SecureOutput *bool `json:"secureOutput,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ActivityPolicy.
func (ap ActivityPolicy) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -2254,7 +2077,6 @@ func (ap ActivityPolicy) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ActivityRun information about an activity run in a pipeline.
type ActivityRun struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -2287,7 +2109,6 @@ type ActivityRun struct {
Error interface{} `json:"error,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ActivityRun.
func (ar ActivityRun) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -2330,7 +2151,6 @@ func (ar ActivityRun) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ActivityRunsListResponse a list activity runs.
type ActivityRunsListResponse struct {
autorest.Response `json:"-"`
@@ -2340,14 +2160,12 @@ type ActivityRunsListResponse struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ActivityRunsListResponseIterator provides access to a complete listing of ActivityRun values.
type ActivityRunsListResponseIterator struct {
i int
page ActivityRunsListResponsePage
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *ActivityRunsListResponseIterator) Next() error {
@@ -2364,19 +2182,16 @@ func (iter *ActivityRunsListResponseIterator) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ActivityRunsListResponseIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (iter ActivityRunsListResponseIterator) Response() ActivityRunsListResponse {
return iter.page.Response()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter ActivityRunsListResponseIterator) Value() ActivityRun {
@@ -2386,7 +2201,6 @@ func (iter ActivityRunsListResponseIterator) Value() ActivityRun {
return iter.page.Values()[iter.i]
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IsEmpty returns true if the ListResult contains no values.
func (arlr ActivityRunsListResponse) IsEmpty() bool {
return arlr.Value == nil || len(*arlr.Value) == 0
@@ -2404,14 +2218,12 @@ func (arlr ActivityRunsListResponse) activityRunsListResponsePreparer() (*http.R
autorest.WithBaseURL(to.String(arlr.NextLink)))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ActivityRunsListResponsePage contains a page of ActivityRun values.
type ActivityRunsListResponsePage struct {
fn func(ActivityRunsListResponse) (ActivityRunsListResponse, error)
arlr ActivityRunsListResponse
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *ActivityRunsListResponsePage) Next() error {
@@ -2423,19 +2235,16 @@ func (page *ActivityRunsListResponsePage) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ActivityRunsListResponsePage) NotDone() bool {
return !page.arlr.IsEmpty()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (page ActivityRunsListResponsePage) Response() ActivityRunsListResponse {
return page.arlr
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Values returns the slice of values for the current page or nil if there are no values.
func (page ActivityRunsListResponsePage) Values() []ActivityRun {
if page.arlr.IsEmpty() {
@@ -2444,7 +2253,6 @@ func (page ActivityRunsListResponsePage) Values() []ActivityRun {
return *page.arlr.Value
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AmazonMWSLinkedService amazon Marketplace Web Service linked service.
type AmazonMWSLinkedService struct {
// AmazonMWSLinkedServiceTypeProperties - Amazon Marketplace Web Service linked service properties.
@@ -2463,7 +2271,6 @@ type AmazonMWSLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) MarshalJSON() ([]byte, error) {
amls.Type = TypeAmazonMWS
@@ -2492,439 +2299,366 @@ func (amls AmazonMWSLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return &amls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AmazonMWSLinkedService.
func (amls AmazonMWSLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &amls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AmazonMWSLinkedService struct.
func (amls *AmazonMWSLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -3006,7 +2740,6 @@ func (amls *AmazonMWSLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AmazonMWSLinkedServiceTypeProperties amazon Marketplace Web Service linked service properties.
type AmazonMWSLinkedServiceTypeProperties struct {
// Endpoint - The endpoint of the Amazon MWS server, (i.e. mws.amazonservices.com)
@@ -3031,7 +2764,6 @@ type AmazonMWSLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AmazonMWSLinkedServiceTypeProperties struct.
func (amlstp *AmazonMWSLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -3135,7 +2867,6 @@ func (amlstp *AmazonMWSLinkedServiceTypeProperties) UnmarshalJSON(body []byte) e
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AmazonMWSObjectDataset amazon Marketplace Web Service dataset.
type AmazonMWSObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -3154,7 +2885,6 @@ type AmazonMWSObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) MarshalJSON() ([]byte, error) {
amod.Type = TypeAmazonMWSObject
@@ -3181,337 +2911,281 @@ func (amod AmazonMWSObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return &amod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for AmazonMWSObjectDataset.
func (amod AmazonMWSObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &amod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AmazonMWSSource a copy activity Amazon Marketplace Web Service source.
type AmazonMWSSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -3526,7 +3200,6 @@ type AmazonMWSSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AmazonMWSSource.
func (ams AmazonMWSSource) MarshalJSON() ([]byte, error) {
ams.Type = TypeAmazonMWSSource
@@ -3543,319 +3216,266 @@ func (ams AmazonMWSSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return &ams, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for AmazonMWSSource.
func (ams AmazonMWSSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ams, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AmazonRedshiftLinkedService linked service for Amazon Redshift.
type AmazonRedshiftLinkedService struct {
// AmazonRedshiftLinkedServiceTypeProperties - Amazon Redshift linked service properties.
@@ -3874,7 +3494,6 @@ type AmazonRedshiftLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) MarshalJSON() ([]byte, error) {
arls.Type = TypeAmazonRedshift
@@ -3903,439 +3522,366 @@ func (arls AmazonRedshiftLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return &arls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AmazonRedshiftLinkedService.
func (arls AmazonRedshiftLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &arls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AmazonRedshiftLinkedService struct.
func (arls *AmazonRedshiftLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -4417,7 +3963,6 @@ func (arls *AmazonRedshiftLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AmazonRedshiftLinkedServiceTypeProperties amazon Redshift linked service properties.
type AmazonRedshiftLinkedServiceTypeProperties struct {
// Server - The name of the Amazon Redshift server. Type: string (or Expression with resultType string).
@@ -4434,7 +3979,6 @@ type AmazonRedshiftLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AmazonRedshiftLinkedServiceTypeProperties struct.
func (arlstp *AmazonRedshiftLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -4503,7 +4047,6 @@ func (arlstp *AmazonRedshiftLinkedServiceTypeProperties) UnmarshalJSON(body []by
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AmazonRedshiftSource a copy activity source for Amazon Redshift Source.
type AmazonRedshiftSource struct {
// Query - Database query. Type: string (or Expression with resultType string).
@@ -4520,7 +4063,6 @@ type AmazonRedshiftSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) MarshalJSON() ([]byte, error) {
ars.Type = TypeAmazonRedshiftSource
@@ -4540,319 +4082,266 @@ func (ars AmazonRedshiftSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return &ars, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for AmazonRedshiftSource.
func (ars AmazonRedshiftSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ars, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AmazonS3Dataset a single Amazon Simple Storage Service (S3) object or a set of S3 objects.
type AmazonS3Dataset struct {
// AmazonS3DatasetTypeProperties - Amazon S3 dataset properties.
@@ -4873,7 +4362,6 @@ type AmazonS3Dataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AmazonS3Dataset.
func (asd AmazonS3Dataset) MarshalJSON() ([]byte, error) {
asd.Type = TypeAmazonS3Object
@@ -4903,337 +4391,281 @@ func (asd AmazonS3Dataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return &asd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for AmazonS3Dataset.
func (asd AmazonS3Dataset) AsBasicDataset() (BasicDataset, bool) {
return &asd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AmazonS3Dataset struct.
func (asd *AmazonS3Dataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -5324,7 +4756,6 @@ func (asd *AmazonS3Dataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AmazonS3DatasetTypeProperties amazon S3 dataset properties.
type AmazonS3DatasetTypeProperties struct {
// BucketName - The name of the Amazon S3 bucket. Type: string (or Expression with resultType string).
@@ -5341,7 +4772,6 @@ type AmazonS3DatasetTypeProperties struct {
Compression BasicDatasetCompression `json:"compression,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AmazonS3DatasetTypeProperties struct.
func (asdtp *AmazonS3DatasetTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -5409,7 +4839,6 @@ func (asdtp *AmazonS3DatasetTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AmazonS3LinkedService linked service for Amazon S3.
type AmazonS3LinkedService struct {
// AmazonS3LinkedServiceTypeProperties - Amazon S3 linked service properties.
@@ -5428,7 +4857,6 @@ type AmazonS3LinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) MarshalJSON() ([]byte, error) {
asls.Type = TypeAmazonS3
@@ -5457,439 +4885,366 @@ func (asls AmazonS3LinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return &asls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AmazonS3LinkedService.
func (asls AmazonS3LinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &asls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AmazonS3LinkedService struct.
func (asls *AmazonS3LinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -5971,7 +5326,6 @@ func (asls *AmazonS3LinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AmazonS3LinkedServiceTypeProperties amazon S3 linked service properties.
type AmazonS3LinkedServiceTypeProperties struct {
// AccessKeyID - The access key identifier of the Amazon S3 Identity and Access Management (IAM) user. Type: string (or Expression with resultType string).
@@ -5982,7 +5336,6 @@ type AmazonS3LinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AmazonS3LinkedServiceTypeProperties struct.
func (aslstp *AmazonS3LinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -6024,7 +5377,6 @@ func (aslstp *AmazonS3LinkedServiceTypeProperties) UnmarshalJSON(body []byte) er
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AvroFormat the data stored in Avro format.
type AvroFormat struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -6037,7 +5389,6 @@ type AvroFormat struct {
Type TypeBasicDatasetStorageFormat `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AvroFormat.
func (af AvroFormat) MarshalJSON() ([]byte, error) {
af.Type = TypeAvroFormat
@@ -6053,49 +5404,41 @@ func (af AvroFormat) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsParquetFormat is the BasicDatasetStorageFormat implementation for AvroFormat.
func (af AvroFormat) AsParquetFormat() (*ParquetFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOrcFormat is the BasicDatasetStorageFormat implementation for AvroFormat.
func (af AvroFormat) AsOrcFormat() (*OrcFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAvroFormat is the BasicDatasetStorageFormat implementation for AvroFormat.
func (af AvroFormat) AsAvroFormat() (*AvroFormat, bool) {
return &af, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJSONFormat is the BasicDatasetStorageFormat implementation for AvroFormat.
func (af AvroFormat) AsJSONFormat() (*JSONFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTextFormat is the BasicDatasetStorageFormat implementation for AvroFormat.
func (af AvroFormat) AsTextFormat() (*TextFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetStorageFormat is the BasicDatasetStorageFormat implementation for AvroFormat.
func (af AvroFormat) AsDatasetStorageFormat() (*DatasetStorageFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDatasetStorageFormat is the BasicDatasetStorageFormat implementation for AvroFormat.
func (af AvroFormat) AsBasicDatasetStorageFormat() (BasicDatasetStorageFormat, bool) {
return &af, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureBatchLinkedService azure Batch linked service.
type AzureBatchLinkedService struct {
// AzureBatchLinkedServiceTypeProperties - Azure Batch linked service properties.
@@ -6114,7 +5457,6 @@ type AzureBatchLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) MarshalJSON() ([]byte, error) {
abls.Type = TypeAzureBatch
@@ -6143,439 +5485,366 @@ func (abls AzureBatchLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return &abls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AzureBatchLinkedService.
func (abls AzureBatchLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &abls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureBatchLinkedService struct.
func (abls *AzureBatchLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -6657,7 +5926,6 @@ func (abls *AzureBatchLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureBatchLinkedServiceTypeProperties azure Batch linked service properties.
type AzureBatchLinkedServiceTypeProperties struct {
// AccountName - The Azure Batch account name. Type: string (or Expression with resultType string).
@@ -6674,7 +5942,6 @@ type AzureBatchLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureBatchLinkedServiceTypeProperties struct.
func (ablstp *AzureBatchLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -6743,7 +6010,6 @@ func (ablstp *AzureBatchLinkedServiceTypeProperties) UnmarshalJSON(body []byte)
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureBlobDataset the Azure Blob storage.
type AzureBlobDataset struct {
// AzureBlobDatasetTypeProperties - Azure Blob dataset properties.
@@ -6764,7 +6030,6 @@ type AzureBlobDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureBlobDataset.
func (abd AzureBlobDataset) MarshalJSON() ([]byte, error) {
abd.Type = TypeAzureBlob
@@ -6794,337 +6059,281 @@ func (abd AzureBlobDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return &abd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for AzureBlobDataset.
func (abd AzureBlobDataset) AsBasicDataset() (BasicDataset, bool) {
return &abd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureBlobDataset struct.
func (abd *AzureBlobDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -7215,7 +6424,6 @@ func (abd *AzureBlobDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureBlobDatasetTypeProperties azure Blob dataset properties.
type AzureBlobDatasetTypeProperties struct {
// FolderPath - The path of the Azure Blob storage. Type: string (or Expression with resultType string).
@@ -7230,7 +6438,6 @@ type AzureBlobDatasetTypeProperties struct {
Compression BasicDatasetCompression `json:"compression,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureBlobDatasetTypeProperties struct.
func (abdtp *AzureBlobDatasetTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -7289,7 +6496,6 @@ func (abdtp *AzureBlobDatasetTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureDatabricksLinkedService azure Databricks linked service.
type AzureDatabricksLinkedService struct {
// AzureDatabricksLinkedServiceTypeProperties - Azure Databricks linked service properties.
@@ -7308,7 +6514,6 @@ type AzureDatabricksLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) MarshalJSON() ([]byte, error) {
adls.Type = TypeAzureDatabricks
@@ -7337,439 +6542,366 @@ func (adls AzureDatabricksLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return &adls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AzureDatabricksLinkedService.
func (adls AzureDatabricksLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &adls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureDatabricksLinkedService struct.
func (adls *AzureDatabricksLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -7851,7 +6983,6 @@ func (adls *AzureDatabricksLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureDatabricksLinkedServiceTypeProperties azure Databricks linked service properties.
type AzureDatabricksLinkedServiceTypeProperties struct {
// Domain - .azuredatabricks.net, domain name of your Databricks deployment. Type: string (or Expression with resultType string).
@@ -7872,7 +7003,6 @@ type AzureDatabricksLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureDatabricksLinkedServiceTypeProperties.
func (adlstp AzureDatabricksLinkedServiceTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -7889,7 +7019,6 @@ func (adlstp AzureDatabricksLinkedServiceTypeProperties) MarshalJSON() ([]byte,
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureDatabricksLinkedServiceTypeProperties struct.
func (adlstp *AzureDatabricksLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -7976,7 +7105,6 @@ func (adlstp *AzureDatabricksLinkedServiceTypeProperties) UnmarshalJSON(body []b
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureDataLakeAnalyticsLinkedService azure Data Lake Analytics linked service.
type AzureDataLakeAnalyticsLinkedService struct {
// AzureDataLakeAnalyticsLinkedServiceTypeProperties - Azure Data Lake Analytics linked service properties.
@@ -7995,7 +7123,6 @@ type AzureDataLakeAnalyticsLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) MarshalJSON() ([]byte, error) {
adlals.Type = TypeAzureDataLakeAnalytics
@@ -8024,439 +7151,366 @@ func (adlals AzureDataLakeAnalyticsLinkedService) MarshalJSON() ([]byte, error)
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return &adlals, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AzureDataLakeAnalyticsLinkedService.
func (adlals AzureDataLakeAnalyticsLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &adlals, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureDataLakeAnalyticsLinkedService struct.
func (adlals *AzureDataLakeAnalyticsLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -8538,7 +7592,6 @@ func (adlals *AzureDataLakeAnalyticsLinkedService) UnmarshalJSON(body []byte) er
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureDataLakeAnalyticsLinkedServiceTypeProperties azure Data Lake Analytics linked service properties.
type AzureDataLakeAnalyticsLinkedServiceTypeProperties struct {
// AccountName - The Azure Data Lake Analytics account name. Type: string (or Expression with resultType string).
@@ -8559,7 +7612,6 @@ type AzureDataLakeAnalyticsLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureDataLakeAnalyticsLinkedServiceTypeProperties struct.
func (adlalstp *AzureDataLakeAnalyticsLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -8646,7 +7698,6 @@ func (adlalstp *AzureDataLakeAnalyticsLinkedServiceTypeProperties) UnmarshalJSON
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureDataLakeStoreDataset azure Data Lake Store dataset.
type AzureDataLakeStoreDataset struct {
// AzureDataLakeStoreDatasetTypeProperties - Azure Data Lake Store dataset properties.
@@ -8667,7 +7718,6 @@ type AzureDataLakeStoreDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) MarshalJSON() ([]byte, error) {
adlsd.Type = TypeAzureDataLakeStoreFile
@@ -8697,337 +7747,281 @@ func (adlsd AzureDataLakeStoreDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return &adlsd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for AzureDataLakeStoreDataset.
func (adlsd AzureDataLakeStoreDataset) AsBasicDataset() (BasicDataset, bool) {
return &adlsd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureDataLakeStoreDataset struct.
func (adlsd *AzureDataLakeStoreDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -9118,7 +8112,6 @@ func (adlsd *AzureDataLakeStoreDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureDataLakeStoreDatasetTypeProperties azure Data Lake Store dataset properties.
type AzureDataLakeStoreDatasetTypeProperties struct {
// FolderPath - Path to the folder in the Azure Data Lake Store. Type: string (or Expression with resultType string).
@@ -9131,7 +8124,6 @@ type AzureDataLakeStoreDatasetTypeProperties struct {
Compression BasicDatasetCompression `json:"compression,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureDataLakeStoreDatasetTypeProperties struct.
func (adlsdtp *AzureDataLakeStoreDatasetTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -9181,7 +8173,6 @@ func (adlsdtp *AzureDataLakeStoreDatasetTypeProperties) UnmarshalJSON(body []byt
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureDataLakeStoreLinkedService azure Data Lake Store linked service.
type AzureDataLakeStoreLinkedService struct {
// AzureDataLakeStoreLinkedServiceTypeProperties - Azure Data Lake Store linked service properties.
@@ -9200,7 +8191,6 @@ type AzureDataLakeStoreLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) MarshalJSON() ([]byte, error) {
adlsls.Type = TypeAzureDataLakeStore
@@ -9229,439 +8219,366 @@ func (adlsls AzureDataLakeStoreLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return &adlsls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AzureDataLakeStoreLinkedService.
func (adlsls AzureDataLakeStoreLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &adlsls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureDataLakeStoreLinkedService struct.
func (adlsls *AzureDataLakeStoreLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -9743,7 +8660,6 @@ func (adlsls *AzureDataLakeStoreLinkedService) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureDataLakeStoreLinkedServiceTypeProperties azure Data Lake Store linked service properties.
type AzureDataLakeStoreLinkedServiceTypeProperties struct {
// DataLakeStoreURI - Data Lake Store service URI. Type: string (or Expression with resultType string).
@@ -9764,7 +8680,6 @@ type AzureDataLakeStoreLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureDataLakeStoreLinkedServiceTypeProperties struct.
func (adlslstp *AzureDataLakeStoreLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -9851,7 +8766,6 @@ func (adlslstp *AzureDataLakeStoreLinkedServiceTypeProperties) UnmarshalJSON(bod
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureDataLakeStoreSink a copy activity Azure Data Lake Store sink.
type AzureDataLakeStoreSink struct {
// CopyBehavior - The type of copy behavior for copy sink. Possible values include: 'PreserveHierarchy', 'FlattenHierarchy', 'MergeFiles'
@@ -9870,7 +8784,6 @@ type AzureDataLakeStoreSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) MarshalJSON() ([]byte, error) {
adlss.Type = TypeAzureDataLakeStoreSink
@@ -9891,103 +8804,86 @@ func (adlss AzureDataLakeStoreSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return &adlss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for AzureDataLakeStoreSink.
func (adlss AzureDataLakeStoreSink) AsBasicCopySink() (BasicCopySink, bool) {
return &adlss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureDataLakeStoreSource a copy activity Azure Data Lake source.
type AzureDataLakeStoreSource struct {
// Recursive - If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean).
@@ -10002,7 +8898,6 @@ type AzureDataLakeStoreSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) MarshalJSON() ([]byte, error) {
adlss.Type = TypeAzureDataLakeStoreSource
@@ -10019,319 +8914,266 @@ func (adlss AzureDataLakeStoreSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return &adlss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for AzureDataLakeStoreSource.
func (adlss AzureDataLakeStoreSource) AsBasicCopySource() (BasicCopySource, bool) {
return &adlss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureKeyVaultLinkedService azure Key Vault linked service.
type AzureKeyVaultLinkedService struct {
// AzureKeyVaultLinkedServiceTypeProperties - Azure Key Vault linked service properties.
@@ -10350,7 +9192,6 @@ type AzureKeyVaultLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) MarshalJSON() ([]byte, error) {
akvls.Type = TypeAzureKeyVault
@@ -10379,439 +9220,366 @@ func (akvls AzureKeyVaultLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return &akvls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AzureKeyVaultLinkedService.
func (akvls AzureKeyVaultLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &akvls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureKeyVaultLinkedService struct.
func (akvls *AzureKeyVaultLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -10893,14 +9661,12 @@ func (akvls *AzureKeyVaultLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureKeyVaultLinkedServiceTypeProperties azure Key Vault linked service properties.
type AzureKeyVaultLinkedServiceTypeProperties struct {
// BaseURL - The base URL of the Azure Key Vault. e.g. https://myakv.vault.azure.net Type: string (or Expression with resultType string).
BaseURL interface{} `json:"baseUrl,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureKeyVaultSecretReference azure Key Vault secret reference.
type AzureKeyVaultSecretReference struct {
// Store - The Azure Key Vault linked service reference.
@@ -10913,7 +9679,6 @@ type AzureKeyVaultSecretReference struct {
Type Type `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureKeyVaultSecretReference.
func (akvsr AzureKeyVaultSecretReference) MarshalJSON() ([]byte, error) {
akvsr.Type = TypeAzureKeyVaultSecret
@@ -10929,31 +9694,26 @@ func (akvsr AzureKeyVaultSecretReference) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSecureString is the BasicSecretBase implementation for AzureKeyVaultSecretReference.
func (akvsr AzureKeyVaultSecretReference) AsSecureString() (*SecureString, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultSecretReference is the BasicSecretBase implementation for AzureKeyVaultSecretReference.
func (akvsr AzureKeyVaultSecretReference) AsAzureKeyVaultSecretReference() (*AzureKeyVaultSecretReference, bool) {
return &akvsr, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSecretBase is the BasicSecretBase implementation for AzureKeyVaultSecretReference.
func (akvsr AzureKeyVaultSecretReference) AsSecretBase() (*SecretBase, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicSecretBase is the BasicSecretBase implementation for AzureKeyVaultSecretReference.
func (akvsr AzureKeyVaultSecretReference) AsBasicSecretBase() (BasicSecretBase, bool) {
return &akvsr, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureMLBatchExecutionActivity azure ML Batch Execution activity.
type AzureMLBatchExecutionActivity struct {
// AzureMLBatchExecutionActivityTypeProperties - Azure ML Batch Execution activity properties.
@@ -10974,7 +9734,6 @@ type AzureMLBatchExecutionActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) MarshalJSON() ([]byte, error) {
ambea.Type = TypeAzureMLBatchExecution
@@ -11006,175 +9765,146 @@ func (ambea AzureMLBatchExecutionActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return &ambea, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &ambea, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for AzureMLBatchExecutionActivity.
func (ambea AzureMLBatchExecutionActivity) AsBasicActivity() (BasicActivity, bool) {
return &ambea, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureMLBatchExecutionActivity struct.
func (ambea *AzureMLBatchExecutionActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -11265,7 +9995,6 @@ func (ambea *AzureMLBatchExecutionActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureMLBatchExecutionActivityTypeProperties azure ML Batch Execution activity properties.
type AzureMLBatchExecutionActivityTypeProperties struct {
// GlobalParameters - Key,Value pairs to be passed to the Azure ML Batch Execution Service endpoint. Keys must match the names of web service parameters defined in the published Azure ML web service. Values will be passed in the GlobalParameters property of the Azure ML batch execution request.
@@ -11276,7 +10005,6 @@ type AzureMLBatchExecutionActivityTypeProperties struct {
WebServiceInputs map[string]*AzureMLWebServiceFile `json:"webServiceInputs"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureMLBatchExecutionActivityTypeProperties.
func (ambeatp AzureMLBatchExecutionActivityTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -11292,7 +10020,6 @@ func (ambeatp AzureMLBatchExecutionActivityTypeProperties) MarshalJSON() ([]byte
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureMLLinkedService azure ML Web Service linked service.
type AzureMLLinkedService struct {
// AzureMLLinkedServiceTypeProperties - Azure ML Web Service linked service properties.
@@ -11311,7 +10038,6 @@ type AzureMLLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureMLLinkedService.
func (amls AzureMLLinkedService) MarshalJSON() ([]byte, error) {
amls.Type = TypeAzureML
@@ -11340,439 +10066,366 @@ func (amls AzureMLLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return &amls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AzureMLLinkedService.
func (amls AzureMLLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &amls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureMLLinkedService struct.
func (amls *AzureMLLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -11854,7 +10507,6 @@ func (amls *AzureMLLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureMLLinkedServiceTypeProperties azure ML Web Service linked service properties.
type AzureMLLinkedServiceTypeProperties struct {
// MlEndpoint - The Batch Execution REST URL for an Azure ML Web Service endpoint. Type: string (or Expression with resultType string).
@@ -11873,7 +10525,6 @@ type AzureMLLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureMLLinkedServiceTypeProperties struct.
func (amlstp *AzureMLLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -11950,7 +10601,6 @@ func (amlstp *AzureMLLinkedServiceTypeProperties) UnmarshalJSON(body []byte) err
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureMLUpdateResourceActivity azure ML Update Resource management activity.
type AzureMLUpdateResourceActivity struct {
// AzureMLUpdateResourceActivityTypeProperties - Azure ML Update Resource management activity properties.
@@ -11971,7 +10621,6 @@ type AzureMLUpdateResourceActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) MarshalJSON() ([]byte, error) {
amura.Type = TypeAzureMLUpdateResource
@@ -12003,175 +10652,146 @@ func (amura AzureMLUpdateResourceActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return &amura, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &amura, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for AzureMLUpdateResourceActivity.
func (amura AzureMLUpdateResourceActivity) AsBasicActivity() (BasicActivity, bool) {
return &amura, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureMLUpdateResourceActivity struct.
func (amura *AzureMLUpdateResourceActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -12262,7 +10882,6 @@ func (amura *AzureMLUpdateResourceActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureMLUpdateResourceActivityTypeProperties azure ML Update Resource activity properties.
type AzureMLUpdateResourceActivityTypeProperties struct {
// TrainedModelName - Name of the Trained Model module in the Web Service experiment to be updated. Type: string (or Expression with resultType string).
@@ -12273,7 +10892,6 @@ type AzureMLUpdateResourceActivityTypeProperties struct {
TrainedModelFilePath interface{} `json:"trainedModelFilePath,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureMLWebServiceFile azure ML WebService Input/Output file
type AzureMLWebServiceFile struct {
// FilePath - The relative file path, including container name, in the Azure Blob Storage specified by the LinkedService. Type: string (or Expression with resultType string).
@@ -12282,7 +10900,6 @@ type AzureMLWebServiceFile struct {
LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureMySQLLinkedService azure MySQL database linked service.
type AzureMySQLLinkedService struct {
// AzureMySQLLinkedServiceTypeProperties - Azure MySQL database linked service properties.
@@ -12301,7 +10918,6 @@ type AzureMySQLLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) MarshalJSON() ([]byte, error) {
amsls.Type = TypeAzureMySQL
@@ -12330,439 +10946,366 @@ func (amsls AzureMySQLLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return &amsls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AzureMySQLLinkedService.
func (amsls AzureMySQLLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &amsls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureMySQLLinkedService struct.
func (amsls *AzureMySQLLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -12844,7 +11387,6 @@ func (amsls *AzureMySQLLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureMySQLLinkedServiceTypeProperties azure MySQL database linked service properties.
type AzureMySQLLinkedServiceTypeProperties struct {
// ConnectionString - The connection string.
@@ -12853,7 +11395,6 @@ type AzureMySQLLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureMySQLLinkedServiceTypeProperties struct.
func (amslstp *AzureMySQLLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -12886,7 +11427,6 @@ func (amslstp *AzureMySQLLinkedServiceTypeProperties) UnmarshalJSON(body []byte)
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureMySQLSource a copy activity Azure MySQL source.
type AzureMySQLSource struct {
// Query - Database query. Type: string (or Expression with resultType string).
@@ -12901,7 +11441,6 @@ type AzureMySQLSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureMySQLSource.
func (amss AzureMySQLSource) MarshalJSON() ([]byte, error) {
amss.Type = TypeAzureMySQLSource
@@ -12918,319 +11457,266 @@ func (amss AzureMySQLSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return &amss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for AzureMySQLSource.
func (amss AzureMySQLSource) AsBasicCopySource() (BasicCopySource, bool) {
return &amss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureMySQLTableDataset the Azure MySQL database dataset.
type AzureMySQLTableDataset struct {
// AzureMySQLTableDatasetTypeProperties - Azure MySQL database dataset properties.
@@ -13251,7 +11737,6 @@ type AzureMySQLTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) MarshalJSON() ([]byte, error) {
amstd.Type = TypeAzureMySQLTable
@@ -13281,337 +11766,281 @@ func (amstd AzureMySQLTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return &amstd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for AzureMySQLTableDataset.
func (amstd AzureMySQLTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &amstd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureMySQLTableDataset struct.
func (amstd *AzureMySQLTableDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -13702,14 +12131,12 @@ func (amstd *AzureMySQLTableDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureMySQLTableDatasetTypeProperties azure MySQL database dataset properties.
type AzureMySQLTableDatasetTypeProperties struct {
// TableName - The Azure MySQL database table name. Type: string (or Expression with resultType string).
TableName interface{} `json:"tableName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzurePostgreSQLLinkedService azure PostgreSQL linked service.
type AzurePostgreSQLLinkedService struct {
// AzurePostgreSQLLinkedServiceTypeProperties - Azure PostgreSQL linked service properties.
@@ -13728,7 +12155,6 @@ type AzurePostgreSQLLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) MarshalJSON() ([]byte, error) {
apsls.Type = TypeAzurePostgreSQL
@@ -13757,439 +12183,366 @@ func (apsls AzurePostgreSQLLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return &apsls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AzurePostgreSQLLinkedService.
func (apsls AzurePostgreSQLLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &apsls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzurePostgreSQLLinkedService struct.
func (apsls *AzurePostgreSQLLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -14271,7 +12624,6 @@ func (apsls *AzurePostgreSQLLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzurePostgreSQLLinkedServiceTypeProperties azure PostgreSQL linked service properties.
type AzurePostgreSQLLinkedServiceTypeProperties struct {
// ConnectionString - An ODBC connection string.
@@ -14280,7 +12632,6 @@ type AzurePostgreSQLLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzurePostgreSQLLinkedServiceTypeProperties struct.
func (apslstp *AzurePostgreSQLLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -14313,7 +12664,6 @@ func (apslstp *AzurePostgreSQLLinkedServiceTypeProperties) UnmarshalJSON(body []
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzurePostgreSQLSource a copy activity Azure PostgreSQL source.
type AzurePostgreSQLSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -14328,7 +12678,6 @@ type AzurePostgreSQLSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) MarshalJSON() ([]byte, error) {
apss.Type = TypeAzurePostgreSQLSource
@@ -14345,319 +12694,266 @@ func (apss AzurePostgreSQLSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return &apss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for AzurePostgreSQLSource.
func (apss AzurePostgreSQLSource) AsBasicCopySource() (BasicCopySource, bool) {
return &apss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzurePostgreSQLTableDataset azure PostgreSQL dataset.
type AzurePostgreSQLTableDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -14676,7 +12972,6 @@ type AzurePostgreSQLTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) MarshalJSON() ([]byte, error) {
apstd.Type = TypeAzurePostgreSQLTable
@@ -14703,337 +12998,281 @@ func (apstd AzurePostgreSQLTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return &apstd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for AzurePostgreSQLTableDataset.
func (apstd AzurePostgreSQLTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &apstd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureQueueSink a copy activity Azure Queue sink.
type AzureQueueSink struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -15050,7 +13289,6 @@ type AzureQueueSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureQueueSink.
func (aqs AzureQueueSink) MarshalJSON() ([]byte, error) {
aqs.Type = TypeAzureQueueSink
@@ -15068,103 +13306,86 @@ func (aqs AzureQueueSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return &aqs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for AzureQueueSink.
func (aqs AzureQueueSink) AsBasicCopySink() (BasicCopySink, bool) {
return &aqs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSearchIndexDataset the Azure Search Index.
type AzureSearchIndexDataset struct {
// AzureSearchIndexDatasetTypeProperties - Properties specific to this dataset type.
@@ -15185,7 +13406,6 @@ type AzureSearchIndexDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) MarshalJSON() ([]byte, error) {
asid.Type = TypeAzureSearchIndex
@@ -15215,337 +13435,281 @@ func (asid AzureSearchIndexDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return &asid, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for AzureSearchIndexDataset.
func (asid AzureSearchIndexDataset) AsBasicDataset() (BasicDataset, bool) {
return &asid, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureSearchIndexDataset struct.
func (asid *AzureSearchIndexDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -15636,14 +13800,12 @@ func (asid *AzureSearchIndexDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSearchIndexDatasetTypeProperties properties specific to this dataset type.
type AzureSearchIndexDatasetTypeProperties struct {
// IndexName - The name of the Azure Search Index. Type: string (or Expression with resultType string).
IndexName interface{} `json:"indexName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSearchIndexSink a copy activity Azure Search Index sink.
type AzureSearchIndexSink struct {
// WriteBehavior - Specify the write behavior when upserting documents into Azure Search Index. Possible values include: 'Merge', 'Upload'
@@ -15662,7 +13824,6 @@ type AzureSearchIndexSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) MarshalJSON() ([]byte, error) {
asis.Type = TypeAzureSearchIndexSink
@@ -15683,103 +13844,86 @@ func (asis AzureSearchIndexSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return &asis, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for AzureSearchIndexSink.
func (asis AzureSearchIndexSink) AsBasicCopySink() (BasicCopySink, bool) {
return &asis, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSearchLinkedService linked service for Windows Azure Search Service.
type AzureSearchLinkedService struct {
// AzureSearchLinkedServiceTypeProperties - Windows Azure Search Service linked service properties.
@@ -15798,7 +13942,6 @@ type AzureSearchLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) MarshalJSON() ([]byte, error) {
asls.Type = TypeAzureSearch
@@ -15827,439 +13970,366 @@ func (asls AzureSearchLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return &asls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AzureSearchLinkedService.
func (asls AzureSearchLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &asls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureSearchLinkedService struct.
func (asls *AzureSearchLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -16341,7 +14411,6 @@ func (asls *AzureSearchLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSearchLinkedServiceTypeProperties windows Azure Search Service linked service properties.
type AzureSearchLinkedServiceTypeProperties struct {
// URL - URL for Azure Search service. Type: string (or Expression with resultType string).
@@ -16352,7 +14421,6 @@ type AzureSearchLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureSearchLinkedServiceTypeProperties struct.
func (aslstp *AzureSearchLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -16394,7 +14462,6 @@ func (aslstp *AzureSearchLinkedServiceTypeProperties) UnmarshalJSON(body []byte)
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSQLDatabaseLinkedService microsoft Azure SQL Database linked service.
type AzureSQLDatabaseLinkedService struct {
// AzureSQLDatabaseLinkedServiceTypeProperties - Azure SQL Database linked service properties.
@@ -16413,7 +14480,6 @@ type AzureSQLDatabaseLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) MarshalJSON() ([]byte, error) {
asdls.Type = TypeAzureSQLDatabase
@@ -16442,439 +14508,366 @@ func (asdls AzureSQLDatabaseLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return &asdls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AzureSQLDatabaseLinkedService.
func (asdls AzureSQLDatabaseLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &asdls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureSQLDatabaseLinkedService struct.
func (asdls *AzureSQLDatabaseLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -16956,7 +14949,6 @@ func (asdls *AzureSQLDatabaseLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSQLDatabaseLinkedServiceTypeProperties azure SQL Database linked service properties.
type AzureSQLDatabaseLinkedServiceTypeProperties struct {
// ConnectionString - The connection string.
@@ -16971,7 +14963,6 @@ type AzureSQLDatabaseLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureSQLDatabaseLinkedServiceTypeProperties struct.
func (asdlstp *AzureSQLDatabaseLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -17030,7 +15021,6 @@ func (asdlstp *AzureSQLDatabaseLinkedServiceTypeProperties) UnmarshalJSON(body [
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSQLDWLinkedService azure SQL Data Warehouse linked service.
type AzureSQLDWLinkedService struct {
// AzureSQLDWLinkedServiceTypeProperties - Azure SQL Data Warehouse linked service properties.
@@ -17049,7 +15039,6 @@ type AzureSQLDWLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) MarshalJSON() ([]byte, error) {
asdls.Type = TypeAzureSQLDW
@@ -17078,439 +15067,366 @@ func (asdls AzureSQLDWLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return &asdls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AzureSQLDWLinkedService.
func (asdls AzureSQLDWLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &asdls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureSQLDWLinkedService struct.
func (asdls *AzureSQLDWLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -17592,7 +15508,6 @@ func (asdls *AzureSQLDWLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSQLDWLinkedServiceTypeProperties azure SQL Data Warehouse linked service properties.
type AzureSQLDWLinkedServiceTypeProperties struct {
// ConnectionString - The connection string.
@@ -17607,7 +15522,6 @@ type AzureSQLDWLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureSQLDWLinkedServiceTypeProperties struct.
func (asdlstp *AzureSQLDWLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -17666,7 +15580,6 @@ func (asdlstp *AzureSQLDWLinkedServiceTypeProperties) UnmarshalJSON(body []byte)
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSQLDWTableDataset the Azure SQL Data Warehouse dataset.
type AzureSQLDWTableDataset struct {
// AzureSQLDWTableDatasetTypeProperties - Azure SQL Data Warehouse dataset properties.
@@ -17687,7 +15600,6 @@ type AzureSQLDWTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) MarshalJSON() ([]byte, error) {
asdtd.Type = TypeAzureSQLDWTable
@@ -17717,337 +15629,281 @@ func (asdtd AzureSQLDWTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return &asdtd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for AzureSQLDWTableDataset.
func (asdtd AzureSQLDWTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &asdtd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureSQLDWTableDataset struct.
func (asdtd *AzureSQLDWTableDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -18138,14 +15994,12 @@ func (asdtd *AzureSQLDWTableDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSQLDWTableDatasetTypeProperties azure SQL Data Warehouse dataset properties.
type AzureSQLDWTableDatasetTypeProperties struct {
// TableName - The table name of the Azure SQL Data Warehouse. Type: string (or Expression with resultType string).
TableName interface{} `json:"tableName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSQLTableDataset the Azure SQL Server database dataset.
type AzureSQLTableDataset struct {
// AzureSQLTableDatasetTypeProperties - Azure SQL dataset properties.
@@ -18166,7 +16020,6 @@ type AzureSQLTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) MarshalJSON() ([]byte, error) {
astd.Type = TypeAzureSQLTable
@@ -18196,337 +16049,281 @@ func (astd AzureSQLTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return &astd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for AzureSQLTableDataset.
func (astd AzureSQLTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &astd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureSQLTableDataset struct.
func (astd *AzureSQLTableDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -18617,14 +16414,12 @@ func (astd *AzureSQLTableDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureSQLTableDatasetTypeProperties azure SQL dataset properties.
type AzureSQLTableDatasetTypeProperties struct {
// TableName - The table name of the Azure SQL database. Type: string (or Expression with resultType string).
TableName interface{} `json:"tableName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureStorageLinkedService the storage account linked service.
type AzureStorageLinkedService struct {
// AzureStorageLinkedServiceTypeProperties - Azure Storage linked service properties.
@@ -18643,7 +16438,6 @@ type AzureStorageLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) MarshalJSON() ([]byte, error) {
asls.Type = TypeAzureStorage
@@ -18672,439 +16466,366 @@ func (asls AzureStorageLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return &asls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for AzureStorageLinkedService.
func (asls AzureStorageLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &asls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureStorageLinkedService struct.
func (asls *AzureStorageLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -19186,7 +16907,6 @@ func (asls *AzureStorageLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureStorageLinkedServiceTypeProperties azure Storage linked service properties.
type AzureStorageLinkedServiceTypeProperties struct {
// ConnectionString - The connection string. It is mutually exclusive with sasUri property.
@@ -19197,7 +16917,6 @@ type AzureStorageLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureStorageLinkedServiceTypeProperties struct.
func (aslstp *AzureStorageLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -19238,7 +16957,6 @@ func (aslstp *AzureStorageLinkedServiceTypeProperties) UnmarshalJSON(body []byte
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureTableDataset the Azure Table storage dataset.
type AzureTableDataset struct {
// AzureTableDatasetTypeProperties - Azure Table dataset properties.
@@ -19259,7 +16977,6 @@ type AzureTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureTableDataset.
func (atd AzureTableDataset) MarshalJSON() ([]byte, error) {
atd.Type = TypeAzureTable
@@ -19289,337 +17006,281 @@ func (atd AzureTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return &atd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for AzureTableDataset.
func (atd AzureTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &atd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for AzureTableDataset struct.
func (atd *AzureTableDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -19710,14 +17371,12 @@ func (atd *AzureTableDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureTableDatasetTypeProperties azure Table dataset properties.
type AzureTableDatasetTypeProperties struct {
// TableName - The table name of the Azure Table storage. Type: string (or Expression with resultType string).
TableName interface{} `json:"tableName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureTableSink a copy activity Azure Table sink.
type AzureTableSink struct {
// AzureTableDefaultPartitionKeyValue - Azure Table default partition key value. Type: string (or Expression with resultType string).
@@ -19742,7 +17401,6 @@ type AzureTableSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureTableSink.
func (ats AzureTableSink) MarshalJSON() ([]byte, error) {
ats.Type = TypeAzureTableSink
@@ -19764,103 +17422,86 @@ func (ats AzureTableSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsAzureTableSink() (*AzureTableSink, bool) {
return &ats, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for AzureTableSink.
func (ats AzureTableSink) AsBasicCopySink() (BasicCopySink, bool) {
return &ats, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AzureTableSource a copy activity Azure Table source.
type AzureTableSource struct {
// AzureTableSourceQuery - Azure Table source query. Type: string (or Expression with resultType string).
@@ -19877,7 +17518,6 @@ type AzureTableSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for AzureTableSource.
func (ats AzureTableSource) MarshalJSON() ([]byte, error) {
ats.Type = TypeAzureTableSource
@@ -19895,319 +17535,266 @@ func (ats AzureTableSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsAzureTableSource() (*AzureTableSource, bool) {
return &ats, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for AzureTableSource.
func (ats AzureTableSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ats, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BlobSink a copy activity Azure Blob sink.
type BlobSink struct {
// BlobWriterOverwriteFiles - Blob writer overwrite files. Type: boolean (or Expression with resultType boolean).
@@ -20232,7 +17819,6 @@ type BlobSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for BlobSink.
func (bs BlobSink) MarshalJSON() ([]byte, error) {
bs.Type = TypeBlobSink
@@ -20256,103 +17842,86 @@ func (bs BlobSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsBlobSink() (*BlobSink, bool) {
return &bs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for BlobSink.
func (bs BlobSink) AsBasicCopySink() (BasicCopySink, bool) {
return &bs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BlobSource a copy activity Azure Blob source.
type BlobSource struct {
// TreatEmptyAsNull - Treat empty as null. Type: boolean (or Expression with resultType boolean).
@@ -20371,7 +17940,6 @@ type BlobSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for BlobSource.
func (bs BlobSource) MarshalJSON() ([]byte, error) {
bs.Type = TypeBlobSource
@@ -20390,319 +17958,266 @@ func (bs BlobSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsBlobSource() (*BlobSource, bool) {
return &bs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for BlobSource.
func (bs BlobSource) AsBasicCopySource() (BasicCopySource, bool) {
return &bs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BlobTrigger trigger that runs everytime the selected Blob container changes.
type BlobTrigger struct {
// BlobTriggerTypeProperties - Blob Trigger properties.
@@ -20719,7 +18234,6 @@ type BlobTrigger struct {
Type TypeBasicTrigger `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for BlobTrigger.
func (bt BlobTrigger) MarshalJSON() ([]byte, error) {
bt.Type = TypeBlobTrigger
@@ -20745,49 +18259,41 @@ func (bt BlobTrigger) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTumblingWindowTrigger is the BasicTrigger implementation for BlobTrigger.
func (bt BlobTrigger) AsTumblingWindowTrigger() (*TumblingWindowTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobTrigger is the BasicTrigger implementation for BlobTrigger.
func (bt BlobTrigger) AsBlobTrigger() (*BlobTrigger, bool) {
return &bt, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsScheduleTrigger is the BasicTrigger implementation for BlobTrigger.
func (bt BlobTrigger) AsScheduleTrigger() (*ScheduleTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMultiplePipelineTrigger is the BasicTrigger implementation for BlobTrigger.
func (bt BlobTrigger) AsMultiplePipelineTrigger() (*MultiplePipelineTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicMultiplePipelineTrigger is the BasicTrigger implementation for BlobTrigger.
func (bt BlobTrigger) AsBasicMultiplePipelineTrigger() (BasicMultiplePipelineTrigger, bool) {
return &bt, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTrigger is the BasicTrigger implementation for BlobTrigger.
func (bt BlobTrigger) AsTrigger() (*Trigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicTrigger is the BasicTrigger implementation for BlobTrigger.
func (bt BlobTrigger) AsBasicTrigger() (BasicTrigger, bool) {
return &bt, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for BlobTrigger struct.
func (bt *BlobTrigger) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -20860,7 +18366,6 @@ func (bt *BlobTrigger) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BlobTriggerTypeProperties blob Trigger properties.
type BlobTriggerTypeProperties struct {
// FolderPath - The path of the container/folder that will trigger the pipeline.
@@ -20871,7 +18376,6 @@ type BlobTriggerTypeProperties struct {
LinkedService *LinkedServiceReference `json:"linkedService,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CassandraLinkedService linked service for Cassandra data source.
type CassandraLinkedService struct {
// CassandraLinkedServiceTypeProperties - Cassandra linked service properties.
@@ -20890,7 +18394,6 @@ type CassandraLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CassandraLinkedService.
func (cls CassandraLinkedService) MarshalJSON() ([]byte, error) {
cls.Type = TypeCassandra
@@ -20919,439 +18422,366 @@ func (cls CassandraLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return &cls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for CassandraLinkedService.
func (cls CassandraLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &cls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for CassandraLinkedService struct.
func (cls *CassandraLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -21433,7 +18863,6 @@ func (cls *CassandraLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CassandraLinkedServiceTypeProperties cassandra linked service properties.
type CassandraLinkedServiceTypeProperties struct {
// Host - Host name for connection. Type: string (or Expression with resultType string).
@@ -21450,7 +18879,6 @@ type CassandraLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for CassandraLinkedServiceTypeProperties struct.
func (clstp *CassandraLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -21519,7 +18947,6 @@ func (clstp *CassandraLinkedServiceTypeProperties) UnmarshalJSON(body []byte) er
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CassandraSource a copy activity source for a Cassandra database.
type CassandraSource struct {
// Query - Database query. Should be a SQL-92 query expression or Cassandra Query Language (CQL) command. Type: string (or Expression with resultType string).
@@ -21536,7 +18963,6 @@ type CassandraSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CassandraSource.
func (cs CassandraSource) MarshalJSON() ([]byte, error) {
cs.Type = TypeCassandraSource
@@ -21556,319 +18982,266 @@ func (cs CassandraSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsCassandraSource() (*CassandraSource, bool) {
return &cs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for CassandraSource.
func (cs CassandraSource) AsBasicCopySource() (BasicCopySource, bool) {
return &cs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CassandraTableDataset the Cassandra database dataset.
type CassandraTableDataset struct {
// CassandraTableDatasetTypeProperties - Cassandra dataset properties.
@@ -21889,7 +19262,6 @@ type CassandraTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CassandraTableDataset.
func (ctd CassandraTableDataset) MarshalJSON() ([]byte, error) {
ctd.Type = TypeCassandraTable
@@ -21919,337 +19291,281 @@ func (ctd CassandraTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return &ctd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for CassandraTableDataset.
func (ctd CassandraTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &ctd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for CassandraTableDataset struct.
func (ctd *CassandraTableDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -22340,7 +19656,6 @@ func (ctd *CassandraTableDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CassandraTableDatasetTypeProperties cassandra dataset properties.
type CassandraTableDatasetTypeProperties struct {
// TableName - The table name of the Cassandra database. Type: string (or Expression with resultType string).
@@ -22349,7 +19664,6 @@ type CassandraTableDatasetTypeProperties struct {
Keyspace interface{} `json:"keyspace,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ConcurLinkedService concur Serivce linked service.
type ConcurLinkedService struct {
// ConcurLinkedServiceTypeProperties - Concur Serivce linked service properties.
@@ -22368,7 +19682,6 @@ type ConcurLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ConcurLinkedService.
func (cls ConcurLinkedService) MarshalJSON() ([]byte, error) {
cls.Type = TypeConcur
@@ -22397,439 +19710,366 @@ func (cls ConcurLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return &cls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for ConcurLinkedService.
func (cls ConcurLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &cls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ConcurLinkedService struct.
func (cls *ConcurLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -22911,7 +20151,6 @@ func (cls *ConcurLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ConcurLinkedServiceTypeProperties concur Serivce linked service properties.
type ConcurLinkedServiceTypeProperties struct {
// ClientID - Application client_id supplied by Concur App Management.
@@ -22930,7 +20169,6 @@ type ConcurLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ConcurLinkedServiceTypeProperties struct.
func (clstp *ConcurLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -23008,7 +20246,6 @@ func (clstp *ConcurLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ConcurObjectDataset concur Serivce dataset.
type ConcurObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -23027,7 +20264,6 @@ type ConcurObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ConcurObjectDataset.
func (cod ConcurObjectDataset) MarshalJSON() ([]byte, error) {
cod.Type = TypeConcurObject
@@ -23054,337 +20290,281 @@ func (cod ConcurObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return &cod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for ConcurObjectDataset.
func (cod ConcurObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &cod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ConcurSource a copy activity Concur Serivce source.
type ConcurSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -23399,7 +20579,6 @@ type ConcurSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ConcurSource.
func (cs ConcurSource) MarshalJSON() ([]byte, error) {
cs.Type = TypeConcurSource
@@ -23416,319 +20595,266 @@ func (cs ConcurSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsConcurSource() (*ConcurSource, bool) {
return &cs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for ConcurSource.
func (cs ConcurSource) AsBasicCopySource() (BasicCopySource, bool) {
return &cs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicControlActivity base class for all control activities like IfCondition, ForEach , Until.
type BasicControlActivity interface {
AsFilterActivity() (*FilterActivity, bool)
@@ -23740,7 +20866,6 @@ type BasicControlActivity interface {
AsControlActivity() (*ControlActivity, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ControlActivity base class for all control activities like IfCondition, ForEach , Until.
type ControlActivity struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -23812,7 +20937,6 @@ func unmarshalBasicControlActivityArray(body []byte) ([]BasicControlActivity, er
return caArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ControlActivity.
func (ca ControlActivity) MarshalJSON() ([]byte, error) {
ca.Type = TypeContainer
@@ -23835,175 +20959,146 @@ func (ca ControlActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsControlActivity() (*ControlActivity, bool) {
return &ca, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return &ca, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for ControlActivity.
func (ca ControlActivity) AsBasicActivity() (BasicActivity, bool) {
return &ca, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CopyActivity copy activity.
type CopyActivity struct {
// CopyActivityTypeProperties - Copy activity properties.
@@ -24028,7 +21123,6 @@ type CopyActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CopyActivity.
func (ca CopyActivity) MarshalJSON() ([]byte, error) {
ca.Type = TypeCopy
@@ -24066,175 +21160,146 @@ func (ca CopyActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsCopyActivity() (*CopyActivity, bool) {
return &ca, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &ca, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for CopyActivity.
func (ca CopyActivity) AsBasicActivity() (BasicActivity, bool) {
return &ca, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for CopyActivity struct.
func (ca *CopyActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -24343,7 +21408,6 @@ func (ca *CopyActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CopyActivityTypeProperties copy activity properties.
type CopyActivityTypeProperties struct {
// Source - Copy activity source.
@@ -24366,7 +21430,6 @@ type CopyActivityTypeProperties struct {
RedirectIncompatibleRowSettings *RedirectIncompatibleRowSettings `json:"redirectIncompatibleRowSettings,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for CopyActivityTypeProperties struct.
func (catp *CopyActivityTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -24460,7 +21523,6 @@ func (catp *CopyActivityTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicCopySink a copy activity sink.
type BasicCopySink interface {
AsSalesforceSink() (*SalesforceSink, bool)
@@ -24480,7 +21542,6 @@ type BasicCopySink interface {
AsCopySink() (*CopySink, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CopySink a copy activity sink.
type CopySink struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -24586,7 +21647,6 @@ func unmarshalBasicCopySinkArray(body []byte) ([]BasicCopySink, error) {
return csArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CopySink.
func (cs CopySink) MarshalJSON() ([]byte, error) {
cs.Type = TypeCopySink
@@ -24604,103 +21664,86 @@ func (cs CopySink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsCopySink() (*CopySink, bool) {
return &cs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for CopySink.
func (cs CopySink) AsBasicCopySink() (BasicCopySink, bool) {
return &cs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicCopySource a copy activity source.
type BasicCopySource interface {
AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool)
@@ -24756,7 +21799,6 @@ type BasicCopySource interface {
AsCopySource() (*CopySource, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CopySource a copy activity source.
type CopySource struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -25002,7 +22044,6 @@ func unmarshalBasicCopySourceArray(body []byte) ([]BasicCopySource, error) {
return csArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CopySource.
func (cs CopySource) MarshalJSON() ([]byte, error) {
cs.Type = TypeCopySource
@@ -25018,326 +22059,272 @@ func (cs CopySource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsCopySource() (*CopySource, bool) {
return &cs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for CopySource.
func (cs CopySource) AsBasicCopySource() (BasicCopySource, bool) {
return &cs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicCopyTranslator a copy activity translator.
type BasicCopyTranslator interface {
AsTabularTranslator() (*TabularTranslator, bool)
AsCopyTranslator() (*CopyTranslator, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CopyTranslator a copy activity translator.
type CopyTranslator struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -25383,7 +22370,6 @@ func unmarshalBasicCopyTranslatorArray(body []byte) ([]BasicCopyTranslator, erro
return ctArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CopyTranslator.
func (ct CopyTranslator) MarshalJSON() ([]byte, error) {
ct.Type = TypeCopyTranslator
@@ -25397,25 +22383,21 @@ func (ct CopyTranslator) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTabularTranslator is the BasicCopyTranslator implementation for CopyTranslator.
func (ct CopyTranslator) AsTabularTranslator() (*TabularTranslator, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyTranslator is the BasicCopyTranslator implementation for CopyTranslator.
func (ct CopyTranslator) AsCopyTranslator() (*CopyTranslator, bool) {
return &ct, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopyTranslator is the BasicCopyTranslator implementation for CopyTranslator.
func (ct CopyTranslator) AsBasicCopyTranslator() (BasicCopyTranslator, bool) {
return &ct, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CosmosDbLinkedService microsoft Azure Cosmos Database (CosmosDB) linked service.
type CosmosDbLinkedService struct {
// CosmosDbLinkedServiceTypeProperties - CosmosDB linked service properties.
@@ -25434,7 +22416,6 @@ type CosmosDbLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) MarshalJSON() ([]byte, error) {
cdls.Type = TypeCosmosDb
@@ -25463,439 +22444,366 @@ func (cdls CosmosDbLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return &cdls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for CosmosDbLinkedService.
func (cdls CosmosDbLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &cdls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for CosmosDbLinkedService struct.
func (cdls *CosmosDbLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -25977,7 +22885,6 @@ func (cdls *CosmosDbLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CosmosDbLinkedServiceTypeProperties cosmosDB linked service properties.
type CosmosDbLinkedServiceTypeProperties struct {
// ConnectionString - The connection string.
@@ -25986,7 +22893,6 @@ type CosmosDbLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for CosmosDbLinkedServiceTypeProperties struct.
func (cdlstp *CosmosDbLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -26019,7 +22925,6 @@ func (cdlstp *CosmosDbLinkedServiceTypeProperties) UnmarshalJSON(body []byte) er
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CouchbaseLinkedService couchbase server linked service.
type CouchbaseLinkedService struct {
// CouchbaseLinkedServiceTypeProperties - Couchbase server linked service properties.
@@ -26038,7 +22943,6 @@ type CouchbaseLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) MarshalJSON() ([]byte, error) {
cls.Type = TypeCouchbase
@@ -26067,439 +22971,366 @@ func (cls CouchbaseLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return &cls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for CouchbaseLinkedService.
func (cls CouchbaseLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &cls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for CouchbaseLinkedService struct.
func (cls *CouchbaseLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -26581,7 +23412,6 @@ func (cls *CouchbaseLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CouchbaseLinkedServiceTypeProperties couchbase server linked service properties.
type CouchbaseLinkedServiceTypeProperties struct {
// ConnectionString - An ODBC connection string.
@@ -26590,7 +23420,6 @@ type CouchbaseLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for CouchbaseLinkedServiceTypeProperties struct.
func (clstp *CouchbaseLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -26623,7 +23452,6 @@ func (clstp *CouchbaseLinkedServiceTypeProperties) UnmarshalJSON(body []byte) er
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CouchbaseSource a copy activity Couchbase server source.
type CouchbaseSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -26638,7 +23466,6 @@ type CouchbaseSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CouchbaseSource.
func (cs CouchbaseSource) MarshalJSON() ([]byte, error) {
cs.Type = TypeCouchbaseSource
@@ -26655,319 +23482,266 @@ func (cs CouchbaseSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return &cs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for CouchbaseSource.
func (cs CouchbaseSource) AsBasicCopySource() (BasicCopySource, bool) {
return &cs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CouchbaseTableDataset couchbase server dataset.
type CouchbaseTableDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -26986,7 +23760,6 @@ type CouchbaseTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) MarshalJSON() ([]byte, error) {
ctd.Type = TypeCouchbaseTable
@@ -27013,337 +23786,281 @@ func (ctd CouchbaseTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return &ctd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for CouchbaseTableDataset.
func (ctd CouchbaseTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &ctd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateRunResponse response body with a run identifier.
type CreateRunResponse struct {
autorest.Response `json:"-"`
@@ -27351,7 +24068,6 @@ type CreateRunResponse struct {
RunID *string `json:"runId,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CustomActivity custom activity type.
type CustomActivity struct {
// CustomActivityTypeProperties - Custom activity properties.
@@ -27372,7 +24088,6 @@ type CustomActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CustomActivity.
func (ca CustomActivity) MarshalJSON() ([]byte, error) {
ca.Type = TypeCustom
@@ -27404,175 +24119,146 @@ func (ca CustomActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsCustomActivity() (*CustomActivity, bool) {
return &ca, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &ca, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for CustomActivity.
func (ca CustomActivity) AsBasicActivity() (BasicActivity, bool) {
return &ca, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for CustomActivity struct.
func (ca *CustomActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -27663,7 +24349,6 @@ func (ca *CustomActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CustomActivityReferenceObject reference objects for custom activity
type CustomActivityReferenceObject struct {
// LinkedServices - Linked service references.
@@ -27672,7 +24357,6 @@ type CustomActivityReferenceObject struct {
Datasets *[]DatasetReference `json:"datasets,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CustomActivityTypeProperties custom activity properties.
type CustomActivityTypeProperties struct {
// Command - Command for custom activity Type: string (or Expression with resultType string).
@@ -27687,7 +24371,6 @@ type CustomActivityTypeProperties struct {
ExtendedProperties map[string]interface{} `json:"extendedProperties"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CustomActivityTypeProperties.
func (catp CustomActivityTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -27705,7 +24388,6 @@ func (catp CustomActivityTypeProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CustomDataset the custom dataset.
type CustomDataset struct {
// TypeProperties - Custom dataset properties.
@@ -27726,7 +24408,6 @@ type CustomDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CustomDataset.
func (cd CustomDataset) MarshalJSON() ([]byte, error) {
cd.Type = TypeCustomDataset
@@ -27754,337 +24435,281 @@ func (cd CustomDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsCustomDataset() (*CustomDataset, bool) {
return &cd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for CustomDataset.
func (cd CustomDataset) AsBasicDataset() (BasicDataset, bool) {
return &cd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CustomDataSourceLinkedService custom linked service.
type CustomDataSourceLinkedService struct {
// TypeProperties - Custom linked service properties.
@@ -28103,7 +24728,6 @@ type CustomDataSourceLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) MarshalJSON() ([]byte, error) {
cdsls.Type = TypeCustomDataSource
@@ -28130,439 +24754,366 @@ func (cdsls CustomDataSourceLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return &cdsls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for CustomDataSourceLinkedService.
func (cdsls CustomDataSourceLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &cdsls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatabricksNotebookActivity databricksNotebook activity.
type DatabricksNotebookActivity struct {
// DatabricksNotebookActivityTypeProperties - Databricks Notebook activity properties.
@@ -28583,7 +25134,6 @@ type DatabricksNotebookActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) MarshalJSON() ([]byte, error) {
dna.Type = TypeDatabricksNotebook
@@ -28615,175 +25165,146 @@ func (dna DatabricksNotebookActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return &dna, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &dna, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for DatabricksNotebookActivity.
func (dna DatabricksNotebookActivity) AsBasicActivity() (BasicActivity, bool) {
return &dna, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for DatabricksNotebookActivity struct.
func (dna *DatabricksNotebookActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -28874,7 +25395,6 @@ func (dna *DatabricksNotebookActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatabricksNotebookActivityTypeProperties databricks Notebook activity properties.
type DatabricksNotebookActivityTypeProperties struct {
// NotebookPath - The absolute path of the notebook to be run in the Databricks Workspace. This path must begin with a slash. Type: string (or Expression with resultType string).
@@ -28883,7 +25403,6 @@ type DatabricksNotebookActivityTypeProperties struct {
BaseParameters map[string]interface{} `json:"baseParameters"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DatabricksNotebookActivityTypeProperties.
func (dnatp DatabricksNotebookActivityTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -28894,7 +25413,6 @@ func (dnatp DatabricksNotebookActivityTypeProperties) MarshalJSON() ([]byte, err
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DataLakeAnalyticsUSQLActivity data Lake Analytics U-SQL activity.
type DataLakeAnalyticsUSQLActivity struct {
// DataLakeAnalyticsUSQLActivityTypeProperties - Data Lake Analytics U-SQL activity properties.
@@ -28915,7 +25433,6 @@ type DataLakeAnalyticsUSQLActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) MarshalJSON() ([]byte, error) {
dlaua.Type = TypeDataLakeAnalyticsUSQL
@@ -28947,175 +25464,146 @@ func (dlaua DataLakeAnalyticsUSQLActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return &dlaua, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &dlaua, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for DataLakeAnalyticsUSQLActivity.
func (dlaua DataLakeAnalyticsUSQLActivity) AsBasicActivity() (BasicActivity, bool) {
return &dlaua, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for DataLakeAnalyticsUSQLActivity struct.
func (dlaua *DataLakeAnalyticsUSQLActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -29206,7 +25694,6 @@ func (dlaua *DataLakeAnalyticsUSQLActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DataLakeAnalyticsUSQLActivityTypeProperties dataLakeAnalyticsU-SQL activity properties.
type DataLakeAnalyticsUSQLActivityTypeProperties struct {
// ScriptPath - Case-sensitive path to folder that contains the U-SQL script. Type: string (or Expression with resultType string).
@@ -29225,7 +25712,6 @@ type DataLakeAnalyticsUSQLActivityTypeProperties struct {
CompilationMode interface{} `json:"compilationMode,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DataLakeAnalyticsUSQLActivityTypeProperties.
func (dlauatp DataLakeAnalyticsUSQLActivityTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -29243,7 +25729,6 @@ func (dlauatp DataLakeAnalyticsUSQLActivityTypeProperties) MarshalJSON() ([]byte
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicDataset the Azure Data Factory nested object which identifies data within different data stores, such as
// tables, files, folders, and documents.
type BasicDataset interface {
@@ -29303,7 +25788,6 @@ type BasicDataset interface {
AsDataset() (*Dataset, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Dataset the Azure Data Factory nested object which identifies data within different data stores, such as tables,
// files, folders, and documents.
type Dataset struct {
@@ -29568,7 +26052,6 @@ func unmarshalBasicDatasetArray(body []byte) ([]BasicDataset, error) {
return dArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for Dataset.
func (d Dataset) MarshalJSON() ([]byte, error) {
d.Type = TypeDataset
@@ -29595,337 +26078,281 @@ func (d Dataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsDataset() (*Dataset, bool) {
return &d, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for Dataset.
func (d Dataset) AsBasicDataset() (BasicDataset, bool) {
return &d, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatasetBZip2Compression the BZip2 compression method used on a dataset.
type DatasetBZip2Compression struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -29934,7 +26361,6 @@ type DatasetBZip2Compression struct {
Type TypeBasicDatasetCompression `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DatasetBZip2Compression.
func (dbz2c DatasetBZip2Compression) MarshalJSON() ([]byte, error) {
dbz2c.Type = TypeBZip2
@@ -29948,43 +26374,36 @@ func (dbz2c DatasetBZip2Compression) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetZipDeflateCompression is the BasicDatasetCompression implementation for DatasetBZip2Compression.
func (dbz2c DatasetBZip2Compression) AsDatasetZipDeflateCompression() (*DatasetZipDeflateCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetDeflateCompression is the BasicDatasetCompression implementation for DatasetBZip2Compression.
func (dbz2c DatasetBZip2Compression) AsDatasetDeflateCompression() (*DatasetDeflateCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetGZipCompression is the BasicDatasetCompression implementation for DatasetBZip2Compression.
func (dbz2c DatasetBZip2Compression) AsDatasetGZipCompression() (*DatasetGZipCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetBZip2Compression is the BasicDatasetCompression implementation for DatasetBZip2Compression.
func (dbz2c DatasetBZip2Compression) AsDatasetBZip2Compression() (*DatasetBZip2Compression, bool) {
return &dbz2c, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetCompression is the BasicDatasetCompression implementation for DatasetBZip2Compression.
func (dbz2c DatasetBZip2Compression) AsDatasetCompression() (*DatasetCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDatasetCompression is the BasicDatasetCompression implementation for DatasetBZip2Compression.
func (dbz2c DatasetBZip2Compression) AsBasicDatasetCompression() (BasicDatasetCompression, bool) {
return &dbz2c, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicDatasetCompression the compression method used on a dataset.
type BasicDatasetCompression interface {
AsDatasetZipDeflateCompression() (*DatasetZipDeflateCompression, bool)
@@ -29994,7 +26413,6 @@ type BasicDatasetCompression interface {
AsDatasetCompression() (*DatasetCompression, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatasetCompression the compression method used on a dataset.
type DatasetCompression struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -30052,7 +26470,6 @@ func unmarshalBasicDatasetCompressionArray(body []byte) ([]BasicDatasetCompressi
return dcArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DatasetCompression.
func (dc DatasetCompression) MarshalJSON() ([]byte, error) {
dc.Type = TypeDatasetCompression
@@ -30066,43 +26483,36 @@ func (dc DatasetCompression) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetZipDeflateCompression is the BasicDatasetCompression implementation for DatasetCompression.
func (dc DatasetCompression) AsDatasetZipDeflateCompression() (*DatasetZipDeflateCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetDeflateCompression is the BasicDatasetCompression implementation for DatasetCompression.
func (dc DatasetCompression) AsDatasetDeflateCompression() (*DatasetDeflateCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetGZipCompression is the BasicDatasetCompression implementation for DatasetCompression.
func (dc DatasetCompression) AsDatasetGZipCompression() (*DatasetGZipCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetBZip2Compression is the BasicDatasetCompression implementation for DatasetCompression.
func (dc DatasetCompression) AsDatasetBZip2Compression() (*DatasetBZip2Compression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetCompression is the BasicDatasetCompression implementation for DatasetCompression.
func (dc DatasetCompression) AsDatasetCompression() (*DatasetCompression, bool) {
return &dc, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDatasetCompression is the BasicDatasetCompression implementation for DatasetCompression.
func (dc DatasetCompression) AsBasicDatasetCompression() (BasicDatasetCompression, bool) {
return &dc, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatasetDeflateCompression the Deflate compression method used on a dataset.
type DatasetDeflateCompression struct {
// Level - The Deflate compression level. Possible values include: 'Optimal', 'Fastest'
@@ -30113,7 +26523,6 @@ type DatasetDeflateCompression struct {
Type TypeBasicDatasetCompression `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DatasetDeflateCompression.
func (ddc DatasetDeflateCompression) MarshalJSON() ([]byte, error) {
ddc.Type = TypeDeflate
@@ -30130,43 +26539,36 @@ func (ddc DatasetDeflateCompression) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetZipDeflateCompression is the BasicDatasetCompression implementation for DatasetDeflateCompression.
func (ddc DatasetDeflateCompression) AsDatasetZipDeflateCompression() (*DatasetZipDeflateCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetDeflateCompression is the BasicDatasetCompression implementation for DatasetDeflateCompression.
func (ddc DatasetDeflateCompression) AsDatasetDeflateCompression() (*DatasetDeflateCompression, bool) {
return &ddc, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetGZipCompression is the BasicDatasetCompression implementation for DatasetDeflateCompression.
func (ddc DatasetDeflateCompression) AsDatasetGZipCompression() (*DatasetGZipCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetBZip2Compression is the BasicDatasetCompression implementation for DatasetDeflateCompression.
func (ddc DatasetDeflateCompression) AsDatasetBZip2Compression() (*DatasetBZip2Compression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetCompression is the BasicDatasetCompression implementation for DatasetDeflateCompression.
func (ddc DatasetDeflateCompression) AsDatasetCompression() (*DatasetCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDatasetCompression is the BasicDatasetCompression implementation for DatasetDeflateCompression.
func (ddc DatasetDeflateCompression) AsBasicDatasetCompression() (BasicDatasetCompression, bool) {
return &ddc, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatasetGZipCompression the GZip compression method used on a dataset.
type DatasetGZipCompression struct {
// Level - The GZip compression level. Possible values include: 'Optimal', 'Fastest'
@@ -30177,7 +26579,6 @@ type DatasetGZipCompression struct {
Type TypeBasicDatasetCompression `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DatasetGZipCompression.
func (dgzc DatasetGZipCompression) MarshalJSON() ([]byte, error) {
dgzc.Type = TypeGZip
@@ -30194,43 +26595,36 @@ func (dgzc DatasetGZipCompression) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetZipDeflateCompression is the BasicDatasetCompression implementation for DatasetGZipCompression.
func (dgzc DatasetGZipCompression) AsDatasetZipDeflateCompression() (*DatasetZipDeflateCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetDeflateCompression is the BasicDatasetCompression implementation for DatasetGZipCompression.
func (dgzc DatasetGZipCompression) AsDatasetDeflateCompression() (*DatasetDeflateCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetGZipCompression is the BasicDatasetCompression implementation for DatasetGZipCompression.
func (dgzc DatasetGZipCompression) AsDatasetGZipCompression() (*DatasetGZipCompression, bool) {
return &dgzc, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetBZip2Compression is the BasicDatasetCompression implementation for DatasetGZipCompression.
func (dgzc DatasetGZipCompression) AsDatasetBZip2Compression() (*DatasetBZip2Compression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetCompression is the BasicDatasetCompression implementation for DatasetGZipCompression.
func (dgzc DatasetGZipCompression) AsDatasetCompression() (*DatasetCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDatasetCompression is the BasicDatasetCompression implementation for DatasetGZipCompression.
func (dgzc DatasetGZipCompression) AsBasicDatasetCompression() (BasicDatasetCompression, bool) {
return &dgzc, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatasetListResponse a list of dataset resources.
type DatasetListResponse struct {
autorest.Response `json:"-"`
@@ -30240,14 +26634,12 @@ type DatasetListResponse struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatasetListResponseIterator provides access to a complete listing of DatasetResource values.
type DatasetListResponseIterator struct {
i int
page DatasetListResponsePage
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *DatasetListResponseIterator) Next() error {
@@ -30264,19 +26656,16 @@ func (iter *DatasetListResponseIterator) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DatasetListResponseIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (iter DatasetListResponseIterator) Response() DatasetListResponse {
return iter.page.Response()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter DatasetListResponseIterator) Value() DatasetResource {
@@ -30286,7 +26675,6 @@ func (iter DatasetListResponseIterator) Value() DatasetResource {
return iter.page.Values()[iter.i]
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IsEmpty returns true if the ListResult contains no values.
func (dlr DatasetListResponse) IsEmpty() bool {
return dlr.Value == nil || len(*dlr.Value) == 0
@@ -30304,14 +26692,12 @@ func (dlr DatasetListResponse) datasetListResponsePreparer() (*http.Request, err
autorest.WithBaseURL(to.String(dlr.NextLink)))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatasetListResponsePage contains a page of DatasetResource values.
type DatasetListResponsePage struct {
fn func(DatasetListResponse) (DatasetListResponse, error)
dlr DatasetListResponse
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *DatasetListResponsePage) Next() error {
@@ -30323,19 +26709,16 @@ func (page *DatasetListResponsePage) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DatasetListResponsePage) NotDone() bool {
return !page.dlr.IsEmpty()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (page DatasetListResponsePage) Response() DatasetListResponse {
return page.dlr
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Values returns the slice of values for the current page or nil if there are no values.
func (page DatasetListResponsePage) Values() []DatasetResource {
if page.dlr.IsEmpty() {
@@ -30344,7 +26727,6 @@ func (page DatasetListResponsePage) Values() []DatasetResource {
return *page.dlr.Value
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatasetReference dataset reference type.
type DatasetReference struct {
// Type - Dataset reference type.
@@ -30355,7 +26737,6 @@ type DatasetReference struct {
Parameters map[string]interface{} `json:"parameters"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DatasetReference.
func (dr DatasetReference) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -30371,7 +26752,6 @@ func (dr DatasetReference) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatasetResource dataset resource type.
type DatasetResource struct {
autorest.Response `json:"-"`
@@ -30387,7 +26767,6 @@ type DatasetResource struct {
Etag *string `json:"etag,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for DatasetResource struct.
func (dr *DatasetResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -30447,7 +26826,6 @@ func (dr *DatasetResource) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicDatasetStorageFormat the format definition of a storage.
type BasicDatasetStorageFormat interface {
AsParquetFormat() (*ParquetFormat, bool)
@@ -30458,7 +26836,6 @@ type BasicDatasetStorageFormat interface {
AsDatasetStorageFormat() (*DatasetStorageFormat, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatasetStorageFormat the format definition of a storage.
type DatasetStorageFormat struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -30524,7 +26901,6 @@ func unmarshalBasicDatasetStorageFormatArray(body []byte) ([]BasicDatasetStorage
return dsfArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DatasetStorageFormat.
func (dsf DatasetStorageFormat) MarshalJSON() ([]byte, error) {
dsf.Type = TypeDatasetStorageFormat
@@ -30540,49 +26916,41 @@ func (dsf DatasetStorageFormat) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsParquetFormat is the BasicDatasetStorageFormat implementation for DatasetStorageFormat.
func (dsf DatasetStorageFormat) AsParquetFormat() (*ParquetFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOrcFormat is the BasicDatasetStorageFormat implementation for DatasetStorageFormat.
func (dsf DatasetStorageFormat) AsOrcFormat() (*OrcFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAvroFormat is the BasicDatasetStorageFormat implementation for DatasetStorageFormat.
func (dsf DatasetStorageFormat) AsAvroFormat() (*AvroFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJSONFormat is the BasicDatasetStorageFormat implementation for DatasetStorageFormat.
func (dsf DatasetStorageFormat) AsJSONFormat() (*JSONFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTextFormat is the BasicDatasetStorageFormat implementation for DatasetStorageFormat.
func (dsf DatasetStorageFormat) AsTextFormat() (*TextFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetStorageFormat is the BasicDatasetStorageFormat implementation for DatasetStorageFormat.
func (dsf DatasetStorageFormat) AsDatasetStorageFormat() (*DatasetStorageFormat, bool) {
return &dsf, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDatasetStorageFormat is the BasicDatasetStorageFormat implementation for DatasetStorageFormat.
func (dsf DatasetStorageFormat) AsBasicDatasetStorageFormat() (BasicDatasetStorageFormat, bool) {
return &dsf, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DatasetZipDeflateCompression the ZipDeflate compression method used on a dataset.
type DatasetZipDeflateCompression struct {
// Level - The ZipDeflate compression level. Possible values include: 'Optimal', 'Fastest'
@@ -30593,7 +26961,6 @@ type DatasetZipDeflateCompression struct {
Type TypeBasicDatasetCompression `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DatasetZipDeflateCompression.
func (dzdc DatasetZipDeflateCompression) MarshalJSON() ([]byte, error) {
dzdc.Type = TypeZipDeflate
@@ -30610,43 +26977,36 @@ func (dzdc DatasetZipDeflateCompression) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetZipDeflateCompression is the BasicDatasetCompression implementation for DatasetZipDeflateCompression.
func (dzdc DatasetZipDeflateCompression) AsDatasetZipDeflateCompression() (*DatasetZipDeflateCompression, bool) {
return &dzdc, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetDeflateCompression is the BasicDatasetCompression implementation for DatasetZipDeflateCompression.
func (dzdc DatasetZipDeflateCompression) AsDatasetDeflateCompression() (*DatasetDeflateCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetGZipCompression is the BasicDatasetCompression implementation for DatasetZipDeflateCompression.
func (dzdc DatasetZipDeflateCompression) AsDatasetGZipCompression() (*DatasetGZipCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetBZip2Compression is the BasicDatasetCompression implementation for DatasetZipDeflateCompression.
func (dzdc DatasetZipDeflateCompression) AsDatasetBZip2Compression() (*DatasetBZip2Compression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetCompression is the BasicDatasetCompression implementation for DatasetZipDeflateCompression.
func (dzdc DatasetZipDeflateCompression) AsDatasetCompression() (*DatasetCompression, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDatasetCompression is the BasicDatasetCompression implementation for DatasetZipDeflateCompression.
func (dzdc DatasetZipDeflateCompression) AsBasicDatasetCompression() (BasicDatasetCompression, bool) {
return &dzdc, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Db2LinkedService linked service for DB2 data source.
type Db2LinkedService struct {
// Db2LinkedServiceTypeProperties - DB2 linked service properties.
@@ -30665,7 +27025,6 @@ type Db2LinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for Db2LinkedService.
func (d2ls Db2LinkedService) MarshalJSON() ([]byte, error) {
d2ls.Type = TypeDb2
@@ -30694,439 +27053,366 @@ func (d2ls Db2LinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return &d2ls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for Db2LinkedService.
func (d2ls Db2LinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &d2ls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for Db2LinkedService struct.
func (d2ls *Db2LinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -31208,7 +27494,6 @@ func (d2ls *Db2LinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Db2LinkedServiceTypeProperties dB2 linked service properties.
type Db2LinkedServiceTypeProperties struct {
// Server - Server name for connection. Type: string (or Expression with resultType string).
@@ -31227,7 +27512,6 @@ type Db2LinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for Db2LinkedServiceTypeProperties struct.
func (d2lstp *Db2LinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -31305,7 +27589,6 @@ func (d2lstp *Db2LinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DistcpSettings distcp settings.
type DistcpSettings struct {
// ResourceManagerEndpoint - Specifies the Yarn ResourceManager endpoint. Type: string (or Expression with resultType string).
@@ -31316,7 +27599,6 @@ type DistcpSettings struct {
DistcpOptions interface{} `json:"distcpOptions,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DocumentDbCollectionDataset microsoft Azure Document Database Collection dataset.
type DocumentDbCollectionDataset struct {
// DocumentDbCollectionDatasetTypeProperties - DocumentDB Collection dataset properties.
@@ -31337,7 +27619,6 @@ type DocumentDbCollectionDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) MarshalJSON() ([]byte, error) {
ddcd.Type = TypeDocumentDbCollection
@@ -31367,337 +27648,281 @@ func (ddcd DocumentDbCollectionDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return &ddcd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for DocumentDbCollectionDataset.
func (ddcd DocumentDbCollectionDataset) AsBasicDataset() (BasicDataset, bool) {
return &ddcd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for DocumentDbCollectionDataset struct.
func (ddcd *DocumentDbCollectionDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -31788,14 +28013,12 @@ func (ddcd *DocumentDbCollectionDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DocumentDbCollectionDatasetTypeProperties documentDB Collection dataset properties.
type DocumentDbCollectionDatasetTypeProperties struct {
// CollectionName - Document Database collection name. Type: string (or Expression with resultType string).
CollectionName interface{} `json:"collectionName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DocumentDbCollectionSink a copy activity Document Database Collection sink.
type DocumentDbCollectionSink struct {
// NestingSeparator - Nested properties separator. Default is . (dot). Type: string (or Expression with resultType string).
@@ -31814,7 +28037,6 @@ type DocumentDbCollectionSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) MarshalJSON() ([]byte, error) {
ddcs.Type = TypeDocumentDbCollectionSink
@@ -31833,103 +28055,86 @@ func (ddcs DocumentDbCollectionSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return &ddcs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for DocumentDbCollectionSink.
func (ddcs DocumentDbCollectionSink) AsBasicCopySink() (BasicCopySink, bool) {
return &ddcs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DocumentDbCollectionSource a copy activity Document Database Collection source.
type DocumentDbCollectionSource struct {
// Query - Documents query. Type: string (or Expression with resultType string).
@@ -31946,7 +28151,6 @@ type DocumentDbCollectionSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) MarshalJSON() ([]byte, error) {
ddcs.Type = TypeDocumentDbCollectionSource
@@ -31964,319 +28168,266 @@ func (ddcs DocumentDbCollectionSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return &ddcs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for DocumentDbCollectionSource.
func (ddcs DocumentDbCollectionSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ddcs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DrillLinkedService drill server linked service.
type DrillLinkedService struct {
// DrillLinkedServiceTypeProperties - Drill server linked service properties.
@@ -32295,7 +28446,6 @@ type DrillLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DrillLinkedService.
func (dls DrillLinkedService) MarshalJSON() ([]byte, error) {
dls.Type = TypeDrill
@@ -32324,439 +28474,366 @@ func (dls DrillLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return &dls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for DrillLinkedService.
func (dls DrillLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &dls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for DrillLinkedService struct.
func (dls *DrillLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -32838,7 +28915,6 @@ func (dls *DrillLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DrillLinkedServiceTypeProperties drill server linked service properties.
type DrillLinkedServiceTypeProperties struct {
// ConnectionString - An ODBC connection string.
@@ -32847,7 +28923,6 @@ type DrillLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for DrillLinkedServiceTypeProperties struct.
func (dlstp *DrillLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -32880,7 +28955,6 @@ func (dlstp *DrillLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DrillSource a copy activity Drill server source.
type DrillSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -32895,7 +28969,6 @@ type DrillSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DrillSource.
func (ds DrillSource) MarshalJSON() ([]byte, error) {
ds.Type = TypeDrillSource
@@ -32912,319 +28985,266 @@ func (ds DrillSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsDrillSource() (*DrillSource, bool) {
return &ds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for DrillSource.
func (ds DrillSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DrillTableDataset drill server dataset.
type DrillTableDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -33243,7 +29263,6 @@ type DrillTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DrillTableDataset.
func (dtd DrillTableDataset) MarshalJSON() ([]byte, error) {
dtd.Type = TypeDrillTable
@@ -33270,337 +29289,281 @@ func (dtd DrillTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return &dtd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for DrillTableDataset.
func (dtd DrillTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &dtd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DynamicsEntityDataset the Dynamics entity dataset.
type DynamicsEntityDataset struct {
// DynamicsEntityDatasetTypeProperties - Dynamics entity dataset properties.
@@ -33621,7 +29584,6 @@ type DynamicsEntityDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) MarshalJSON() ([]byte, error) {
ded.Type = TypeDynamicsEntity
@@ -33651,337 +29613,281 @@ func (ded DynamicsEntityDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return &ded, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for DynamicsEntityDataset.
func (ded DynamicsEntityDataset) AsBasicDataset() (BasicDataset, bool) {
return &ded, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for DynamicsEntityDataset struct.
func (ded *DynamicsEntityDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -34072,14 +29978,12 @@ func (ded *DynamicsEntityDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DynamicsEntityDatasetTypeProperties dynamics entity dataset properties.
type DynamicsEntityDatasetTypeProperties struct {
// EntityName - The logical name of the entity. Type: string (or Expression with resultType string).
EntityName interface{} `json:"entityName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DynamicsLinkedService dynamics linked service.
type DynamicsLinkedService struct {
// DynamicsLinkedServiceTypeProperties - Dynamics linked service properties.
@@ -34098,7 +30002,6 @@ type DynamicsLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DynamicsLinkedService.
func (dls DynamicsLinkedService) MarshalJSON() ([]byte, error) {
dls.Type = TypeDynamics
@@ -34127,439 +30030,366 @@ func (dls DynamicsLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return &dls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for DynamicsLinkedService.
func (dls DynamicsLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &dls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for DynamicsLinkedService struct.
func (dls *DynamicsLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -34641,7 +30471,6 @@ func (dls *DynamicsLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DynamicsLinkedServiceTypeProperties dynamics linked service properties.
type DynamicsLinkedServiceTypeProperties struct {
// DeploymentType - The deployment type of the Dynamics instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for Dynamics on-premises with Ifd. Type: string (or Expression with resultType string).
@@ -34664,7 +30493,6 @@ type DynamicsLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for DynamicsLinkedServiceTypeProperties struct.
func (dlstp *DynamicsLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -34760,7 +30588,6 @@ func (dlstp *DynamicsLinkedServiceTypeProperties) UnmarshalJSON(body []byte) err
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DynamicsSink a copy activity Dynamics sink.
type DynamicsSink struct {
// WriteBehavior - The write behavior for the operation.
@@ -34781,7 +30608,6 @@ type DynamicsSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DynamicsSink.
func (ds DynamicsSink) MarshalJSON() ([]byte, error) {
ds.Type = TypeDynamicsSink
@@ -34803,103 +30629,86 @@ func (ds DynamicsSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsDynamicsSink() (*DynamicsSink, bool) {
return &ds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for DynamicsSink.
func (ds DynamicsSink) AsBasicCopySink() (BasicCopySink, bool) {
return &ds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DynamicsSource a copy activity Dynamics source.
type DynamicsSource struct {
// Query - FetchXML is a proprietary query language that is used in Microsoft Dynamics (online & on-premises). Type: string (or Expression with resultType string).
@@ -34914,7 +30723,6 @@ type DynamicsSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for DynamicsSource.
func (ds DynamicsSource) MarshalJSON() ([]byte, error) {
ds.Type = TypeDynamicsSource
@@ -34931,319 +30739,266 @@ func (ds DynamicsSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsDynamicsSource() (*DynamicsSource, bool) {
return &ds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for DynamicsSource.
func (ds DynamicsSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// EloquaLinkedService eloqua server linked service.
type EloquaLinkedService struct {
// EloquaLinkedServiceTypeProperties - Eloqua server linked service properties.
@@ -35262,7 +31017,6 @@ type EloquaLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for EloquaLinkedService.
func (els EloquaLinkedService) MarshalJSON() ([]byte, error) {
els.Type = TypeEloqua
@@ -35291,439 +31045,366 @@ func (els EloquaLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return &els, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for EloquaLinkedService.
func (els EloquaLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &els, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for EloquaLinkedService struct.
func (els *EloquaLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -35805,7 +31486,6 @@ func (els *EloquaLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// EloquaLinkedServiceTypeProperties eloqua server linked service properties.
type EloquaLinkedServiceTypeProperties struct {
// Endpoint - The endpoint of the Eloqua server. (i.e. eloqua.example.com)
@@ -35824,7 +31504,6 @@ type EloquaLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for EloquaLinkedServiceTypeProperties struct.
func (elstp *EloquaLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -35902,7 +31581,6 @@ func (elstp *EloquaLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// EloquaObjectDataset eloqua server dataset.
type EloquaObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -35921,7 +31599,6 @@ type EloquaObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for EloquaObjectDataset.
func (eod EloquaObjectDataset) MarshalJSON() ([]byte, error) {
eod.Type = TypeEloquaObject
@@ -35948,337 +31625,281 @@ func (eod EloquaObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return &eod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for EloquaObjectDataset.
func (eod EloquaObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &eod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// EloquaSource a copy activity Eloqua server source.
type EloquaSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -36293,7 +31914,6 @@ type EloquaSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for EloquaSource.
func (es EloquaSource) MarshalJSON() ([]byte, error) {
es.Type = TypeEloquaSource
@@ -36310,319 +31930,266 @@ func (es EloquaSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsEloquaSource() (*EloquaSource, bool) {
return &es, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for EloquaSource.
func (es EloquaSource) AsBasicCopySource() (BasicCopySource, bool) {
return &es, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ErrorResponse the object that defines the structure of an Azure Data Factory response.
type ErrorResponse struct {
// Code - Error code.
@@ -36635,7 +32202,6 @@ type ErrorResponse struct {
Details *[]ErrorResponse `json:"details,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ExecutePipelineActivity execute pipeline activity.
type ExecutePipelineActivity struct {
// ExecutePipelineActivityTypeProperties - Execute pipeline activity properties.
@@ -36652,7 +32218,6 @@ type ExecutePipelineActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) MarshalJSON() ([]byte, error) {
epa.Type = TypeExecutePipeline
@@ -36678,175 +32243,146 @@ func (epa ExecutePipelineActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return &epa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return &epa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for ExecutePipelineActivity.
func (epa ExecutePipelineActivity) AsBasicActivity() (BasicActivity, bool) {
return &epa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ExecutePipelineActivity struct.
func (epa *ExecutePipelineActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -36919,7 +32455,6 @@ func (epa *ExecutePipelineActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ExecutePipelineActivityTypeProperties execute pipeline activity properties.
type ExecutePipelineActivityTypeProperties struct {
// Pipeline - Pipeline reference.
@@ -36930,7 +32465,6 @@ type ExecutePipelineActivityTypeProperties struct {
WaitOnCompletion *bool `json:"waitOnCompletion,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ExecutePipelineActivityTypeProperties.
func (epatp ExecutePipelineActivityTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -36946,7 +32480,6 @@ func (epatp ExecutePipelineActivityTypeProperties) MarshalJSON() ([]byte, error)
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ExecuteSSISPackageActivity execute SSIS package activity.
type ExecuteSSISPackageActivity struct {
// ExecuteSSISPackageActivityTypeProperties - Execute SSIS package activity properties.
@@ -36967,7 +32500,6 @@ type ExecuteSSISPackageActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) MarshalJSON() ([]byte, error) {
espa.Type = TypeExecuteSSISPackage
@@ -36999,175 +32531,146 @@ func (espa ExecuteSSISPackageActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return &espa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &espa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for ExecuteSSISPackageActivity.
func (espa ExecuteSSISPackageActivity) AsBasicActivity() (BasicActivity, bool) {
return &espa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ExecuteSSISPackageActivity struct.
func (espa *ExecuteSSISPackageActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -37258,7 +32761,6 @@ func (espa *ExecuteSSISPackageActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ExecuteSSISPackageActivityTypeProperties execute SSIS package activity properties.
type ExecuteSSISPackageActivityTypeProperties struct {
// PackageLocation - SSIS package location.
@@ -37283,7 +32785,6 @@ type ExecuteSSISPackageActivityTypeProperties struct {
PropertyOverrides map[string]*SSISPropertyOverride `json:"propertyOverrides"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ExecuteSSISPackageActivityTypeProperties.
func (espatp ExecuteSSISPackageActivityTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -37320,7 +32821,6 @@ func (espatp ExecuteSSISPackageActivityTypeProperties) MarshalJSON() ([]byte, er
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicExecutionActivity base class for all execution activities.
type BasicExecutionActivity interface {
AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool)
@@ -37342,7 +32842,6 @@ type BasicExecutionActivity interface {
AsExecutionActivity() (*ExecutionActivity, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ExecutionActivity base class for all execution activities.
type ExecutionActivity struct {
// LinkedServiceName - Linked service reference.
@@ -37458,7 +32957,6 @@ func unmarshalBasicExecutionActivityArray(body []byte) ([]BasicExecutionActivity
return eaArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ExecutionActivity.
func (ea ExecutionActivity) MarshalJSON() ([]byte, error) {
ea.Type = TypeExecution
@@ -37487,175 +32985,146 @@ func (ea ExecutionActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return &ea, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &ea, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for ExecutionActivity.
func (ea ExecutionActivity) AsBasicActivity() (BasicActivity, bool) {
return &ea, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Expression azure Data Factory expression definition.
type Expression struct {
// Type - Expression type.
@@ -37664,7 +33133,6 @@ type Expression struct {
Value *string `json:"value,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Factory factory resource type.
type Factory struct {
autorest.Response `json:"-"`
@@ -37686,7 +33154,6 @@ type Factory struct {
Tags map[string]*string `json:"tags"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for Factory.
func (f Factory) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -37717,7 +33184,6 @@ func (f Factory) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for Factory struct.
func (f *Factory) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -37808,7 +33274,6 @@ func (f *Factory) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FactoryIdentity identity properties of the factory resource.
type FactoryIdentity struct {
// Type - The identity type. Currently the only supported type is 'SystemAssigned'.
@@ -37819,7 +33284,6 @@ type FactoryIdentity struct {
TenantID *uuid.UUID `json:"tenantId,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FactoryListResponse a list of factory resources.
type FactoryListResponse struct {
autorest.Response `json:"-"`
@@ -37829,14 +33293,12 @@ type FactoryListResponse struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FactoryListResponseIterator provides access to a complete listing of Factory values.
type FactoryListResponseIterator struct {
i int
page FactoryListResponsePage
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *FactoryListResponseIterator) Next() error {
@@ -37853,19 +33315,16 @@ func (iter *FactoryListResponseIterator) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter FactoryListResponseIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (iter FactoryListResponseIterator) Response() FactoryListResponse {
return iter.page.Response()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter FactoryListResponseIterator) Value() Factory {
@@ -37875,7 +33334,6 @@ func (iter FactoryListResponseIterator) Value() Factory {
return iter.page.Values()[iter.i]
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IsEmpty returns true if the ListResult contains no values.
func (flr FactoryListResponse) IsEmpty() bool {
return flr.Value == nil || len(*flr.Value) == 0
@@ -37893,14 +33351,12 @@ func (flr FactoryListResponse) factoryListResponsePreparer() (*http.Request, err
autorest.WithBaseURL(to.String(flr.NextLink)))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FactoryListResponsePage contains a page of Factory values.
type FactoryListResponsePage struct {
fn func(FactoryListResponse) (FactoryListResponse, error)
flr FactoryListResponse
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *FactoryListResponsePage) Next() error {
@@ -37912,19 +33368,16 @@ func (page *FactoryListResponsePage) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page FactoryListResponsePage) NotDone() bool {
return !page.flr.IsEmpty()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (page FactoryListResponsePage) Response() FactoryListResponse {
return page.flr
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Values returns the slice of values for the current page or nil if there are no values.
func (page FactoryListResponsePage) Values() []Factory {
if page.flr.IsEmpty() {
@@ -37933,7 +33386,6 @@ func (page FactoryListResponsePage) Values() []Factory {
return *page.flr.Value
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FactoryProperties factory resource properties.
type FactoryProperties struct {
// ProvisioningState - Factory provisioning state, example Succeeded.
@@ -37942,9 +33394,20 @@ type FactoryProperties struct {
CreateTime *date.Time `json:"createTime,omitempty"`
// Version - Version of the factory.
Version *string `json:"version,omitempty"`
+ // VstsConfiguration - VSTS repo information of the factory.
+ VstsConfiguration *FactoryVSTSConfiguration `json:"vstsConfiguration,omitempty"`
+}
+
+// FactoryRepoUpdate factory's VSTS repo information.
+type FactoryRepoUpdate struct {
+ // FactoryResourceID - The factory resource id.
+ FactoryResourceID *string `json:"factoryResourceId,omitempty"`
+ // ResourceGroupName - The resource group name.
+ ResourceGroupName *string `json:"resourceGroupName,omitempty"`
+ // VstsConfiguration - VSTS repo information of the factory.
+ VstsConfiguration *FactoryVSTSConfiguration `json:"vstsConfiguration,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FactoryUpdateParameters parameters for updating a factory resource.
type FactoryUpdateParameters struct {
// Tags - The resource tags.
@@ -37953,7 +33416,6 @@ type FactoryUpdateParameters struct {
Identity *FactoryIdentity `json:"identity,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for FactoryUpdateParameters.
func (fup FactoryUpdateParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -37966,7 +33428,24 @@ func (fup FactoryUpdateParameters) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
+// FactoryVSTSConfiguration factory's VSTS repo information.
+type FactoryVSTSConfiguration struct {
+ // AccountName - VSTS account name.
+ AccountName *string `json:"accountName,omitempty"`
+ // ProjectName - VSTS project name.
+ ProjectName *string `json:"projectName,omitempty"`
+ // RepositoryName - VSTS repository name.
+ RepositoryName *string `json:"repositoryName,omitempty"`
+ // CollaborationBranch - VSTS collaboration branch.
+ CollaborationBranch *string `json:"collaborationBranch,omitempty"`
+ // RootFolder - VSTS root folder.
+ RootFolder *string `json:"rootFolder,omitempty"`
+ // LastCommitID - VSTS last commit id.
+ LastCommitID *string `json:"lastCommitId,omitempty"`
+ // TenantID - VSTS tenant id.
+ TenantID *string `json:"tenantId,omitempty"`
+}
+
// FileServerLinkedService file system linked service.
type FileServerLinkedService struct {
// FileServerLinkedServiceTypeProperties - File system linked service properties.
@@ -37985,7 +33464,6 @@ type FileServerLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for FileServerLinkedService.
func (fsls FileServerLinkedService) MarshalJSON() ([]byte, error) {
fsls.Type = TypeFileServer
@@ -38014,439 +33492,366 @@ func (fsls FileServerLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return &fsls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for FileServerLinkedService.
func (fsls FileServerLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &fsls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for FileServerLinkedService struct.
func (fsls *FileServerLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -38528,7 +33933,6 @@ func (fsls *FileServerLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FileServerLinkedServiceTypeProperties file system linked service properties.
type FileServerLinkedServiceTypeProperties struct {
// Host - Host name of the server. Type: string (or Expression with resultType string).
@@ -38541,7 +33945,6 @@ type FileServerLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for FileServerLinkedServiceTypeProperties struct.
func (fslstp *FileServerLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -38592,7 +33995,6 @@ func (fslstp *FileServerLinkedServiceTypeProperties) UnmarshalJSON(body []byte)
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FileShareDataset an on-premises file system dataset.
type FileShareDataset struct {
// FileShareDatasetTypeProperties - On-premises file system dataset properties.
@@ -38613,7 +34015,6 @@ type FileShareDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for FileShareDataset.
func (fsd FileShareDataset) MarshalJSON() ([]byte, error) {
fsd.Type = TypeFileShare
@@ -38643,337 +34044,281 @@ func (fsd FileShareDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return &fsd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for FileShareDataset.
func (fsd FileShareDataset) AsBasicDataset() (BasicDataset, bool) {
return &fsd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for FileShareDataset struct.
func (fsd *FileShareDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -39064,7 +34409,6 @@ func (fsd *FileShareDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FileShareDatasetTypeProperties on-premises file system dataset properties.
type FileShareDatasetTypeProperties struct {
// FolderPath - The path of the on-premises file system. Type: string (or Expression with resultType string).
@@ -39079,7 +34423,6 @@ type FileShareDatasetTypeProperties struct {
Compression BasicDatasetCompression `json:"compression,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for FileShareDatasetTypeProperties struct.
func (fsdtp *FileShareDatasetTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -39138,7 +34481,6 @@ func (fsdtp *FileShareDatasetTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FileSystemSink a copy activity file system sink.
type FileSystemSink struct {
// CopyBehavior - The type of copy behavior for copy sink. Possible values include: 'PreserveHierarchy', 'FlattenHierarchy', 'MergeFiles'
@@ -39157,7 +34499,6 @@ type FileSystemSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for FileSystemSink.
func (fss FileSystemSink) MarshalJSON() ([]byte, error) {
fss.Type = TypeFileSystemSink
@@ -39178,103 +34519,86 @@ func (fss FileSystemSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsFileSystemSink() (*FileSystemSink, bool) {
return &fss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for FileSystemSink.
func (fss FileSystemSink) AsBasicCopySink() (BasicCopySink, bool) {
return &fss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FileSystemSource a copy activity file system source.
type FileSystemSource struct {
// Recursive - If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean).
@@ -39289,7 +34613,6 @@ type FileSystemSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for FileSystemSource.
func (fss FileSystemSource) MarshalJSON() ([]byte, error) {
fss.Type = TypeFileSystemSource
@@ -39306,319 +34629,266 @@ func (fss FileSystemSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsFileSystemSource() (*FileSystemSource, bool) {
return &fss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for FileSystemSource.
func (fss FileSystemSource) AsBasicCopySource() (BasicCopySource, bool) {
return &fss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FilterActivity filter and return results from input array based on the conditions.
type FilterActivity struct {
// FilterActivityTypeProperties - Filter activity properties.
@@ -39635,7 +34905,6 @@ type FilterActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for FilterActivity.
func (fa FilterActivity) MarshalJSON() ([]byte, error) {
fa.Type = TypeFilter
@@ -39661,175 +34930,146 @@ func (fa FilterActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsFilterActivity() (*FilterActivity, bool) {
return &fa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return &fa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for FilterActivity.
func (fa FilterActivity) AsBasicActivity() (BasicActivity, bool) {
return &fa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for FilterActivity struct.
func (fa *FilterActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -39902,7 +35142,6 @@ func (fa *FilterActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FilterActivityTypeProperties fitler activity properties.
type FilterActivityTypeProperties struct {
// Items - Input array on which filter should be applied.
@@ -39911,7 +35150,6 @@ type FilterActivityTypeProperties struct {
Condition *Expression `json:"condition,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ForEachActivity this activity is used for iterating over a collection and execute given activities.
type ForEachActivity struct {
// ForEachActivityTypeProperties - ForEach activity properties.
@@ -39928,7 +35166,6 @@ type ForEachActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ForEachActivity.
func (fea ForEachActivity) MarshalJSON() ([]byte, error) {
fea.Type = TypeForEach
@@ -39954,175 +35191,146 @@ func (fea ForEachActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsForEachActivity() (*ForEachActivity, bool) {
return &fea, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return &fea, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for ForEachActivity.
func (fea ForEachActivity) AsBasicActivity() (BasicActivity, bool) {
return &fea, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ForEachActivity struct.
func (fea *ForEachActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -40195,7 +35403,6 @@ func (fea *ForEachActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ForEachActivityTypeProperties forEach activity properties.
type ForEachActivityTypeProperties struct {
// IsSequential - Should the loop be executed in sequence or in parallel (max 50)
@@ -40208,7 +35415,6 @@ type ForEachActivityTypeProperties struct {
Activities *[]BasicActivity `json:"activities,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ForEachActivityTypeProperties struct.
func (featp *ForEachActivityTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -40259,7 +35465,6 @@ func (featp *ForEachActivityTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FtpServerLinkedService a FTP server Linked Service.
type FtpServerLinkedService struct {
// FtpServerLinkedServiceTypeProperties - Properties specific to this linked service type.
@@ -40278,7 +35483,6 @@ type FtpServerLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for FtpServerLinkedService.
func (fsls FtpServerLinkedService) MarshalJSON() ([]byte, error) {
fsls.Type = TypeFtpServer
@@ -40307,439 +35511,366 @@ func (fsls FtpServerLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return &fsls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for FtpServerLinkedService.
func (fsls FtpServerLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &fsls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for FtpServerLinkedService struct.
func (fsls *FtpServerLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -40821,7 +35952,6 @@ func (fsls *FtpServerLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// FtpServerLinkedServiceTypeProperties properties specific to this linked service type.
type FtpServerLinkedServiceTypeProperties struct {
// Host - Host name of the FTP server. Type: string (or Expression with resultType string).
@@ -40842,7 +35972,6 @@ type FtpServerLinkedServiceTypeProperties struct {
EnableServerCertificateValidation interface{} `json:"enableServerCertificateValidation,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for FtpServerLinkedServiceTypeProperties struct.
func (fslstp *FtpServerLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -40929,7 +36058,6 @@ func (fslstp *FtpServerLinkedServiceTypeProperties) UnmarshalJSON(body []byte) e
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetMetadataActivity activity to get metadata of dataset
type GetMetadataActivity struct {
// GetMetadataActivityTypeProperties - GetMetadata activity properties.
@@ -40950,7 +36078,6 @@ type GetMetadataActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for GetMetadataActivity.
func (gma GetMetadataActivity) MarshalJSON() ([]byte, error) {
gma.Type = TypeGetMetadata
@@ -40982,175 +36109,146 @@ func (gma GetMetadataActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return &gma, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &gma, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for GetMetadataActivity.
func (gma GetMetadataActivity) AsBasicActivity() (BasicActivity, bool) {
return &gma, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for GetMetadataActivity struct.
func (gma *GetMetadataActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -41241,7 +36339,6 @@ func (gma *GetMetadataActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetMetadataActivityTypeProperties getMetadata activity properties.
type GetMetadataActivityTypeProperties struct {
// Dataset - GetMetadata activity dataset reference.
@@ -41250,7 +36347,6 @@ type GetMetadataActivityTypeProperties struct {
FieldList *[]interface{} `json:"fieldList,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GoogleBigQueryLinkedService google BigQuery service linked service.
type GoogleBigQueryLinkedService struct {
// GoogleBigQueryLinkedServiceTypeProperties - Google BigQuery service linked service properties.
@@ -41269,7 +36365,6 @@ type GoogleBigQueryLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) MarshalJSON() ([]byte, error) {
gbqls.Type = TypeGoogleBigQuery
@@ -41298,439 +36393,366 @@ func (gbqls GoogleBigQueryLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return &gbqls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for GoogleBigQueryLinkedService.
func (gbqls GoogleBigQueryLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &gbqls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for GoogleBigQueryLinkedService struct.
func (gbqls *GoogleBigQueryLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -41812,7 +36834,6 @@ func (gbqls *GoogleBigQueryLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GoogleBigQueryLinkedServiceTypeProperties google BigQuery service linked service properties.
type GoogleBigQueryLinkedServiceTypeProperties struct {
// Project - The default BigQuery project to query against.
@@ -41841,7 +36862,6 @@ type GoogleBigQueryLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for GoogleBigQueryLinkedServiceTypeProperties struct.
func (gbqlstp *GoogleBigQueryLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -41962,7 +36982,6 @@ func (gbqlstp *GoogleBigQueryLinkedServiceTypeProperties) UnmarshalJSON(body []b
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GoogleBigQueryObjectDataset google BigQuery service dataset.
type GoogleBigQueryObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -41981,7 +37000,6 @@ type GoogleBigQueryObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) MarshalJSON() ([]byte, error) {
gbqod.Type = TypeGoogleBigQueryObject
@@ -42008,337 +37026,281 @@ func (gbqod GoogleBigQueryObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return &gbqod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for GoogleBigQueryObjectDataset.
func (gbqod GoogleBigQueryObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &gbqod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GoogleBigQuerySource a copy activity Google BigQuery service source.
type GoogleBigQuerySource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -42353,7 +37315,6 @@ type GoogleBigQuerySource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) MarshalJSON() ([]byte, error) {
gbqs.Type = TypeGoogleBigQuerySource
@@ -42370,319 +37331,266 @@ func (gbqs GoogleBigQuerySource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return &gbqs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for GoogleBigQuerySource.
func (gbqs GoogleBigQuerySource) AsBasicCopySource() (BasicCopySource, bool) {
return &gbqs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GreenplumLinkedService greenplum Database linked service.
type GreenplumLinkedService struct {
// GreenplumLinkedServiceTypeProperties - Greenplum Database linked service properties.
@@ -42701,7 +37609,6 @@ type GreenplumLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for GreenplumLinkedService.
func (gls GreenplumLinkedService) MarshalJSON() ([]byte, error) {
gls.Type = TypeGreenplum
@@ -42730,439 +37637,366 @@ func (gls GreenplumLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return &gls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for GreenplumLinkedService.
func (gls GreenplumLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &gls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for GreenplumLinkedService struct.
func (gls *GreenplumLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -43244,7 +38078,6 @@ func (gls *GreenplumLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GreenplumLinkedServiceTypeProperties greenplum Database linked service properties.
type GreenplumLinkedServiceTypeProperties struct {
// ConnectionString - An ODBC connection string.
@@ -43253,7 +38086,6 @@ type GreenplumLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for GreenplumLinkedServiceTypeProperties struct.
func (glstp *GreenplumLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -43286,7 +38118,6 @@ func (glstp *GreenplumLinkedServiceTypeProperties) UnmarshalJSON(body []byte) er
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GreenplumSource a copy activity Greenplum Database source.
type GreenplumSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -43301,7 +38132,6 @@ type GreenplumSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for GreenplumSource.
func (gs GreenplumSource) MarshalJSON() ([]byte, error) {
gs.Type = TypeGreenplumSource
@@ -43318,319 +38148,266 @@ func (gs GreenplumSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsGreenplumSource() (*GreenplumSource, bool) {
return &gs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for GreenplumSource.
func (gs GreenplumSource) AsBasicCopySource() (BasicCopySource, bool) {
return &gs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GreenplumTableDataset greenplum Database dataset.
type GreenplumTableDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -43649,7 +38426,6 @@ type GreenplumTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for GreenplumTableDataset.
func (gtd GreenplumTableDataset) MarshalJSON() ([]byte, error) {
gtd.Type = TypeGreenplumTable
@@ -43676,337 +38452,281 @@ func (gtd GreenplumTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return >d, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for GreenplumTableDataset.
func (gtd GreenplumTableDataset) AsBasicDataset() (BasicDataset, bool) {
return >d, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HBaseLinkedService hBase server linked service.
type HBaseLinkedService struct {
// HBaseLinkedServiceTypeProperties - HBase server linked service properties.
@@ -44025,7 +38745,6 @@ type HBaseLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HBaseLinkedService.
func (hbls HBaseLinkedService) MarshalJSON() ([]byte, error) {
hbls.Type = TypeHBase
@@ -44054,439 +38773,366 @@ func (hbls HBaseLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return &hbls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for HBaseLinkedService.
func (hbls HBaseLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &hbls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HBaseLinkedService struct.
func (hbls *HBaseLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -44568,7 +39214,6 @@ func (hbls *HBaseLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HBaseLinkedServiceTypeProperties hBase server linked service properties.
type HBaseLinkedServiceTypeProperties struct {
// Host - The IP address or host name of the HBase server. (i.e. 192.168.222.160)
@@ -44595,7 +39240,6 @@ type HBaseLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HBaseLinkedServiceTypeProperties struct.
func (hblstp *HBaseLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -44709,7 +39353,6 @@ func (hblstp *HBaseLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HBaseObjectDataset hBase server dataset.
type HBaseObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -44728,7 +39371,6 @@ type HBaseObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HBaseObjectDataset.
func (hbod HBaseObjectDataset) MarshalJSON() ([]byte, error) {
hbod.Type = TypeHBaseObject
@@ -44755,337 +39397,281 @@ func (hbod HBaseObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return &hbod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for HBaseObjectDataset.
func (hbod HBaseObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &hbod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HBaseSource a copy activity HBase server source.
type HBaseSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -45100,7 +39686,6 @@ type HBaseSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HBaseSource.
func (hbs HBaseSource) MarshalJSON() ([]byte, error) {
hbs.Type = TypeHBaseSource
@@ -45117,319 +39702,266 @@ func (hbs HBaseSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsHBaseSource() (*HBaseSource, bool) {
return &hbs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for HBaseSource.
func (hbs HBaseSource) AsBasicCopySource() (BasicCopySource, bool) {
return &hbs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HdfsLinkedService hadoop Distributed File System (HDFS) linked service.
type HdfsLinkedService struct {
// HdfsLinkedServiceTypeProperties - HDFS linked service properties.
@@ -45448,7 +39980,6 @@ type HdfsLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HdfsLinkedService.
func (hls HdfsLinkedService) MarshalJSON() ([]byte, error) {
hls.Type = TypeHdfs
@@ -45477,439 +40008,366 @@ func (hls HdfsLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return &hls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for HdfsLinkedService.
func (hls HdfsLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &hls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HdfsLinkedService struct.
func (hls *HdfsLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -45991,7 +40449,6 @@ func (hls *HdfsLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HdfsLinkedServiceTypeProperties HDFS linked service properties.
type HdfsLinkedServiceTypeProperties struct {
// URL - The URL of the HDFS service endpoint, e.g. http://myhostname:50070/webhdfs/v1 . Type: string (or Expression with resultType string).
@@ -46006,7 +40463,6 @@ type HdfsLinkedServiceTypeProperties struct {
Password BasicSecretBase `json:"password,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HdfsLinkedServiceTypeProperties struct.
func (hlstp *HdfsLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -46066,7 +40522,6 @@ func (hlstp *HdfsLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HdfsSource a copy activity HDFS source.
type HdfsSource struct {
// Recursive - If true, files under the folder path will be read recursively. Default is true. Type: boolean (or Expression with resultType boolean).
@@ -46083,7 +40538,6 @@ type HdfsSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HdfsSource.
func (hs HdfsSource) MarshalJSON() ([]byte, error) {
hs.Type = TypeHdfsSource
@@ -46103,319 +40557,266 @@ func (hs HdfsSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsHdfsSource() (*HdfsSource, bool) {
return &hs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for HdfsSource.
func (hs HdfsSource) AsBasicCopySource() (BasicCopySource, bool) {
return &hs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightHiveActivity hDInsight Hive activity type.
type HDInsightHiveActivity struct {
// HDInsightHiveActivityTypeProperties - HDInsight Hive activity properties.
@@ -46436,7 +40837,6 @@ type HDInsightHiveActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) MarshalJSON() ([]byte, error) {
hiha.Type = TypeHDInsightHive
@@ -46468,175 +40868,146 @@ func (hiha HDInsightHiveActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return &hiha, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &hiha, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for HDInsightHiveActivity.
func (hiha HDInsightHiveActivity) AsBasicActivity() (BasicActivity, bool) {
return &hiha, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HDInsightHiveActivity struct.
func (hiha *HDInsightHiveActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -46727,7 +41098,6 @@ func (hiha *HDInsightHiveActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightHiveActivityTypeProperties hDInsight Hive activity properties.
type HDInsightHiveActivityTypeProperties struct {
// StorageLinkedServices - Storage linked service references.
@@ -46744,7 +41114,6 @@ type HDInsightHiveActivityTypeProperties struct {
Defines map[string]interface{} `json:"defines"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HDInsightHiveActivityTypeProperties.
func (hihatp HDInsightHiveActivityTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -46767,7 +41136,6 @@ func (hihatp HDInsightHiveActivityTypeProperties) MarshalJSON() ([]byte, error)
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightLinkedService hDInsight linked service.
type HDInsightLinkedService struct {
// HDInsightLinkedServiceTypeProperties - HDInsight linked service properties.
@@ -46786,7 +41154,6 @@ type HDInsightLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HDInsightLinkedService.
func (hils HDInsightLinkedService) MarshalJSON() ([]byte, error) {
hils.Type = TypeHDInsight
@@ -46815,439 +41182,366 @@ func (hils HDInsightLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return &hils, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for HDInsightLinkedService.
func (hils HDInsightLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &hils, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HDInsightLinkedService struct.
func (hils *HDInsightLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -47329,7 +41623,6 @@ func (hils *HDInsightLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightLinkedServiceTypeProperties hDInsight linked service properties.
type HDInsightLinkedServiceTypeProperties struct {
// ClusterURI - HDInsight cluster URI. Type: string (or Expression with resultType string).
@@ -47346,7 +41639,6 @@ type HDInsightLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HDInsightLinkedServiceTypeProperties struct.
func (hilstp *HDInsightLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -47415,7 +41707,6 @@ func (hilstp *HDInsightLinkedServiceTypeProperties) UnmarshalJSON(body []byte) e
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightMapReduceActivity hDInsight MapReduce activity type.
type HDInsightMapReduceActivity struct {
// HDInsightMapReduceActivityTypeProperties - HDInsight MapReduce activity properties.
@@ -47436,7 +41727,6 @@ type HDInsightMapReduceActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) MarshalJSON() ([]byte, error) {
himra.Type = TypeHDInsightMapReduce
@@ -47468,175 +41758,146 @@ func (himra HDInsightMapReduceActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return &himra, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &himra, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for HDInsightMapReduceActivity.
func (himra HDInsightMapReduceActivity) AsBasicActivity() (BasicActivity, bool) {
return &himra, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HDInsightMapReduceActivity struct.
func (himra *HDInsightMapReduceActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -47727,7 +41988,6 @@ func (himra *HDInsightMapReduceActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightMapReduceActivityTypeProperties hDInsight MapReduce activity properties.
type HDInsightMapReduceActivityTypeProperties struct {
// StorageLinkedServices - Storage linked service references.
@@ -47748,7 +42008,6 @@ type HDInsightMapReduceActivityTypeProperties struct {
Defines map[string]interface{} `json:"defines"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HDInsightMapReduceActivityTypeProperties.
func (himratp HDInsightMapReduceActivityTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -47775,7 +42034,6 @@ func (himratp HDInsightMapReduceActivityTypeProperties) MarshalJSON() ([]byte, e
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightOnDemandLinkedService hDInsight ondemand linked service.
type HDInsightOnDemandLinkedService struct {
// HDInsightOnDemandLinkedServiceTypeProperties - HDInsight ondemand linked service properties.
@@ -47794,7 +42052,6 @@ type HDInsightOnDemandLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) MarshalJSON() ([]byte, error) {
hiodls.Type = TypeHDInsightOnDemand
@@ -47823,439 +42080,366 @@ func (hiodls HDInsightOnDemandLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return &hiodls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for HDInsightOnDemandLinkedService.
func (hiodls HDInsightOnDemandLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &hiodls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HDInsightOnDemandLinkedService struct.
func (hiodls *HDInsightOnDemandLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -48337,7 +42521,6 @@ func (hiodls *HDInsightOnDemandLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightOnDemandLinkedServiceTypeProperties hDInsight ondemand linked service properties.
type HDInsightOnDemandLinkedServiceTypeProperties struct {
// ClusterSize - Number of worker/data nodes in the cluster. Suggestion value: 4. Type: string (or Expression with resultType string).
@@ -48402,7 +42585,6 @@ type HDInsightOnDemandLinkedServiceTypeProperties struct {
ZookeeperNodeSize interface{} `json:"zookeeperNodeSize,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HDInsightOnDemandLinkedServiceTypeProperties struct.
func (hiodlstp *HDInsightOnDemandLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -48685,7 +42867,6 @@ func (hiodlstp *HDInsightOnDemandLinkedServiceTypeProperties) UnmarshalJSON(body
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightPigActivity hDInsight Pig activity type.
type HDInsightPigActivity struct {
// HDInsightPigActivityTypeProperties - HDInsight Pig activity properties.
@@ -48706,7 +42887,6 @@ type HDInsightPigActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HDInsightPigActivity.
func (hipa HDInsightPigActivity) MarshalJSON() ([]byte, error) {
hipa.Type = TypeHDInsightPig
@@ -48738,175 +42918,146 @@ func (hipa HDInsightPigActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return &hipa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &hipa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for HDInsightPigActivity.
func (hipa HDInsightPigActivity) AsBasicActivity() (BasicActivity, bool) {
return &hipa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HDInsightPigActivity struct.
func (hipa *HDInsightPigActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -48997,7 +43148,6 @@ func (hipa *HDInsightPigActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightPigActivityTypeProperties hDInsight Pig activity properties.
type HDInsightPigActivityTypeProperties struct {
// StorageLinkedServices - Storage linked service references.
@@ -49014,7 +43164,6 @@ type HDInsightPigActivityTypeProperties struct {
Defines map[string]interface{} `json:"defines"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HDInsightPigActivityTypeProperties.
func (hipatp HDInsightPigActivityTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -49037,7 +43186,6 @@ func (hipatp HDInsightPigActivityTypeProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightSparkActivity hDInsight Spark activity.
type HDInsightSparkActivity struct {
// HDInsightSparkActivityTypeProperties - HDInsight spark activity properties.
@@ -49058,7 +43206,6 @@ type HDInsightSparkActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) MarshalJSON() ([]byte, error) {
hisa.Type = TypeHDInsightSpark
@@ -49090,175 +43237,146 @@ func (hisa HDInsightSparkActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return &hisa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &hisa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for HDInsightSparkActivity.
func (hisa HDInsightSparkActivity) AsBasicActivity() (BasicActivity, bool) {
return &hisa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HDInsightSparkActivity struct.
func (hisa *HDInsightSparkActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -49349,7 +43467,6 @@ func (hisa *HDInsightSparkActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightSparkActivityTypeProperties hDInsight spark activity properties.
type HDInsightSparkActivityTypeProperties struct {
// RootPath - The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string).
@@ -49370,7 +43487,6 @@ type HDInsightSparkActivityTypeProperties struct {
SparkConfig map[string]interface{} `json:"sparkConfig"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HDInsightSparkActivityTypeProperties.
func (hisatp HDInsightSparkActivityTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -49395,7 +43511,6 @@ func (hisatp HDInsightSparkActivityTypeProperties) MarshalJSON() ([]byte, error)
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightStreamingActivity hDInsight streaming activity type.
type HDInsightStreamingActivity struct {
// HDInsightStreamingActivityTypeProperties - HDInsight streaming activity properties.
@@ -49416,7 +43531,6 @@ type HDInsightStreamingActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) MarshalJSON() ([]byte, error) {
hisa.Type = TypeHDInsightStreaming
@@ -49448,175 +43562,146 @@ func (hisa HDInsightStreamingActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return &hisa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &hisa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for HDInsightStreamingActivity.
func (hisa HDInsightStreamingActivity) AsBasicActivity() (BasicActivity, bool) {
return &hisa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HDInsightStreamingActivity struct.
func (hisa *HDInsightStreamingActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -49707,7 +43792,6 @@ func (hisa *HDInsightStreamingActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HDInsightStreamingActivityTypeProperties hDInsight streaming activity properties.
type HDInsightStreamingActivityTypeProperties struct {
// StorageLinkedServices - Storage linked service references.
@@ -49736,7 +43820,6 @@ type HDInsightStreamingActivityTypeProperties struct {
Defines map[string]interface{} `json:"defines"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HDInsightStreamingActivityTypeProperties.
func (hisatp HDInsightStreamingActivityTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -49769,7 +43852,6 @@ func (hisatp HDInsightStreamingActivityTypeProperties) MarshalJSON() ([]byte, er
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HiveLinkedService hive Server linked service.
type HiveLinkedService struct {
// HiveLinkedServiceTypeProperties - Hive Server linked service properties.
@@ -49788,7 +43870,6 @@ type HiveLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HiveLinkedService.
func (hls HiveLinkedService) MarshalJSON() ([]byte, error) {
hls.Type = TypeHive
@@ -49817,439 +43898,366 @@ func (hls HiveLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return &hls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for HiveLinkedService.
func (hls HiveLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &hls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HiveLinkedService struct.
func (hls *HiveLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -50331,7 +44339,6 @@ func (hls *HiveLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HiveLinkedServiceTypeProperties hive Server linked service properties.
type HiveLinkedServiceTypeProperties struct {
// Host - IP address or host name of the Hive server, separated by ';' for multiple hosts (only when serviceDiscoveryMode is enable).
@@ -50370,7 +44377,6 @@ type HiveLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HiveLinkedServiceTypeProperties struct.
func (hlstp *HiveLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -50538,7 +44544,6 @@ func (hlstp *HiveLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HiveObjectDataset hive Server dataset.
type HiveObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -50557,7 +44562,6 @@ type HiveObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HiveObjectDataset.
func (hod HiveObjectDataset) MarshalJSON() ([]byte, error) {
hod.Type = TypeHiveObject
@@ -50584,337 +44588,281 @@ func (hod HiveObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return &hod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for HiveObjectDataset.
func (hod HiveObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &hod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HiveSource a copy activity Hive Server source.
type HiveSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -50929,7 +44877,6 @@ type HiveSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HiveSource.
func (hs HiveSource) MarshalJSON() ([]byte, error) {
hs.Type = TypeHiveSource
@@ -50946,319 +44893,266 @@ func (hs HiveSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsHiveSource() (*HiveSource, bool) {
return &hs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for HiveSource.
func (hs HiveSource) AsBasicCopySource() (BasicCopySource, bool) {
return &hs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HTTPDataset a file in an HTTP web server.
type HTTPDataset struct {
// HTTPDatasetTypeProperties - Properties specific to this dataset type.
@@ -51279,7 +45173,6 @@ type HTTPDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HTTPDataset.
func (hd HTTPDataset) MarshalJSON() ([]byte, error) {
hd.Type = TypeHTTPFile
@@ -51309,337 +45202,281 @@ func (hd HTTPDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return &hd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for HTTPDataset.
func (hd HTTPDataset) AsBasicDataset() (BasicDataset, bool) {
return &hd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HTTPDataset struct.
func (hd *HTTPDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -51730,7 +45567,6 @@ func (hd *HTTPDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HTTPDatasetTypeProperties properties specific to this dataset type.
type HTTPDatasetTypeProperties struct {
// RelativeURL - The relative URL based on the URL in the HttpLinkedService refers to an HTTP file Type: string (or Expression with resultType string).
@@ -51749,7 +45585,6 @@ type HTTPDatasetTypeProperties struct {
Compression BasicDatasetCompression `json:"compression,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HTTPDatasetTypeProperties struct.
func (hdtp *HTTPDatasetTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -51817,7 +45652,6 @@ func (hdtp *HTTPDatasetTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HTTPLinkedService linked service for an HTTP source.
type HTTPLinkedService struct {
// HTTPLinkedServiceTypeProperties - Properties specific to this linked service type.
@@ -51836,7 +45670,6 @@ type HTTPLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HTTPLinkedService.
func (hls HTTPLinkedService) MarshalJSON() ([]byte, error) {
hls.Type = TypeHTTPServer
@@ -51865,439 +45698,366 @@ func (hls HTTPLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return &hls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for HTTPLinkedService.
func (hls HTTPLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &hls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HTTPLinkedService struct.
func (hls *HTTPLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -52379,7 +46139,6 @@ func (hls *HTTPLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HTTPLinkedServiceTypeProperties properties specific to this linked service type.
type HTTPLinkedServiceTypeProperties struct {
// URL - The base URL of the HTTP endpoint, e.g. http://www.microsoft.com. Type: string (or Expression with resultType string).
@@ -52400,7 +46159,6 @@ type HTTPLinkedServiceTypeProperties struct {
EnableServerCertificateValidation interface{} `json:"enableServerCertificateValidation,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HTTPLinkedServiceTypeProperties struct.
func (hlstp *HTTPLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -52487,7 +46245,6 @@ func (hlstp *HTTPLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HTTPSource a copy activity source for an HTTP file.
type HTTPSource struct {
// HTTPRequestTimeout - Specifies the timeout for a HTTP client to get HTTP response from HTTP server. The default value is equivalent to System.Net.HttpWebRequest.Timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
@@ -52502,7 +46259,6 @@ type HTTPSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HTTPSource.
func (hs HTTPSource) MarshalJSON() ([]byte, error) {
hs.Type = TypeHTTPSource
@@ -52519,319 +46275,266 @@ func (hs HTTPSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsHTTPSource() (*HTTPSource, bool) {
return &hs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for HTTPSource.
func (hs HTTPSource) AsBasicCopySource() (BasicCopySource, bool) {
return &hs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HubspotLinkedService hubspot Serivce linked service.
type HubspotLinkedService struct {
// HubspotLinkedServiceTypeProperties - Hubspot Serivce linked service properties.
@@ -52850,7 +46553,6 @@ type HubspotLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HubspotLinkedService.
func (hls HubspotLinkedService) MarshalJSON() ([]byte, error) {
hls.Type = TypeHubspot
@@ -52879,439 +46581,366 @@ func (hls HubspotLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return &hls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for HubspotLinkedService.
func (hls HubspotLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &hls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HubspotLinkedService struct.
func (hls *HubspotLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -53393,7 +47022,6 @@ func (hls *HubspotLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HubspotLinkedServiceTypeProperties hubspot Serivce linked service properties.
type HubspotLinkedServiceTypeProperties struct {
// ClientID - The client ID associated with your Hubspot application.
@@ -53414,7 +47042,6 @@ type HubspotLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for HubspotLinkedServiceTypeProperties struct.
func (hlstp *HubspotLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -53499,7 +47126,6 @@ func (hlstp *HubspotLinkedServiceTypeProperties) UnmarshalJSON(body []byte) erro
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HubspotObjectDataset hubspot Serivce dataset.
type HubspotObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -53518,7 +47144,6 @@ type HubspotObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HubspotObjectDataset.
func (hod HubspotObjectDataset) MarshalJSON() ([]byte, error) {
hod.Type = TypeHubspotObject
@@ -53545,337 +47170,281 @@ func (hod HubspotObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return &hod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for HubspotObjectDataset.
func (hod HubspotObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &hod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// HubspotSource a copy activity Hubspot Serivce source.
type HubspotSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -53890,7 +47459,6 @@ type HubspotSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for HubspotSource.
func (hs HubspotSource) MarshalJSON() ([]byte, error) {
hs.Type = TypeHubspotSource
@@ -53907,319 +47475,266 @@ func (hs HubspotSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsHubspotSource() (*HubspotSource, bool) {
return &hs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for HubspotSource.
func (hs HubspotSource) AsBasicCopySource() (BasicCopySource, bool) {
return &hs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IfConditionActivity this activity evaluates a boolean expression and executes either the activities under the
// ifTrueActivities property or the ifFalseActivities property depending on the result of the expression.
type IfConditionActivity struct {
@@ -54237,7 +47752,6 @@ type IfConditionActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for IfConditionActivity.
func (ica IfConditionActivity) MarshalJSON() ([]byte, error) {
ica.Type = TypeIfCondition
@@ -54263,175 +47777,146 @@ func (ica IfConditionActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return &ica, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return &ica, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for IfConditionActivity.
func (ica IfConditionActivity) AsBasicActivity() (BasicActivity, bool) {
return &ica, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for IfConditionActivity struct.
func (ica *IfConditionActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -54504,7 +47989,6 @@ func (ica *IfConditionActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IfConditionActivityTypeProperties ifCondition activity properties.
type IfConditionActivityTypeProperties struct {
// Expression - An expression that would evaluate to Boolean. This is used to determine the block of activities (ifTrueActivities or ifFalseActivities) that will be executed.
@@ -54515,7 +47999,6 @@ type IfConditionActivityTypeProperties struct {
IfFalseActivities *[]BasicActivity `json:"ifFalseActivities,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for IfConditionActivityTypeProperties struct.
func (icatp *IfConditionActivityTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -54556,7 +48039,6 @@ func (icatp *IfConditionActivityTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ImpalaLinkedService impala server linked service.
type ImpalaLinkedService struct {
// ImpalaLinkedServiceTypeProperties - Impala server linked service properties.
@@ -54575,7 +48057,6 @@ type ImpalaLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ImpalaLinkedService.
func (ils ImpalaLinkedService) MarshalJSON() ([]byte, error) {
ils.Type = TypeImpala
@@ -54604,439 +48085,366 @@ func (ils ImpalaLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return &ils, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for ImpalaLinkedService.
func (ils ImpalaLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &ils, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ImpalaLinkedService struct.
func (ils *ImpalaLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -55118,7 +48526,6 @@ func (ils *ImpalaLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ImpalaLinkedServiceTypeProperties impala server linked service properties.
type ImpalaLinkedServiceTypeProperties struct {
// Host - The IP address or host name of the Impala server. (i.e. 192.168.222.160)
@@ -55145,7 +48552,6 @@ type ImpalaLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ImpalaLinkedServiceTypeProperties struct.
func (ilstp *ImpalaLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -55259,7 +48665,6 @@ func (ilstp *ImpalaLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ImpalaObjectDataset impala server dataset.
type ImpalaObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -55278,7 +48683,6 @@ type ImpalaObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) MarshalJSON() ([]byte, error) {
iod.Type = TypeImpalaObject
@@ -55305,337 +48709,281 @@ func (iod ImpalaObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return &iod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for ImpalaObjectDataset.
func (iod ImpalaObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &iod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ImpalaSource a copy activity Impala server source.
type ImpalaSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -55650,7 +48998,6 @@ type ImpalaSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ImpalaSource.
func (is ImpalaSource) MarshalJSON() ([]byte, error) {
is.Type = TypeImpalaSource
@@ -55667,319 +49014,266 @@ func (is ImpalaSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsImpalaSource() (*ImpalaSource, bool) {
return &is, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for ImpalaSource.
func (is ImpalaSource) AsBasicCopySource() (BasicCopySource, bool) {
return &is, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicIntegrationRuntime azure Data Factory nested object which serves as a compute resource for activities.
type BasicIntegrationRuntime interface {
AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool)
@@ -55987,7 +49281,6 @@ type BasicIntegrationRuntime interface {
AsIntegrationRuntime() (*IntegrationRuntime, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntime azure Data Factory nested object which serves as a compute resource for activities.
type IntegrationRuntime struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -56039,7 +49332,6 @@ func unmarshalBasicIntegrationRuntimeArray(body []byte) ([]BasicIntegrationRunti
return irArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for IntegrationRuntime.
func (ir IntegrationRuntime) MarshalJSON() ([]byte, error) {
ir.Type = TypeIntegrationRuntime
@@ -56056,31 +49348,26 @@ func (ir IntegrationRuntime) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSelfHostedIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime.
func (ir IntegrationRuntime) AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsManagedIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime.
func (ir IntegrationRuntime) AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime.
func (ir IntegrationRuntime) AsIntegrationRuntime() (*IntegrationRuntime, bool) {
return &ir, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime.
func (ir IntegrationRuntime) AsBasicIntegrationRuntime() (BasicIntegrationRuntime, bool) {
return &ir, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeAuthKeys the integration runtime authentication keys.
type IntegrationRuntimeAuthKeys struct {
autorest.Response `json:"-"`
@@ -56090,7 +49377,6 @@ type IntegrationRuntimeAuthKeys struct {
AuthKey2 *string `json:"authKey2,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeComputeProperties the compute resource properties for managed integration runtime.
type IntegrationRuntimeComputeProperties struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -56107,7 +49393,6 @@ type IntegrationRuntimeComputeProperties struct {
VNetProperties *IntegrationRuntimeVNetProperties `json:"vNetProperties,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for IntegrationRuntimeComputeProperties.
func (ircp IntegrationRuntimeComputeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -56132,7 +49417,6 @@ func (ircp IntegrationRuntimeComputeProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeConnectionInfo connection information for encrypting the on-premises data source credentials.
type IntegrationRuntimeConnectionInfo struct {
autorest.Response `json:"-"`
@@ -56152,7 +49436,6 @@ type IntegrationRuntimeConnectionInfo struct {
IsIdentityCertExprired *bool `json:"isIdentityCertExprired,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for IntegrationRuntimeConnectionInfo.
func (irci IntegrationRuntimeConnectionInfo) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -56180,7 +49463,6 @@ func (irci IntegrationRuntimeConnectionInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeCustomSetupScriptProperties custom setup script properties for a managed dedicated integration
// runtime.
type IntegrationRuntimeCustomSetupScriptProperties struct {
@@ -56190,7 +49472,6 @@ type IntegrationRuntimeCustomSetupScriptProperties struct {
SasToken *SecureString `json:"sasToken,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeListResponse a list of integration runtime resources.
type IntegrationRuntimeListResponse struct {
autorest.Response `json:"-"`
@@ -56200,7 +49481,6 @@ type IntegrationRuntimeListResponse struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeListResponseIterator provides access to a complete listing of IntegrationRuntimeResource
// values.
type IntegrationRuntimeListResponseIterator struct {
@@ -56208,7 +49488,6 @@ type IntegrationRuntimeListResponseIterator struct {
page IntegrationRuntimeListResponsePage
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *IntegrationRuntimeListResponseIterator) Next() error {
@@ -56225,19 +49504,16 @@ func (iter *IntegrationRuntimeListResponseIterator) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IntegrationRuntimeListResponseIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (iter IntegrationRuntimeListResponseIterator) Response() IntegrationRuntimeListResponse {
return iter.page.Response()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter IntegrationRuntimeListResponseIterator) Value() IntegrationRuntimeResource {
@@ -56247,7 +49523,6 @@ func (iter IntegrationRuntimeListResponseIterator) Value() IntegrationRuntimeRes
return iter.page.Values()[iter.i]
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IsEmpty returns true if the ListResult contains no values.
func (irlr IntegrationRuntimeListResponse) IsEmpty() bool {
return irlr.Value == nil || len(*irlr.Value) == 0
@@ -56265,14 +49540,12 @@ func (irlr IntegrationRuntimeListResponse) integrationRuntimeListResponsePrepare
autorest.WithBaseURL(to.String(irlr.NextLink)))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeListResponsePage contains a page of IntegrationRuntimeResource values.
type IntegrationRuntimeListResponsePage struct {
fn func(IntegrationRuntimeListResponse) (IntegrationRuntimeListResponse, error)
irlr IntegrationRuntimeListResponse
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *IntegrationRuntimeListResponsePage) Next() error {
@@ -56284,19 +49557,16 @@ func (page *IntegrationRuntimeListResponsePage) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IntegrationRuntimeListResponsePage) NotDone() bool {
return !page.irlr.IsEmpty()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (page IntegrationRuntimeListResponsePage) Response() IntegrationRuntimeListResponse {
return page.irlr
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Values returns the slice of values for the current page or nil if there are no values.
func (page IntegrationRuntimeListResponsePage) Values() []IntegrationRuntimeResource {
if page.irlr.IsEmpty() {
@@ -56305,7 +49575,6 @@ func (page IntegrationRuntimeListResponsePage) Values() []IntegrationRuntimeReso
return *page.irlr.Value
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeMonitoringData get monitoring data response.
type IntegrationRuntimeMonitoringData struct {
autorest.Response `json:"-"`
@@ -56315,7 +49584,6 @@ type IntegrationRuntimeMonitoringData struct {
Nodes *[]IntegrationRuntimeNodeMonitoringData `json:"nodes,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeNodeIPAddress the IP address of self-hosted integration runtime node.
type IntegrationRuntimeNodeIPAddress struct {
autorest.Response `json:"-"`
@@ -56323,7 +49591,6 @@ type IntegrationRuntimeNodeIPAddress struct {
IPAddress *string `json:"ipAddress,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeNodeMonitoringData monitoring data for integration runtime node.
type IntegrationRuntimeNodeMonitoringData struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -56346,7 +49613,6 @@ type IntegrationRuntimeNodeMonitoringData struct {
ReceivedBytes *float64 `json:"receivedBytes,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for IntegrationRuntimeNodeMonitoringData.
func (irnmd IntegrationRuntimeNodeMonitoringData) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -56380,7 +49646,6 @@ func (irnmd IntegrationRuntimeNodeMonitoringData) MarshalJSON() ([]byte, error)
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeReference integration runtime reference type.
type IntegrationRuntimeReference struct {
// Type - Type of integration runtime.
@@ -56391,7 +49656,6 @@ type IntegrationRuntimeReference struct {
Parameters map[string]interface{} `json:"parameters"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for IntegrationRuntimeReference.
func (irr IntegrationRuntimeReference) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -56407,14 +49671,12 @@ func (irr IntegrationRuntimeReference) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeRegenerateKeyParameters parameters to regenerate the authentication key.
type IntegrationRuntimeRegenerateKeyParameters struct {
// KeyName - The name of the authentication key to regenerate. Possible values include: 'AuthKey1', 'AuthKey2'
KeyName IntegrationRuntimeAuthKeyName `json:"keyName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeRemoveNodeRequest request to remove a node.
type IntegrationRuntimeRemoveNodeRequest struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -56423,7 +49685,6 @@ type IntegrationRuntimeRemoveNodeRequest struct {
NodeName *string `json:"nodeName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for IntegrationRuntimeRemoveNodeRequest.
func (irrnr IntegrationRuntimeRemoveNodeRequest) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -56436,7 +49697,6 @@ func (irrnr IntegrationRuntimeRemoveNodeRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeResource integration runtime resource type.
type IntegrationRuntimeResource struct {
autorest.Response `json:"-"`
@@ -56452,7 +49712,6 @@ type IntegrationRuntimeResource struct {
Etag *string `json:"etag,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeResource struct.
func (irr *IntegrationRuntimeResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -56512,7 +49771,6 @@ func (irr *IntegrationRuntimeResource) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeSsisCatalogInfo catalog information for managed dedicated integration runtime.
type IntegrationRuntimeSsisCatalogInfo struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -56527,7 +49785,6 @@ type IntegrationRuntimeSsisCatalogInfo struct {
CatalogPricingTier IntegrationRuntimeSsisCatalogPricingTier `json:"catalogPricingTier,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for IntegrationRuntimeSsisCatalogInfo.
func (irsci IntegrationRuntimeSsisCatalogInfo) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -56549,7 +49806,6 @@ func (irsci IntegrationRuntimeSsisCatalogInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeSsisProperties SSIS properties for managed integration runtime.
type IntegrationRuntimeSsisProperties struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -56564,7 +49820,6 @@ type IntegrationRuntimeSsisProperties struct {
Edition IntegrationRuntimeEdition `json:"edition,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for IntegrationRuntimeSsisProperties.
func (irsp IntegrationRuntimeSsisProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -56586,7 +49841,6 @@ func (irsp IntegrationRuntimeSsisProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimesStartFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type IntegrationRuntimesStartFuture struct {
@@ -56594,7 +49848,6 @@ type IntegrationRuntimesStartFuture struct {
req *http.Request
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future IntegrationRuntimesStartFuture) Result(client IntegrationRuntimesClient) (irsr IntegrationRuntimeStatusResponse, err error) {
@@ -56637,7 +49890,6 @@ func (future IntegrationRuntimesStartFuture) Result(client IntegrationRuntimesCl
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimesStopFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type IntegrationRuntimesStopFuture struct {
@@ -56645,7 +49897,6 @@ type IntegrationRuntimesStopFuture struct {
req *http.Request
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future IntegrationRuntimesStopFuture) Result(client IntegrationRuntimesClient) (ar autorest.Response, err error) {
@@ -56688,7 +49939,6 @@ func (future IntegrationRuntimesStopFuture) Result(client IntegrationRuntimesCli
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicIntegrationRuntimeStatus integration runtime status.
type BasicIntegrationRuntimeStatus interface {
AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool)
@@ -56696,7 +49946,6 @@ type BasicIntegrationRuntimeStatus interface {
AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeStatus integration runtime status.
type IntegrationRuntimeStatus struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -56750,7 +49999,6 @@ func unmarshalBasicIntegrationRuntimeStatusArray(body []byte) ([]BasicIntegratio
return irsArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for IntegrationRuntimeStatus.
func (irs IntegrationRuntimeStatus) MarshalJSON() ([]byte, error) {
irs.Type = TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus
@@ -56770,31 +50018,26 @@ func (irs IntegrationRuntimeStatus) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSelfHostedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus.
func (irs IntegrationRuntimeStatus) AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsManagedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus.
func (irs IntegrationRuntimeStatus) AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus.
func (irs IntegrationRuntimeStatus) AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) {
return &irs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus.
func (irs IntegrationRuntimeStatus) AsBasicIntegrationRuntimeStatus() (BasicIntegrationRuntimeStatus, bool) {
return &irs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeStatusListResponse a list of integration runtime status.
type IntegrationRuntimeStatusListResponse struct {
// Value - List of integration runtime status.
@@ -56803,7 +50046,6 @@ type IntegrationRuntimeStatusListResponse struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeStatusResponse integration runtime status response.
type IntegrationRuntimeStatusResponse struct {
autorest.Response `json:"-"`
@@ -56813,7 +50055,6 @@ type IntegrationRuntimeStatusResponse struct {
Properties BasicIntegrationRuntimeStatus `json:"properties,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeStatusResponse struct.
func (irsr *IntegrationRuntimeStatusResponse) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -56846,7 +50087,6 @@ func (irsr *IntegrationRuntimeStatusResponse) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IntegrationRuntimeVNetProperties vNet properties for managed integration runtime.
type IntegrationRuntimeVNetProperties struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -56857,7 +50097,6 @@ type IntegrationRuntimeVNetProperties struct {
Subnet *string `json:"subnet,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for IntegrationRuntimeVNetProperties.
func (irvnp IntegrationRuntimeVNetProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -56873,7 +50112,6 @@ func (irvnp IntegrationRuntimeVNetProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// JiraLinkedService jira Serivce linked service.
type JiraLinkedService struct {
// JiraLinkedServiceTypeProperties - Jira Serivce linked service properties.
@@ -56892,7 +50130,6 @@ type JiraLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for JiraLinkedService.
func (jls JiraLinkedService) MarshalJSON() ([]byte, error) {
jls.Type = TypeJira
@@ -56921,439 +50158,366 @@ func (jls JiraLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return &jls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for JiraLinkedService.
func (jls JiraLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &jls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for JiraLinkedService struct.
func (jls *JiraLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -57435,7 +50599,6 @@ func (jls *JiraLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// JiraLinkedServiceTypeProperties jira Serivce linked service properties.
type JiraLinkedServiceTypeProperties struct {
// Host - The IP address or host name of the Jira service. (e.g. jira.example.com)
@@ -57456,7 +50619,6 @@ type JiraLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for JiraLinkedServiceTypeProperties struct.
func (jlstp *JiraLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -57543,7 +50705,6 @@ func (jlstp *JiraLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// JiraObjectDataset jira Serivce dataset.
type JiraObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -57562,7 +50723,6 @@ type JiraObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for JiraObjectDataset.
func (jod JiraObjectDataset) MarshalJSON() ([]byte, error) {
jod.Type = TypeJiraObject
@@ -57589,337 +50749,281 @@ func (jod JiraObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return &jod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for JiraObjectDataset.
func (jod JiraObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &jod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// JiraSource a copy activity Jira Serivce source.
type JiraSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -57934,7 +51038,6 @@ type JiraSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for JiraSource.
func (js JiraSource) MarshalJSON() ([]byte, error) {
js.Type = TypeJiraSource
@@ -57951,319 +51054,266 @@ func (js JiraSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsJiraSource() (*JiraSource, bool) {
return &js, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for JiraSource.
func (js JiraSource) AsBasicCopySource() (BasicCopySource, bool) {
return &js, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// JSONFormat the data stored in JSON format.
type JSONFormat struct {
// FilePattern - File pattern of JSON. To be more specific, the way of separating a collection of JSON objects. The default value is 'setOfObjects'. It is case-sensitive. Possible values include: 'SetOfObjects', 'ArrayOfObjects'
@@ -58286,7 +51336,6 @@ type JSONFormat struct {
Type TypeBasicDatasetStorageFormat `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for JSONFormat.
func (jf JSONFormat) MarshalJSON() ([]byte, error) {
jf.Type = TypeJSONFormat
@@ -58309,49 +51358,41 @@ func (jf JSONFormat) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsParquetFormat is the BasicDatasetStorageFormat implementation for JSONFormat.
func (jf JSONFormat) AsParquetFormat() (*ParquetFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOrcFormat is the BasicDatasetStorageFormat implementation for JSONFormat.
func (jf JSONFormat) AsOrcFormat() (*OrcFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAvroFormat is the BasicDatasetStorageFormat implementation for JSONFormat.
func (jf JSONFormat) AsAvroFormat() (*AvroFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJSONFormat is the BasicDatasetStorageFormat implementation for JSONFormat.
func (jf JSONFormat) AsJSONFormat() (*JSONFormat, bool) {
return &jf, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTextFormat is the BasicDatasetStorageFormat implementation for JSONFormat.
func (jf JSONFormat) AsTextFormat() (*TextFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetStorageFormat is the BasicDatasetStorageFormat implementation for JSONFormat.
func (jf JSONFormat) AsDatasetStorageFormat() (*DatasetStorageFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDatasetStorageFormat is the BasicDatasetStorageFormat implementation for JSONFormat.
func (jf JSONFormat) AsBasicDatasetStorageFormat() (BasicDatasetStorageFormat, bool) {
return &jf, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LinkedIntegrationRuntime the linked integration runtime information.
type LinkedIntegrationRuntime struct {
// Name - The name of the linked integration runtime.
@@ -58366,7 +51407,6 @@ type LinkedIntegrationRuntime struct {
CreateTime *date.Time `json:"createTime,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LinkedIntegrationRuntimeKey the base definition of a secret type.
type LinkedIntegrationRuntimeKey struct {
// Key - Type of the secret.
@@ -58375,7 +51415,6 @@ type LinkedIntegrationRuntimeKey struct {
AuthorizationType AuthorizationType `json:"authorizationType,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for LinkedIntegrationRuntimeKey.
func (lirk LinkedIntegrationRuntimeKey) MarshalJSON() ([]byte, error) {
lirk.AuthorizationType = AuthorizationTypeKey
@@ -58389,31 +51428,26 @@ func (lirk LinkedIntegrationRuntimeKey) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedIntegrationRuntimeRbac is the BasicLinkedIntegrationRuntimeProperties implementation for LinkedIntegrationRuntimeKey.
func (lirk LinkedIntegrationRuntimeKey) AsLinkedIntegrationRuntimeRbac() (*LinkedIntegrationRuntimeRbac, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedIntegrationRuntimeKey is the BasicLinkedIntegrationRuntimeProperties implementation for LinkedIntegrationRuntimeKey.
func (lirk LinkedIntegrationRuntimeKey) AsLinkedIntegrationRuntimeKey() (*LinkedIntegrationRuntimeKey, bool) {
return &lirk, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedIntegrationRuntimeProperties is the BasicLinkedIntegrationRuntimeProperties implementation for LinkedIntegrationRuntimeKey.
func (lirk LinkedIntegrationRuntimeKey) AsLinkedIntegrationRuntimeProperties() (*LinkedIntegrationRuntimeProperties, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedIntegrationRuntimeProperties is the BasicLinkedIntegrationRuntimeProperties implementation for LinkedIntegrationRuntimeKey.
func (lirk LinkedIntegrationRuntimeKey) AsBasicLinkedIntegrationRuntimeProperties() (BasicLinkedIntegrationRuntimeProperties, bool) {
return &lirk, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicLinkedIntegrationRuntimeProperties the base definition of a secret type.
type BasicLinkedIntegrationRuntimeProperties interface {
AsLinkedIntegrationRuntimeRbac() (*LinkedIntegrationRuntimeRbac, bool)
@@ -58421,7 +51455,6 @@ type BasicLinkedIntegrationRuntimeProperties interface {
AsLinkedIntegrationRuntimeProperties() (*LinkedIntegrationRuntimeProperties, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LinkedIntegrationRuntimeProperties the base definition of a secret type.
type LinkedIntegrationRuntimeProperties struct {
// AuthorizationType - Possible values include: 'AuthorizationTypeLinkedIntegrationRuntimeProperties', 'AuthorizationTypeRBAC', 'AuthorizationTypeKey'
@@ -58469,7 +51502,6 @@ func unmarshalBasicLinkedIntegrationRuntimePropertiesArray(body []byte) ([]Basic
return lirpArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for LinkedIntegrationRuntimeProperties.
func (lirp LinkedIntegrationRuntimeProperties) MarshalJSON() ([]byte, error) {
lirp.AuthorizationType = AuthorizationTypeLinkedIntegrationRuntimeProperties
@@ -58480,31 +51512,26 @@ func (lirp LinkedIntegrationRuntimeProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedIntegrationRuntimeRbac is the BasicLinkedIntegrationRuntimeProperties implementation for LinkedIntegrationRuntimeProperties.
func (lirp LinkedIntegrationRuntimeProperties) AsLinkedIntegrationRuntimeRbac() (*LinkedIntegrationRuntimeRbac, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedIntegrationRuntimeKey is the BasicLinkedIntegrationRuntimeProperties implementation for LinkedIntegrationRuntimeProperties.
func (lirp LinkedIntegrationRuntimeProperties) AsLinkedIntegrationRuntimeKey() (*LinkedIntegrationRuntimeKey, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedIntegrationRuntimeProperties is the BasicLinkedIntegrationRuntimeProperties implementation for LinkedIntegrationRuntimeProperties.
func (lirp LinkedIntegrationRuntimeProperties) AsLinkedIntegrationRuntimeProperties() (*LinkedIntegrationRuntimeProperties, bool) {
return &lirp, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedIntegrationRuntimeProperties is the BasicLinkedIntegrationRuntimeProperties implementation for LinkedIntegrationRuntimeProperties.
func (lirp LinkedIntegrationRuntimeProperties) AsBasicLinkedIntegrationRuntimeProperties() (BasicLinkedIntegrationRuntimeProperties, bool) {
return &lirp, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LinkedIntegrationRuntimeRbac the base definition of a secret type.
type LinkedIntegrationRuntimeRbac struct {
// ResourceID - The resource ID of the integration runtime to be shared.
@@ -58513,7 +51540,6 @@ type LinkedIntegrationRuntimeRbac struct {
AuthorizationType AuthorizationType `json:"authorizationType,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for LinkedIntegrationRuntimeRbac.
func (lirr LinkedIntegrationRuntimeRbac) MarshalJSON() ([]byte, error) {
lirr.AuthorizationType = AuthorizationTypeRBAC
@@ -58527,37 +51553,31 @@ func (lirr LinkedIntegrationRuntimeRbac) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedIntegrationRuntimeRbac is the BasicLinkedIntegrationRuntimeProperties implementation for LinkedIntegrationRuntimeRbac.
func (lirr LinkedIntegrationRuntimeRbac) AsLinkedIntegrationRuntimeRbac() (*LinkedIntegrationRuntimeRbac, bool) {
return &lirr, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedIntegrationRuntimeKey is the BasicLinkedIntegrationRuntimeProperties implementation for LinkedIntegrationRuntimeRbac.
func (lirr LinkedIntegrationRuntimeRbac) AsLinkedIntegrationRuntimeKey() (*LinkedIntegrationRuntimeKey, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedIntegrationRuntimeProperties is the BasicLinkedIntegrationRuntimeProperties implementation for LinkedIntegrationRuntimeRbac.
func (lirr LinkedIntegrationRuntimeRbac) AsLinkedIntegrationRuntimeProperties() (*LinkedIntegrationRuntimeProperties, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedIntegrationRuntimeProperties is the BasicLinkedIntegrationRuntimeProperties implementation for LinkedIntegrationRuntimeRbac.
func (lirr LinkedIntegrationRuntimeRbac) AsBasicLinkedIntegrationRuntimeProperties() (BasicLinkedIntegrationRuntimeProperties, bool) {
return &lirr, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LinkedIntegrationRuntimeTypeProperties the base definition of a secret type.
type LinkedIntegrationRuntimeTypeProperties struct {
LinkedInfo BasicLinkedIntegrationRuntimeProperties `json:"linkedInfo,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for LinkedIntegrationRuntimeTypeProperties struct.
func (lirtp *LinkedIntegrationRuntimeTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -58581,7 +51601,6 @@ func (lirtp *LinkedIntegrationRuntimeTypeProperties) UnmarshalJSON(body []byte)
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicLinkedService the Azure Data Factory nested object which contains the information and credential which can be
// used to connect with related store or compute resource.
type BasicLinkedService interface {
@@ -58658,7 +51677,6 @@ type BasicLinkedService interface {
AsLinkedService() (*LinkedService, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LinkedService the Azure Data Factory nested object which contains the information and credential which can be
// used to connect with related store or compute resource.
type LinkedService struct {
@@ -58989,7 +52007,6 @@ func unmarshalBasicLinkedServiceArray(body []byte) ([]BasicLinkedService, error)
return lsArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for LinkedService.
func (ls LinkedService) MarshalJSON() ([]byte, error) {
ls.Type = TypeLinkedService
@@ -59015,439 +52032,366 @@ func (ls LinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsLinkedService() (*LinkedService, bool) {
return &ls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for LinkedService.
func (ls LinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &ls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LinkedServiceListResponse a list of linked service resources.
type LinkedServiceListResponse struct {
autorest.Response `json:"-"`
@@ -59457,14 +52401,12 @@ type LinkedServiceListResponse struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LinkedServiceListResponseIterator provides access to a complete listing of LinkedServiceResource values.
type LinkedServiceListResponseIterator struct {
i int
page LinkedServiceListResponsePage
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *LinkedServiceListResponseIterator) Next() error {
@@ -59481,19 +52423,16 @@ func (iter *LinkedServiceListResponseIterator) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter LinkedServiceListResponseIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (iter LinkedServiceListResponseIterator) Response() LinkedServiceListResponse {
return iter.page.Response()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter LinkedServiceListResponseIterator) Value() LinkedServiceResource {
@@ -59503,7 +52442,6 @@ func (iter LinkedServiceListResponseIterator) Value() LinkedServiceResource {
return iter.page.Values()[iter.i]
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IsEmpty returns true if the ListResult contains no values.
func (lslr LinkedServiceListResponse) IsEmpty() bool {
return lslr.Value == nil || len(*lslr.Value) == 0
@@ -59521,14 +52459,12 @@ func (lslr LinkedServiceListResponse) linkedServiceListResponsePreparer() (*http
autorest.WithBaseURL(to.String(lslr.NextLink)))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LinkedServiceListResponsePage contains a page of LinkedServiceResource values.
type LinkedServiceListResponsePage struct {
fn func(LinkedServiceListResponse) (LinkedServiceListResponse, error)
lslr LinkedServiceListResponse
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *LinkedServiceListResponsePage) Next() error {
@@ -59540,19 +52476,16 @@ func (page *LinkedServiceListResponsePage) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page LinkedServiceListResponsePage) NotDone() bool {
return !page.lslr.IsEmpty()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (page LinkedServiceListResponsePage) Response() LinkedServiceListResponse {
return page.lslr
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Values returns the slice of values for the current page or nil if there are no values.
func (page LinkedServiceListResponsePage) Values() []LinkedServiceResource {
if page.lslr.IsEmpty() {
@@ -59561,7 +52494,6 @@ func (page LinkedServiceListResponsePage) Values() []LinkedServiceResource {
return *page.lslr.Value
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LinkedServiceReference linked service reference type.
type LinkedServiceReference struct {
// Type - Linked service reference type.
@@ -59572,7 +52504,6 @@ type LinkedServiceReference struct {
Parameters map[string]interface{} `json:"parameters"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for LinkedServiceReference.
func (lsr LinkedServiceReference) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -59588,7 +52519,6 @@ func (lsr LinkedServiceReference) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LinkedServiceResource linked service resource type.
type LinkedServiceResource struct {
autorest.Response `json:"-"`
@@ -59604,7 +52534,6 @@ type LinkedServiceResource struct {
Etag *string `json:"etag,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for LinkedServiceResource struct.
func (lsr *LinkedServiceResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -59664,7 +52593,6 @@ func (lsr *LinkedServiceResource) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LookupActivity lookup activity.
type LookupActivity struct {
// LookupActivityTypeProperties - Lookup activity properties.
@@ -59685,7 +52613,6 @@ type LookupActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for LookupActivity.
func (la LookupActivity) MarshalJSON() ([]byte, error) {
la.Type = TypeLookup
@@ -59717,175 +52644,146 @@ func (la LookupActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsLookupActivity() (*LookupActivity, bool) {
return &la, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &la, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for LookupActivity.
func (la LookupActivity) AsBasicActivity() (BasicActivity, bool) {
return &la, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for LookupActivity struct.
func (la *LookupActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -59976,7 +52874,6 @@ func (la *LookupActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// LookupActivityTypeProperties lookup activity properties.
type LookupActivityTypeProperties struct {
// Source - Dataset-specific source properties, same as copy activity source.
@@ -59987,7 +52884,6 @@ type LookupActivityTypeProperties struct {
FirstRowOnly interface{} `json:"firstRowOnly,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for LookupActivityTypeProperties struct.
func (latp *LookupActivityTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -60029,7 +52925,6 @@ func (latp *LookupActivityTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MagentoLinkedService magento server linked service.
type MagentoLinkedService struct {
// MagentoLinkedServiceTypeProperties - Magento server linked service properties.
@@ -60048,7 +52943,6 @@ type MagentoLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MagentoLinkedService.
func (mls MagentoLinkedService) MarshalJSON() ([]byte, error) {
mls.Type = TypeMagento
@@ -60077,439 +52971,366 @@ func (mls MagentoLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return &mls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for MagentoLinkedService.
func (mls MagentoLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &mls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for MagentoLinkedService struct.
func (mls *MagentoLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -60591,7 +53412,6 @@ func (mls *MagentoLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MagentoLinkedServiceTypeProperties magento server linked service properties.
type MagentoLinkedServiceTypeProperties struct {
// Host - The URL of the Magento instance. (i.e. 192.168.222.110/magento3)
@@ -60608,7 +53428,6 @@ type MagentoLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for MagentoLinkedServiceTypeProperties struct.
func (mlstp *MagentoLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -60677,7 +53496,6 @@ func (mlstp *MagentoLinkedServiceTypeProperties) UnmarshalJSON(body []byte) erro
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MagentoObjectDataset magento server dataset.
type MagentoObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -60696,7 +53514,6 @@ type MagentoObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MagentoObjectDataset.
func (mod MagentoObjectDataset) MarshalJSON() ([]byte, error) {
mod.Type = TypeMagentoObject
@@ -60723,337 +53540,281 @@ func (mod MagentoObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return &mod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for MagentoObjectDataset.
func (mod MagentoObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &mod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MagentoSource a copy activity Magento server source.
type MagentoSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -61068,7 +53829,6 @@ type MagentoSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MagentoSource.
func (ms MagentoSource) MarshalJSON() ([]byte, error) {
ms.Type = TypeMagentoSource
@@ -61085,319 +53845,266 @@ func (ms MagentoSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsMagentoSource() (*MagentoSource, bool) {
return &ms, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for MagentoSource.
func (ms MagentoSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ms, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ManagedIntegrationRuntime managed integration runtime, including managed elastic and managed dedicated
// integration runtimes.
type ManagedIntegrationRuntime struct {
@@ -61413,7 +54120,6 @@ type ManagedIntegrationRuntime struct {
Type TypeBasicIntegrationRuntime `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ManagedIntegrationRuntime.
func (mir ManagedIntegrationRuntime) MarshalJSON() ([]byte, error) {
mir.Type = TypeManaged
@@ -61436,31 +54142,26 @@ func (mir ManagedIntegrationRuntime) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSelfHostedIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime.
func (mir ManagedIntegrationRuntime) AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsManagedIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime.
func (mir ManagedIntegrationRuntime) AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) {
return &mir, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime.
func (mir ManagedIntegrationRuntime) AsIntegrationRuntime() (*IntegrationRuntime, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime.
func (mir ManagedIntegrationRuntime) AsBasicIntegrationRuntime() (BasicIntegrationRuntime, bool) {
return &mir, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ManagedIntegrationRuntime struct.
func (mir *ManagedIntegrationRuntime) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -61524,7 +54225,6 @@ func (mir *ManagedIntegrationRuntime) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ManagedIntegrationRuntimeError error definition for managed integration runtime.
type ManagedIntegrationRuntimeError struct {
// Time - The time when the error occurred.
@@ -61537,7 +54237,6 @@ type ManagedIntegrationRuntimeError struct {
Message *string `json:"message,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ManagedIntegrationRuntimeNode properties of integration runtime node.
type ManagedIntegrationRuntimeNode struct {
// NodeID - The managed integration runtime node id.
@@ -61548,7 +54247,6 @@ type ManagedIntegrationRuntimeNode struct {
Errors *[]ManagedIntegrationRuntimeError `json:"errors,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ManagedIntegrationRuntimeOperationResult properties of managed integration runtime operation result.
type ManagedIntegrationRuntimeOperationResult struct {
// Type - The operation type. Could be start or stop.
@@ -61565,7 +54263,6 @@ type ManagedIntegrationRuntimeOperationResult struct {
ActivityID *string `json:"activityId,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ManagedIntegrationRuntimeStatus managed integration runtime status.
type ManagedIntegrationRuntimeStatus struct {
// ManagedIntegrationRuntimeStatusTypeProperties - Managed integration runtime status type properties.
@@ -61580,7 +54277,6 @@ type ManagedIntegrationRuntimeStatus struct {
Type TypeBasicIntegrationRuntimeStatus `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ManagedIntegrationRuntimeStatus.
func (mirs ManagedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) {
mirs.Type = TypeBasicIntegrationRuntimeStatusTypeManaged
@@ -61603,31 +54299,26 @@ func (mirs ManagedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSelfHostedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus.
func (mirs ManagedIntegrationRuntimeStatus) AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsManagedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus.
func (mirs ManagedIntegrationRuntimeStatus) AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) {
return &mirs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus.
func (mirs ManagedIntegrationRuntimeStatus) AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus.
func (mirs ManagedIntegrationRuntimeStatus) AsBasicIntegrationRuntimeStatus() (BasicIntegrationRuntimeStatus, bool) {
return &mirs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ManagedIntegrationRuntimeStatus struct.
func (mirs *ManagedIntegrationRuntimeStatus) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -61691,7 +54382,6 @@ func (mirs *ManagedIntegrationRuntimeStatus) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ManagedIntegrationRuntimeStatusTypeProperties managed integration runtime status type properties.
type ManagedIntegrationRuntimeStatusTypeProperties struct {
// CreateTime - The time at which the integration runtime was created, in ISO8601 format.
@@ -61704,7 +54394,6 @@ type ManagedIntegrationRuntimeStatusTypeProperties struct {
LastOperation *ManagedIntegrationRuntimeOperationResult `json:"lastOperation,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ManagedIntegrationRuntimeTypeProperties managed integration runtime type properties.
type ManagedIntegrationRuntimeTypeProperties struct {
// ComputeProperties - The compute resource for managed integration runtime.
@@ -61713,7 +54402,6 @@ type ManagedIntegrationRuntimeTypeProperties struct {
SsisProperties *IntegrationRuntimeSsisProperties `json:"ssisProperties,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MariaDBLinkedService mariaDB server linked service.
type MariaDBLinkedService struct {
// MariaDBLinkedServiceTypeProperties - MariaDB server linked service properties.
@@ -61732,7 +54420,6 @@ type MariaDBLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MariaDBLinkedService.
func (mdls MariaDBLinkedService) MarshalJSON() ([]byte, error) {
mdls.Type = TypeMariaDB
@@ -61761,439 +54448,366 @@ func (mdls MariaDBLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return &mdls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for MariaDBLinkedService.
func (mdls MariaDBLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &mdls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for MariaDBLinkedService struct.
func (mdls *MariaDBLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -62275,7 +54889,6 @@ func (mdls *MariaDBLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MariaDBLinkedServiceTypeProperties mariaDB server linked service properties.
type MariaDBLinkedServiceTypeProperties struct {
// ConnectionString - An ODBC connection string.
@@ -62284,7 +54897,6 @@ type MariaDBLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for MariaDBLinkedServiceTypeProperties struct.
func (mdlstp *MariaDBLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -62317,7 +54929,6 @@ func (mdlstp *MariaDBLinkedServiceTypeProperties) UnmarshalJSON(body []byte) err
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MariaDBSource a copy activity MariaDB server source.
type MariaDBSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -62332,7 +54943,6 @@ type MariaDBSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MariaDBSource.
func (mds MariaDBSource) MarshalJSON() ([]byte, error) {
mds.Type = TypeMariaDBSource
@@ -62349,319 +54959,266 @@ func (mds MariaDBSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsMariaDBSource() (*MariaDBSource, bool) {
return &mds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for MariaDBSource.
func (mds MariaDBSource) AsBasicCopySource() (BasicCopySource, bool) {
return &mds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MariaDBTableDataset mariaDB server dataset.
type MariaDBTableDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -62680,7 +55237,6 @@ type MariaDBTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) MarshalJSON() ([]byte, error) {
mdtd.Type = TypeMariaDBTable
@@ -62707,337 +55263,281 @@ func (mdtd MariaDBTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return &mdtd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for MariaDBTableDataset.
func (mdtd MariaDBTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &mdtd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarketoLinkedService marketo server linked service.
type MarketoLinkedService struct {
// MarketoLinkedServiceTypeProperties - Marketo server linked service properties.
@@ -63056,7 +55556,6 @@ type MarketoLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MarketoLinkedService.
func (mls MarketoLinkedService) MarshalJSON() ([]byte, error) {
mls.Type = TypeMarketo
@@ -63085,439 +55584,366 @@ func (mls MarketoLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return &mls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for MarketoLinkedService.
func (mls MarketoLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &mls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for MarketoLinkedService struct.
func (mls *MarketoLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -63599,7 +56025,6 @@ func (mls *MarketoLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarketoLinkedServiceTypeProperties marketo server linked service properties.
type MarketoLinkedServiceTypeProperties struct {
// Endpoint - The endpoint of the Marketo server. (i.e. 123-ABC-321.mktorest.com)
@@ -63618,7 +56043,6 @@ type MarketoLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for MarketoLinkedServiceTypeProperties struct.
func (mlstp *MarketoLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -63696,7 +56120,6 @@ func (mlstp *MarketoLinkedServiceTypeProperties) UnmarshalJSON(body []byte) erro
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarketoObjectDataset marketo server dataset.
type MarketoObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -63715,7 +56138,6 @@ type MarketoObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MarketoObjectDataset.
func (mod MarketoObjectDataset) MarshalJSON() ([]byte, error) {
mod.Type = TypeMarketoObject
@@ -63742,337 +56164,281 @@ func (mod MarketoObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return &mod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for MarketoObjectDataset.
func (mod MarketoObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &mod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarketoSource a copy activity Marketo server source.
type MarketoSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -64087,7 +56453,6 @@ type MarketoSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MarketoSource.
func (ms MarketoSource) MarshalJSON() ([]byte, error) {
ms.Type = TypeMarketoSource
@@ -64104,319 +56469,266 @@ func (ms MarketoSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsMarketoSource() (*MarketoSource, bool) {
return &ms, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for MarketoSource.
func (ms MarketoSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ms, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MongoDbCollectionDataset the MongoDB database dataset.
type MongoDbCollectionDataset struct {
// MongoDbCollectionDatasetTypeProperties - MongoDB database dataset properties.
@@ -64437,7 +56749,6 @@ type MongoDbCollectionDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) MarshalJSON() ([]byte, error) {
mdcd.Type = TypeMongoDbCollection
@@ -64467,337 +56778,281 @@ func (mdcd MongoDbCollectionDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return &mdcd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for MongoDbCollectionDataset.
func (mdcd MongoDbCollectionDataset) AsBasicDataset() (BasicDataset, bool) {
return &mdcd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for MongoDbCollectionDataset struct.
func (mdcd *MongoDbCollectionDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -64888,14 +57143,12 @@ func (mdcd *MongoDbCollectionDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MongoDbCollectionDatasetTypeProperties mongoDB database dataset properties.
type MongoDbCollectionDatasetTypeProperties struct {
// CollectionName - The table name of the MongoDB database. Type: string (or Expression with resultType string).
CollectionName interface{} `json:"collectionName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MongoDbLinkedService linked service for MongoDb data source.
type MongoDbLinkedService struct {
// MongoDbLinkedServiceTypeProperties - MongoDB linked service properties.
@@ -64914,7 +57167,6 @@ type MongoDbLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MongoDbLinkedService.
func (mdls MongoDbLinkedService) MarshalJSON() ([]byte, error) {
mdls.Type = TypeMongoDb
@@ -64943,439 +57195,366 @@ func (mdls MongoDbLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return &mdls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for MongoDbLinkedService.
func (mdls MongoDbLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &mdls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for MongoDbLinkedService struct.
func (mdls *MongoDbLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -65457,7 +57636,6 @@ func (mdls *MongoDbLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MongoDbLinkedServiceTypeProperties mongoDB linked service properties.
type MongoDbLinkedServiceTypeProperties struct {
// Server - The IP address or server name of the MongoDB server. Type: string (or Expression with resultType string).
@@ -65482,7 +57660,6 @@ type MongoDbLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for MongoDbLinkedServiceTypeProperties struct.
func (mdlstp *MongoDbLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -65587,7 +57764,6 @@ func (mdlstp *MongoDbLinkedServiceTypeProperties) UnmarshalJSON(body []byte) err
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MongoDbSource a copy activity source for a MongoDB database.
type MongoDbSource struct {
// Query - Database query. Should be a SQL-92 query expression. Type: string (or Expression with resultType string).
@@ -65602,7 +57778,6 @@ type MongoDbSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MongoDbSource.
func (mds MongoDbSource) MarshalJSON() ([]byte, error) {
mds.Type = TypeMongoDbSource
@@ -65619,319 +57794,266 @@ func (mds MongoDbSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsMongoDbSource() (*MongoDbSource, bool) {
return &mds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for MongoDbSource.
func (mds MongoDbSource) AsBasicCopySource() (BasicCopySource, bool) {
return &mds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicMultiplePipelineTrigger base class for all triggers that support one to many model for trigger to pipeline.
type BasicMultiplePipelineTrigger interface {
AsBlobTrigger() (*BlobTrigger, bool)
@@ -65939,7 +58061,6 @@ type BasicMultiplePipelineTrigger interface {
AsMultiplePipelineTrigger() (*MultiplePipelineTrigger, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MultiplePipelineTrigger base class for all triggers that support one to many model for trigger to pipeline.
type MultiplePipelineTrigger struct {
// Pipelines - Pipelines that need to be started.
@@ -65995,7 +58116,6 @@ func unmarshalBasicMultiplePipelineTriggerArray(body []byte) ([]BasicMultiplePip
return mptArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MultiplePipelineTrigger.
func (mpt MultiplePipelineTrigger) MarshalJSON() ([]byte, error) {
mpt.Type = TypeMultiplePipelineTrigger
@@ -66018,49 +58138,41 @@ func (mpt MultiplePipelineTrigger) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTumblingWindowTrigger is the BasicTrigger implementation for MultiplePipelineTrigger.
func (mpt MultiplePipelineTrigger) AsTumblingWindowTrigger() (*TumblingWindowTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobTrigger is the BasicTrigger implementation for MultiplePipelineTrigger.
func (mpt MultiplePipelineTrigger) AsBlobTrigger() (*BlobTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsScheduleTrigger is the BasicTrigger implementation for MultiplePipelineTrigger.
func (mpt MultiplePipelineTrigger) AsScheduleTrigger() (*ScheduleTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMultiplePipelineTrigger is the BasicTrigger implementation for MultiplePipelineTrigger.
func (mpt MultiplePipelineTrigger) AsMultiplePipelineTrigger() (*MultiplePipelineTrigger, bool) {
return &mpt, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicMultiplePipelineTrigger is the BasicTrigger implementation for MultiplePipelineTrigger.
func (mpt MultiplePipelineTrigger) AsBasicMultiplePipelineTrigger() (BasicMultiplePipelineTrigger, bool) {
return &mpt, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTrigger is the BasicTrigger implementation for MultiplePipelineTrigger.
func (mpt MultiplePipelineTrigger) AsTrigger() (*Trigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicTrigger is the BasicTrigger implementation for MultiplePipelineTrigger.
func (mpt MultiplePipelineTrigger) AsBasicTrigger() (BasicTrigger, bool) {
return &mpt, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MySQLLinkedService linked service for MySQL data source.
type MySQLLinkedService struct {
// MySQLLinkedServiceTypeProperties - MySQL linked service properties.
@@ -66079,7 +58191,6 @@ type MySQLLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for MySQLLinkedService.
func (msls MySQLLinkedService) MarshalJSON() ([]byte, error) {
msls.Type = TypeMySQL
@@ -66108,439 +58219,366 @@ func (msls MySQLLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return &msls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for MySQLLinkedService.
func (msls MySQLLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &msls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for MySQLLinkedService struct.
func (msls *MySQLLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -66622,7 +58660,6 @@ func (msls *MySQLLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MySQLLinkedServiceTypeProperties mySQL linked service properties.
type MySQLLinkedServiceTypeProperties struct {
// Server - Server name for connection. Type: string (or Expression with resultType string).
@@ -66639,7 +58676,6 @@ type MySQLLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for MySQLLinkedServiceTypeProperties struct.
func (mslstp *MySQLLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -66708,7 +58744,6 @@ func (mslstp *MySQLLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NetezzaLinkedService netezza linked service.
type NetezzaLinkedService struct {
// NetezzaLinkedServiceTypeProperties - Netezza linked service properties.
@@ -66727,7 +58762,6 @@ type NetezzaLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for NetezzaLinkedService.
func (nls NetezzaLinkedService) MarshalJSON() ([]byte, error) {
nls.Type = TypeNetezza
@@ -66756,439 +58790,366 @@ func (nls NetezzaLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return &nls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for NetezzaLinkedService.
func (nls NetezzaLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &nls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for NetezzaLinkedService struct.
func (nls *NetezzaLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -67270,7 +59231,6 @@ func (nls *NetezzaLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NetezzaLinkedServiceTypeProperties netezza linked service properties.
type NetezzaLinkedServiceTypeProperties struct {
// ConnectionString - An ODBC connection string.
@@ -67279,7 +59239,6 @@ type NetezzaLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for NetezzaLinkedServiceTypeProperties struct.
func (nlstp *NetezzaLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -67312,7 +59271,6 @@ func (nlstp *NetezzaLinkedServiceTypeProperties) UnmarshalJSON(body []byte) erro
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NetezzaSource a copy activity Netezza source.
type NetezzaSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -67327,7 +59285,6 @@ type NetezzaSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for NetezzaSource.
func (ns NetezzaSource) MarshalJSON() ([]byte, error) {
ns.Type = TypeNetezzaSource
@@ -67344,319 +59301,266 @@ func (ns NetezzaSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsNetezzaSource() (*NetezzaSource, bool) {
return &ns, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for NetezzaSource.
func (ns NetezzaSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ns, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NetezzaTableDataset netezza dataset.
type NetezzaTableDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -67675,7 +59579,6 @@ type NetezzaTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for NetezzaTableDataset.
func (ntd NetezzaTableDataset) MarshalJSON() ([]byte, error) {
ntd.Type = TypeNetezzaTable
@@ -67702,337 +59605,281 @@ func (ntd NetezzaTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return &ntd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for NetezzaTableDataset.
func (ntd NetezzaTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &ntd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ODataLinkedService open Data Protocol (OData) linked service.
type ODataLinkedService struct {
// ODataLinkedServiceTypeProperties - OData linked service properties.
@@ -68051,7 +59898,6 @@ type ODataLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ODataLinkedService.
func (odls ODataLinkedService) MarshalJSON() ([]byte, error) {
odls.Type = TypeOData
@@ -68080,439 +59926,366 @@ func (odls ODataLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return &odls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for ODataLinkedService.
func (odls ODataLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &odls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ODataLinkedService struct.
func (odls *ODataLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -68594,7 +60367,6 @@ func (odls *ODataLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ODataLinkedServiceTypeProperties oData linked service properties.
type ODataLinkedServiceTypeProperties struct {
// URL - The URL of the OData service endpoint. Type: string (or Expression with resultType string).
@@ -68609,7 +60381,6 @@ type ODataLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ODataLinkedServiceTypeProperties struct.
func (odlstp *ODataLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -68669,7 +60440,6 @@ func (odlstp *ODataLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ODataResourceDataset the Open Data Protocol (OData) resource dataset.
type ODataResourceDataset struct {
// ODataResourceDatasetTypeProperties - OData dataset properties.
@@ -68690,7 +60460,6 @@ type ODataResourceDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ODataResourceDataset.
func (odrd ODataResourceDataset) MarshalJSON() ([]byte, error) {
odrd.Type = TypeODataResource
@@ -68720,337 +60489,281 @@ func (odrd ODataResourceDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return &odrd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for ODataResourceDataset.
func (odrd ODataResourceDataset) AsBasicDataset() (BasicDataset, bool) {
return &odrd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ODataResourceDataset struct.
func (odrd *ODataResourceDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -69141,14 +60854,12 @@ func (odrd *ODataResourceDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ODataResourceDatasetTypeProperties oData dataset properties.
type ODataResourceDatasetTypeProperties struct {
// Path - The OData resource path. Type: string (or Expression with resultType string).
Path interface{} `json:"path,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OdbcLinkedService open Database Connectivity (ODBC) linked service.
type OdbcLinkedService struct {
// OdbcLinkedServiceTypeProperties - ODBC linked service properties.
@@ -69167,7 +60878,6 @@ type OdbcLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for OdbcLinkedService.
func (ols OdbcLinkedService) MarshalJSON() ([]byte, error) {
ols.Type = TypeOdbc
@@ -69196,439 +60906,366 @@ func (ols OdbcLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return &ols, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for OdbcLinkedService.
func (ols OdbcLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &ols, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for OdbcLinkedService struct.
func (ols *OdbcLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -69710,7 +61347,6 @@ func (ols *OdbcLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OdbcLinkedServiceTypeProperties ODBC linked service properties.
type OdbcLinkedServiceTypeProperties struct {
// ConnectionString - The non-access credential portion of the connection string as well as an optional encrypted credential.
@@ -69727,7 +61363,6 @@ type OdbcLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for OdbcLinkedServiceTypeProperties struct.
func (olstp *OdbcLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -69794,7 +61429,6 @@ func (olstp *OdbcLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OdbcSink a copy activity ODBC sink.
type OdbcSink struct {
// PreCopyScript - A query to execute before starting the copy. Type: string (or Expression with resultType string).
@@ -69813,7 +61447,6 @@ type OdbcSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for OdbcSink.
func (osVar OdbcSink) MarshalJSON() ([]byte, error) {
osVar.Type = TypeOdbcSink
@@ -69832,103 +61465,86 @@ func (osVar OdbcSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsOdbcSink() (*OdbcSink, bool) {
return &osVar, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for OdbcSink.
func (osVar OdbcSink) AsBasicCopySink() (BasicCopySink, bool) {
return &osVar, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Operation azure Data Factory API operation definition.
type Operation struct {
// Name - Operation name: {provider}/{resource}/{operation}
@@ -69941,7 +61557,6 @@ type Operation struct {
*OperationProperties `json:"properties,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for Operation.
func (o Operation) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -69960,7 +61575,6 @@ func (o Operation) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for Operation struct.
func (o *Operation) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -70012,7 +61626,6 @@ func (o *Operation) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OperationDisplay metadata associated with the operation.
type OperationDisplay struct {
// Description - The description of the operation.
@@ -70025,7 +61638,6 @@ type OperationDisplay struct {
Operation *string `json:"operation,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OperationListResponse a list of operations that can be performed by the Data Factory service.
type OperationListResponse struct {
autorest.Response `json:"-"`
@@ -70035,7 +61647,6 @@ type OperationListResponse struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OperationLogSpecification details about an operation related to logs.
type OperationLogSpecification struct {
// Name - The name of the log category.
@@ -70046,7 +61657,6 @@ type OperationLogSpecification struct {
BlobDuration *string `json:"blobDuration,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OperationMetricAvailability defines how often data for a metric becomes available.
type OperationMetricAvailability struct {
// TimeGrain - The granularity for the metric.
@@ -70055,7 +61665,6 @@ type OperationMetricAvailability struct {
BlobDuration *string `json:"blobDuration,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OperationMetricSpecification details about an operation related to metrics.
type OperationMetricSpecification struct {
// Name - The name of the metric.
@@ -70078,14 +61687,12 @@ type OperationMetricSpecification struct {
Availabilities *[]OperationMetricAvailability `json:"availabilities,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OperationProperties additional details about an operation.
type OperationProperties struct {
// ServiceSpecification - Details about a service operation.
ServiceSpecification *OperationServiceSpecification `json:"serviceSpecification,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OperationServiceSpecification details about a service operation.
type OperationServiceSpecification struct {
// LogSpecifications - Details about operations related to logs.
@@ -70094,7 +61701,6 @@ type OperationServiceSpecification struct {
MetricSpecifications *[]OperationMetricSpecification `json:"metricSpecifications,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OracleLinkedService oracle database.
type OracleLinkedService struct {
// OracleLinkedServiceTypeProperties - Oracle database linked service properties.
@@ -70113,7 +61719,6 @@ type OracleLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for OracleLinkedService.
func (ols OracleLinkedService) MarshalJSON() ([]byte, error) {
ols.Type = TypeOracle
@@ -70142,439 +61747,366 @@ func (ols OracleLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return &ols, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for OracleLinkedService.
func (ols OracleLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &ols, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for OracleLinkedService struct.
func (ols *OracleLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -70656,7 +62188,6 @@ func (ols *OracleLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OracleLinkedServiceTypeProperties oracle database linked service properties.
type OracleLinkedServiceTypeProperties struct {
// ConnectionString - The connection string.
@@ -70665,7 +62196,6 @@ type OracleLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for OracleLinkedServiceTypeProperties struct.
func (olstp *OracleLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -70698,7 +62228,6 @@ func (olstp *OracleLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OracleSink a copy activity Oracle sink.
type OracleSink struct {
// PreCopyScript - SQL pre-copy script. Type: string (or Expression with resultType string).
@@ -70717,7 +62246,6 @@ type OracleSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for OracleSink.
func (osVar OracleSink) MarshalJSON() ([]byte, error) {
osVar.Type = TypeOracleSink
@@ -70736,103 +62264,86 @@ func (osVar OracleSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsOracleSink() (*OracleSink, bool) {
return &osVar, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for OracleSink.
func (osVar OracleSink) AsBasicCopySink() (BasicCopySink, bool) {
return &osVar, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OracleSource a copy activity Oracle source.
type OracleSource struct {
// OracleReaderQuery - Oracle reader query. Type: string (or Expression with resultType string).
@@ -70849,7 +62360,6 @@ type OracleSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for OracleSource.
func (osVar OracleSource) MarshalJSON() ([]byte, error) {
osVar.Type = TypeOracleSource
@@ -70867,319 +62377,266 @@ func (osVar OracleSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsOracleSource() (*OracleSource, bool) {
return &osVar, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for OracleSource.
func (osVar OracleSource) AsBasicCopySource() (BasicCopySource, bool) {
return &osVar, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OracleTableDataset the on-premises Oracle database dataset.
type OracleTableDataset struct {
// OracleTableDatasetTypeProperties - On-premises Oracle dataset properties.
@@ -71200,7 +62657,6 @@ type OracleTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for OracleTableDataset.
func (otd OracleTableDataset) MarshalJSON() ([]byte, error) {
otd.Type = TypeOracleTable
@@ -71230,337 +62686,281 @@ func (otd OracleTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return &otd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for OracleTableDataset.
func (otd OracleTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &otd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for OracleTableDataset struct.
func (otd *OracleTableDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -71651,14 +63051,12 @@ func (otd *OracleTableDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OracleTableDatasetTypeProperties on-premises Oracle dataset properties.
type OracleTableDatasetTypeProperties struct {
// TableName - The table name of the on-premises Oracle database. Type: string (or Expression with resultType string).
TableName interface{} `json:"tableName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OrcFormat the data stored in Optimized Row Columnar (ORC) format.
type OrcFormat struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -71671,7 +63069,6 @@ type OrcFormat struct {
Type TypeBasicDatasetStorageFormat `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for OrcFormat.
func (of OrcFormat) MarshalJSON() ([]byte, error) {
of.Type = TypeOrcFormat
@@ -71687,49 +63084,41 @@ func (of OrcFormat) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsParquetFormat is the BasicDatasetStorageFormat implementation for OrcFormat.
func (of OrcFormat) AsParquetFormat() (*ParquetFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOrcFormat is the BasicDatasetStorageFormat implementation for OrcFormat.
func (of OrcFormat) AsOrcFormat() (*OrcFormat, bool) {
return &of, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAvroFormat is the BasicDatasetStorageFormat implementation for OrcFormat.
func (of OrcFormat) AsAvroFormat() (*AvroFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJSONFormat is the BasicDatasetStorageFormat implementation for OrcFormat.
func (of OrcFormat) AsJSONFormat() (*JSONFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTextFormat is the BasicDatasetStorageFormat implementation for OrcFormat.
func (of OrcFormat) AsTextFormat() (*TextFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetStorageFormat is the BasicDatasetStorageFormat implementation for OrcFormat.
func (of OrcFormat) AsDatasetStorageFormat() (*DatasetStorageFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDatasetStorageFormat is the BasicDatasetStorageFormat implementation for OrcFormat.
func (of OrcFormat) AsBasicDatasetStorageFormat() (BasicDatasetStorageFormat, bool) {
return &of, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ParameterSpecification definition of a single parameter for an entity.
type ParameterSpecification struct {
// Type - Parameter type. Possible values include: 'ParameterTypeObject', 'ParameterTypeString', 'ParameterTypeInt', 'ParameterTypeFloat', 'ParameterTypeBool', 'ParameterTypeArray', 'ParameterTypeSecureString'
@@ -71738,7 +63127,6 @@ type ParameterSpecification struct {
DefaultValue interface{} `json:"defaultValue,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ParquetFormat the data stored in Parquet format.
type ParquetFormat struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -71751,7 +63139,6 @@ type ParquetFormat struct {
Type TypeBasicDatasetStorageFormat `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ParquetFormat.
func (pf ParquetFormat) MarshalJSON() ([]byte, error) {
pf.Type = TypeParquetFormat
@@ -71767,49 +63154,41 @@ func (pf ParquetFormat) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsParquetFormat is the BasicDatasetStorageFormat implementation for ParquetFormat.
func (pf ParquetFormat) AsParquetFormat() (*ParquetFormat, bool) {
return &pf, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOrcFormat is the BasicDatasetStorageFormat implementation for ParquetFormat.
func (pf ParquetFormat) AsOrcFormat() (*OrcFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAvroFormat is the BasicDatasetStorageFormat implementation for ParquetFormat.
func (pf ParquetFormat) AsAvroFormat() (*AvroFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJSONFormat is the BasicDatasetStorageFormat implementation for ParquetFormat.
func (pf ParquetFormat) AsJSONFormat() (*JSONFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTextFormat is the BasicDatasetStorageFormat implementation for ParquetFormat.
func (pf ParquetFormat) AsTextFormat() (*TextFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetStorageFormat is the BasicDatasetStorageFormat implementation for ParquetFormat.
func (pf ParquetFormat) AsDatasetStorageFormat() (*DatasetStorageFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDatasetStorageFormat is the BasicDatasetStorageFormat implementation for ParquetFormat.
func (pf ParquetFormat) AsBasicDatasetStorageFormat() (BasicDatasetStorageFormat, bool) {
return &pf, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PaypalLinkedService paypal Serivce linked service.
type PaypalLinkedService struct {
// PaypalLinkedServiceTypeProperties - Paypal Serivce linked service properties.
@@ -71828,7 +63207,6 @@ type PaypalLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for PaypalLinkedService.
func (pls PaypalLinkedService) MarshalJSON() ([]byte, error) {
pls.Type = TypePaypal
@@ -71857,439 +63235,366 @@ func (pls PaypalLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return &pls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for PaypalLinkedService.
func (pls PaypalLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &pls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for PaypalLinkedService struct.
func (pls *PaypalLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -72371,7 +63676,6 @@ func (pls *PaypalLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PaypalLinkedServiceTypeProperties paypal Serivce linked service properties.
type PaypalLinkedServiceTypeProperties struct {
// Host - The URL of the PayPal instance. (i.e. api.sandbox.paypal.com)
@@ -72390,7 +63694,6 @@ type PaypalLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for PaypalLinkedServiceTypeProperties struct.
func (plstp *PaypalLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -72468,7 +63771,6 @@ func (plstp *PaypalLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PaypalObjectDataset paypal Serivce dataset.
type PaypalObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -72487,7 +63789,6 @@ type PaypalObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for PaypalObjectDataset.
func (pod PaypalObjectDataset) MarshalJSON() ([]byte, error) {
pod.Type = TypePaypalObject
@@ -72514,337 +63815,281 @@ func (pod PaypalObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return &pod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for PaypalObjectDataset.
func (pod PaypalObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &pod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PaypalSource a copy activity Paypal Serivce source.
type PaypalSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -72859,7 +64104,6 @@ type PaypalSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for PaypalSource.
func (ps PaypalSource) MarshalJSON() ([]byte, error) {
ps.Type = TypePaypalSource
@@ -72876,319 +64120,266 @@ func (ps PaypalSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsPaypalSource() (*PaypalSource, bool) {
return &ps, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for PaypalSource.
func (ps PaypalSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ps, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PhoenixLinkedService phoenix server linked service.
type PhoenixLinkedService struct {
// PhoenixLinkedServiceTypeProperties - Phoenix server linked service properties.
@@ -73207,7 +64398,6 @@ type PhoenixLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for PhoenixLinkedService.
func (pls PhoenixLinkedService) MarshalJSON() ([]byte, error) {
pls.Type = TypePhoenix
@@ -73236,439 +64426,366 @@ func (pls PhoenixLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return &pls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for PhoenixLinkedService.
func (pls PhoenixLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &pls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for PhoenixLinkedService struct.
func (pls *PhoenixLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -73750,7 +64867,6 @@ func (pls *PhoenixLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PhoenixLinkedServiceTypeProperties phoenix server linked service properties.
type PhoenixLinkedServiceTypeProperties struct {
// Host - The IP address or host name of the Phoenix server. (i.e. 192.168.222.160)
@@ -73779,7 +64895,6 @@ type PhoenixLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for PhoenixLinkedServiceTypeProperties struct.
func (plstp *PhoenixLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -73902,7 +65017,6 @@ func (plstp *PhoenixLinkedServiceTypeProperties) UnmarshalJSON(body []byte) erro
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PhoenixObjectDataset phoenix server dataset.
type PhoenixObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -73921,7 +65035,6 @@ type PhoenixObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) MarshalJSON() ([]byte, error) {
pod.Type = TypePhoenixObject
@@ -73948,337 +65061,281 @@ func (pod PhoenixObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return &pod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for PhoenixObjectDataset.
func (pod PhoenixObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &pod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PhoenixSource a copy activity Phoenix server source.
type PhoenixSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -74293,7 +65350,6 @@ type PhoenixSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for PhoenixSource.
func (ps PhoenixSource) MarshalJSON() ([]byte, error) {
ps.Type = TypePhoenixSource
@@ -74310,319 +65366,266 @@ func (ps PhoenixSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsPhoenixSource() (*PhoenixSource, bool) {
return &ps, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for PhoenixSource.
func (ps PhoenixSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ps, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Pipeline a data factory pipeline.
type Pipeline struct {
// Description - The description of the pipeline.
@@ -74637,7 +65640,6 @@ type Pipeline struct {
Annotations *[]interface{} `json:"annotations,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for Pipeline.
func (p Pipeline) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -74659,7 +65661,6 @@ func (p Pipeline) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for Pipeline struct.
func (p *Pipeline) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -74719,7 +65720,6 @@ func (p *Pipeline) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineListResponse a list of pipeline resources.
type PipelineListResponse struct {
autorest.Response `json:"-"`
@@ -74729,14 +65729,12 @@ type PipelineListResponse struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineListResponseIterator provides access to a complete listing of PipelineResource values.
type PipelineListResponseIterator struct {
i int
page PipelineListResponsePage
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *PipelineListResponseIterator) Next() error {
@@ -74753,19 +65751,16 @@ func (iter *PipelineListResponseIterator) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter PipelineListResponseIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (iter PipelineListResponseIterator) Response() PipelineListResponse {
return iter.page.Response()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter PipelineListResponseIterator) Value() PipelineResource {
@@ -74775,7 +65770,6 @@ func (iter PipelineListResponseIterator) Value() PipelineResource {
return iter.page.Values()[iter.i]
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IsEmpty returns true if the ListResult contains no values.
func (plr PipelineListResponse) IsEmpty() bool {
return plr.Value == nil || len(*plr.Value) == 0
@@ -74793,14 +65787,12 @@ func (plr PipelineListResponse) pipelineListResponsePreparer() (*http.Request, e
autorest.WithBaseURL(to.String(plr.NextLink)))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineListResponsePage contains a page of PipelineResource values.
type PipelineListResponsePage struct {
fn func(PipelineListResponse) (PipelineListResponse, error)
plr PipelineListResponse
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *PipelineListResponsePage) Next() error {
@@ -74812,19 +65804,16 @@ func (page *PipelineListResponsePage) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page PipelineListResponsePage) NotDone() bool {
return !page.plr.IsEmpty()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (page PipelineListResponsePage) Response() PipelineListResponse {
return page.plr
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Values returns the slice of values for the current page or nil if there are no values.
func (page PipelineListResponsePage) Values() []PipelineResource {
if page.plr.IsEmpty() {
@@ -74833,7 +65822,6 @@ func (page PipelineListResponsePage) Values() []PipelineResource {
return *page.plr.Value
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineReference pipeline reference type.
type PipelineReference struct {
// Type - Pipeline reference type.
@@ -74844,7 +65832,6 @@ type PipelineReference struct {
Name *string `json:"name,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineResource pipeline resource type.
type PipelineResource struct {
autorest.Response `json:"-"`
@@ -74862,7 +65849,6 @@ type PipelineResource struct {
Etag *string `json:"etag,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for PipelineResource.
func (pr PipelineResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -74887,7 +65873,6 @@ func (pr PipelineResource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for PipelineResource struct.
func (pr *PipelineResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -74960,7 +65945,6 @@ func (pr *PipelineResource) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineRun information about a pipeline run.
type PipelineRun struct {
autorest.Response `json:"-"`
@@ -74988,7 +65972,6 @@ type PipelineRun struct {
Message *string `json:"message,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for PipelineRun.
func (pr PipelineRun) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -75028,7 +66011,6 @@ func (pr PipelineRun) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineRunFilterParameters query parameters for listing pipeline runs.
type PipelineRunFilterParameters struct {
// ContinuationToken - The continuation token for getting the next page of results. Null for first page.
@@ -75043,7 +66025,6 @@ type PipelineRunFilterParameters struct {
OrderBy *[]PipelineRunQueryOrderBy `json:"orderBy,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineRunInvokedBy provides entity name and id that started the pipeline run.
type PipelineRunInvokedBy struct {
// Name - Name of the entity that started the pipeline run.
@@ -75052,7 +66033,6 @@ type PipelineRunInvokedBy struct {
ID *string `json:"id,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineRunQueryFilter query filter option for listing pipeline runs.
type PipelineRunQueryFilter struct {
// Operand - Parameter name to be used for filter. Possible values include: 'PipelineName', 'Status', 'RunStart', 'RunEnd'
@@ -75063,7 +66043,6 @@ type PipelineRunQueryFilter struct {
Values *[]string `json:"values,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineRunQueryOrderBy an object to provide order by options for listing pipeline runs.
type PipelineRunQueryOrderBy struct {
// OrderBy - Parameter name to be used for order by. Possible values include: 'PipelineRunQueryOrderByFieldRunStart', 'PipelineRunQueryOrderByFieldRunEnd'
@@ -75072,7 +66051,6 @@ type PipelineRunQueryOrderBy struct {
Order PipelineRunQueryOrder `json:"order,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineRunQueryResponse a list pipeline runs.
type PipelineRunQueryResponse struct {
autorest.Response `json:"-"`
@@ -75082,7 +66060,6 @@ type PipelineRunQueryResponse struct {
ContinuationToken *string `json:"continuationToken,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PolybaseSettings polyBase settings.
type PolybaseSettings struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -75097,7 +66074,6 @@ type PolybaseSettings struct {
UseTypeDefault interface{} `json:"useTypeDefault,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for PolybaseSettings.
func (ps PolybaseSettings) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -75113,7 +66089,6 @@ func (ps PolybaseSettings) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PostgreSQLLinkedService linked service for PostgreSQL data source.
type PostgreSQLLinkedService struct {
// PostgreSQLLinkedServiceTypeProperties - PostgreSQL linked service properties.
@@ -75132,7 +66107,6 @@ type PostgreSQLLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) MarshalJSON() ([]byte, error) {
psls.Type = TypePostgreSQL
@@ -75161,439 +66135,366 @@ func (psls PostgreSQLLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return &psls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for PostgreSQLLinkedService.
func (psls PostgreSQLLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &psls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for PostgreSQLLinkedService struct.
func (psls *PostgreSQLLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -75675,7 +66576,6 @@ func (psls *PostgreSQLLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PostgreSQLLinkedServiceTypeProperties postgreSQL linked service properties.
type PostgreSQLLinkedServiceTypeProperties struct {
// Server - Server name for connection. Type: string (or Expression with resultType string).
@@ -75692,7 +66592,6 @@ type PostgreSQLLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for PostgreSQLLinkedServiceTypeProperties struct.
func (pslstp *PostgreSQLLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -75761,7 +66660,6 @@ func (pslstp *PostgreSQLLinkedServiceTypeProperties) UnmarshalJSON(body []byte)
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PrestoLinkedService presto server linked service.
type PrestoLinkedService struct {
// PrestoLinkedServiceTypeProperties - Presto server linked service properties.
@@ -75780,7 +66678,6 @@ type PrestoLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for PrestoLinkedService.
func (pls PrestoLinkedService) MarshalJSON() ([]byte, error) {
pls.Type = TypePresto
@@ -75809,439 +66706,366 @@ func (pls PrestoLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return &pls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for PrestoLinkedService.
func (pls PrestoLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &pls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for PrestoLinkedService struct.
func (pls *PrestoLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -76323,7 +67147,6 @@ func (pls *PrestoLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PrestoLinkedServiceTypeProperties presto server linked service properties.
type PrestoLinkedServiceTypeProperties struct {
// Host - The IP address or host name of the Presto server. (i.e. 192.168.222.160)
@@ -76356,7 +67179,6 @@ type PrestoLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for PrestoLinkedServiceTypeProperties struct.
func (plstp *PrestoLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -76497,7 +67319,6 @@ func (plstp *PrestoLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PrestoObjectDataset presto server dataset.
type PrestoObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -76516,7 +67337,6 @@ type PrestoObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for PrestoObjectDataset.
func (pod PrestoObjectDataset) MarshalJSON() ([]byte, error) {
pod.Type = TypePrestoObject
@@ -76543,337 +67363,281 @@ func (pod PrestoObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return &pod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for PrestoObjectDataset.
func (pod PrestoObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &pod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PrestoSource a copy activity Presto server source.
type PrestoSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -76888,7 +67652,6 @@ type PrestoSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for PrestoSource.
func (ps PrestoSource) MarshalJSON() ([]byte, error) {
ps.Type = TypePrestoSource
@@ -76905,319 +67668,266 @@ func (ps PrestoSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsPrestoSource() (*PrestoSource, bool) {
return &ps, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for PrestoSource.
func (ps PrestoSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ps, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// QuickBooksLinkedService quickBooks server linked service.
type QuickBooksLinkedService struct {
// QuickBooksLinkedServiceTypeProperties - QuickBooks server linked service properties.
@@ -77236,7 +67946,6 @@ type QuickBooksLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) MarshalJSON() ([]byte, error) {
qbls.Type = TypeQuickBooks
@@ -77265,439 +67974,366 @@ func (qbls QuickBooksLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return &qbls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for QuickBooksLinkedService.
func (qbls QuickBooksLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &qbls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for QuickBooksLinkedService struct.
func (qbls *QuickBooksLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -77779,7 +68415,6 @@ func (qbls *QuickBooksLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// QuickBooksLinkedServiceTypeProperties quickBooks server linked service properties.
type QuickBooksLinkedServiceTypeProperties struct {
// Endpoint - The endpoint of the QuickBooks server. (i.e. quickbooks.api.intuit.com)
@@ -77796,7 +68431,6 @@ type QuickBooksLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for QuickBooksLinkedServiceTypeProperties struct.
func (qblstp *QuickBooksLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -77864,7 +68498,6 @@ func (qblstp *QuickBooksLinkedServiceTypeProperties) UnmarshalJSON(body []byte)
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// QuickBooksObjectDataset quickBooks server dataset.
type QuickBooksObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -77883,7 +68516,6 @@ type QuickBooksObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) MarshalJSON() ([]byte, error) {
qbod.Type = TypeQuickBooksObject
@@ -77910,337 +68542,281 @@ func (qbod QuickBooksObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return &qbod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for QuickBooksObjectDataset.
func (qbod QuickBooksObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &qbod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// QuickBooksSource a copy activity QuickBooks server source.
type QuickBooksSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -78255,7 +68831,6 @@ type QuickBooksSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for QuickBooksSource.
func (qbs QuickBooksSource) MarshalJSON() ([]byte, error) {
qbs.Type = TypeQuickBooksSource
@@ -78272,319 +68847,266 @@ func (qbs QuickBooksSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return &qbs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for QuickBooksSource.
func (qbs QuickBooksSource) AsBasicCopySource() (BasicCopySource, bool) {
return &qbs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RecurrenceSchedule the recurrence schedule.
type RecurrenceSchedule struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -78601,7 +69123,6 @@ type RecurrenceSchedule struct {
MonthlyOccurrences *[]RecurrenceScheduleOccurrence `json:"monthlyOccurrences,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for RecurrenceSchedule.
func (rs RecurrenceSchedule) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -78626,7 +69147,6 @@ func (rs RecurrenceSchedule) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RecurrenceScheduleOccurrence the recurrence schedule occurence.
type RecurrenceScheduleOccurrence struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -78637,7 +69157,6 @@ type RecurrenceScheduleOccurrence struct {
Occurrence *int32 `json:"occurrence,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for RecurrenceScheduleOccurrence.
func (rso RecurrenceScheduleOccurrence) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -78653,7 +69172,6 @@ func (rso RecurrenceScheduleOccurrence) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RedirectIncompatibleRowSettings redirect incompatible row settings
type RedirectIncompatibleRowSettings struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -78664,7 +69182,6 @@ type RedirectIncompatibleRowSettings struct {
Path interface{} `json:"path,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for RedirectIncompatibleRowSettings.
func (rirs RedirectIncompatibleRowSettings) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -78676,7 +69193,6 @@ func (rirs RedirectIncompatibleRowSettings) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RedshiftUnloadSettings the Amazon S3 settings needed for the interim Amazon S3 when copying from Amazon Redshift
// with unload. With this, data from Amazon Redshift source will be unloaded into S3 first and then copied into the
// targeted sink from the interim S3.
@@ -78687,7 +69203,6 @@ type RedshiftUnloadSettings struct {
BucketName interface{} `json:"bucketName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RelationalSource a copy activity source for various relational databases.
type RelationalSource struct {
// Query - Database query. Type: string (or Expression with resultType string).
@@ -78702,7 +69217,6 @@ type RelationalSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for RelationalSource.
func (rs RelationalSource) MarshalJSON() ([]byte, error) {
rs.Type = TypeRelationalSource
@@ -78719,319 +69233,266 @@ func (rs RelationalSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsRelationalSource() (*RelationalSource, bool) {
return &rs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for RelationalSource.
func (rs RelationalSource) AsBasicCopySource() (BasicCopySource, bool) {
return &rs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RelationalTableDataset the relational table dataset.
type RelationalTableDataset struct {
// RelationalTableDatasetTypeProperties - Relational table dataset properties.
@@ -79052,7 +69513,6 @@ type RelationalTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for RelationalTableDataset.
func (rtd RelationalTableDataset) MarshalJSON() ([]byte, error) {
rtd.Type = TypeRelationalTable
@@ -79082,337 +69542,281 @@ func (rtd RelationalTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return &rtd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for RelationalTableDataset.
func (rtd RelationalTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &rtd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for RelationalTableDataset struct.
func (rtd *RelationalTableDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -79503,14 +69907,12 @@ func (rtd *RelationalTableDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RelationalTableDatasetTypeProperties relational table dataset properties.
type RelationalTableDatasetTypeProperties struct {
// TableName - The relational table name. Type: string (or Expression with resultType string).
TableName interface{} `json:"tableName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Resource azure Data Factory top-level resource.
type Resource struct {
// ID - The resource identifier.
@@ -79525,7 +69927,6 @@ type Resource struct {
Tags map[string]*string `json:"tags"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for Resource.
func (r Resource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -79547,7 +69948,6 @@ func (r Resource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ResponsysLinkedService responsys linked service.
type ResponsysLinkedService struct {
// ResponsysLinkedServiceTypeProperties - Responsys linked service properties.
@@ -79566,7 +69966,6 @@ type ResponsysLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ResponsysLinkedService.
func (rls ResponsysLinkedService) MarshalJSON() ([]byte, error) {
rls.Type = TypeResponsys
@@ -79595,439 +69994,366 @@ func (rls ResponsysLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return &rls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for ResponsysLinkedService.
func (rls ResponsysLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &rls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ResponsysLinkedService struct.
func (rls *ResponsysLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -80109,7 +70435,6 @@ func (rls *ResponsysLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ResponsysLinkedServiceTypeProperties responsys linked service properties.
type ResponsysLinkedServiceTypeProperties struct {
// Endpoint - The endpoint of the Responsys server.
@@ -80128,7 +70453,6 @@ type ResponsysLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ResponsysLinkedServiceTypeProperties struct.
func (rlstp *ResponsysLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -80206,7 +70530,6 @@ func (rlstp *ResponsysLinkedServiceTypeProperties) UnmarshalJSON(body []byte) er
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ResponsysObjectDataset responsys dataset.
type ResponsysObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -80225,7 +70548,6 @@ type ResponsysObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) MarshalJSON() ([]byte, error) {
rod.Type = TypeResponsysObject
@@ -80252,337 +70574,281 @@ func (rod ResponsysObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return &rod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for ResponsysObjectDataset.
func (rod ResponsysObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &rod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ResponsysSource a copy activity Responsys source.
type ResponsysSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -80597,7 +70863,6 @@ type ResponsysSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ResponsysSource.
func (rs ResponsysSource) MarshalJSON() ([]byte, error) {
rs.Type = TypeResponsysSource
@@ -80614,319 +70879,266 @@ func (rs ResponsysSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsResponsysSource() (*ResponsysSource, bool) {
return &rs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for ResponsysSource.
func (rs ResponsysSource) AsBasicCopySource() (BasicCopySource, bool) {
return &rs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// RetryPolicy execution policy for an activity.
type RetryPolicy struct {
// Count - Maximum ordinary retry attempts. Default is 0. Type: integer (or Expression with resultType integer), minimum: 0.
@@ -80935,7 +71147,6 @@ type RetryPolicy struct {
IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SalesforceLinkedService linked service for Salesforce.
type SalesforceLinkedService struct {
// SalesforceLinkedServiceTypeProperties - Salesforce linked service properties.
@@ -80954,7 +71165,6 @@ type SalesforceLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SalesforceLinkedService.
func (sls SalesforceLinkedService) MarshalJSON() ([]byte, error) {
sls.Type = TypeSalesforce
@@ -80983,439 +71193,366 @@ func (sls SalesforceLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return &sls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for SalesforceLinkedService.
func (sls SalesforceLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &sls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SalesforceLinkedService struct.
func (sls *SalesforceLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -81497,7 +71634,6 @@ func (sls *SalesforceLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SalesforceLinkedServiceTypeProperties salesforce linked service properties.
type SalesforceLinkedServiceTypeProperties struct {
// EnvironmentURL - The URL of Salesforce instance. Default is 'https://login.salesforce.com'. To copy data from sandbox, specify 'https://test.salesforce.com'. To copy data from custom domain, specify, for example, 'https://[domain].my.salesforce.com'. Type: string (or Expression with resultType string).
@@ -81512,7 +71648,6 @@ type SalesforceLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SalesforceLinkedServiceTypeProperties struct.
func (slstp *SalesforceLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -81571,7 +71706,6 @@ func (slstp *SalesforceLinkedServiceTypeProperties) UnmarshalJSON(body []byte) e
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SalesforceMarketingCloudLinkedService salesforce Marketing Cloud linked service.
type SalesforceMarketingCloudLinkedService struct {
// SalesforceMarketingCloudLinkedServiceTypeProperties - Salesforce Marketing Cloud linked service properties.
@@ -81590,7 +71724,6 @@ type SalesforceMarketingCloudLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) MarshalJSON() ([]byte, error) {
smcls.Type = TypeSalesforceMarketingCloud
@@ -81619,439 +71752,366 @@ func (smcls SalesforceMarketingCloudLinkedService) MarshalJSON() ([]byte, error)
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return &smcls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for SalesforceMarketingCloudLinkedService.
func (smcls SalesforceMarketingCloudLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &smcls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SalesforceMarketingCloudLinkedService struct.
func (smcls *SalesforceMarketingCloudLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -82133,7 +72193,6 @@ func (smcls *SalesforceMarketingCloudLinkedService) UnmarshalJSON(body []byte) e
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SalesforceMarketingCloudLinkedServiceTypeProperties salesforce Marketing Cloud linked service properties.
type SalesforceMarketingCloudLinkedServiceTypeProperties struct {
// ClientID - The client ID associated with the Salesforce Marketing Cloud application. Type: string (or Expression with resultType string).
@@ -82150,7 +72209,6 @@ type SalesforceMarketingCloudLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SalesforceMarketingCloudLinkedServiceTypeProperties struct.
func (smclstp *SalesforceMarketingCloudLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -82219,7 +72277,6 @@ func (smclstp *SalesforceMarketingCloudLinkedServiceTypeProperties) UnmarshalJSO
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SalesforceMarketingCloudObjectDataset salesforce Marketing Cloud dataset.
type SalesforceMarketingCloudObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -82238,7 +72295,6 @@ type SalesforceMarketingCloudObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) MarshalJSON() ([]byte, error) {
smcod.Type = TypeSalesforceMarketingCloudObject
@@ -82265,337 +72321,281 @@ func (smcod SalesforceMarketingCloudObjectDataset) MarshalJSON() ([]byte, error)
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return &smcod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for SalesforceMarketingCloudObjectDataset.
func (smcod SalesforceMarketingCloudObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &smcod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SalesforceMarketingCloudSource a copy activity Salesforce Marketing Cloud source.
type SalesforceMarketingCloudSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -82610,7 +72610,6 @@ type SalesforceMarketingCloudSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) MarshalJSON() ([]byte, error) {
smcs.Type = TypeSalesforceMarketingCloudSource
@@ -82627,319 +72626,266 @@ func (smcs SalesforceMarketingCloudSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return &smcs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for SalesforceMarketingCloudSource.
func (smcs SalesforceMarketingCloudSource) AsBasicCopySource() (BasicCopySource, bool) {
return &smcs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SalesforceObjectDataset the Salesforce object dataset.
type SalesforceObjectDataset struct {
// SalesforceObjectDatasetTypeProperties - Salesforce object dataset properties.
@@ -82960,7 +72906,6 @@ type SalesforceObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) MarshalJSON() ([]byte, error) {
sod.Type = TypeSalesforceObject
@@ -82990,337 +72935,281 @@ func (sod SalesforceObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return &sod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for SalesforceObjectDataset.
func (sod SalesforceObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &sod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SalesforceObjectDataset struct.
func (sod *SalesforceObjectDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -83411,14 +73300,12 @@ func (sod *SalesforceObjectDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SalesforceObjectDatasetTypeProperties salesforce object dataset properties.
type SalesforceObjectDatasetTypeProperties struct {
// ObjectAPIName - The Salesforce object API name. Type: string (or Expression with resultType string).
ObjectAPIName interface{} `json:"objectApiName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SalesforceSink a copy activity Salesforce sink.
type SalesforceSink struct {
// WriteBehavior - The write behavior for the operation. Default is Insert. Possible values include: 'Insert', 'Upsert'
@@ -83441,7 +73328,6 @@ type SalesforceSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SalesforceSink.
func (ss SalesforceSink) MarshalJSON() ([]byte, error) {
ss.Type = TypeSalesforceSink
@@ -83464,103 +73350,86 @@ func (ss SalesforceSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsSalesforceSink() (*SalesforceSink, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for SalesforceSink.
func (ss SalesforceSink) AsBasicCopySink() (BasicCopySink, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SalesforceSource a copy activity Salesforce source.
type SalesforceSource struct {
// Query - Database query. Type: string (or Expression with resultType string).
@@ -83577,7 +73446,6 @@ type SalesforceSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SalesforceSource.
func (ss SalesforceSource) MarshalJSON() ([]byte, error) {
ss.Type = TypeSalesforceSource
@@ -83597,319 +73465,266 @@ func (ss SalesforceSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsSalesforceSource() (*SalesforceSource, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for SalesforceSource.
func (ss SalesforceSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapBWLinkedService SAP Business Warehouse Linked Service.
type SapBWLinkedService struct {
// SapBWLinkedServiceTypeProperties - Properties specific to this linked service type.
@@ -83928,7 +73743,6 @@ type SapBWLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SapBWLinkedService.
func (sbls SapBWLinkedService) MarshalJSON() ([]byte, error) {
sbls.Type = TypeSapBW
@@ -83957,439 +73771,366 @@ func (sbls SapBWLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return &sbls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for SapBWLinkedService.
func (sbls SapBWLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &sbls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SapBWLinkedService struct.
func (sbls *SapBWLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -84471,7 +74212,6 @@ func (sbls *SapBWLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapBWLinkedServiceTypeProperties properties specific to this linked service type.
type SapBWLinkedServiceTypeProperties struct {
// Server - Host name of the SAP BW instance. Type: string (or Expression with resultType string).
@@ -84488,7 +74228,6 @@ type SapBWLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SapBWLinkedServiceTypeProperties struct.
func (sblstp *SapBWLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -84557,7 +74296,6 @@ func (sblstp *SapBWLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapCloudForCustomerLinkedService linked service for SAP Cloud for Customer.
type SapCloudForCustomerLinkedService struct {
// SapCloudForCustomerLinkedServiceTypeProperties - SAP Cloud for Customer linked service properties.
@@ -84576,7 +74314,6 @@ type SapCloudForCustomerLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) MarshalJSON() ([]byte, error) {
scfcls.Type = TypeSapCloudForCustomer
@@ -84605,439 +74342,366 @@ func (scfcls SapCloudForCustomerLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return &scfcls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for SapCloudForCustomerLinkedService.
func (scfcls SapCloudForCustomerLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &scfcls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SapCloudForCustomerLinkedService struct.
func (scfcls *SapCloudForCustomerLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -85119,7 +74783,6 @@ func (scfcls *SapCloudForCustomerLinkedService) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapCloudForCustomerLinkedServiceTypeProperties SAP Cloud for Customer linked service properties.
type SapCloudForCustomerLinkedServiceTypeProperties struct {
// URL - The URL of SAP Cloud for Customer OData API. For example, '[https://[tenantname].crm.ondemand.com/sap/c4c/odata/v1]'. Type: string (or Expression with resultType string).
@@ -85132,7 +74795,6 @@ type SapCloudForCustomerLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SapCloudForCustomerLinkedServiceTypeProperties struct.
func (scfclstp *SapCloudForCustomerLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -85183,7 +74845,6 @@ func (scfclstp *SapCloudForCustomerLinkedServiceTypeProperties) UnmarshalJSON(bo
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapCloudForCustomerResourceDataset the path of the SAP Cloud for Customer OData entity.
type SapCloudForCustomerResourceDataset struct {
// SapCloudForCustomerResourceDatasetTypeProperties - SAP Cloud For Customer OData resource dataset properties.
@@ -85204,7 +74865,6 @@ type SapCloudForCustomerResourceDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) MarshalJSON() ([]byte, error) {
scfcrd.Type = TypeSapCloudForCustomerResource
@@ -85234,337 +74894,281 @@ func (scfcrd SapCloudForCustomerResourceDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return &scfcrd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for SapCloudForCustomerResourceDataset.
func (scfcrd SapCloudForCustomerResourceDataset) AsBasicDataset() (BasicDataset, bool) {
return &scfcrd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SapCloudForCustomerResourceDataset struct.
func (scfcrd *SapCloudForCustomerResourceDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -85655,14 +75259,12 @@ func (scfcrd *SapCloudForCustomerResourceDataset) UnmarshalJSON(body []byte) err
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapCloudForCustomerResourceDatasetTypeProperties sap Cloud For Customer OData resource dataset properties.
type SapCloudForCustomerResourceDatasetTypeProperties struct {
// Path - The path of the SAP Cloud for Customer OData entity. Type: string (or Expression with resultType string).
Path interface{} `json:"path,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapCloudForCustomerSink a copy activity SAP Cloud for Customer sink.
type SapCloudForCustomerSink struct {
// WriteBehavior - The write behavior for the operation. Default is 'Insert'. Possible values include: 'SapCloudForCustomerSinkWriteBehaviorInsert', 'SapCloudForCustomerSinkWriteBehaviorUpdate'
@@ -85681,7 +75283,6 @@ type SapCloudForCustomerSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) MarshalJSON() ([]byte, error) {
scfcs.Type = TypeSapCloudForCustomerSink
@@ -85702,103 +75303,86 @@ func (scfcs SapCloudForCustomerSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return &scfcs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for SapCloudForCustomerSink.
func (scfcs SapCloudForCustomerSink) AsBasicCopySink() (BasicCopySink, bool) {
return &scfcs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapCloudForCustomerSource a copy activity source for SAP Cloud for Customer source.
type SapCloudForCustomerSource struct {
// Query - SAP Cloud for Customer OData query. For example, "$top=1". Type: string (or Expression with resultType string).
@@ -85813,7 +75397,6 @@ type SapCloudForCustomerSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) MarshalJSON() ([]byte, error) {
scfcs.Type = TypeSapCloudForCustomerSource
@@ -85830,319 +75413,266 @@ func (scfcs SapCloudForCustomerSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return &scfcs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for SapCloudForCustomerSource.
func (scfcs SapCloudForCustomerSource) AsBasicCopySource() (BasicCopySource, bool) {
return &scfcs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapEccLinkedService linked service for SAP ERP Central Component(SAP ECC).
type SapEccLinkedService struct {
// SapEccLinkedServiceTypeProperties - SAP ECC linked service properties.
@@ -86161,7 +75691,6 @@ type SapEccLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SapEccLinkedService.
func (sels SapEccLinkedService) MarshalJSON() ([]byte, error) {
sels.Type = TypeSapEcc
@@ -86190,439 +75719,366 @@ func (sels SapEccLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return &sels, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for SapEccLinkedService.
func (sels SapEccLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &sels, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SapEccLinkedService struct.
func (sels *SapEccLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -86704,7 +76160,6 @@ func (sels *SapEccLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapEccLinkedServiceTypeProperties SAP ECC linked service properties.
type SapEccLinkedServiceTypeProperties struct {
// URL - The URL of SAP ECC OData API. For example, '[https://hostname:port/sap/opu/odata/sap/servicename/]'. Type: string (or Expression with resultType string).
@@ -86717,7 +76172,6 @@ type SapEccLinkedServiceTypeProperties struct {
EncryptedCredential *string `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SapEccLinkedServiceTypeProperties struct.
func (selstp *SapEccLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -86768,7 +76222,6 @@ func (selstp *SapEccLinkedServiceTypeProperties) UnmarshalJSON(body []byte) erro
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapEccResourceDataset the path of the SAP ECC OData entity.
type SapEccResourceDataset struct {
// SapEccResourceDatasetTypeProperties - SAP ECC OData resource dataset properties.
@@ -86789,7 +76242,6 @@ type SapEccResourceDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SapEccResourceDataset.
func (serd SapEccResourceDataset) MarshalJSON() ([]byte, error) {
serd.Type = TypeSapEccResource
@@ -86819,337 +76271,281 @@ func (serd SapEccResourceDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return &serd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for SapEccResourceDataset.
func (serd SapEccResourceDataset) AsBasicDataset() (BasicDataset, bool) {
return &serd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SapEccResourceDataset struct.
func (serd *SapEccResourceDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -87240,14 +76636,12 @@ func (serd *SapEccResourceDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapEccResourceDatasetTypeProperties sap ECC OData resource dataset properties.
type SapEccResourceDatasetTypeProperties struct {
// Path - The path of the SAP ECC OData entity. Type: string (or Expression with resultType string).
Path *string `json:"path,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapEccSource a copy activity source for SAP ECC source.
type SapEccSource struct {
// Query - SAP ECC OData query. For example, "$top=1". Type: string (or Expression with resultType string).
@@ -87262,7 +76656,6 @@ type SapEccSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SapEccSource.
func (ses SapEccSource) MarshalJSON() ([]byte, error) {
ses.Type = TypeSapEccSource
@@ -87281,319 +76674,266 @@ func (ses SapEccSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsSapEccSource() (*SapEccSource, bool) {
return &ses, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for SapEccSource.
func (ses SapEccSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ses, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapHanaLinkedService SAP HANA Linked Service.
type SapHanaLinkedService struct {
// SapHanaLinkedServiceProperties - Properties specific to this linked service type.
@@ -87612,7 +76952,6 @@ type SapHanaLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SapHanaLinkedService.
func (shls SapHanaLinkedService) MarshalJSON() ([]byte, error) {
shls.Type = TypeSapHana
@@ -87641,439 +76980,366 @@ func (shls SapHanaLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return &shls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for SapHanaLinkedService.
func (shls SapHanaLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &shls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SapHanaLinkedService struct.
func (shls *SapHanaLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -88155,7 +77421,6 @@ func (shls *SapHanaLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SapHanaLinkedServiceProperties properties specific to this linked service type.
type SapHanaLinkedServiceProperties struct {
// Server - Host name of the SAP HANA server. Type: string (or Expression with resultType string).
@@ -88170,7 +77435,6 @@ type SapHanaLinkedServiceProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SapHanaLinkedServiceProperties struct.
func (shlsp *SapHanaLinkedServiceProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -88230,7 +77494,6 @@ func (shlsp *SapHanaLinkedServiceProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ScheduleTrigger trigger that creates pipeline runs periodically, on schedule.
type ScheduleTrigger struct {
// ScheduleTriggerTypeProperties - Schedule Trigger properties.
@@ -88247,7 +77510,6 @@ type ScheduleTrigger struct {
Type TypeBasicTrigger `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ScheduleTrigger.
func (st ScheduleTrigger) MarshalJSON() ([]byte, error) {
st.Type = TypeScheduleTrigger
@@ -88273,49 +77535,41 @@ func (st ScheduleTrigger) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTumblingWindowTrigger is the BasicTrigger implementation for ScheduleTrigger.
func (st ScheduleTrigger) AsTumblingWindowTrigger() (*TumblingWindowTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobTrigger is the BasicTrigger implementation for ScheduleTrigger.
func (st ScheduleTrigger) AsBlobTrigger() (*BlobTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsScheduleTrigger is the BasicTrigger implementation for ScheduleTrigger.
func (st ScheduleTrigger) AsScheduleTrigger() (*ScheduleTrigger, bool) {
return &st, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMultiplePipelineTrigger is the BasicTrigger implementation for ScheduleTrigger.
func (st ScheduleTrigger) AsMultiplePipelineTrigger() (*MultiplePipelineTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicMultiplePipelineTrigger is the BasicTrigger implementation for ScheduleTrigger.
func (st ScheduleTrigger) AsBasicMultiplePipelineTrigger() (BasicMultiplePipelineTrigger, bool) {
return &st, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTrigger is the BasicTrigger implementation for ScheduleTrigger.
func (st ScheduleTrigger) AsTrigger() (*Trigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicTrigger is the BasicTrigger implementation for ScheduleTrigger.
func (st ScheduleTrigger) AsBasicTrigger() (BasicTrigger, bool) {
return &st, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ScheduleTrigger struct.
func (st *ScheduleTrigger) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -88388,7 +77642,6 @@ func (st *ScheduleTrigger) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ScheduleTriggerRecurrence the workflow trigger recurrence.
type ScheduleTriggerRecurrence struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -88407,7 +77660,6 @@ type ScheduleTriggerRecurrence struct {
Schedule *RecurrenceSchedule `json:"schedule,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ScheduleTriggerRecurrence.
func (str ScheduleTriggerRecurrence) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -88435,14 +77687,12 @@ func (str ScheduleTriggerRecurrence) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ScheduleTriggerTypeProperties schedule Trigger properties.
type ScheduleTriggerTypeProperties struct {
// Recurrence - Recurrence schedule configuration.
Recurrence *ScheduleTriggerRecurrence `json:"recurrence,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicSecretBase the base definition of a secret type.
type BasicSecretBase interface {
AsSecureString() (*SecureString, bool)
@@ -88450,7 +77700,6 @@ type BasicSecretBase interface {
AsSecretBase() (*SecretBase, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SecretBase the base definition of a secret type.
type SecretBase struct {
// Type - Possible values include: 'TypeSecretBase', 'TypeSecureString', 'TypeAzureKeyVaultSecret'
@@ -88498,7 +77747,6 @@ func unmarshalBasicSecretBaseArray(body []byte) ([]BasicSecretBase, error) {
return sbArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SecretBase.
func (sb SecretBase) MarshalJSON() ([]byte, error) {
sb.Type = TypeSecretBase
@@ -88509,31 +77757,26 @@ func (sb SecretBase) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSecureString is the BasicSecretBase implementation for SecretBase.
func (sb SecretBase) AsSecureString() (*SecureString, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultSecretReference is the BasicSecretBase implementation for SecretBase.
func (sb SecretBase) AsAzureKeyVaultSecretReference() (*AzureKeyVaultSecretReference, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSecretBase is the BasicSecretBase implementation for SecretBase.
func (sb SecretBase) AsSecretBase() (*SecretBase, bool) {
return &sb, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicSecretBase is the BasicSecretBase implementation for SecretBase.
func (sb SecretBase) AsBasicSecretBase() (BasicSecretBase, bool) {
return &sb, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SecureString azure Data Factory secure string definition. The string value will be masked with asterisks '*'
// during Get or List API calls.
type SecureString struct {
@@ -88543,7 +77786,6 @@ type SecureString struct {
Type Type `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SecureString.
func (ss SecureString) MarshalJSON() ([]byte, error) {
ss.Type = TypeSecureString
@@ -88557,31 +77799,26 @@ func (ss SecureString) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSecureString is the BasicSecretBase implementation for SecureString.
func (ss SecureString) AsSecureString() (*SecureString, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultSecretReference is the BasicSecretBase implementation for SecureString.
func (ss SecureString) AsAzureKeyVaultSecretReference() (*AzureKeyVaultSecretReference, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSecretBase is the BasicSecretBase implementation for SecureString.
func (ss SecureString) AsSecretBase() (*SecretBase, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicSecretBase is the BasicSecretBase implementation for SecureString.
func (ss SecureString) AsBasicSecretBase() (BasicSecretBase, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SelfHostedIntegrationRuntime self-hosted integration runtime.
type SelfHostedIntegrationRuntime struct {
// LinkedIntegrationRuntimeTypeProperties - When this property is not null, means this is a linked integration runtime. The property is used to access original integration runtime.
@@ -88594,7 +77831,6 @@ type SelfHostedIntegrationRuntime struct {
Type TypeBasicIntegrationRuntime `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntime.
func (shir SelfHostedIntegrationRuntime) MarshalJSON() ([]byte, error) {
shir.Type = TypeSelfHosted
@@ -88614,31 +77850,26 @@ func (shir SelfHostedIntegrationRuntime) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSelfHostedIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime.
func (shir SelfHostedIntegrationRuntime) AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) {
return &shir, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsManagedIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime.
func (shir SelfHostedIntegrationRuntime) AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime.
func (shir SelfHostedIntegrationRuntime) AsIntegrationRuntime() (*IntegrationRuntime, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime.
func (shir SelfHostedIntegrationRuntime) AsBasicIntegrationRuntime() (BasicIntegrationRuntime, bool) {
return &shir, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SelfHostedIntegrationRuntime struct.
func (shir *SelfHostedIntegrationRuntime) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -88693,7 +77924,6 @@ func (shir *SelfHostedIntegrationRuntime) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SelfHostedIntegrationRuntimeNode properties of Self-hosted integration runtime node.
type SelfHostedIntegrationRuntimeNode struct {
autorest.Response `json:"-"`
@@ -88735,7 +77965,6 @@ type SelfHostedIntegrationRuntimeNode struct {
MaxConcurrentJobs *int32 `json:"maxConcurrentJobs,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntimeNode.
func (shirn SelfHostedIntegrationRuntimeNode) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -88796,7 +78025,6 @@ func (shirn SelfHostedIntegrationRuntimeNode) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SelfHostedIntegrationRuntimeStatus self-hosted integration runtime status.
type SelfHostedIntegrationRuntimeStatus struct {
// SelfHostedIntegrationRuntimeStatusTypeProperties - Self-hosted integration runtime status type properties.
@@ -88811,7 +78039,6 @@ type SelfHostedIntegrationRuntimeStatus struct {
Type TypeBasicIntegrationRuntimeStatus `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntimeStatus.
func (shirs SelfHostedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) {
shirs.Type = TypeBasicIntegrationRuntimeStatusTypeSelfHosted
@@ -88834,31 +78061,26 @@ func (shirs SelfHostedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSelfHostedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus.
func (shirs SelfHostedIntegrationRuntimeStatus) AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) {
return &shirs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsManagedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus.
func (shirs SelfHostedIntegrationRuntimeStatus) AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus.
func (shirs SelfHostedIntegrationRuntimeStatus) AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus.
func (shirs SelfHostedIntegrationRuntimeStatus) AsBasicIntegrationRuntimeStatus() (BasicIntegrationRuntimeStatus, bool) {
return &shirs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SelfHostedIntegrationRuntimeStatus struct.
func (shirs *SelfHostedIntegrationRuntimeStatus) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -88922,7 +78144,6 @@ func (shirs *SelfHostedIntegrationRuntimeStatus) UnmarshalJSON(body []byte) erro
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SelfHostedIntegrationRuntimeStatusTypeProperties self-hosted integration runtime status type properties.
type SelfHostedIntegrationRuntimeStatusTypeProperties struct {
// CreateTime - The time at which the integration runtime was created, in ISO8601 format.
@@ -88953,7 +78174,6 @@ type SelfHostedIntegrationRuntimeStatusTypeProperties struct {
Links *[]LinkedIntegrationRuntime `json:"links,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntimeStatusTypeProperties.
func (shirstp SelfHostedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -88999,7 +78219,6 @@ func (shirstp SelfHostedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ServiceNowLinkedService serviceNow server linked service.
type ServiceNowLinkedService struct {
// ServiceNowLinkedServiceTypeProperties - ServiceNow server linked service properties.
@@ -89018,7 +78237,6 @@ type ServiceNowLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) MarshalJSON() ([]byte, error) {
snls.Type = TypeServiceNow
@@ -89047,439 +78265,366 @@ func (snls ServiceNowLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return &snls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for ServiceNowLinkedService.
func (snls ServiceNowLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &snls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ServiceNowLinkedService struct.
func (snls *ServiceNowLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -89561,7 +78706,6 @@ func (snls *ServiceNowLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ServiceNowLinkedServiceTypeProperties serviceNow server linked service properties.
type ServiceNowLinkedServiceTypeProperties struct {
// Endpoint - The endpoint of the ServiceNow server. (i.e. ServiceNowData.com)
@@ -89586,7 +78730,6 @@ type ServiceNowLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ServiceNowLinkedServiceTypeProperties struct.
func (snlstp *ServiceNowLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -89690,7 +78833,6 @@ func (snlstp *ServiceNowLinkedServiceTypeProperties) UnmarshalJSON(body []byte)
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ServiceNowObjectDataset serviceNow server dataset.
type ServiceNowObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -89709,7 +78851,6 @@ type ServiceNowObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) MarshalJSON() ([]byte, error) {
snod.Type = TypeServiceNowObject
@@ -89736,337 +78877,281 @@ func (snod ServiceNowObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return &snod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for ServiceNowObjectDataset.
func (snod ServiceNowObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &snod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ServiceNowSource a copy activity ServiceNow server source.
type ServiceNowSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -90081,7 +79166,6 @@ type ServiceNowSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ServiceNowSource.
func (sns ServiceNowSource) MarshalJSON() ([]byte, error) {
sns.Type = TypeServiceNowSource
@@ -90098,319 +79182,266 @@ func (sns ServiceNowSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return &sns, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for ServiceNowSource.
func (sns ServiceNowSource) AsBasicCopySource() (BasicCopySource, bool) {
return &sns, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SftpServerLinkedService a linked service for an SSH File Transfer Protocol (SFTP) server.
type SftpServerLinkedService struct {
// SftpServerLinkedServiceTypeProperties - Properties specific to this linked service type.
@@ -90429,7 +79460,6 @@ type SftpServerLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SftpServerLinkedService.
func (ssls SftpServerLinkedService) MarshalJSON() ([]byte, error) {
ssls.Type = TypeSftp
@@ -90458,439 +79488,366 @@ func (ssls SftpServerLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return &ssls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for SftpServerLinkedService.
func (ssls SftpServerLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &ssls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SftpServerLinkedService struct.
func (ssls *SftpServerLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -90972,7 +79929,6 @@ func (ssls *SftpServerLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SftpServerLinkedServiceTypeProperties properties specific to this linked service type.
type SftpServerLinkedServiceTypeProperties struct {
// Host - The SFTP server host name. Type: string (or Expression with resultType string).
@@ -90999,7 +79955,6 @@ type SftpServerLinkedServiceTypeProperties struct {
HostKeyFingerprint interface{} `json:"hostKeyFingerprint,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SftpServerLinkedServiceTypeProperties struct.
func (sslstp *SftpServerLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -91111,7 +80066,6 @@ func (sslstp *SftpServerLinkedServiceTypeProperties) UnmarshalJSON(body []byte)
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ShopifyLinkedService shopify Serivce linked service.
type ShopifyLinkedService struct {
// ShopifyLinkedServiceTypeProperties - Shopify Serivce linked service properties.
@@ -91130,7 +80084,6 @@ type ShopifyLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ShopifyLinkedService.
func (sls ShopifyLinkedService) MarshalJSON() ([]byte, error) {
sls.Type = TypeShopify
@@ -91159,439 +80112,366 @@ func (sls ShopifyLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return &sls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for ShopifyLinkedService.
func (sls ShopifyLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &sls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ShopifyLinkedService struct.
func (sls *ShopifyLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -91673,7 +80553,6 @@ func (sls *ShopifyLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ShopifyLinkedServiceTypeProperties shopify Serivce linked service properties.
type ShopifyLinkedServiceTypeProperties struct {
// Host - The endpoint of the Shopify server. (i.e. mystore.myshopify.com)
@@ -91690,7 +80569,6 @@ type ShopifyLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ShopifyLinkedServiceTypeProperties struct.
func (slstp *ShopifyLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -91759,7 +80637,6 @@ func (slstp *ShopifyLinkedServiceTypeProperties) UnmarshalJSON(body []byte) erro
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ShopifyObjectDataset shopify Serivce dataset.
type ShopifyObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -91778,7 +80655,6 @@ type ShopifyObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) MarshalJSON() ([]byte, error) {
sod.Type = TypeShopifyObject
@@ -91805,337 +80681,281 @@ func (sod ShopifyObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return &sod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for ShopifyObjectDataset.
func (sod ShopifyObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &sod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ShopifySource a copy activity Shopify Serivce source.
type ShopifySource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -92150,7 +80970,6 @@ type ShopifySource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ShopifySource.
func (ss ShopifySource) MarshalJSON() ([]byte, error) {
ss.Type = TypeShopifySource
@@ -92167,319 +80986,266 @@ func (ss ShopifySource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsShopifySource() (*ShopifySource, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for ShopifySource.
func (ss ShopifySource) AsBasicCopySource() (BasicCopySource, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SparkLinkedService spark Server linked service.
type SparkLinkedService struct {
// SparkLinkedServiceTypeProperties - Spark Server linked service properties.
@@ -92498,7 +81264,6 @@ type SparkLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SparkLinkedService.
func (sls SparkLinkedService) MarshalJSON() ([]byte, error) {
sls.Type = TypeSpark
@@ -92527,439 +81292,366 @@ func (sls SparkLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return &sls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for SparkLinkedService.
func (sls SparkLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &sls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SparkLinkedService struct.
func (sls *SparkLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -93041,7 +81733,6 @@ func (sls *SparkLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SparkLinkedServiceTypeProperties spark Server linked service properties.
type SparkLinkedServiceTypeProperties struct {
// Host - IP address or host name of the Spark server
@@ -93074,7 +81765,6 @@ type SparkLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SparkLinkedServiceTypeProperties struct.
func (slstp *SparkLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -93215,7 +81905,6 @@ func (slstp *SparkLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SparkObjectDataset spark Server dataset.
type SparkObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -93234,7 +81923,6 @@ type SparkObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SparkObjectDataset.
func (sod SparkObjectDataset) MarshalJSON() ([]byte, error) {
sod.Type = TypeSparkObject
@@ -93261,337 +81949,281 @@ func (sod SparkObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return &sod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for SparkObjectDataset.
func (sod SparkObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &sod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SparkSource a copy activity Spark Server source.
type SparkSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -93606,7 +82238,6 @@ type SparkSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SparkSource.
func (ss SparkSource) MarshalJSON() ([]byte, error) {
ss.Type = TypeSparkSource
@@ -93623,319 +82254,266 @@ func (ss SparkSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsSparkSource() (*SparkSource, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for SparkSource.
func (ss SparkSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SQLDWSink a copy activity SQL Data Warehouse sink.
type SQLDWSink struct {
// PreCopyScript - SQL pre-copy script. Type: string (or Expression with resultType string).
@@ -93958,7 +82536,6 @@ type SQLDWSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SQLDWSink.
func (sds SQLDWSink) MarshalJSON() ([]byte, error) {
sds.Type = TypeSQLDWSink
@@ -93981,103 +82558,86 @@ func (sds SQLDWSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsSQLDWSink() (*SQLDWSink, bool) {
return &sds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsSQLSink() (*SQLSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for SQLDWSink.
func (sds SQLDWSink) AsBasicCopySink() (BasicCopySink, bool) {
return &sds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SQLDWSource a copy activity SQL Data Warehouse source.
type SQLDWSource struct {
// SQLReaderQuery - SQL Data Warehouse reader query. Type: string (or Expression with resultType string).
@@ -94096,7 +82656,6 @@ type SQLDWSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SQLDWSource.
func (sds SQLDWSource) MarshalJSON() ([]byte, error) {
sds.Type = TypeSQLDWSource
@@ -94115,319 +82674,266 @@ func (sds SQLDWSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsSQLDWSource() (*SQLDWSource, bool) {
return &sds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for SQLDWSource.
func (sds SQLDWSource) AsBasicCopySource() (BasicCopySource, bool) {
return &sds, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SQLServerLinkedService SQL Server linked service.
type SQLServerLinkedService struct {
// SQLServerLinkedServiceTypeProperties - SQL Server linked service properties.
@@ -94446,7 +82952,6 @@ type SQLServerLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SQLServerLinkedService.
func (ssls SQLServerLinkedService) MarshalJSON() ([]byte, error) {
ssls.Type = TypeSQLServer
@@ -94475,439 +82980,366 @@ func (ssls SQLServerLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return &ssls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for SQLServerLinkedService.
func (ssls SQLServerLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &ssls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SQLServerLinkedService struct.
func (ssls *SQLServerLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -94989,7 +83421,6 @@ func (ssls *SQLServerLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SQLServerLinkedServiceTypeProperties SQL Server linked service properties.
type SQLServerLinkedServiceTypeProperties struct {
// ConnectionString - The connection string.
@@ -95002,7 +83433,6 @@ type SQLServerLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SQLServerLinkedServiceTypeProperties struct.
func (sslstp *SQLServerLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -95052,7 +83482,6 @@ func (sslstp *SQLServerLinkedServiceTypeProperties) UnmarshalJSON(body []byte) e
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SQLServerStoredProcedureActivity SQL stored procedure activity type.
type SQLServerStoredProcedureActivity struct {
// SQLServerStoredProcedureActivityTypeProperties - SQL stored procedure activity properties.
@@ -95073,7 +83502,6 @@ type SQLServerStoredProcedureActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) MarshalJSON() ([]byte, error) {
ssspa.Type = TypeSQLServerStoredProcedure
@@ -95105,175 +83533,146 @@ func (ssspa SQLServerStoredProcedureActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return &ssspa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &ssspa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for SQLServerStoredProcedureActivity.
func (ssspa SQLServerStoredProcedureActivity) AsBasicActivity() (BasicActivity, bool) {
return &ssspa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SQLServerStoredProcedureActivity struct.
func (ssspa *SQLServerStoredProcedureActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -95364,7 +83763,6 @@ func (ssspa *SQLServerStoredProcedureActivity) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SQLServerStoredProcedureActivityTypeProperties SQL stored procedure activity properties.
type SQLServerStoredProcedureActivityTypeProperties struct {
// StoredProcedureName - Stored procedure name. Type: string (or Expression with resultType string).
@@ -95373,7 +83771,6 @@ type SQLServerStoredProcedureActivityTypeProperties struct {
StoredProcedureParameters map[string]*StoredProcedureParameter `json:"storedProcedureParameters"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SQLServerStoredProcedureActivityTypeProperties.
func (ssspatp SQLServerStoredProcedureActivityTypeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -95384,7 +83781,6 @@ func (ssspatp SQLServerStoredProcedureActivityTypeProperties) MarshalJSON() ([]b
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SQLServerTableDataset the on-premises SQL Server dataset.
type SQLServerTableDataset struct {
// SQLServerTableDatasetTypeProperties - On-premises SQL Server dataset properties.
@@ -95405,7 +83801,6 @@ type SQLServerTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SQLServerTableDataset.
func (sstd SQLServerTableDataset) MarshalJSON() ([]byte, error) {
sstd.Type = TypeSQLServerTable
@@ -95435,337 +83830,281 @@ func (sstd SQLServerTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return &sstd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for SQLServerTableDataset.
func (sstd SQLServerTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &sstd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SQLServerTableDataset struct.
func (sstd *SQLServerTableDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -95856,14 +84195,12 @@ func (sstd *SQLServerTableDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SQLServerTableDatasetTypeProperties on-premises SQL Server dataset properties.
type SQLServerTableDatasetTypeProperties struct {
// TableName - The table name of the SQL Server dataset. Type: string (or Expression with resultType string).
TableName interface{} `json:"tableName,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SQLSink a copy activity SQL sink.
type SQLSink struct {
// SQLWriterStoredProcedureName - SQL writer stored procedure name. Type: string (or Expression with resultType string).
@@ -95888,7 +84225,6 @@ type SQLSink struct {
Type TypeBasicCopySink `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SQLSink.
func (ss SQLSink) MarshalJSON() ([]byte, error) {
ss.Type = TypeSQLSink
@@ -95912,103 +84248,86 @@ func (ss SQLSink) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsSalesforceSink() (*SalesforceSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsDynamicsSink() (*DynamicsSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsOdbcSink() (*OdbcSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsAzureSearchIndexSink() (*AzureSearchIndexSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsAzureDataLakeStoreSink() (*AzureDataLakeStoreSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsOracleSink() (*OracleSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsSQLDWSink() (*SQLDWSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsSQLSink() (*SQLSink, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsDocumentDbCollectionSink() (*DocumentDbCollectionSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsFileSystemSink() (*FileSystemSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsBlobSink() (*BlobSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsAzureTableSink() (*AzureTableSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureQueueSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsAzureQueueSink() (*AzureQueueSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsSapCloudForCustomerSink() (*SapCloudForCustomerSink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsCopySink() (*CopySink, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySink is the BasicCopySink implementation for SQLSink.
func (ss SQLSink) AsBasicCopySink() (BasicCopySink, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SQLSource a copy activity SQL source.
type SQLSource struct {
// SQLReaderQuery - SQL reader query. Type: string (or Expression with resultType string).
@@ -96027,7 +84346,6 @@ type SQLSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SQLSource.
func (ss SQLSource) MarshalJSON() ([]byte, error) {
ss.Type = TypeSQLSource
@@ -96048,319 +84366,266 @@ func (ss SQLSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsSQLSource() (*SQLSource, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for SQLSource.
func (ss SQLSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SquareLinkedService square Serivce linked service.
type SquareLinkedService struct {
// SquareLinkedServiceTypeProperties - Square Serivce linked service properties.
@@ -96379,7 +84644,6 @@ type SquareLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SquareLinkedService.
func (sls SquareLinkedService) MarshalJSON() ([]byte, error) {
sls.Type = TypeSquare
@@ -96408,439 +84672,366 @@ func (sls SquareLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return &sls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for SquareLinkedService.
func (sls SquareLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &sls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SquareLinkedService struct.
func (sls *SquareLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -96922,7 +85113,6 @@ func (sls *SquareLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SquareLinkedServiceTypeProperties square Serivce linked service properties.
type SquareLinkedServiceTypeProperties struct {
// Host - The URL of the Square instance. (i.e. mystore.mysquare.com)
@@ -96943,7 +85133,6 @@ type SquareLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SquareLinkedServiceTypeProperties struct.
func (slstp *SquareLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -97030,7 +85219,6 @@ func (slstp *SquareLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SquareObjectDataset square Serivce dataset.
type SquareObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -97049,7 +85237,6 @@ type SquareObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SquareObjectDataset.
func (sod SquareObjectDataset) MarshalJSON() ([]byte, error) {
sod.Type = TypeSquareObject
@@ -97076,337 +85263,281 @@ func (sod SquareObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return &sod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for SquareObjectDataset.
func (sod SquareObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &sod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SquareSource a copy activity Square Serivce source.
type SquareSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -97421,7 +85552,6 @@ type SquareSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SquareSource.
func (ss SquareSource) MarshalJSON() ([]byte, error) {
ss.Type = TypeSquareSource
@@ -97438,333 +85568,278 @@ func (ss SquareSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsSquareSource() (*SquareSource, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for SquareSource.
func (ss SquareSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ss, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SSISExecutionParameter SSIS execution parameter.
type SSISExecutionParameter struct {
// Value - SSIS package execution parameter value. Type: string (or Expression with resultType string).
Value interface{} `json:"value,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SSISPackageLocation SSIS package location.
type SSISPackageLocation struct {
// PackagePath - The SSIS package path.
PackagePath *string `json:"packagePath,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SSISPropertyOverride SSIS property override.
type SSISPropertyOverride struct {
// Value - SSIS package property override value. Type: string (or Expression with resultType string).
@@ -97773,7 +85848,6 @@ type SSISPropertyOverride struct {
IsSensitive *bool `json:"isSensitive,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StagingSettings staging settings.
type StagingSettings struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -97786,7 +85860,6 @@ type StagingSettings struct {
EnableCompression interface{} `json:"enableCompression,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for StagingSettings.
func (ss StagingSettings) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -97801,7 +85874,6 @@ func (ss StagingSettings) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StoredProcedureParameter SQL stored procedure parameter.
type StoredProcedureParameter struct {
// Value - Stored procedure parameter value. Type: string (or Expression with resultType string).
@@ -97810,7 +85882,6 @@ type StoredProcedureParameter struct {
Type StoredProcedureParameterType `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SubResource azure Data Factory nested resource, which belongs to a factory.
type SubResource struct {
// ID - The resource identifier.
@@ -97823,7 +85894,6 @@ type SubResource struct {
Etag *string `json:"etag,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SybaseLinkedService linked service for Sybase data source.
type SybaseLinkedService struct {
// SybaseLinkedServiceTypeProperties - Sybase linked service properties.
@@ -97842,7 +85912,6 @@ type SybaseLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for SybaseLinkedService.
func (sls SybaseLinkedService) MarshalJSON() ([]byte, error) {
sls.Type = TypeSybase
@@ -97871,439 +85940,366 @@ func (sls SybaseLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return &sls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for SybaseLinkedService.
func (sls SybaseLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &sls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SybaseLinkedService struct.
func (sls *SybaseLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -98385,7 +86381,6 @@ func (sls *SybaseLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// SybaseLinkedServiceTypeProperties sybase linked service properties.
type SybaseLinkedServiceTypeProperties struct {
// Server - Server name for connection. Type: string (or Expression with resultType string).
@@ -98404,7 +86399,6 @@ type SybaseLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for SybaseLinkedServiceTypeProperties struct.
func (slstp *SybaseLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -98482,7 +86476,6 @@ func (slstp *SybaseLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TabularTranslator a copy activity tabular translator.
type TabularTranslator struct {
// ColumnMappings - Column mappings. Type: string (or Expression with resultType string).
@@ -98493,7 +86486,6 @@ type TabularTranslator struct {
Type TypeBasicCopyTranslator `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for TabularTranslator.
func (tt TabularTranslator) MarshalJSON() ([]byte, error) {
tt.Type = TypeTabularTranslator
@@ -98508,25 +86500,21 @@ func (tt TabularTranslator) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTabularTranslator is the BasicCopyTranslator implementation for TabularTranslator.
func (tt TabularTranslator) AsTabularTranslator() (*TabularTranslator, bool) {
return &tt, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyTranslator is the BasicCopyTranslator implementation for TabularTranslator.
func (tt TabularTranslator) AsCopyTranslator() (*CopyTranslator, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopyTranslator is the BasicCopyTranslator implementation for TabularTranslator.
func (tt TabularTranslator) AsBasicCopyTranslator() (BasicCopyTranslator, bool) {
return &tt, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TeradataLinkedService linked service for Teradata data source.
type TeradataLinkedService struct {
// TeradataLinkedServiceTypeProperties - Teradata linked service properties.
@@ -98545,7 +86533,6 @@ type TeradataLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for TeradataLinkedService.
func (TLSVar TeradataLinkedService) MarshalJSON() ([]byte, error) {
TLSVar.Type = TypeTeradata
@@ -98574,439 +86561,366 @@ func (TLSVar TeradataLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return &TLSVar, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for TeradataLinkedService.
func (TLSVar TeradataLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &TLSVar, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for TeradataLinkedService struct.
func (TLSVar *TeradataLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -99088,7 +87002,6 @@ func (TLSVar *TeradataLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TeradataLinkedServiceTypeProperties teradata linked service properties.
type TeradataLinkedServiceTypeProperties struct {
// Server - Server name for connection. Type: string (or Expression with resultType string).
@@ -99105,7 +87018,6 @@ type TeradataLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for TeradataLinkedServiceTypeProperties struct.
func (tlstp *TeradataLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -99174,7 +87086,6 @@ func (tlstp *TeradataLinkedServiceTypeProperties) UnmarshalJSON(body []byte) err
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TextFormat the data stored in text format.
type TextFormat struct {
// ColumnDelimiter - The column delimiter. Type: string (or Expression with resultType string).
@@ -99205,7 +87116,6 @@ type TextFormat struct {
Type TypeBasicDatasetStorageFormat `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for TextFormat.
func (tf TextFormat) MarshalJSON() ([]byte, error) {
tf.Type = TypeTextFormat
@@ -99230,49 +87140,41 @@ func (tf TextFormat) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsParquetFormat is the BasicDatasetStorageFormat implementation for TextFormat.
func (tf TextFormat) AsParquetFormat() (*ParquetFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOrcFormat is the BasicDatasetStorageFormat implementation for TextFormat.
func (tf TextFormat) AsOrcFormat() (*OrcFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAvroFormat is the BasicDatasetStorageFormat implementation for TextFormat.
func (tf TextFormat) AsAvroFormat() (*AvroFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJSONFormat is the BasicDatasetStorageFormat implementation for TextFormat.
func (tf TextFormat) AsJSONFormat() (*JSONFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTextFormat is the BasicDatasetStorageFormat implementation for TextFormat.
func (tf TextFormat) AsTextFormat() (*TextFormat, bool) {
return &tf, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatasetStorageFormat is the BasicDatasetStorageFormat implementation for TextFormat.
func (tf TextFormat) AsDatasetStorageFormat() (*DatasetStorageFormat, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDatasetStorageFormat is the BasicDatasetStorageFormat implementation for TextFormat.
func (tf TextFormat) AsBasicDatasetStorageFormat() (BasicDatasetStorageFormat, bool) {
return &tf, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicTrigger azure data factory nested object which contains information about creating pipeline run
type BasicTrigger interface {
AsTumblingWindowTrigger() (*TumblingWindowTrigger, bool)
@@ -99283,7 +87185,6 @@ type BasicTrigger interface {
AsTrigger() (*Trigger, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Trigger azure data factory nested object which contains information about creating pipeline run
type Trigger struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -99345,7 +87246,6 @@ func unmarshalBasicTriggerArray(body []byte) ([]BasicTrigger, error) {
return tArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for Trigger.
func (t Trigger) MarshalJSON() ([]byte, error) {
t.Type = TypeTrigger
@@ -99365,49 +87265,41 @@ func (t Trigger) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTumblingWindowTrigger is the BasicTrigger implementation for Trigger.
func (t Trigger) AsTumblingWindowTrigger() (*TumblingWindowTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobTrigger is the BasicTrigger implementation for Trigger.
func (t Trigger) AsBlobTrigger() (*BlobTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsScheduleTrigger is the BasicTrigger implementation for Trigger.
func (t Trigger) AsScheduleTrigger() (*ScheduleTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMultiplePipelineTrigger is the BasicTrigger implementation for Trigger.
func (t Trigger) AsMultiplePipelineTrigger() (*MultiplePipelineTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicMultiplePipelineTrigger is the BasicTrigger implementation for Trigger.
func (t Trigger) AsBasicMultiplePipelineTrigger() (BasicMultiplePipelineTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTrigger is the BasicTrigger implementation for Trigger.
func (t Trigger) AsTrigger() (*Trigger, bool) {
return &t, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicTrigger is the BasicTrigger implementation for Trigger.
func (t Trigger) AsBasicTrigger() (BasicTrigger, bool) {
return &t, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggerListResponse a list of trigger resources.
type TriggerListResponse struct {
autorest.Response `json:"-"`
@@ -99417,14 +87309,12 @@ type TriggerListResponse struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggerListResponseIterator provides access to a complete listing of TriggerResource values.
type TriggerListResponseIterator struct {
i int
page TriggerListResponsePage
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *TriggerListResponseIterator) Next() error {
@@ -99441,19 +87331,16 @@ func (iter *TriggerListResponseIterator) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter TriggerListResponseIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (iter TriggerListResponseIterator) Response() TriggerListResponse {
return iter.page.Response()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter TriggerListResponseIterator) Value() TriggerResource {
@@ -99463,7 +87350,6 @@ func (iter TriggerListResponseIterator) Value() TriggerResource {
return iter.page.Values()[iter.i]
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IsEmpty returns true if the ListResult contains no values.
func (tlr TriggerListResponse) IsEmpty() bool {
return tlr.Value == nil || len(*tlr.Value) == 0
@@ -99481,14 +87367,12 @@ func (tlr TriggerListResponse) triggerListResponsePreparer() (*http.Request, err
autorest.WithBaseURL(to.String(tlr.NextLink)))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggerListResponsePage contains a page of TriggerResource values.
type TriggerListResponsePage struct {
fn func(TriggerListResponse) (TriggerListResponse, error)
tlr TriggerListResponse
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *TriggerListResponsePage) Next() error {
@@ -99500,19 +87384,16 @@ func (page *TriggerListResponsePage) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page TriggerListResponsePage) NotDone() bool {
return !page.tlr.IsEmpty()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (page TriggerListResponsePage) Response() TriggerListResponse {
return page.tlr
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Values returns the slice of values for the current page or nil if there are no values.
func (page TriggerListResponsePage) Values() []TriggerResource {
if page.tlr.IsEmpty() {
@@ -99521,7 +87402,6 @@ func (page TriggerListResponsePage) Values() []TriggerResource {
return *page.tlr.Value
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggerPipelineReference pipeline that needs to be triggered with the given parameters.
type TriggerPipelineReference struct {
// PipelineReference - Pipeline reference.
@@ -99530,7 +87410,6 @@ type TriggerPipelineReference struct {
Parameters map[string]interface{} `json:"parameters"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for TriggerPipelineReference.
func (tpr TriggerPipelineReference) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -99543,7 +87422,6 @@ func (tpr TriggerPipelineReference) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggerResource trigger resource type.
type TriggerResource struct {
autorest.Response `json:"-"`
@@ -99559,7 +87437,6 @@ type TriggerResource struct {
Etag *string `json:"etag,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for TriggerResource struct.
func (tr *TriggerResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -99619,7 +87496,6 @@ func (tr *TriggerResource) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggerRun trigger runs.
type TriggerRun struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -99642,7 +87518,6 @@ type TriggerRun struct {
TriggeredPipelines map[string]*string `json:"triggeredPipelines"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for TriggerRun.
func (tr TriggerRun) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
@@ -99676,7 +87551,6 @@ func (tr TriggerRun) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggerRunListResponse a list of trigger runs.
type TriggerRunListResponse struct {
autorest.Response `json:"-"`
@@ -99686,14 +87560,12 @@ type TriggerRunListResponse struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggerRunListResponseIterator provides access to a complete listing of TriggerRun values.
type TriggerRunListResponseIterator struct {
i int
page TriggerRunListResponsePage
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *TriggerRunListResponseIterator) Next() error {
@@ -99710,19 +87582,16 @@ func (iter *TriggerRunListResponseIterator) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter TriggerRunListResponseIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (iter TriggerRunListResponseIterator) Response() TriggerRunListResponse {
return iter.page.Response()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter TriggerRunListResponseIterator) Value() TriggerRun {
@@ -99732,7 +87601,6 @@ func (iter TriggerRunListResponseIterator) Value() TriggerRun {
return iter.page.Values()[iter.i]
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// IsEmpty returns true if the ListResult contains no values.
func (trlr TriggerRunListResponse) IsEmpty() bool {
return trlr.Value == nil || len(*trlr.Value) == 0
@@ -99750,14 +87618,12 @@ func (trlr TriggerRunListResponse) triggerRunListResponsePreparer() (*http.Reque
autorest.WithBaseURL(to.String(trlr.NextLink)))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggerRunListResponsePage contains a page of TriggerRun values.
type TriggerRunListResponsePage struct {
fn func(TriggerRunListResponse) (TriggerRunListResponse, error)
trlr TriggerRunListResponse
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *TriggerRunListResponsePage) Next() error {
@@ -99769,19 +87635,16 @@ func (page *TriggerRunListResponsePage) Next() error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page TriggerRunListResponsePage) NotDone() bool {
return !page.trlr.IsEmpty()
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Response returns the raw server response from the last page request.
func (page TriggerRunListResponsePage) Response() TriggerRunListResponse {
return page.trlr
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Values returns the slice of values for the current page or nil if there are no values.
func (page TriggerRunListResponsePage) Values() []TriggerRun {
if page.trlr.IsEmpty() {
@@ -99790,14 +87653,12 @@ func (page TriggerRunListResponsePage) Values() []TriggerRun {
return *page.trlr.Value
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggersStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TriggersStartFuture struct {
azure.Future
req *http.Request
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future TriggersStartFuture) Result(client TriggersClient) (ar autorest.Response, err error) {
@@ -99840,14 +87701,12 @@ func (future TriggersStartFuture) Result(client TriggersClient) (ar autorest.Res
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggersStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TriggersStopFuture struct {
azure.Future
req *http.Request
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future TriggersStopFuture) Result(client TriggersClient) (ar autorest.Response, err error) {
@@ -99890,7 +87749,6 @@ func (future TriggersStopFuture) Result(client TriggersClient) (ar autorest.Resp
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TumblingWindowTrigger trigger that schedules pipeline runs for all fixed time interval windows from a start time
// without gaps and also supports backfill scenarios (when start time is in the past).
type TumblingWindowTrigger struct {
@@ -99908,7 +87766,6 @@ type TumblingWindowTrigger struct {
Type TypeBasicTrigger `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for TumblingWindowTrigger.
func (twt TumblingWindowTrigger) MarshalJSON() ([]byte, error) {
twt.Type = TypeTumblingWindowTrigger
@@ -99934,49 +87791,41 @@ func (twt TumblingWindowTrigger) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTumblingWindowTrigger is the BasicTrigger implementation for TumblingWindowTrigger.
func (twt TumblingWindowTrigger) AsTumblingWindowTrigger() (*TumblingWindowTrigger, bool) {
return &twt, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobTrigger is the BasicTrigger implementation for TumblingWindowTrigger.
func (twt TumblingWindowTrigger) AsBlobTrigger() (*BlobTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsScheduleTrigger is the BasicTrigger implementation for TumblingWindowTrigger.
func (twt TumblingWindowTrigger) AsScheduleTrigger() (*ScheduleTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMultiplePipelineTrigger is the BasicTrigger implementation for TumblingWindowTrigger.
func (twt TumblingWindowTrigger) AsMultiplePipelineTrigger() (*MultiplePipelineTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicMultiplePipelineTrigger is the BasicTrigger implementation for TumblingWindowTrigger.
func (twt TumblingWindowTrigger) AsBasicMultiplePipelineTrigger() (BasicMultiplePipelineTrigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTrigger is the BasicTrigger implementation for TumblingWindowTrigger.
func (twt TumblingWindowTrigger) AsTrigger() (*Trigger, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicTrigger is the BasicTrigger implementation for TumblingWindowTrigger.
func (twt TumblingWindowTrigger) AsBasicTrigger() (BasicTrigger, bool) {
return &twt, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for TumblingWindowTrigger struct.
func (twt *TumblingWindowTrigger) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -100049,7 +87898,6 @@ func (twt *TumblingWindowTrigger) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TumblingWindowTriggerTypeProperties tumbling Window Trigger properties.
type TumblingWindowTriggerTypeProperties struct {
// Frequency - The frequency of the time windows. Possible values include: 'TumblingWindowFrequencyMinute', 'TumblingWindowFrequencyHour'
@@ -100068,7 +87916,6 @@ type TumblingWindowTriggerTypeProperties struct {
RetryPolicy *RetryPolicy `json:"retryPolicy,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UntilActivity this activity executes inner activities until the specified boolean expression results to true or
// timeout is reached, whichever is earlier.
type UntilActivity struct {
@@ -100086,7 +87933,6 @@ type UntilActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for UntilActivity.
func (ua UntilActivity) MarshalJSON() ([]byte, error) {
ua.Type = TypeUntil
@@ -100112,175 +87958,146 @@ func (ua UntilActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsUntilActivity() (*UntilActivity, bool) {
return &ua, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return &ua, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for UntilActivity.
func (ua UntilActivity) AsBasicActivity() (BasicActivity, bool) {
return &ua, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for UntilActivity struct.
func (ua *UntilActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -100353,7 +88170,6 @@ func (ua *UntilActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UntilActivityTypeProperties until activity properties.
type UntilActivityTypeProperties struct {
// Expression - An expression that would evaluate to Boolean. The loop will continue until this expression evaluates to true
@@ -100364,7 +88180,6 @@ type UntilActivityTypeProperties struct {
Activities *[]BasicActivity `json:"activities,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for UntilActivityTypeProperties struct.
func (uatp *UntilActivityTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -100406,14 +88221,12 @@ func (uatp *UntilActivityTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpdateIntegrationRuntimeNodeRequest update integration runtime node request.
type UpdateIntegrationRuntimeNodeRequest struct {
// ConcurrentJobsLimit - The number of concurrent jobs permitted to run on the integration runtime node. Values between 1 and maxConcurrentJobs(inclusive) are allowed.
ConcurrentJobsLimit *int32 `json:"concurrentJobsLimit,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UpdateIntegrationRuntimeRequest update integration runtime request.
type UpdateIntegrationRuntimeRequest struct {
// AutoUpdate - Enables or disables the auto-update feature of the self-hosted integration runtime. See https://go.microsoft.com/fwlink/?linkid=854189. Possible values include: 'On', 'Off'
@@ -100422,7 +88235,6 @@ type UpdateIntegrationRuntimeRequest struct {
UpdateDelayOffset *string `json:"updateDelayOffset,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// VerticaLinkedService vertica linked service.
type VerticaLinkedService struct {
// VerticaLinkedServiceTypeProperties - Vertica linked service properties.
@@ -100441,7 +88253,6 @@ type VerticaLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for VerticaLinkedService.
func (vls VerticaLinkedService) MarshalJSON() ([]byte, error) {
vls.Type = TypeVertica
@@ -100470,439 +88281,366 @@ func (vls VerticaLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return &vls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for VerticaLinkedService.
func (vls VerticaLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &vls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for VerticaLinkedService struct.
func (vls *VerticaLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -100984,7 +88722,6 @@ func (vls *VerticaLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// VerticaLinkedServiceTypeProperties vertica linked service properties.
type VerticaLinkedServiceTypeProperties struct {
// ConnectionString - An ODBC connection string.
@@ -100993,7 +88730,6 @@ type VerticaLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for VerticaLinkedServiceTypeProperties struct.
func (vlstp *VerticaLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -101026,7 +88762,6 @@ func (vlstp *VerticaLinkedServiceTypeProperties) UnmarshalJSON(body []byte) erro
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// VerticaSource a copy activity Vertica source.
type VerticaSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -101041,7 +88776,6 @@ type VerticaSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for VerticaSource.
func (vs VerticaSource) MarshalJSON() ([]byte, error) {
vs.Type = TypeVerticaSource
@@ -101058,319 +88792,266 @@ func (vs VerticaSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsVerticaSource() (*VerticaSource, bool) {
return &vs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for VerticaSource.
func (vs VerticaSource) AsBasicCopySource() (BasicCopySource, bool) {
return &vs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// VerticaTableDataset vertica dataset.
type VerticaTableDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -101389,7 +89070,6 @@ type VerticaTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for VerticaTableDataset.
func (vtd VerticaTableDataset) MarshalJSON() ([]byte, error) {
vtd.Type = TypeVerticaTable
@@ -101416,337 +89096,281 @@ func (vtd VerticaTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return &vtd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for VerticaTableDataset.
func (vtd VerticaTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &vtd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WaitActivity this activity suspends pipeline execution for the specified interval.
type WaitActivity struct {
// WaitActivityTypeProperties - Wait activity properties.
@@ -101763,7 +89387,6 @@ type WaitActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for WaitActivity.
func (wa WaitActivity) MarshalJSON() ([]byte, error) {
wa.Type = TypeWait
@@ -101789,175 +89412,146 @@ func (wa WaitActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsWebActivity() (*WebActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsWaitActivity() (*WaitActivity, bool) {
return &wa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return &wa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for WaitActivity.
func (wa WaitActivity) AsBasicActivity() (BasicActivity, bool) {
return &wa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for WaitActivity struct.
func (wa *WaitActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -102030,14 +89624,12 @@ func (wa *WaitActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WaitActivityTypeProperties wait activity properties.
type WaitActivityTypeProperties struct {
// WaitTimeInSeconds - Duration in seconds.
WaitTimeInSeconds *int32 `json:"waitTimeInSeconds,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WebActivity web activity.
type WebActivity struct {
// WebActivityTypeProperties - Web activity properties.
@@ -102058,7 +89650,6 @@ type WebActivity struct {
Type TypeBasicActivity `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for WebActivity.
func (wa WebActivity) MarshalJSON() ([]byte, error) {
wa.Type = TypeWebActivity
@@ -102090,175 +89681,146 @@ func (wa WebActivity) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDatabricksNotebookActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsDatabricksNotebookActivity() (*DatabricksNotebookActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataLakeAnalyticsUSQLActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsDataLakeAnalyticsUSQLActivity() (*DataLakeAnalyticsUSQLActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLUpdateResourceActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsAzureMLUpdateResourceActivity() (*AzureMLUpdateResourceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLBatchExecutionActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsAzureMLBatchExecutionActivity() (*AzureMLBatchExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGetMetadataActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsGetMetadataActivity() (*GetMetadataActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsWebActivity() (*WebActivity, bool) {
return &wa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLookupActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsLookupActivity() (*LookupActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerStoredProcedureActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsSQLServerStoredProcedureActivity() (*SQLServerStoredProcedureActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsCustomActivity() (*CustomActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecuteSSISPackageActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsExecuteSSISPackageActivity() (*ExecuteSSISPackageActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightSparkActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsHDInsightSparkActivity() (*HDInsightSparkActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightStreamingActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsHDInsightStreamingActivity() (*HDInsightStreamingActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightMapReduceActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsHDInsightMapReduceActivity() (*HDInsightMapReduceActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightPigActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsHDInsightPigActivity() (*HDInsightPigActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightHiveActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsHDInsightHiveActivity() (*HDInsightHiveActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopyActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsCopyActivity() (*CopyActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutionActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsExecutionActivity() (*ExecutionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicExecutionActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsBasicExecutionActivity() (BasicExecutionActivity, bool) {
return &wa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFilterActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsFilterActivity() (*FilterActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsUntilActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsUntilActivity() (*UntilActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWaitActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsWaitActivity() (*WaitActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsForEachActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsForEachActivity() (*ForEachActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsIfConditionActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsIfConditionActivity() (*IfConditionActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsExecutePipelineActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsExecutePipelineActivity() (*ExecutePipelineActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsControlActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsControlActivity() (*ControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicControlActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsBasicControlActivity() (BasicControlActivity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsActivity() (*Activity, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicActivity is the BasicActivity implementation for WebActivity.
func (wa WebActivity) AsBasicActivity() (BasicActivity, bool) {
return &wa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for WebActivity struct.
func (wa *WebActivity) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -102349,7 +89911,6 @@ func (wa *WebActivity) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WebActivityAuthentication web activity authentication properties.
type WebActivityAuthentication struct {
// Type - Web activity authentication (Basic/ClientCertificate/MSI)
@@ -102364,7 +89925,6 @@ type WebActivityAuthentication struct {
Resource *string `json:"resource,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WebActivityTypeProperties web activity type properties.
type WebActivityTypeProperties struct {
// Method - Rest API method for target endpoint. Possible values include: 'GET', 'POST', 'PUT', 'DELETE'
@@ -102383,7 +89943,6 @@ type WebActivityTypeProperties struct {
LinkedServices *[]LinkedServiceReference `json:"linkedServices,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WebAnonymousAuthentication a WebLinkedService that uses anonymous authentication to communicate with an HTTP
// endpoint.
type WebAnonymousAuthentication struct {
@@ -102393,7 +89952,6 @@ type WebAnonymousAuthentication struct {
AuthenticationType AuthenticationType `json:"authenticationType,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for WebAnonymousAuthentication.
func (waa WebAnonymousAuthentication) MarshalJSON() ([]byte, error) {
waa.AuthenticationType = AuthenticationTypeAnonymous
@@ -102405,37 +89963,31 @@ func (waa WebAnonymousAuthentication) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebClientCertificateAuthentication is the BasicWebLinkedServiceTypeProperties implementation for WebAnonymousAuthentication.
func (waa WebAnonymousAuthentication) AsWebClientCertificateAuthentication() (*WebClientCertificateAuthentication, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebBasicAuthentication is the BasicWebLinkedServiceTypeProperties implementation for WebAnonymousAuthentication.
func (waa WebAnonymousAuthentication) AsWebBasicAuthentication() (*WebBasicAuthentication, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebAnonymousAuthentication is the BasicWebLinkedServiceTypeProperties implementation for WebAnonymousAuthentication.
func (waa WebAnonymousAuthentication) AsWebAnonymousAuthentication() (*WebAnonymousAuthentication, bool) {
return &waa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedServiceTypeProperties is the BasicWebLinkedServiceTypeProperties implementation for WebAnonymousAuthentication.
func (waa WebAnonymousAuthentication) AsWebLinkedServiceTypeProperties() (*WebLinkedServiceTypeProperties, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicWebLinkedServiceTypeProperties is the BasicWebLinkedServiceTypeProperties implementation for WebAnonymousAuthentication.
func (waa WebAnonymousAuthentication) AsBasicWebLinkedServiceTypeProperties() (BasicWebLinkedServiceTypeProperties, bool) {
return &waa, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WebBasicAuthentication a WebLinkedService that uses basic authentication to communicate with an HTTP endpoint.
type WebBasicAuthentication struct {
// Username - User name for Basic authentication. Type: string (or Expression with resultType string).
@@ -102448,7 +90000,6 @@ type WebBasicAuthentication struct {
AuthenticationType AuthenticationType `json:"authenticationType,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for WebBasicAuthentication.
func (wba WebBasicAuthentication) MarshalJSON() ([]byte, error) {
wba.AuthenticationType = AuthenticationTypeBasic
@@ -102462,37 +90013,31 @@ func (wba WebBasicAuthentication) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebClientCertificateAuthentication is the BasicWebLinkedServiceTypeProperties implementation for WebBasicAuthentication.
func (wba WebBasicAuthentication) AsWebClientCertificateAuthentication() (*WebClientCertificateAuthentication, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebBasicAuthentication is the BasicWebLinkedServiceTypeProperties implementation for WebBasicAuthentication.
func (wba WebBasicAuthentication) AsWebBasicAuthentication() (*WebBasicAuthentication, bool) {
return &wba, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebAnonymousAuthentication is the BasicWebLinkedServiceTypeProperties implementation for WebBasicAuthentication.
func (wba WebBasicAuthentication) AsWebAnonymousAuthentication() (*WebAnonymousAuthentication, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedServiceTypeProperties is the BasicWebLinkedServiceTypeProperties implementation for WebBasicAuthentication.
func (wba WebBasicAuthentication) AsWebLinkedServiceTypeProperties() (*WebLinkedServiceTypeProperties, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicWebLinkedServiceTypeProperties is the BasicWebLinkedServiceTypeProperties implementation for WebBasicAuthentication.
func (wba WebBasicAuthentication) AsBasicWebLinkedServiceTypeProperties() (BasicWebLinkedServiceTypeProperties, bool) {
return &wba, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for WebBasicAuthentication struct.
func (wba *WebBasicAuthentication) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -102543,7 +90088,6 @@ func (wba *WebBasicAuthentication) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WebClientCertificateAuthentication a WebLinkedService that uses client certificate based authentication to
// communicate with an HTTP endpoint. This scheme follows mutual authentication; the server must also provide valid
// credentials to the client.
@@ -102558,7 +90102,6 @@ type WebClientCertificateAuthentication struct {
AuthenticationType AuthenticationType `json:"authenticationType,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for WebClientCertificateAuthentication.
func (wcca WebClientCertificateAuthentication) MarshalJSON() ([]byte, error) {
wcca.AuthenticationType = AuthenticationTypeClientCertificate
@@ -102572,37 +90115,31 @@ func (wcca WebClientCertificateAuthentication) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebClientCertificateAuthentication is the BasicWebLinkedServiceTypeProperties implementation for WebClientCertificateAuthentication.
func (wcca WebClientCertificateAuthentication) AsWebClientCertificateAuthentication() (*WebClientCertificateAuthentication, bool) {
return &wcca, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebBasicAuthentication is the BasicWebLinkedServiceTypeProperties implementation for WebClientCertificateAuthentication.
func (wcca WebClientCertificateAuthentication) AsWebBasicAuthentication() (*WebBasicAuthentication, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebAnonymousAuthentication is the BasicWebLinkedServiceTypeProperties implementation for WebClientCertificateAuthentication.
func (wcca WebClientCertificateAuthentication) AsWebAnonymousAuthentication() (*WebAnonymousAuthentication, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedServiceTypeProperties is the BasicWebLinkedServiceTypeProperties implementation for WebClientCertificateAuthentication.
func (wcca WebClientCertificateAuthentication) AsWebLinkedServiceTypeProperties() (*WebLinkedServiceTypeProperties, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicWebLinkedServiceTypeProperties is the BasicWebLinkedServiceTypeProperties implementation for WebClientCertificateAuthentication.
func (wcca WebClientCertificateAuthentication) AsBasicWebLinkedServiceTypeProperties() (BasicWebLinkedServiceTypeProperties, bool) {
return &wcca, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for WebClientCertificateAuthentication struct.
func (wcca *WebClientCertificateAuthentication) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -102652,7 +90189,6 @@ func (wcca *WebClientCertificateAuthentication) UnmarshalJSON(body []byte) error
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WebLinkedService web linked service.
type WebLinkedService struct {
// TypeProperties - Web linked service properties.
@@ -102671,7 +90207,6 @@ type WebLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for WebLinkedService.
func (wls WebLinkedService) MarshalJSON() ([]byte, error) {
wls.Type = TypeWeb
@@ -102698,439 +90233,366 @@ func (wls WebLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return &wls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for WebLinkedService.
func (wls WebLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &wls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for WebLinkedService struct.
func (wls *WebLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -103211,7 +90673,6 @@ func (wls *WebLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// BasicWebLinkedServiceTypeProperties base definition of WebLinkedServiceTypeProperties, this typeProperties is
// polymorphic based on authenticationType, so not flattened in SDK models.
type BasicWebLinkedServiceTypeProperties interface {
@@ -103221,7 +90682,6 @@ type BasicWebLinkedServiceTypeProperties interface {
AsWebLinkedServiceTypeProperties() (*WebLinkedServiceTypeProperties, bool)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WebLinkedServiceTypeProperties base definition of WebLinkedServiceTypeProperties, this typeProperties is
// polymorphic based on authenticationType, so not flattened in SDK models.
type WebLinkedServiceTypeProperties struct {
@@ -103276,7 +90736,6 @@ func unmarshalBasicWebLinkedServiceTypePropertiesArray(body []byte) ([]BasicWebL
return wlstpArray, nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for WebLinkedServiceTypeProperties.
func (wlstp WebLinkedServiceTypeProperties) MarshalJSON() ([]byte, error) {
wlstp.AuthenticationType = AuthenticationTypeWebLinkedServiceTypeProperties
@@ -103288,37 +90747,31 @@ func (wlstp WebLinkedServiceTypeProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebClientCertificateAuthentication is the BasicWebLinkedServiceTypeProperties implementation for WebLinkedServiceTypeProperties.
func (wlstp WebLinkedServiceTypeProperties) AsWebClientCertificateAuthentication() (*WebClientCertificateAuthentication, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebBasicAuthentication is the BasicWebLinkedServiceTypeProperties implementation for WebLinkedServiceTypeProperties.
func (wlstp WebLinkedServiceTypeProperties) AsWebBasicAuthentication() (*WebBasicAuthentication, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebAnonymousAuthentication is the BasicWebLinkedServiceTypeProperties implementation for WebLinkedServiceTypeProperties.
func (wlstp WebLinkedServiceTypeProperties) AsWebAnonymousAuthentication() (*WebAnonymousAuthentication, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedServiceTypeProperties is the BasicWebLinkedServiceTypeProperties implementation for WebLinkedServiceTypeProperties.
func (wlstp WebLinkedServiceTypeProperties) AsWebLinkedServiceTypeProperties() (*WebLinkedServiceTypeProperties, bool) {
return &wlstp, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicWebLinkedServiceTypeProperties is the BasicWebLinkedServiceTypeProperties implementation for WebLinkedServiceTypeProperties.
func (wlstp WebLinkedServiceTypeProperties) AsBasicWebLinkedServiceTypeProperties() (BasicWebLinkedServiceTypeProperties, bool) {
return &wlstp, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WebSource a copy activity source for web page table.
type WebSource struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -103331,7 +90784,6 @@ type WebSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for WebSource.
func (ws WebSource) MarshalJSON() ([]byte, error) {
ws.Type = TypeWebSource
@@ -103347,319 +90799,266 @@ func (ws WebSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsWebSource() (*WebSource, bool) {
return &ws, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for WebSource.
func (ws WebSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ws, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WebTableDataset the dataset points to a HTML table in the web page.
type WebTableDataset struct {
// WebTableDatasetTypeProperties - Web table dataset properties.
@@ -103680,7 +91079,6 @@ type WebTableDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for WebTableDataset.
func (wtd WebTableDataset) MarshalJSON() ([]byte, error) {
wtd.Type = TypeWebTable
@@ -103710,337 +91108,281 @@ func (wtd WebTableDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return &wtd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for WebTableDataset.
func (wtd WebTableDataset) AsBasicDataset() (BasicDataset, bool) {
return &wtd, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for WebTableDataset struct.
func (wtd *WebTableDataset) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -104131,7 +91473,6 @@ func (wtd *WebTableDataset) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// WebTableDatasetTypeProperties web table dataset properties.
type WebTableDatasetTypeProperties struct {
// Index - The zero-based index of the table in the web page. Type: integer (or Expression with resultType integer), minimum: 0.
@@ -104140,7 +91481,6 @@ type WebTableDatasetTypeProperties struct {
Path interface{} `json:"path,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// XeroLinkedService xero Serivce linked service.
type XeroLinkedService struct {
// XeroLinkedServiceTypeProperties - Xero Serivce linked service properties.
@@ -104159,7 +91499,6 @@ type XeroLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for XeroLinkedService.
func (xls XeroLinkedService) MarshalJSON() ([]byte, error) {
xls.Type = TypeXero
@@ -104188,439 +91527,366 @@ func (xls XeroLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return &xls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for XeroLinkedService.
func (xls XeroLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &xls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for XeroLinkedService struct.
func (xls *XeroLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -104702,7 +91968,6 @@ func (xls *XeroLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// XeroLinkedServiceTypeProperties xero Serivce linked service properties.
type XeroLinkedServiceTypeProperties struct {
// Host - The endpoint of the Xero server. (i.e. api.xero.com)
@@ -104722,7 +91987,6 @@ type XeroLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for XeroLinkedServiceTypeProperties struct.
func (xlstp *XeroLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -104799,7 +92063,6 @@ func (xlstp *XeroLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// XeroObjectDataset xero Serivce dataset.
type XeroObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -104818,7 +92081,6 @@ type XeroObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for XeroObjectDataset.
func (xod XeroObjectDataset) MarshalJSON() ([]byte, error) {
xod.Type = TypeXeroObject
@@ -104845,337 +92107,281 @@ func (xod XeroObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return &xod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for XeroObjectDataset.
func (xod XeroObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &xod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// XeroSource a copy activity Xero Serivce source.
type XeroSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -105190,7 +92396,6 @@ type XeroSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for XeroSource.
func (xs XeroSource) MarshalJSON() ([]byte, error) {
xs.Type = TypeXeroSource
@@ -105207,319 +92412,266 @@ func (xs XeroSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsZohoSource() (*ZohoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsXeroSource() (*XeroSource, bool) {
return &xs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for XeroSource.
func (xs XeroSource) AsBasicCopySource() (BasicCopySource, bool) {
return &xs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ZohoLinkedService zoho server linked service.
type ZohoLinkedService struct {
// ZohoLinkedServiceTypeProperties - Zoho server linked service properties.
@@ -105538,7 +92690,6 @@ type ZohoLinkedService struct {
Type TypeBasicLinkedService `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ZohoLinkedService.
func (zls ZohoLinkedService) MarshalJSON() ([]byte, error) {
zls.Type = TypeZoho
@@ -105567,439 +92718,366 @@ func (zls ZohoLinkedService) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsResponsysLinkedService() (*ResponsysLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDatabricksLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAzureDatabricksLinkedService() (*AzureDatabricksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeAnalyticsLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAzureDataLakeAnalyticsLinkedService() (*AzureDataLakeAnalyticsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightOnDemandLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsHDInsightOnDemandLinkedService() (*HDInsightOnDemandLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsSalesforceMarketingCloudLinkedService() (*SalesforceMarketingCloudLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsNetezzaLinkedService() (*NetezzaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsVerticaLinkedService() (*VerticaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsZohoLinkedService() (*ZohoLinkedService, bool) {
return &zls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsXeroLinkedService() (*XeroLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsSquareLinkedService() (*SquareLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsSparkLinkedService() (*SparkLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsShopifyLinkedService() (*ShopifyLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsServiceNowLinkedService() (*ServiceNowLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsQuickBooksLinkedService() (*QuickBooksLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsPrestoLinkedService() (*PrestoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsPhoenixLinkedService() (*PhoenixLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsPaypalLinkedService() (*PaypalLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsMarketoLinkedService() (*MarketoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsMariaDBLinkedService() (*MariaDBLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsMagentoLinkedService() (*MagentoLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsJiraLinkedService() (*JiraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsImpalaLinkedService() (*ImpalaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsHubspotLinkedService() (*HubspotLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsHiveLinkedService() (*HiveLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsHBaseLinkedService() (*HBaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsGreenplumLinkedService() (*GreenplumLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsGoogleBigQueryLinkedService() (*GoogleBigQueryLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsEloquaLinkedService() (*EloquaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsDrillLinkedService() (*DrillLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsCouchbaseLinkedService() (*CouchbaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsConcurLinkedService() (*ConcurLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAzurePostgreSQLLinkedService() (*AzurePostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAmazonMWSLinkedService() (*AmazonMWSLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapHanaLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsSapHanaLinkedService() (*SapHanaLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapBWLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsSapBWLinkedService() (*SapBWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSftpServerLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsSftpServerLinkedService() (*SftpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFtpServerLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsFtpServerLinkedService() (*FtpServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsHTTPLinkedService() (*HTTPLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAzureSearchLinkedService() (*AzureSearchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataSourceLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsCustomDataSourceLinkedService() (*CustomDataSourceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAmazonRedshiftLinkedService() (*AmazonRedshiftLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3LinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAmazonS3LinkedService() (*AmazonS3LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsSapEccLinkedService() (*SapEccLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsSapCloudForCustomerLinkedService() (*SapCloudForCustomerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsSalesforceLinkedService() (*SalesforceLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAzureDataLakeStoreLinkedService() (*AzureDataLakeStoreLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsMongoDbLinkedService() (*MongoDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsCassandraLinkedService() (*CassandraLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsWebLinkedService() (*WebLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsODataLinkedService() (*ODataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsHdfsLinkedService() (*HdfsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOdbcLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsOdbcLinkedService() (*OdbcLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMLLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAzureMLLinkedService() (*AzureMLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsTeradataLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsTeradataLinkedService() (*TeradataLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDb2LinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsDb2LinkedService() (*Db2LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSybaseLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsSybaseLinkedService() (*SybaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPostgreSQLLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsPostgreSQLLinkedService() (*PostgreSQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMySQLLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsMySQLLinkedService() (*MySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAzureMySQLLinkedService() (*AzureMySQLLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsOracleLinkedService() (*OracleLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileServerLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsFileServerLinkedService() (*FileServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHDInsightLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsHDInsightLinkedService() (*HDInsightLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsDynamicsLinkedService() (*DynamicsLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCosmosDbLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsCosmosDbLinkedService() (*CosmosDbLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureKeyVaultLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAzureKeyVaultLinkedService() (*AzureKeyVaultLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBatchLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAzureBatchLinkedService() (*AzureBatchLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDatabaseLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAzureSQLDatabaseLinkedService() (*AzureSQLDatabaseLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsSQLServerLinkedService() (*SQLServerLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAzureSQLDWLinkedService() (*AzureSQLDWLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureStorageLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsAzureStorageLinkedService() (*AzureStorageLinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsLinkedService() (*LinkedService, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicLinkedService is the BasicLinkedService implementation for ZohoLinkedService.
func (zls ZohoLinkedService) AsBasicLinkedService() (BasicLinkedService, bool) {
return &zls, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ZohoLinkedService struct.
func (zls *ZohoLinkedService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -106081,7 +93159,6 @@ func (zls *ZohoLinkedService) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ZohoLinkedServiceTypeProperties zoho server linked service properties.
type ZohoLinkedServiceTypeProperties struct {
// Endpoint - The endpoint of the Zoho server. (i.e. crm.zoho.com/crm/private)
@@ -106098,7 +93175,6 @@ type ZohoLinkedServiceTypeProperties struct {
EncryptedCredential interface{} `json:"encryptedCredential,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// UnmarshalJSON is the custom unmarshaler for ZohoLinkedServiceTypeProperties struct.
func (zlstp *ZohoLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
@@ -106167,7 +93243,6 @@ func (zlstp *ZohoLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ZohoObjectDataset zoho server dataset.
type ZohoObjectDataset struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -106186,7 +93261,6 @@ type ZohoObjectDataset struct {
Type TypeBasicDataset `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ZohoObjectDataset.
func (zod ZohoObjectDataset) MarshalJSON() ([]byte, error) {
zod.Type = TypeZohoObject
@@ -106213,337 +93287,281 @@ func (zod ZohoObjectDataset) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsResponsysObjectDataset() (*ResponsysObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsSalesforceMarketingCloudObjectDataset() (*SalesforceMarketingCloudObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsVerticaTableDataset() (*VerticaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsNetezzaTableDataset() (*NetezzaTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsZohoObjectDataset() (*ZohoObjectDataset, bool) {
return &zod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsXeroObjectDataset() (*XeroObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsSquareObjectDataset() (*SquareObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsSparkObjectDataset() (*SparkObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifyObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsShopifyObjectDataset() (*ShopifyObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsServiceNowObjectDataset() (*ServiceNowObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsQuickBooksObjectDataset() (*QuickBooksObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsPrestoObjectDataset() (*PrestoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsPhoenixObjectDataset() (*PhoenixObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsPaypalObjectDataset() (*PaypalObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsMarketoObjectDataset() (*MarketoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsMariaDBTableDataset() (*MariaDBTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsMagentoObjectDataset() (*MagentoObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsJiraObjectDataset() (*JiraObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsImpalaObjectDataset() (*ImpalaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsHubspotObjectDataset() (*HubspotObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsHiveObjectDataset() (*HiveObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsHBaseObjectDataset() (*HBaseObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsGreenplumTableDataset() (*GreenplumTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQueryObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsGoogleBigQueryObjectDataset() (*GoogleBigQueryObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsEloquaObjectDataset() (*EloquaObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsDrillTableDataset() (*DrillTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsCouchbaseTableDataset() (*CouchbaseTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsConcurObjectDataset() (*ConcurObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsAzurePostgreSQLTableDataset() (*AzurePostgreSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsAmazonMWSObjectDataset() (*AmazonMWSObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsHTTPDataset() (*HTTPDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSearchIndexDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsAzureSearchIndexDataset() (*AzureSearchIndexDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsWebTableDataset() (*WebTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLServerTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsSQLServerTableDataset() (*SQLServerTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccResourceDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsSapEccResourceDataset() (*SapEccResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerResourceDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsSapCloudForCustomerResourceDataset() (*SapCloudForCustomerResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceObjectDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsSalesforceObjectDataset() (*SalesforceObjectDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsRelationalTableDataset() (*RelationalTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsAzureMySQLTableDataset() (*AzureMySQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsOracleTableDataset() (*OracleTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsODataResourceDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsODataResourceDataset() (*ODataResourceDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbCollectionDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsMongoDbCollectionDataset() (*MongoDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileShareDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsFileShareDataset() (*FileShareDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsAzureDataLakeStoreDataset() (*AzureDataLakeStoreDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsEntityDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsDynamicsEntityDataset() (*DynamicsEntityDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsDocumentDbCollectionDataset() (*DocumentDbCollectionDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCustomDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsCustomDataset() (*CustomDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsCassandraTableDataset() (*CassandraTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLDWTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsAzureSQLDWTableDataset() (*AzureSQLDWTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureSQLTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsAzureSQLTableDataset() (*AzureSQLTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsAzureTableDataset() (*AzureTableDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureBlobDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsAzureBlobDataset() (*AzureBlobDataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonS3Dataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsAmazonS3Dataset() (*AmazonS3Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsDataset() (*Dataset, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicDataset is the BasicDataset implementation for ZohoObjectDataset.
func (zod ZohoObjectDataset) AsBasicDataset() (BasicDataset, bool) {
return &zod, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ZohoSource a copy activity Zoho server source.
type ZohoSource struct {
// Query - A query to retrieve data from source. Type: string (or Expression with resultType string).
@@ -106558,7 +93576,6 @@ type ZohoSource struct {
Type TypeBasicCopySource `json:"type,omitempty"`
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// MarshalJSON is the custom marshaler for ZohoSource.
func (zs ZohoSource) MarshalJSON() ([]byte, error) {
zs.Type = TypeZohoSource
@@ -106575,313 +93592,261 @@ func (zs ZohoSource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonRedshiftSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsAmazonRedshiftSource() (*AmazonRedshiftSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsResponsysSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsResponsysSource() (*ResponsysSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceMarketingCloudSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsSalesforceMarketingCloudSource() (*SalesforceMarketingCloudSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsVerticaSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsVerticaSource() (*VerticaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsNetezzaSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsNetezzaSource() (*NetezzaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsZohoSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsZohoSource() (*ZohoSource, bool) {
return &zs, true
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsXeroSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsXeroSource() (*XeroSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSquareSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsSquareSource() (*SquareSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSparkSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsSparkSource() (*SparkSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsShopifySource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsShopifySource() (*ShopifySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsServiceNowSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsServiceNowSource() (*ServiceNowSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsQuickBooksSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsQuickBooksSource() (*QuickBooksSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPrestoSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsPrestoSource() (*PrestoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPhoenixSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsPhoenixSource() (*PhoenixSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsPaypalSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsPaypalSource() (*PaypalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMarketoSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsMarketoSource() (*MarketoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMariaDBSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsMariaDBSource() (*MariaDBSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMagentoSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsMagentoSource() (*MagentoSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsJiraSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsJiraSource() (*JiraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsImpalaSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsImpalaSource() (*ImpalaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHubspotSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsHubspotSource() (*HubspotSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHiveSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsHiveSource() (*HiveSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHBaseSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsHBaseSource() (*HBaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGreenplumSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsGreenplumSource() (*GreenplumSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsGoogleBigQuerySource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsGoogleBigQuerySource() (*GoogleBigQuerySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsEloquaSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsEloquaSource() (*EloquaSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDrillSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsDrillSource() (*DrillSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCouchbaseSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsCouchbaseSource() (*CouchbaseSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsConcurSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsConcurSource() (*ConcurSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzurePostgreSQLSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsAzurePostgreSQLSource() (*AzurePostgreSQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAmazonMWSSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsAmazonMWSSource() (*AmazonMWSSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHTTPSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsHTTPSource() (*HTTPSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureDataLakeStoreSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsAzureDataLakeStoreSource() (*AzureDataLakeStoreSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsMongoDbSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsMongoDbSource() (*MongoDbSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCassandraSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsCassandraSource() (*CassandraSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsWebSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsWebSource() (*WebSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsOracleSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsOracleSource() (*OracleSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureMySQLSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsAzureMySQLSource() (*AzureMySQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsHdfsSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsHdfsSource() (*HdfsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsFileSystemSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsFileSystemSource() (*FileSystemSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLDWSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsSQLDWSource() (*SQLDWSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSQLSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsSQLSource() (*SQLSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapEccSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsSapEccSource() (*SapEccSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSapCloudForCustomerSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsSapCloudForCustomerSource() (*SapCloudForCustomerSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsSalesforceSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsSalesforceSource() (*SalesforceSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsRelationalSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsRelationalSource() (*RelationalSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDynamicsSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsDynamicsSource() (*DynamicsSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsDocumentDbCollectionSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsDocumentDbCollectionSource() (*DocumentDbCollectionSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBlobSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsBlobSource() (*BlobSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsAzureTableSource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsAzureTableSource() (*AzureTableSource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsCopySource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsCopySource() (*CopySource, bool) {
return nil, false
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// AsBasicCopySource is the BasicCopySource implementation for ZohoSource.
func (zs ZohoSource) AsBasicCopySource() (BasicCopySource, bool) {
return &zs, true
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/operations.go
index c5349e12f..dfddac1d6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/operations.go
@@ -24,26 +24,22 @@ import (
"net/http"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// OperationsClient is the the Azure Data Factory V2 management API provides a RESTful set of web services that
// interact with Azure Data Factory V2 services.
type OperationsClient struct {
BaseClient
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewOperationsClient creates an instance of the OperationsClient client.
func NewOperationsClient(subscriptionID string) OperationsClient {
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// List lists the available Azure Data Factory API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResponse, err error) {
req, err := client.ListPreparer(ctx)
@@ -67,7 +63,6 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListPreparer prepares the List request.
func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
const APIVersion = "2017-09-01-preview"
@@ -83,7 +78,6 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request,
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// 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) {
@@ -91,7 +85,6 @@ func (client OperationsClient) ListSender(req *http.Request) (*http.Response, er
autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListResponder handles the response to the List request. The method always
// closes the http.Response Body.
func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResponse, err error) {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/pipelineruns.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/pipelineruns.go
index f8953b475..0923651b9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/pipelineruns.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/pipelineruns.go
@@ -25,30 +25,27 @@ import (
"net/http"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelineRunsClient is the the Azure Data Factory V2 management API provides a RESTful set of web services that
// interact with Azure Data Factory V2 services.
type PipelineRunsClient struct {
BaseClient
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewPipelineRunsClient creates an instance of the PipelineRunsClient client.
func NewPipelineRunsClient(subscriptionID string) PipelineRunsClient {
return NewPipelineRunsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewPipelineRunsClientWithBaseURI creates an instance of the PipelineRunsClient client.
func NewPipelineRunsClientWithBaseURI(baseURI string, subscriptionID string) PipelineRunsClient {
return PipelineRunsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Get get a pipeline run by its run ID.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. runID is the pipeline run
-// identifier.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// runID - the pipeline run identifier.
func (client PipelineRunsClient) Get(ctx context.Context, resourceGroupName string, factoryName string, runID string) (result PipelineRun, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -83,7 +80,6 @@ func (client PipelineRunsClient) Get(ctx context.Context, resourceGroupName stri
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetPreparer prepares the Get request.
func (client PipelineRunsClient) GetPreparer(ctx context.Context, resourceGroupName string, factoryName string, runID string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -106,7 +102,6 @@ func (client PipelineRunsClient) GetPreparer(ctx context.Context, resourceGroupN
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client PipelineRunsClient) GetSender(req *http.Request) (*http.Response, error) {
@@ -114,7 +109,6 @@ func (client PipelineRunsClient) GetSender(req *http.Request) (*http.Response, e
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client PipelineRunsClient) GetResponder(resp *http.Response) (result PipelineRun, err error) {
@@ -128,11 +122,11 @@ func (client PipelineRunsClient) GetResponder(resp *http.Response) (result Pipel
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// QueryByFactory query pipeline runs in the factory based on input filter conditions.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. filterParameters is parameters to
-// filter the pipeline run.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// filterParameters - parameters to filter the pipeline run.
func (client PipelineRunsClient) QueryByFactory(ctx context.Context, resourceGroupName string, factoryName string, filterParameters PipelineRunFilterParameters) (result PipelineRunQueryResponse, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -170,7 +164,6 @@ func (client PipelineRunsClient) QueryByFactory(ctx context.Context, resourceGro
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// QueryByFactoryPreparer prepares the QueryByFactory request.
func (client PipelineRunsClient) QueryByFactoryPreparer(ctx context.Context, resourceGroupName string, factoryName string, filterParameters PipelineRunFilterParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -194,7 +187,6 @@ func (client PipelineRunsClient) QueryByFactoryPreparer(ctx context.Context, res
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// QueryByFactorySender sends the QueryByFactory request. The method will close the
// http.Response Body if it receives an error.
func (client PipelineRunsClient) QueryByFactorySender(req *http.Request) (*http.Response, error) {
@@ -202,7 +194,6 @@ func (client PipelineRunsClient) QueryByFactorySender(req *http.Request) (*http.
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// QueryByFactoryResponder handles the response to the QueryByFactory request. The method always
// closes the http.Response Body.
func (client PipelineRunsClient) QueryByFactoryResponder(resp *http.Response) (result PipelineRunQueryResponse, err error) {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/pipelines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/pipelines.go
index db37d5db9..1c101a9fc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/pipelines.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/pipelines.go
@@ -25,31 +25,30 @@ import (
"net/http"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// PipelinesClient is the the Azure Data Factory V2 management API provides a RESTful set of web services that interact
// with Azure Data Factory V2 services.
type PipelinesClient struct {
BaseClient
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewPipelinesClient creates an instance of the PipelinesClient client.
func NewPipelinesClient(subscriptionID string) PipelinesClient {
return NewPipelinesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewPipelinesClientWithBaseURI creates an instance of the PipelinesClient client.
func NewPipelinesClientWithBaseURI(baseURI string, subscriptionID string) PipelinesClient {
return PipelinesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdate creates or updates a pipeline.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. pipelineName is the pipeline
-// name. pipeline is pipeline resource definition. ifMatch is eTag of the pipeline entity. Should only be
-// specified for update, for which it should match existing entity or can be * for unconditional update.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// pipelineName - the pipeline name.
+// pipeline - pipeline resource definition.
+// ifMatch - eTag of the pipeline entity. Should only be specified for update, for which it should match
+// existing entity or can be * for unconditional update.
func (client PipelinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, factoryName string, pipelineName string, pipeline PipelineResource, ifMatch string) (result PipelineResource, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -93,7 +92,6 @@ func (client PipelinesClient) CreateOrUpdate(ctx context.Context, resourceGroupN
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client PipelinesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, factoryName string, pipelineName string, pipeline PipelineResource, ifMatch string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -122,7 +120,6 @@ func (client PipelinesClient) CreateOrUpdatePreparer(ctx context.Context, resour
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PipelinesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
@@ -130,7 +127,6 @@ func (client PipelinesClient) CreateOrUpdateSender(req *http.Request) (*http.Res
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client PipelinesClient) CreateOrUpdateResponder(resp *http.Response) (result PipelineResource, err error) {
@@ -144,11 +140,12 @@ func (client PipelinesClient) CreateOrUpdateResponder(resp *http.Response) (resu
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateRun creates a run of a pipeline.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. pipelineName is the pipeline
-// name. parameters is parameters of the pipeline run.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// pipelineName - the pipeline name.
+// parameters - parameters of the pipeline run.
func (client PipelinesClient) CreateRun(ctx context.Context, resourceGroupName string, factoryName string, pipelineName string, parameters map[string]interface{}) (result CreateRunResponse, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -187,7 +184,6 @@ func (client PipelinesClient) CreateRun(ctx context.Context, resourceGroupName s
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateRunPreparer prepares the CreateRun request.
func (client PipelinesClient) CreateRunPreparer(ctx context.Context, resourceGroupName string, factoryName string, pipelineName string, parameters map[string]interface{}) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -215,7 +211,6 @@ func (client PipelinesClient) CreateRunPreparer(ctx context.Context, resourceGro
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateRunSender sends the CreateRun request. The method will close the
// http.Response Body if it receives an error.
func (client PipelinesClient) CreateRunSender(req *http.Request) (*http.Response, error) {
@@ -223,7 +218,6 @@ func (client PipelinesClient) CreateRunSender(req *http.Request) (*http.Response
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateRunResponder handles the response to the CreateRun request. The method always
// closes the http.Response Body.
func (client PipelinesClient) CreateRunResponder(resp *http.Response) (result CreateRunResponse, err error) {
@@ -237,11 +231,11 @@ func (client PipelinesClient) CreateRunResponder(resp *http.Response) (result Cr
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Delete deletes a pipeline.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. pipelineName is the pipeline
-// name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// pipelineName - the pipeline name.
func (client PipelinesClient) Delete(ctx context.Context, resourceGroupName string, factoryName string, pipelineName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -280,7 +274,6 @@ func (client PipelinesClient) Delete(ctx context.Context, resourceGroupName stri
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeletePreparer prepares the Delete request.
func (client PipelinesClient) DeletePreparer(ctx context.Context, resourceGroupName string, factoryName string, pipelineName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -303,7 +296,6 @@ func (client PipelinesClient) DeletePreparer(ctx context.Context, resourceGroupN
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PipelinesClient) DeleteSender(req *http.Request) (*http.Response, error) {
@@ -311,7 +303,6 @@ func (client PipelinesClient) DeleteSender(req *http.Request) (*http.Response, e
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client PipelinesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
@@ -324,11 +315,11 @@ func (client PipelinesClient) DeleteResponder(resp *http.Response) (result autor
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Get gets a pipeline.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. pipelineName is the pipeline
-// name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// pipelineName - the pipeline name.
func (client PipelinesClient) Get(ctx context.Context, resourceGroupName string, factoryName string, pipelineName string) (result PipelineResource, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -367,7 +358,6 @@ func (client PipelinesClient) Get(ctx context.Context, resourceGroupName string,
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetPreparer prepares the Get request.
func (client PipelinesClient) GetPreparer(ctx context.Context, resourceGroupName string, factoryName string, pipelineName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -390,7 +380,6 @@ func (client PipelinesClient) GetPreparer(ctx context.Context, resourceGroupName
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client PipelinesClient) GetSender(req *http.Request) (*http.Response, error) {
@@ -398,7 +387,6 @@ func (client PipelinesClient) GetSender(req *http.Request) (*http.Response, erro
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client PipelinesClient) GetResponder(resp *http.Response) (result PipelineResource, err error) {
@@ -412,10 +400,10 @@ func (client PipelinesClient) GetResponder(resp *http.Response) (result Pipeline
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactory lists pipelines.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
func (client PipelinesClient) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result PipelineListResponsePage, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -451,7 +439,6 @@ func (client PipelinesClient) ListByFactory(ctx context.Context, resourceGroupNa
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryPreparer prepares the ListByFactory request.
func (client PipelinesClient) ListByFactoryPreparer(ctx context.Context, resourceGroupName string, factoryName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -473,7 +460,6 @@ func (client PipelinesClient) ListByFactoryPreparer(ctx context.Context, resourc
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactorySender sends the ListByFactory request. The method will close the
// http.Response Body if it receives an error.
func (client PipelinesClient) ListByFactorySender(req *http.Request) (*http.Response, error) {
@@ -481,7 +467,6 @@ func (client PipelinesClient) ListByFactorySender(req *http.Request) (*http.Resp
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryResponder handles the response to the ListByFactory request. The method always
// closes the http.Response Body.
func (client PipelinesClient) ListByFactoryResponder(resp *http.Response) (result PipelineListResponse, err error) {
@@ -516,7 +501,6 @@ func (client PipelinesClient) listByFactoryNextResults(lastResults PipelineListR
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryComplete enumerates all values, automatically crossing page boundaries as required.
func (client PipelinesClient) ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result PipelineListResponseIterator, err error) {
result.page, err = client.ListByFactory(ctx, resourceGroupName, factoryName)
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/triggers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/triggers.go
index ed3cc7b38..01a49e1f2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/triggers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/triggers.go
@@ -26,31 +26,30 @@ import (
"net/http"
)
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// TriggersClient is the the Azure Data Factory V2 management API provides a RESTful set of web services that interact
// with Azure Data Factory V2 services.
type TriggersClient struct {
BaseClient
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewTriggersClient creates an instance of the TriggersClient client.
func NewTriggersClient(subscriptionID string) TriggersClient {
return NewTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client.
func NewTriggersClientWithBaseURI(baseURI string, subscriptionID string) TriggersClient {
return TriggersClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdate creates or updates a trigger.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. triggerName is the trigger name.
-// trigger is trigger resource definition. ifMatch is eTag of the trigger entity. Should only be specified for
-// update, for which it should match existing entity or can be * for unconditional update.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// triggerName - the trigger name.
+// trigger - trigger resource definition.
+// ifMatch - eTag of the trigger entity. Should only be specified for update, for which it should match
+// existing entity or can be * for unconditional update.
func (client TriggersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, factoryName string, triggerName string, trigger TriggerResource, ifMatch string) (result TriggerResource, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -91,7 +90,6 @@ func (client TriggersClient) CreateOrUpdate(ctx context.Context, resourceGroupNa
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client TriggersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, factoryName string, triggerName string, trigger TriggerResource, ifMatch string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -120,7 +118,6 @@ func (client TriggersClient) CreateOrUpdatePreparer(ctx context.Context, resourc
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client TriggersClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
@@ -128,7 +125,6 @@ func (client TriggersClient) CreateOrUpdateSender(req *http.Request) (*http.Resp
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client TriggersClient) CreateOrUpdateResponder(resp *http.Response) (result TriggerResource, err error) {
@@ -142,10 +138,11 @@ func (client TriggersClient) CreateOrUpdateResponder(resp *http.Response) (resul
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Delete deletes a trigger.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. triggerName is the trigger name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// triggerName - the trigger name.
func (client TriggersClient) Delete(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -184,7 +181,6 @@ func (client TriggersClient) Delete(ctx context.Context, resourceGroupName strin
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeletePreparer prepares the Delete request.
func (client TriggersClient) DeletePreparer(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -207,7 +203,6 @@ func (client TriggersClient) DeletePreparer(ctx context.Context, resourceGroupNa
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client TriggersClient) DeleteSender(req *http.Request) (*http.Response, error) {
@@ -215,7 +210,6 @@ func (client TriggersClient) DeleteSender(req *http.Request) (*http.Response, er
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client TriggersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
@@ -228,10 +222,11 @@ func (client TriggersClient) DeleteResponder(resp *http.Response) (result autore
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Get gets a trigger.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. triggerName is the trigger name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// triggerName - the trigger name.
func (client TriggersClient) Get(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result TriggerResource, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -270,7 +265,6 @@ func (client TriggersClient) Get(ctx context.Context, resourceGroupName string,
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetPreparer prepares the Get request.
func (client TriggersClient) GetPreparer(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -293,7 +287,6 @@ func (client TriggersClient) GetPreparer(ctx context.Context, resourceGroupName
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client TriggersClient) GetSender(req *http.Request) (*http.Response, error) {
@@ -301,7 +294,6 @@ func (client TriggersClient) GetSender(req *http.Request) (*http.Response, error
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client TriggersClient) GetResponder(resp *http.Response) (result TriggerResource, err error) {
@@ -315,10 +307,10 @@ func (client TriggersClient) GetResponder(resp *http.Response) (result TriggerRe
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactory lists triggers.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
func (client TriggersClient) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result TriggerListResponsePage, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -354,7 +346,6 @@ func (client TriggersClient) ListByFactory(ctx context.Context, resourceGroupNam
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryPreparer prepares the ListByFactory request.
func (client TriggersClient) ListByFactoryPreparer(ctx context.Context, resourceGroupName string, factoryName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -376,7 +367,6 @@ func (client TriggersClient) ListByFactoryPreparer(ctx context.Context, resource
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactorySender sends the ListByFactory request. The method will close the
// http.Response Body if it receives an error.
func (client TriggersClient) ListByFactorySender(req *http.Request) (*http.Response, error) {
@@ -384,7 +374,6 @@ func (client TriggersClient) ListByFactorySender(req *http.Request) (*http.Respo
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryResponder handles the response to the ListByFactory request. The method always
// closes the http.Response Body.
func (client TriggersClient) ListByFactoryResponder(resp *http.Response) (result TriggerListResponse, err error) {
@@ -419,18 +408,19 @@ func (client TriggersClient) listByFactoryNextResults(lastResults TriggerListRes
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListByFactoryComplete enumerates all values, automatically crossing page boundaries as required.
func (client TriggersClient) ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result TriggerListResponseIterator, err error) {
result.page, err = client.ListByFactory(ctx, resourceGroupName, factoryName)
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListRuns list trigger runs.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. triggerName is the trigger name.
-// startTime is start time for trigger runs. endTime is end time for trigger runs.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// triggerName - the trigger name.
+// startTime - start time for trigger runs.
+// endTime - end time for trigger runs.
func (client TriggersClient) ListRuns(ctx context.Context, resourceGroupName string, factoryName string, triggerName string, startTime date.Time, endTime date.Time) (result TriggerRunListResponsePage, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -470,7 +460,6 @@ func (client TriggersClient) ListRuns(ctx context.Context, resourceGroupName str
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListRunsPreparer prepares the ListRuns request.
func (client TriggersClient) ListRunsPreparer(ctx context.Context, resourceGroupName string, factoryName string, triggerName string, startTime date.Time, endTime date.Time) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -495,7 +484,6 @@ func (client TriggersClient) ListRunsPreparer(ctx context.Context, resourceGroup
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListRunsSender sends the ListRuns request. The method will close the
// http.Response Body if it receives an error.
func (client TriggersClient) ListRunsSender(req *http.Request) (*http.Response, error) {
@@ -503,7 +491,6 @@ func (client TriggersClient) ListRunsSender(req *http.Request) (*http.Response,
azure.DoRetryWithRegistration(client.Client))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListRunsResponder handles the response to the ListRuns request. The method always
// closes the http.Response Body.
func (client TriggersClient) ListRunsResponder(resp *http.Response) (result TriggerRunListResponse, err error) {
@@ -538,17 +525,17 @@ func (client TriggersClient) listRunsNextResults(lastResults TriggerRunListRespo
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// ListRunsComplete enumerates all values, automatically crossing page boundaries as required.
func (client TriggersClient) ListRunsComplete(ctx context.Context, resourceGroupName string, factoryName string, triggerName string, startTime date.Time, endTime date.Time) (result TriggerRunListResponseIterator, err error) {
result.page, err = client.ListRuns(ctx, resourceGroupName, factoryName, triggerName, startTime, endTime)
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Start starts a trigger.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. triggerName is the trigger name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// triggerName - the trigger name.
func (client TriggersClient) Start(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result TriggersStartFuture, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -581,7 +568,6 @@ func (client TriggersClient) Start(ctx context.Context, resourceGroupName string
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StartPreparer prepares the Start request.
func (client TriggersClient) StartPreparer(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -604,7 +590,6 @@ func (client TriggersClient) StartPreparer(ctx context.Context, resourceGroupNam
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client TriggersClient) StartSender(req *http.Request) (future TriggersStartFuture, err error) {
@@ -620,7 +605,6 @@ func (client TriggersClient) StartSender(req *http.Request) (future TriggersStar
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StartResponder handles the response to the Start request. The method always
// closes the http.Response Body.
func (client TriggersClient) StartResponder(resp *http.Response) (result autorest.Response, err error) {
@@ -633,10 +617,11 @@ func (client TriggersClient) StartResponder(resp *http.Response) (result autores
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Stop stops a trigger.
-//
-// resourceGroupName is the resource group name. factoryName is the factory name. triggerName is the trigger name.
+// Parameters:
+// resourceGroupName - the resource group name.
+// factoryName - the factory name.
+// triggerName - the trigger name.
func (client TriggersClient) Stop(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result TriggersStopFuture, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -669,7 +654,6 @@ func (client TriggersClient) Stop(ctx context.Context, resourceGroupName string,
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StopPreparer prepares the Stop request.
func (client TriggersClient) StopPreparer(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
@@ -692,7 +676,6 @@ func (client TriggersClient) StopPreparer(ctx context.Context, resourceGroupName
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client TriggersClient) StopSender(req *http.Request) (future TriggersStopFuture, err error) {
@@ -708,7 +691,6 @@ func (client TriggersClient) StopSender(req *http.Request) (future TriggersStopF
return
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// StopResponder handles the response to the Stop request. The method always
// closes the http.Response Body.
func (client TriggersClient) StopResponder(resp *http.Response) (result autorest.Response, err error) {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/version.go
index e97f035a7..13ce2e7bc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datafactory/mgmt/2017-09-01-preview/datafactory/version.go
@@ -18,13 +18,12 @@ import "github.com/Azure/azure-sdk-for-go/version"
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
+
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/" + version.Number + " datafactory/2017-09-01-preview"
}
-// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory instead.
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return version.Number
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/2016-11-01-preview/catalog/catalog.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/2016-11-01-preview/catalog/catalog.go
index 6ce554cbe..edf09badc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/2016-11-01-preview/catalog/catalog.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/2016-11-01-preview/catalog/catalog.go
@@ -4637,6 +4637,174 @@ func (client Client) ListViewsByDatabaseComplete(ctx context.Context, accountNam
return
}
+// PreviewTable retrieves a preview set of rows in given table.
+// Parameters:
+// accountName - the Azure Data Lake Analytics account upon which to execute catalog operations.
+// databaseName - the name of the database containing the table.
+// schemaName - the name of the schema containing the table.
+// tableName - the name of the table.
+// maxRows - the maximum number of preview rows to be retrieved. Rows returned may be less than or equal to
+// this number depending on row sizes and number of rows in the table.
+// maxColumns - the maximum number of columns to be retrieved.
+func (client Client) PreviewTable(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, maxRows *int64, maxColumns *int64) (result USQLTablePreview, err error) {
+ req, err := client.PreviewTablePreparer(ctx, accountName, databaseName, schemaName, tableName, maxRows, maxColumns)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "catalog.Client", "PreviewTable", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.PreviewTableSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "catalog.Client", "PreviewTable", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.PreviewTableResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "catalog.Client", "PreviewTable", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// PreviewTablePreparer prepares the PreviewTable request.
+func (client Client) PreviewTablePreparer(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, maxRows *int64, maxColumns *int64) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "accountName": accountName,
+ "adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
+ }
+
+ pathParameters := map[string]interface{}{
+ "databaseName": autorest.Encode("path", databaseName),
+ "schemaName": autorest.Encode("path", schemaName),
+ "tableName": autorest.Encode("path", tableName),
+ }
+
+ const APIVersion = "2016-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if maxRows != nil {
+ queryParameters["maxRows"] = autorest.Encode("query", *maxRows)
+ }
+ if maxColumns != nil {
+ queryParameters["maxColumns"] = autorest.Encode("query", *maxColumns)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
+ autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/previewrows", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PreviewTableSender sends the PreviewTable request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) PreviewTableSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// PreviewTableResponder handles the response to the PreviewTable request. The method always
+// closes the http.Response Body.
+func (client Client) PreviewTableResponder(resp *http.Response) (result USQLTablePreview, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// PreviewTablePartition retrieves a preview set of rows in given partition.
+// Parameters:
+// accountName - the Azure Data Lake Analytics account upon which to execute catalog operations.
+// databaseName - the name of the database containing the partition.
+// schemaName - the name of the schema containing the partition.
+// tableName - the name of the table containing the partition.
+// partitionName - the name of the table partition.
+// maxRows - the maximum number of preview rows to be retrieved.Rows returned may be less than or equal to this
+// number depending on row sizes and number of rows in the partition.
+// maxColumns - the maximum number of columns to be retrieved.
+func (client Client) PreviewTablePartition(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, partitionName string, maxRows *int64, maxColumns *int64) (result USQLTablePreview, err error) {
+ req, err := client.PreviewTablePartitionPreparer(ctx, accountName, databaseName, schemaName, tableName, partitionName, maxRows, maxColumns)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "catalog.Client", "PreviewTablePartition", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.PreviewTablePartitionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "catalog.Client", "PreviewTablePartition", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.PreviewTablePartitionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "catalog.Client", "PreviewTablePartition", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// PreviewTablePartitionPreparer prepares the PreviewTablePartition request.
+func (client Client) PreviewTablePartitionPreparer(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, partitionName string, maxRows *int64, maxColumns *int64) (*http.Request, error) {
+ urlParameters := map[string]interface{}{
+ "accountName": accountName,
+ "adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
+ }
+
+ pathParameters := map[string]interface{}{
+ "databaseName": autorest.Encode("path", databaseName),
+ "partitionName": autorest.Encode("path", partitionName),
+ "schemaName": autorest.Encode("path", schemaName),
+ "tableName": autorest.Encode("path", tableName),
+ }
+
+ const APIVersion = "2016-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if maxRows != nil {
+ queryParameters["maxRows"] = autorest.Encode("query", *maxRows)
+ }
+ if maxColumns != nil {
+ queryParameters["maxColumns"] = autorest.Encode("query", *maxColumns)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
+ autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitions/{partitionName}/previewrows", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PreviewTablePartitionSender sends the PreviewTablePartition request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) PreviewTablePartitionSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// PreviewTablePartitionResponder handles the response to the PreviewTablePartition request. The method always
+// closes the http.Response Body.
+func (client Client) PreviewTablePartitionResponder(resp *http.Response) (result USQLTablePreview, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// RevokeACL revokes an access control list (ACL) entry from the Data Lake Analytics catalog.
// Parameters:
// accountName - the Azure Data Lake Analytics account upon which to execute catalog operations.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/2016-11-01-preview/catalog/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/2016-11-01-preview/catalog/models.go
index 9fca6c1f8..1a8bd5f4e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/2016-11-01-preview/catalog/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/2016-11-01-preview/catalog/models.go
@@ -1602,6 +1602,21 @@ func (page USQLTablePartitionListPage) Values() []USQLTablePartition {
return *page.utpl.Value
}
+// USQLTablePreview a Data Lake Analytics catalog table or partition preview rows item.
+type USQLTablePreview struct {
+ autorest.Response `json:"-"`
+ // TotalRowCount - the total number of rows in the table or partition.
+ TotalRowCount *int64 `json:"totalRowCount,omitempty"`
+ // TotalColumnCount - the total number of columns in the table or partition.
+ TotalColumnCount *int64 `json:"totalColumnCount,omitempty"`
+ // Rows - the rows of the table or partition preview, where each row is an array of string representations the row's values. Note: Byte arrays will appear as base-64 encoded values, SqlMap and SqlArray objects will appear as escaped JSON objects, and DateTime objects will appear as ISO formatted UTC date-times.
+ Rows *[][]string `json:"rows,omitempty"`
+ // Truncated - true if the amount of data in the response is less than expected due to the preview operation's size limitations. This can occur if the requested rows or row counts are too large.
+ Truncated *bool `json:"truncated,omitempty"`
+ // Schema - the schema of the table or partition.
+ Schema *[]USQLTableColumn `json:"schema,omitempty"`
+}
+
// USQLTableStatistics a Data Lake Analytics catalog U-SQL table statistics item.
type USQLTableStatistics struct {
autorest.Response `json:"-"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go
index 04d28e6e1..a1b91e122 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go
@@ -185,15 +185,17 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -254,15 +256,17 @@ func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupNa
// 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) (future AccountsDeleteFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -658,15 +662,17 @@ func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) UpdateSender(req *http.Request) (future AccountsUpdateFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/models.go
index f0d0dcd6a..56af0c25b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/models.go
@@ -192,12 +192,11 @@ func PossibleTierTypeValues() []TierType {
// AccountsCreateFutureType an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsCreateFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsCreateFutureType) Result(client AccountsClient) (dlaa DataLakeAnalyticsAccount, err error) {
+func (future *AccountsCreateFutureType) Result(client AccountsClient) (dlaa DataLakeAnalyticsAccount, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -205,34 +204,15 @@ func (future AccountsCreateFutureType) Result(client AccountsClient) (dlaa DataL
return
}
if !done {
- return dlaa, azure.NewAsyncOpIncompleteError("account.AccountsCreateFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- dlaa, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("account.AccountsCreateFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dlaa.Response.Response, err = future.GetResult(sender); err == nil && dlaa.Response.Response.StatusCode != http.StatusNoContent {
+ dlaa, err = client.CreateResponder(dlaa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", dlaa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", resp, "Failure sending request")
- return
- }
- dlaa, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", resp, "Failure responding to request")
}
return
}
@@ -240,12 +220,11 @@ func (future AccountsCreateFutureType) Result(client AccountsClient) (dlaa DataL
// AccountsDeleteFutureType an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsDeleteFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsDeleteFutureType) Result(client AccountsClient) (ar autorest.Response, err error) {
+func (future *AccountsDeleteFutureType) Result(client AccountsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -253,47 +232,21 @@ func (future AccountsDeleteFutureType) Result(client AccountsClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("account.AccountsDeleteFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsDeleteFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("account.AccountsDeleteFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsDeleteFutureType", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsDeleteFutureType", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// AccountsUpdateFutureType an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsUpdateFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsUpdateFutureType) Result(client AccountsClient) (dlaa DataLakeAnalyticsAccount, err error) {
+func (future *AccountsUpdateFutureType) Result(client AccountsClient) (dlaa DataLakeAnalyticsAccount, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -301,34 +254,15 @@ func (future AccountsUpdateFutureType) Result(client AccountsClient) (dlaa DataL
return
}
if !done {
- return dlaa, azure.NewAsyncOpIncompleteError("account.AccountsUpdateFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- dlaa, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("account.AccountsUpdateFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dlaa.Response.Response, err = future.GetResult(sender); err == nil && dlaa.Response.Response.StatusCode != http.StatusNoContent {
+ dlaa, err = client.UpdateResponder(dlaa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", dlaa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", resp, "Failure sending request")
- return
- }
- dlaa, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", resp, "Failure responding to request")
}
return
}
@@ -2575,9 +2509,9 @@ type UpdateDataLakeAnalyticsAccountProperties struct {
StorageAccounts *[]UpdateStorageAccountWithAccountParameters `json:"storageAccounts,omitempty"`
// ComputePolicies - The list of compute policies associated with this account.
ComputePolicies *[]UpdateComputePolicyWithAccountParameters `json:"computePolicies,omitempty"`
- // FirewallRules - The list of firewall rules associated with this Data Lake Analytics account.
+ // FirewallRules - The list of firewall rules associated with this account.
FirewallRules *[]UpdateFirewallRuleWithAccountParameters `json:"firewallRules,omitempty"`
- // FirewallState - The current state of the IP address firewall for this Data Lake Analytics account. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled'
+ // FirewallState - The current state of the IP address firewall for this account. Disabling the firewall does not remove existing rules, they will just be ignored until the firewall is re-enabled. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled'
FirewallState FirewallState `json:"firewallState,omitempty"`
// FirewallAllowAzureIps - The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled'
FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/accounts.go
index 52f0dc72d..6cce0f738 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/accounts.go
@@ -179,15 +179,17 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -248,15 +250,17 @@ func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupNa
// 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) (future AccountsDeleteFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -714,15 +718,17 @@ func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) UpdateSender(req *http.Request) (future AccountsUpdateFutureType, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/firewallrules.go
index f3c1385d0..6ce16a323 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/firewallrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/firewallrules.go
@@ -122,7 +122,7 @@ 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.
// Parameters:
// resourceGroupName - the name of the Azure resource group.
// accountName - the name of the Data Lake Store account.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/models.go
index c5fd6c189..17ffe424c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/models.go
@@ -231,12 +231,11 @@ func PossibleTrustedIDProviderStateValues() []TrustedIDProviderState {
// AccountsCreateFutureType an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsCreateFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsCreateFutureType) Result(client AccountsClient) (dlsa DataLakeStoreAccount, err error) {
+func (future *AccountsCreateFutureType) Result(client AccountsClient) (dlsa DataLakeStoreAccount, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -244,34 +243,15 @@ func (future AccountsCreateFutureType) Result(client AccountsClient) (dlsa DataL
return
}
if !done {
- return dlsa, azure.NewAsyncOpIncompleteError("account.AccountsCreateFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- dlsa, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("account.AccountsCreateFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dlsa.Response.Response, err = future.GetResult(sender); err == nil && dlsa.Response.Response.StatusCode != http.StatusNoContent {
+ dlsa, err = client.CreateResponder(dlsa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", dlsa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", resp, "Failure sending request")
- return
- }
- dlsa, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", resp, "Failure responding to request")
}
return
}
@@ -279,12 +259,11 @@ func (future AccountsCreateFutureType) Result(client AccountsClient) (dlsa DataL
// AccountsDeleteFutureType an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsDeleteFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsDeleteFutureType) Result(client AccountsClient) (ar autorest.Response, err error) {
+func (future *AccountsDeleteFutureType) Result(client AccountsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -292,47 +271,21 @@ func (future AccountsDeleteFutureType) Result(client AccountsClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("account.AccountsDeleteFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsDeleteFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("account.AccountsDeleteFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsDeleteFutureType", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsDeleteFutureType", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// AccountsUpdateFutureType an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsUpdateFutureType struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsUpdateFutureType) Result(client AccountsClient) (dlsa DataLakeStoreAccount, err error) {
+func (future *AccountsUpdateFutureType) Result(client AccountsClient) (dlsa DataLakeStoreAccount, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -340,34 +293,15 @@ func (future AccountsUpdateFutureType) Result(client AccountsClient) (dlsa DataL
return
}
if !done {
- return dlsa, azure.NewAsyncOpIncompleteError("account.AccountsUpdateFutureType")
- }
- if future.PollingMethod() == azure.PollingLocation {
- dlsa, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("account.AccountsUpdateFutureType")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dlsa.Response.Response, err = future.GetResult(sender); err == nil && dlsa.Response.Response.StatusCode != http.StatusNoContent {
+ dlsa, err = client.UpdateResponder(dlsa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", dlsa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", resp, "Failure sending request")
- return
- }
- dlsa, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", resp, "Failure responding to request")
}
return
}
@@ -486,6 +420,8 @@ type CreateDataLakeStoreAccountProperties struct {
EncryptionState EncryptionState `json:"encryptionState,omitempty"`
// FirewallRules - The list of firewall rules associated with this Data Lake Store account.
FirewallRules *[]CreateFirewallRuleWithAccountParameters `json:"firewallRules,omitempty"`
+ // VirtualNetworkRules - The list of virtual network rules associated with this Data Lake Store account.
+ VirtualNetworkRules *[]CreateVirtualNetworkRuleWithAccountParameters `json:"virtualNetworkRules,omitempty"`
// FirewallState - The current state of the IP address firewall for this Data Lake Store account. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled'
FirewallState FirewallState `json:"firewallState,omitempty"`
// FirewallAllowAzureIps - The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'FirewallAllowAzureIpsStateEnabled', 'FirewallAllowAzureIpsStateDisabled'
@@ -645,6 +581,52 @@ type CreateOrUpdateTrustedIDProviderProperties struct {
IDProvider *string `json:"idProvider,omitempty"`
}
+// CreateOrUpdateVirtualNetworkRuleParameters the parameters used to create a new virtual network rule.
+type CreateOrUpdateVirtualNetworkRuleParameters struct {
+ // CreateOrUpdateVirtualNetworkRuleProperties - The virtual network rule properties to use when creating a new virtual network rule.
+ *CreateOrUpdateVirtualNetworkRuleProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CreateOrUpdateVirtualNetworkRuleParameters.
+func (couvnrp CreateOrUpdateVirtualNetworkRuleParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if couvnrp.CreateOrUpdateVirtualNetworkRuleProperties != nil {
+ objectMap["properties"] = couvnrp.CreateOrUpdateVirtualNetworkRuleProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for CreateOrUpdateVirtualNetworkRuleParameters struct.
+func (couvnrp *CreateOrUpdateVirtualNetworkRuleParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var createOrUpdateVirtualNetworkRuleProperties CreateOrUpdateVirtualNetworkRuleProperties
+ err = json.Unmarshal(*v, &createOrUpdateVirtualNetworkRuleProperties)
+ if err != nil {
+ return err
+ }
+ couvnrp.CreateOrUpdateVirtualNetworkRuleProperties = &createOrUpdateVirtualNetworkRuleProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// CreateOrUpdateVirtualNetworkRuleProperties the virtual network rule properties to use when creating a new
+// virtual network rule.
+type CreateOrUpdateVirtualNetworkRuleProperties struct {
+ // SubnetID - The resource identifier for the subnet.
+ SubnetID *string `json:"subnetId,omitempty"`
+}
+
// CreateTrustedIDProviderWithAccountParameters the parameters used to create a new trusted identity provider while
// creating a new Data Lake Store account.
type CreateTrustedIDProviderWithAccountParameters struct {
@@ -699,6 +681,60 @@ func (ctipwap *CreateTrustedIDProviderWithAccountParameters) UnmarshalJSON(body
return nil
}
+// CreateVirtualNetworkRuleWithAccountParameters the parameters used to create a new virtual network rule while
+// creating a new Data Lake Store account.
+type CreateVirtualNetworkRuleWithAccountParameters struct {
+ // Name - The unique name of the virtual network rule to create.
+ Name *string `json:"name,omitempty"`
+ // CreateOrUpdateVirtualNetworkRuleProperties - The virtual network rule properties to use when creating a new virtual network rule.
+ *CreateOrUpdateVirtualNetworkRuleProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CreateVirtualNetworkRuleWithAccountParameters.
+func (cvnrwap CreateVirtualNetworkRuleWithAccountParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cvnrwap.Name != nil {
+ objectMap["name"] = cvnrwap.Name
+ }
+ if cvnrwap.CreateOrUpdateVirtualNetworkRuleProperties != nil {
+ objectMap["properties"] = cvnrwap.CreateOrUpdateVirtualNetworkRuleProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for CreateVirtualNetworkRuleWithAccountParameters struct.
+func (cvnrwap *CreateVirtualNetworkRuleWithAccountParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cvnrwap.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var createOrUpdateVirtualNetworkRuleProperties CreateOrUpdateVirtualNetworkRuleProperties
+ err = json.Unmarshal(*v, &createOrUpdateVirtualNetworkRuleProperties)
+ if err != nil {
+ return err
+ }
+ cvnrwap.CreateOrUpdateVirtualNetworkRuleProperties = &createOrUpdateVirtualNetworkRuleProperties
+ }
+ }
+ }
+
+ return nil
+}
+
// DataLakeStoreAccount data Lake Store account information.
type DataLakeStoreAccount struct {
autorest.Response `json:"-"`
@@ -1047,6 +1083,8 @@ type DataLakeStoreAccountProperties struct {
EncryptionProvisioningState EncryptionProvisioningState `json:"encryptionProvisioningState,omitempty"`
// FirewallRules - The list of firewall rules associated with this Data Lake Store account.
FirewallRules *[]FirewallRule `json:"firewallRules,omitempty"`
+ // VirtualNetworkRules - The list of virtual network rules associated with this Data Lake Store account.
+ VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
// FirewallState - The current state of the IP address firewall for this Data Lake Store account. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled'
FirewallState FirewallState `json:"firewallState,omitempty"`
// FirewallAllowAzureIps - The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'FirewallAllowAzureIpsStateEnabled', 'FirewallAllowAzureIpsStateDisabled'
@@ -1648,6 +1686,8 @@ type UpdateDataLakeStoreAccountProperties struct {
EncryptionConfig *UpdateEncryptionConfig `json:"encryptionConfig,omitempty"`
// FirewallRules - The list of firewall rules associated with this Data Lake Store account.
FirewallRules *[]UpdateFirewallRuleWithAccountParameters `json:"firewallRules,omitempty"`
+ // VirtualNetworkRules - The list of virtual network rules associated with this Data Lake Store account.
+ VirtualNetworkRules *[]UpdateVirtualNetworkRuleWithAccountParameters `json:"virtualNetworkRules,omitempty"`
// FirewallState - The current state of the IP address firewall for this Data Lake Store account. Disabling the firewall does not remove existing rules, they will just be ignored until the firewall is re-enabled. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled'
FirewallState FirewallState `json:"firewallState,omitempty"`
// FirewallAllowAzureIps - The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'FirewallAllowAzureIpsStateEnabled', 'FirewallAllowAzureIpsStateDisabled'
@@ -1872,3 +1912,293 @@ func (utipwap *UpdateTrustedIDProviderWithAccountParameters) UnmarshalJSON(body
return nil
}
+
+// UpdateVirtualNetworkRuleParameters the parameters used to update a virtual network rule.
+type UpdateVirtualNetworkRuleParameters struct {
+ // UpdateVirtualNetworkRuleProperties - The virtual network rule properties to use when updating a virtual network rule.
+ *UpdateVirtualNetworkRuleProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for UpdateVirtualNetworkRuleParameters.
+func (uvnrp UpdateVirtualNetworkRuleParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if uvnrp.UpdateVirtualNetworkRuleProperties != nil {
+ objectMap["properties"] = uvnrp.UpdateVirtualNetworkRuleProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for UpdateVirtualNetworkRuleParameters struct.
+func (uvnrp *UpdateVirtualNetworkRuleParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var updateVirtualNetworkRuleProperties UpdateVirtualNetworkRuleProperties
+ err = json.Unmarshal(*v, &updateVirtualNetworkRuleProperties)
+ if err != nil {
+ return err
+ }
+ uvnrp.UpdateVirtualNetworkRuleProperties = &updateVirtualNetworkRuleProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// UpdateVirtualNetworkRuleProperties the virtual network rule properties to use when updating a virtual network
+// rule.
+type UpdateVirtualNetworkRuleProperties struct {
+ // SubnetID - The resource identifier for the subnet.
+ SubnetID *string `json:"subnetId,omitempty"`
+}
+
+// UpdateVirtualNetworkRuleWithAccountParameters the parameters used to update a virtual network rule while
+// updating a Data Lake Store account.
+type UpdateVirtualNetworkRuleWithAccountParameters struct {
+ // Name - The unique name of the virtual network rule to update.
+ Name *string `json:"name,omitempty"`
+ // UpdateVirtualNetworkRuleProperties - The virtual network rule properties to use when updating a virtual network rule.
+ *UpdateVirtualNetworkRuleProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for UpdateVirtualNetworkRuleWithAccountParameters.
+func (uvnrwap UpdateVirtualNetworkRuleWithAccountParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if uvnrwap.Name != nil {
+ objectMap["name"] = uvnrwap.Name
+ }
+ if uvnrwap.UpdateVirtualNetworkRuleProperties != nil {
+ objectMap["properties"] = uvnrwap.UpdateVirtualNetworkRuleProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for UpdateVirtualNetworkRuleWithAccountParameters struct.
+func (uvnrwap *UpdateVirtualNetworkRuleWithAccountParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ uvnrwap.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var updateVirtualNetworkRuleProperties UpdateVirtualNetworkRuleProperties
+ err = json.Unmarshal(*v, &updateVirtualNetworkRuleProperties)
+ if err != nil {
+ return err
+ }
+ uvnrwap.UpdateVirtualNetworkRuleProperties = &updateVirtualNetworkRuleProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkRule data Lake Store virtual network rule information.
+type VirtualNetworkRule struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkRuleProperties - The virtual network rule properties.
+ *VirtualNetworkRuleProperties `json:"properties,omitempty"`
+ // ID - The resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - The resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - The resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkRule.
+func (vnr VirtualNetworkRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vnr.VirtualNetworkRuleProperties != nil {
+ objectMap["properties"] = vnr.VirtualNetworkRuleProperties
+ }
+ if vnr.ID != nil {
+ objectMap["id"] = vnr.ID
+ }
+ if vnr.Name != nil {
+ objectMap["name"] = vnr.Name
+ }
+ if vnr.Type != nil {
+ objectMap["type"] = vnr.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkRule struct.
+func (vnr *VirtualNetworkRule) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualNetworkRuleProperties VirtualNetworkRuleProperties
+ err = json.Unmarshal(*v, &virtualNetworkRuleProperties)
+ if err != nil {
+ return err
+ }
+ vnr.VirtualNetworkRuleProperties = &virtualNetworkRuleProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vnr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vnr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vnr.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkRuleListResult data Lake Store virtual network rule list information.
+type VirtualNetworkRuleListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The results of the list operation.
+ Value *[]VirtualNetworkRule `json:"value,omitempty"`
+ // NextLink - The link (url) to the next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualNetworkRuleListResultIterator provides access to a complete listing of VirtualNetworkRule values.
+type VirtualNetworkRuleListResultIterator struct {
+ i int
+ page VirtualNetworkRuleListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualNetworkRuleListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkRuleListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualNetworkRuleListResultIterator) Response() VirtualNetworkRuleListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualNetworkRuleListResultIterator) Value() VirtualNetworkRule {
+ if !iter.page.NotDone() {
+ return VirtualNetworkRule{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool {
+ return vnrlr.Value == nil || len(*vnrlr.Value) == 0
+}
+
+// virtualNetworkRuleListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer() (*http.Request, error) {
+ if vnrlr.NextLink == nil || len(to.String(vnrlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnrlr.NextLink)))
+}
+
+// VirtualNetworkRuleListResultPage contains a page of VirtualNetworkRule values.
+type VirtualNetworkRuleListResultPage struct {
+ fn func(VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)
+ vnrlr VirtualNetworkRuleListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualNetworkRuleListResultPage) Next() error {
+ next, err := page.fn(page.vnrlr)
+ if err != nil {
+ return err
+ }
+ page.vnrlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkRuleListResultPage) NotDone() bool {
+ return !page.vnrlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkRuleListResultPage) Response() VirtualNetworkRuleListResult {
+ return page.vnrlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkRuleListResultPage) Values() []VirtualNetworkRule {
+ if page.vnrlr.IsEmpty() {
+ return nil
+ }
+ return *page.vnrlr.Value
+}
+
+// VirtualNetworkRuleProperties the virtual network rule properties.
+type VirtualNetworkRuleProperties struct {
+ // SubnetID - The resource identifier for the subnet.
+ SubnetID *string `json:"subnetId,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/virtualnetworkrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/virtualnetworkrules.go
new file mode 100644
index 000000000..d44ef296b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/virtualnetworkrules.go
@@ -0,0 +1,428 @@
+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 (
+ "context"
+ "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 creates an Azure Data Lake Store account management client.
+type VirtualNetworkRulesClient struct {
+ BaseClient
+}
+
+// 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 the specified virtual network rule. During update, the virtual network rule with
+// the specified name will be replaced with this new virtual network rule.
+// Parameters:
+// resourceGroupName - the name of the Azure resource group.
+// accountName - the name of the Data Lake Store account.
+// virtualNetworkRuleName - the name of the virtual network rule to create or update.
+// parameters - parameters supplied to create or update the virtual network rule.
+func (client VirtualNetworkRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string, parameters CreateOrUpdateVirtualNetworkRuleParameters) (result VirtualNetworkRule, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.CreateOrUpdateVirtualNetworkRuleProperties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.CreateOrUpdateVirtualNetworkRuleProperties.SubnetID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("account.VirtualNetworkRulesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, virtualNetworkRuleName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "account.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, "account.VirtualNetworkRulesClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualNetworkRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string, parameters CreateOrUpdateVirtualNetworkRuleParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName),
+ }
+
+ const APIVersion = "2016-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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.DoRetryWithRegistration(client.Client))
+}
+
+// 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),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the specified virtual network rule from the specified Data Lake Store account.
+// Parameters:
+// resourceGroupName - the name of the Azure resource group.
+// accountName - the name of the Data Lake Store account.
+// virtualNetworkRuleName - the name of the virtual network rule to delete.
+func (client VirtualNetworkRulesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, virtualNetworkRuleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualNetworkRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName),
+ }
+
+ 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.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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.DoRetryWithRegistration(client.Client))
+}
+
+// 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.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets the specified Data Lake Store virtual network rule.
+// Parameters:
+// resourceGroupName - the name of the Azure resource group.
+// accountName - the name of the Data Lake Store account.
+// virtualNetworkRuleName - the name of the virtual network rule to retrieve.
+func (client VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string) (result VirtualNetworkRule, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, accountName, virtualNetworkRuleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "account.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, "account.VirtualNetworkRulesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualNetworkRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName),
+ }
+
+ 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.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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
+}
+
+// ListByAccount lists the Data Lake Store virtual network rules within the specified Data Lake Store account.
+// Parameters:
+// resourceGroupName - the name of the Azure resource group.
+// accountName - the name of the Data Lake Store account.
+func (client VirtualNetworkRulesClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result VirtualNetworkRuleListResultPage, err error) {
+ result.fn = client.listByAccountNextResults
+ req, err := client.ListByAccountPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "ListByAccount", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByAccountSender(req)
+ if err != nil {
+ result.vnrlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "ListByAccount", resp, "Failure sending request")
+ return
+ }
+
+ result.vnrlr, err = client.ListByAccountResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "ListByAccount", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByAccountPreparer prepares the ListByAccount request.
+func (client VirtualNetworkRulesClient) ListByAccountPreparer(ctx context.Context, 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.DataLakeStore/accounts/{accountName}/virtualNetworkRules", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByAccountSender sends the ListByAccount request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkRulesClient) ListByAccountSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByAccountResponder handles the response to the ListByAccount request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkRulesClient) ListByAccountResponder(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
+}
+
+// listByAccountNextResults retrieves the next set of results, if any.
+func (client VirtualNetworkRulesClient) listByAccountNextResults(lastResults VirtualNetworkRuleListResult) (result VirtualNetworkRuleListResult, err error) {
+ req, err := lastResults.virtualNetworkRuleListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "listByAccountNextResults", 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.VirtualNetworkRulesClient", "listByAccountNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByAccountResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "listByAccountNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByAccountComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualNetworkRulesClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result VirtualNetworkRuleListResultIterator, err error) {
+ result.page, err = client.ListByAccount(ctx, resourceGroupName, accountName)
+ return
+}
+
+// Update updates the specified virtual network rule.
+// Parameters:
+// resourceGroupName - the name of the Azure resource group.
+// accountName - the name of the Data Lake Store account.
+// virtualNetworkRuleName - the name of the virtual network rule to update.
+// parameters - parameters supplied to update the virtual network rule.
+func (client VirtualNetworkRulesClient) Update(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string, parameters *UpdateVirtualNetworkRuleParameters) (result VirtualNetworkRule, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, virtualNetworkRuleName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "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.VirtualNetworkRulesClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualNetworkRulesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string, parameters *UpdateVirtualNetworkRuleParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName),
+ }
+
+ const APIVersion = "2016-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkRulesClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkRulesClient) UpdateResponder(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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/customimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/customimages.go
index 5fba68062..7c2c9007a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/customimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/customimages.go
@@ -95,15 +95,17 @@ func (client CustomImagesClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client CustomImagesClient) CreateOrUpdateSender(req *http.Request) (future CustomImagesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -166,15 +168,17 @@ func (client CustomImagesClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client CustomImagesClient) DeleteSender(req *http.Request) (future CustomImagesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/disks.go
index 8095cdbd6..5792fc4b5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/disks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/disks.go
@@ -91,15 +91,17 @@ func (client DisksClient) AttachPreparer(ctx context.Context, resourceGroupName
// AttachSender sends the Attach request. The method will close the
// http.Response Body if it receives an error.
func (client DisksClient) AttachSender(req *http.Request) (future DisksAttachFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -172,15 +174,17 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
// 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) (future DisksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -245,15 +249,17 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName
// 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) (future DisksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -321,15 +327,17 @@ func (client DisksClient) DetachPreparer(ctx context.Context, resourceGroupName
// DetachSender sends the Detach request. The method will close the
// http.Response Body if it receives an error.
func (client DisksClient) DetachSender(req *http.Request) (future DisksDetachFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/environments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/environments.go
index a2d483eae..6e1e06ed2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/environments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/environments.go
@@ -97,15 +97,17 @@ func (client EnvironmentsClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client EnvironmentsClient) CreateOrUpdateSender(req *http.Request) (future EnvironmentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client EnvironmentsClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client EnvironmentsClient) DeleteSender(req *http.Request) (future EnvironmentsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/formulas.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/formulas.go
index 19f3c1c2f..0bc96e0f7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/formulas.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/formulas.go
@@ -108,15 +108,17 @@ func (client FormulasClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client FormulasClient) CreateOrUpdateSender(req *http.Request) (future FormulasCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/globalschedules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/globalschedules.go
index 902559ee6..cbb18431b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/globalschedules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/globalschedules.go
@@ -226,15 +226,17 @@ func (client GlobalSchedulesClient) ExecutePreparer(ctx context.Context, resourc
// ExecuteSender sends the Execute request. The method will close the
// http.Response Body if it receives an error.
func (client GlobalSchedulesClient) ExecuteSender(req *http.Request) (future GlobalSchedulesExecuteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -584,15 +586,17 @@ func (client GlobalSchedulesClient) RetargetPreparer(ctx context.Context, resour
// RetargetSender sends the Retarget request. The method will close the
// http.Response Body if it receives an error.
func (client GlobalSchedulesClient) RetargetSender(req *http.Request) (future GlobalSchedulesRetargetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/labs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/labs.go
index 8ea8df7a7..11f27dc90 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/labs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/labs.go
@@ -84,15 +84,17 @@ func (client LabsClient) ClaimAnyVMPreparer(ctx context.Context, resourceGroupNa
// ClaimAnyVMSender sends the ClaimAnyVM request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) ClaimAnyVMSender(req *http.Request) (future LabsClaimAnyVMFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client LabsClient) CreateEnvironmentPreparer(ctx context.Context, resource
// CreateEnvironmentSender sends the CreateEnvironment request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) CreateEnvironmentSender(req *http.Request) (future LabsCreateEnvironmentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -241,15 +245,17 @@ func (client LabsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGro
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) CreateOrUpdateSender(req *http.Request) (future LabsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -310,15 +316,17 @@ func (client LabsClient) DeletePreparer(ctx context.Context, resourceGroupName s
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) DeleteSender(req *http.Request) (future LabsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -382,15 +390,17 @@ func (client LabsClient) ExportResourceUsagePreparer(ctx context.Context, resour
// ExportResourceUsageSender sends the ExportResourceUsage request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) ExportResourceUsageSender(req *http.Request) (future LabsExportResourceUsageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/models.go
index 25c425826..acd828195 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/models.go
@@ -1599,12 +1599,11 @@ type CustomImagePropertiesFromVM struct {
// operation.
type CustomImagesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomImagesCreateOrUpdateFuture) Result(client CustomImagesClient) (ci CustomImage, err error) {
+func (future *CustomImagesCreateOrUpdateFuture) Result(client CustomImagesClient) (ci CustomImage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1612,34 +1611,15 @@ func (future CustomImagesCreateOrUpdateFuture) Result(client CustomImagesClient)
return
}
if !done {
- return ci, azure.NewAsyncOpIncompleteError("dtl.CustomImagesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ci, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CustomImagesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.CustomImagesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CreateOrUpdateResponder(ci.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dtl.CustomImagesCreateOrUpdateFuture", "Result", ci.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CustomImagesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ci, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CustomImagesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1647,12 +1627,11 @@ func (future CustomImagesCreateOrUpdateFuture) Result(client CustomImagesClient)
// CustomImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CustomImagesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomImagesDeleteFuture) Result(client CustomImagesClient) (ar autorest.Response, err error) {
+func (future *CustomImagesDeleteFuture) Result(client CustomImagesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1660,35 +1639,10 @@ func (future CustomImagesDeleteFuture) Result(client CustomImagesClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.CustomImagesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CustomImagesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.CustomImagesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CustomImagesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CustomImagesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1863,12 +1817,11 @@ type DiskProperties struct {
// DisksAttachFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksAttachFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksAttachFuture) Result(client DisksClient) (ar autorest.Response, err error) {
+func (future *DisksAttachFuture) Result(client DisksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1876,47 +1829,21 @@ func (future DisksAttachFuture) Result(client DisksClient) (ar autorest.Response
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.DisksAttachFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.AttachResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.DisksAttachFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.DisksAttachFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.DisksAttachFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.AttachResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.DisksAttachFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err error) {
+func (future *DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1924,34 +1851,15 @@ func (future DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("dtl.DisksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.DisksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.DisksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dtl.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.DisksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.DisksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1959,12 +1867,11 @@ func (future DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err
// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksDeleteFuture) Result(client DisksClient) (ar autorest.Response, err error) {
+func (future *DisksDeleteFuture) Result(client DisksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1972,47 +1879,21 @@ func (future DisksDeleteFuture) Result(client DisksClient) (ar autorest.Response
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.DisksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.DisksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.DisksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.DisksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.DisksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DisksDetachFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksDetachFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksDetachFuture) Result(client DisksClient) (ar autorest.Response, err error) {
+func (future *DisksDetachFuture) Result(client DisksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2020,35 +1901,10 @@ func (future DisksDetachFuture) Result(client DisksClient) (ar autorest.Response
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.DisksDetachFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DetachResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.DisksDetachFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.DisksDetachFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.DisksDetachFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DetachResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.DisksDetachFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2190,12 +2046,11 @@ type EnvironmentProperties struct {
// operation.
type EnvironmentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EnvironmentsCreateOrUpdateFuture) Result(client EnvironmentsClient) (e Environment, err error) {
+func (future *EnvironmentsCreateOrUpdateFuture) Result(client EnvironmentsClient) (e Environment, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2203,34 +2058,15 @@ func (future EnvironmentsCreateOrUpdateFuture) Result(client EnvironmentsClient)
return
}
if !done {
- return e, azure.NewAsyncOpIncompleteError("dtl.EnvironmentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- e, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.EnvironmentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.EnvironmentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
+ e, err = client.CreateOrUpdateResponder(e.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dtl.EnvironmentsCreateOrUpdateFuture", "Result", e.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.EnvironmentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- e, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.EnvironmentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2238,12 +2074,11 @@ func (future EnvironmentsCreateOrUpdateFuture) Result(client EnvironmentsClient)
// EnvironmentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EnvironmentsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EnvironmentsDeleteFuture) Result(client EnvironmentsClient) (ar autorest.Response, err error) {
+func (future *EnvironmentsDeleteFuture) Result(client EnvironmentsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2251,35 +2086,10 @@ func (future EnvironmentsDeleteFuture) Result(client EnvironmentsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.EnvironmentsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.EnvironmentsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.EnvironmentsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.EnvironmentsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.EnvironmentsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2482,12 +2292,11 @@ type FormulaPropertiesFromVM struct {
// operation.
type FormulasCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FormulasCreateOrUpdateFuture) Result(client FormulasClient) (f Formula, err error) {
+func (future *FormulasCreateOrUpdateFuture) Result(client FormulasClient) (f Formula, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2495,34 +2304,15 @@ func (future FormulasCreateOrUpdateFuture) Result(client FormulasClient) (f Form
return
}
if !done {
- return f, azure.NewAsyncOpIncompleteError("dtl.FormulasCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- f, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.FormulasCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.FormulasCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
+ f, err = client.CreateOrUpdateResponder(f.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dtl.FormulasCreateOrUpdateFuture", "Result", f.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.FormulasCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- f, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.FormulasCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2709,12 +2499,11 @@ type GenerateUploadURIResponse struct {
// operation.
type GlobalSchedulesExecuteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GlobalSchedulesExecuteFuture) Result(client GlobalSchedulesClient) (ar autorest.Response, err error) {
+func (future *GlobalSchedulesExecuteFuture) Result(client GlobalSchedulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2722,35 +2511,10 @@ func (future GlobalSchedulesExecuteFuture) Result(client GlobalSchedulesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.GlobalSchedulesExecuteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ExecuteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesExecuteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.GlobalSchedulesExecuteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesExecuteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ExecuteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesExecuteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2758,12 +2522,11 @@ func (future GlobalSchedulesExecuteFuture) Result(client GlobalSchedulesClient)
// operation.
type GlobalSchedulesRetargetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GlobalSchedulesRetargetFuture) Result(client GlobalSchedulesClient) (ar autorest.Response, err error) {
+func (future *GlobalSchedulesRetargetFuture) Result(client GlobalSchedulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2771,35 +2534,10 @@ func (future GlobalSchedulesRetargetFuture) Result(client GlobalSchedulesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.GlobalSchedulesRetargetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RetargetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesRetargetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.GlobalSchedulesRetargetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesRetargetFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RetargetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesRetargetFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3283,12 +3021,11 @@ type LabResourceCostProperties struct {
// LabsClaimAnyVMFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LabsClaimAnyVMFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LabsClaimAnyVMFuture) Result(client LabsClient) (ar autorest.Response, err error) {
+func (future *LabsClaimAnyVMFuture) Result(client LabsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3296,35 +3033,10 @@ func (future LabsClaimAnyVMFuture) Result(client LabsClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.LabsClaimAnyVMFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ClaimAnyVMResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsClaimAnyVMFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.LabsClaimAnyVMFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsClaimAnyVMFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ClaimAnyVMResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsClaimAnyVMFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3332,12 +3044,11 @@ func (future LabsClaimAnyVMFuture) Result(client LabsClient) (ar autorest.Respon
// operation.
type LabsCreateEnvironmentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LabsCreateEnvironmentFuture) Result(client LabsClient) (ar autorest.Response, err error) {
+func (future *LabsCreateEnvironmentFuture) Result(client LabsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3345,47 +3056,21 @@ func (future LabsCreateEnvironmentFuture) Result(client LabsClient) (ar autorest
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.LabsCreateEnvironmentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.CreateEnvironmentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsCreateEnvironmentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.LabsCreateEnvironmentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsCreateEnvironmentFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.CreateEnvironmentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsCreateEnvironmentFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// LabsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LabsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LabsCreateOrUpdateFuture) Result(client LabsClient) (l Lab, err error) {
+func (future *LabsCreateOrUpdateFuture) Result(client LabsClient) (l Lab, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3393,34 +3078,15 @@ func (future LabsCreateOrUpdateFuture) Result(client LabsClient) (l Lab, err err
return
}
if !done {
- return l, azure.NewAsyncOpIncompleteError("dtl.LabsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- l, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.LabsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if l.Response.Response, err = future.GetResult(sender); err == nil && l.Response.Response.StatusCode != http.StatusNoContent {
+ l, err = client.CreateOrUpdateResponder(l.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dtl.LabsCreateOrUpdateFuture", "Result", l.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- l, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3428,12 +3094,11 @@ func (future LabsCreateOrUpdateFuture) Result(client LabsClient) (l Lab, err err
// LabsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LabsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LabsDeleteFuture) Result(client LabsClient) (ar autorest.Response, err error) {
+func (future *LabsDeleteFuture) Result(client LabsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3441,35 +3106,10 @@ func (future LabsDeleteFuture) Result(client LabsClient) (ar autorest.Response,
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.LabsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.LabsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3477,12 +3117,11 @@ func (future LabsDeleteFuture) Result(client LabsClient) (ar autorest.Response,
// operation.
type LabsExportResourceUsageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LabsExportResourceUsageFuture) Result(client LabsClient) (ar autorest.Response, err error) {
+func (future *LabsExportResourceUsageFuture) Result(client LabsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3490,35 +3129,10 @@ func (future LabsExportResourceUsageFuture) Result(client LabsClient) (ar autore
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.LabsExportResourceUsageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ExportResourceUsageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsExportResourceUsageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.LabsExportResourceUsageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsExportResourceUsageFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ExportResourceUsageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabsExportResourceUsageFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6960,12 +6574,11 @@ type SchedulePropertiesFragment struct {
// SchedulesExecuteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SchedulesExecuteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SchedulesExecuteFuture) Result(client SchedulesClient) (ar autorest.Response, err error) {
+func (future *SchedulesExecuteFuture) Result(client SchedulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6973,35 +6586,10 @@ func (future SchedulesExecuteFuture) Result(client SchedulesClient) (ar autorest
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.SchedulesExecuteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ExecuteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.SchedulesExecuteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.SchedulesExecuteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.SchedulesExecuteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ExecuteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.SchedulesExecuteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7563,12 +7151,11 @@ type UserPropertiesFragment struct {
// UsersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UsersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UsersDeleteFuture) Result(client UsersClient) (ar autorest.Response, err error) {
+func (future *UsersDeleteFuture) Result(client UsersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7576,35 +7163,10 @@ func (future UsersDeleteFuture) Result(client UsersClient) (ar autorest.Response
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.UsersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.UsersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.UsersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.UsersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.UsersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7628,12 +7190,11 @@ type UserSecretStoreFragment struct {
// operation.
type VirtualMachinesAddDataDiskFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesAddDataDiskFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+func (future *VirtualMachinesAddDataDiskFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7641,35 +7202,10 @@ func (future VirtualMachinesAddDataDiskFuture) Result(client VirtualMachinesClie
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesAddDataDiskFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.AddDataDiskResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesAddDataDiskFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesAddDataDiskFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesAddDataDiskFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.AddDataDiskResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesAddDataDiskFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7677,12 +7213,11 @@ func (future VirtualMachinesAddDataDiskFuture) Result(client VirtualMachinesClie
// operation.
type VirtualMachinesApplyArtifactsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesApplyArtifactsFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+func (future *VirtualMachinesApplyArtifactsFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7690,35 +7225,10 @@ func (future VirtualMachinesApplyArtifactsFuture) Result(client VirtualMachinesC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesApplyArtifactsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ApplyArtifactsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesApplyArtifactsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesApplyArtifactsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesApplyArtifactsFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ApplyArtifactsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesApplyArtifactsFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7726,12 +7236,11 @@ func (future VirtualMachinesApplyArtifactsFuture) Result(client VirtualMachinesC
// operation.
type VirtualMachineSchedulesExecuteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineSchedulesExecuteFuture) Result(client VirtualMachineSchedulesClient) (ar autorest.Response, err error) {
+func (future *VirtualMachineSchedulesExecuteFuture) Result(client VirtualMachineSchedulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7739,47 +7248,21 @@ func (future VirtualMachineSchedulesExecuteFuture) Result(client VirtualMachineS
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualMachineSchedulesExecuteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ExecuteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineSchedulesExecuteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachineSchedulesExecuteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineSchedulesExecuteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ExecuteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineSchedulesExecuteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// VirtualMachinesClaimFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VirtualMachinesClaimFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesClaimFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+func (future *VirtualMachinesClaimFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7787,35 +7270,10 @@ func (future VirtualMachinesClaimFuture) Result(client VirtualMachinesClient) (a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesClaimFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ClaimResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClaimFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesClaimFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClaimFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ClaimResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClaimFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7823,12 +7281,11 @@ func (future VirtualMachinesClaimFuture) Result(client VirtualMachinesClient) (a
// operation.
type VirtualMachinesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (lvm LabVirtualMachine, err error) {
+func (future *VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (lvm LabVirtualMachine, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7836,34 +7293,15 @@ func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesC
return
}
if !done {
- return lvm, azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lvm, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lvm.Response.Response, err = future.GetResult(sender); err == nil && lvm.Response.Response.StatusCode != http.StatusNoContent {
+ lvm, err = client.CreateOrUpdateResponder(lvm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesCreateOrUpdateFuture", "Result", lvm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lvm, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7872,12 +7310,11 @@ func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesC
// operation.
type VirtualMachinesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+func (future *VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7885,35 +7322,10 @@ func (future VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7921,12 +7333,11 @@ func (future VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (
// operation.
type VirtualMachinesDetachDataDiskFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesDetachDataDiskFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+func (future *VirtualMachinesDetachDataDiskFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7934,47 +7345,21 @@ func (future VirtualMachinesDetachDataDiskFuture) Result(client VirtualMachinesC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesDetachDataDiskFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DetachDataDiskResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesDetachDataDiskFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesDetachDataDiskFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesDetachDataDiskFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DetachDataDiskResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesDetachDataDiskFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VirtualMachinesStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+func (future *VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7982,47 +7367,21 @@ func (future VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// VirtualMachinesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VirtualMachinesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesStopFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+func (future *VirtualMachinesStopFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8030,35 +7389,10 @@ func (future VirtualMachinesStopFuture) Result(client VirtualMachinesClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8323,12 +7657,11 @@ type VirtualNetworkPropertiesFragment struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8336,34 +7669,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("dtl.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8372,12 +7686,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8385,35 +7698,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/schedules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/schedules.go
index 5610a7861..4ca911a3c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/schedules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/schedules.go
@@ -232,15 +232,17 @@ func (client SchedulesClient) ExecutePreparer(ctx context.Context, resourceGroup
// ExecuteSender sends the Execute request. The method will close the
// http.Response Body if it receives an error.
func (client SchedulesClient) ExecuteSender(req *http.Request) (future SchedulesExecuteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/users.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/users.go
index 09f77996e..d15cba9c6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/users.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/users.go
@@ -157,15 +157,17 @@ func (client UsersClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client UsersClient) DeleteSender(req *http.Request) (future UsersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachines.go
index d5aea89b7..25468038e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachines.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachines.go
@@ -89,15 +89,17 @@ func (client VirtualMachinesClient) AddDataDiskPreparer(ctx context.Context, res
// AddDataDiskSender sends the AddDataDisk request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) AddDataDiskSender(req *http.Request) (future VirtualMachinesAddDataDiskFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client VirtualMachinesClient) ApplyArtifactsPreparer(ctx context.Context,
// ApplyArtifactsSender sends the ApplyArtifacts request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ApplyArtifactsSender(req *http.Request) (future VirtualMachinesApplyArtifactsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -232,15 +236,17 @@ func (client VirtualMachinesClient) ClaimPreparer(ctx context.Context, resourceG
// ClaimSender sends the Claim request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ClaimSender(req *http.Request) (future VirtualMachinesClaimFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -320,15 +326,17 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -391,15 +399,17 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future VirtualMachinesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -464,15 +474,17 @@ func (client VirtualMachinesClient) DetachDataDiskPreparer(ctx context.Context,
// DetachDataDiskSender sends the DetachDataDisk request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DetachDataDiskSender(req *http.Request) (future VirtualMachinesDetachDataDiskFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -789,15 +801,17 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) StartSender(req *http.Request) (future VirtualMachinesStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -859,15 +873,17 @@ func (client VirtualMachinesClient) StopPreparer(ctx context.Context, resourceGr
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) StopSender(req *http.Request) (future VirtualMachinesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachineschedules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachineschedules.go
index 6207fa0a0..c6799a34b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachineschedules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachineschedules.go
@@ -238,15 +238,17 @@ func (client VirtualMachineSchedulesClient) ExecutePreparer(ctx context.Context,
// ExecuteSender sends the Execute request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineSchedulesClient) ExecuteSender(req *http.Request) (future VirtualMachineSchedulesExecuteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualnetworks.go
index 120b8fcd1..f0af59dfa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualnetworks.go
@@ -88,15 +88,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/models.go
index d346ca44b..f7b9cea94 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/models.go
@@ -824,12 +824,11 @@ type ZoneProperties struct {
// ZonesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ZonesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ZonesDeleteFuture) Result(client ZonesClient) (zdr ZoneDeleteResult, err error) {
+func (future *ZonesDeleteFuture) Result(client ZonesClient) (zdr ZoneDeleteResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -837,34 +836,15 @@ func (future ZonesDeleteFuture) Result(client ZonesClient) (zdr ZoneDeleteResult
return
}
if !done {
- return zdr, azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- zdr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if zdr.Response.Response, err = future.GetResult(sender); err == nil && zdr.Response.Response.StatusCode != http.StatusNoContent {
+ zdr, err = client.DeleteResponder(zdr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", zdr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- zdr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/zones.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/zones.go
index d085c1784..e6043c347 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/zones.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/zones.go
@@ -172,15 +172,17 @@ func (client ZonesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ZonesClient) DeleteSender(req *http.Request) (future ZonesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-09-01/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-09-01/dns/models.go
index 53d57a6ad..ccdb50b92 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-09-01/dns/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-09-01/dns/models.go
@@ -717,12 +717,11 @@ type ZoneProperties struct {
// ZonesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ZonesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response, err error) {
+func (future *ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -730,34 +729,9 @@ func (future ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-09-01/dns/zones.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-09-01/dns/zones.go
index 3beeefdb0..a54c1dcbb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-09-01/dns/zones.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-09-01/dns/zones.go
@@ -172,15 +172,17 @@ func (client ZonesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ZonesClient) DeleteSender(req *http.Request) (future ZonesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-10-01/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-10-01/dns/models.go
index 0a4c1f24a..9d292001a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-10-01/dns/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-10-01/dns/models.go
@@ -717,12 +717,11 @@ type ZoneProperties struct {
// ZonesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ZonesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response, err error) {
+func (future *ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -730,35 +729,10 @@ func (future ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-10-01/dns/zones.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-10-01/dns/zones.go
index da2979b98..40c2eedb5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-10-01/dns/zones.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-10-01/dns/zones.go
@@ -172,15 +172,17 @@ func (client ZonesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ZonesClient) DeleteSender(req *http.Request) (future ZonesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-01-01/aad/domainservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-01-01/aad/domainservices.go
index fa7e0f859..f0dac2223 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-01-01/aad/domainservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-01-01/aad/domainservices.go
@@ -98,15 +98,17 @@ func (client DomainServicesClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DomainServicesClient) CreateOrUpdateSender(req *http.Request) (future DomainServicesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client DomainServicesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DomainServicesClient) DeleteSender(req *http.Request) (future DomainServicesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -472,15 +476,17 @@ func (client DomainServicesClient) UpdatePreparer(ctx context.Context, resourceG
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client DomainServicesClient) UpdateSender(req *http.Request) (future DomainServicesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-01-01/aad/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-01-01/aad/models.go
index 73265110b..1998186c5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-01-01/aad/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-01-01/aad/models.go
@@ -216,12 +216,11 @@ type DomainServiceProperties struct {
// operation.
type DomainServicesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DomainServicesCreateOrUpdateFuture) Result(client DomainServicesClient) (ds DomainService, err error) {
+func (future *DomainServicesCreateOrUpdateFuture) Result(client DomainServicesClient) (ds DomainService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -229,34 +228,15 @@ func (future DomainServicesCreateOrUpdateFuture) Result(client DomainServicesCli
return
}
if !done {
- return ds, azure.NewAsyncOpIncompleteError("aad.DomainServicesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ds, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("aad.DomainServicesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ds.Response.Response, err = future.GetResult(sender); err == nil && ds.Response.Response.StatusCode != http.StatusNoContent {
+ ds, err = client.CreateOrUpdateResponder(ds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "aad.DomainServicesCreateOrUpdateFuture", "Result", ds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ds, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -264,12 +244,11 @@ func (future DomainServicesCreateOrUpdateFuture) Result(client DomainServicesCli
// DomainServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DomainServicesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DomainServicesDeleteFuture) Result(client DomainServicesClient) (ds DomainService, err error) {
+func (future *DomainServicesDeleteFuture) Result(client DomainServicesClient) (ds DomainService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -277,34 +256,15 @@ func (future DomainServicesDeleteFuture) Result(client DomainServicesClient) (ds
return
}
if !done {
- return ds, azure.NewAsyncOpIncompleteError("aad.DomainServicesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ds, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("aad.DomainServicesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ds.Response.Response, err = future.GetResult(sender); err == nil && ds.Response.Response.StatusCode != http.StatusNoContent {
+ ds, err = client.DeleteResponder(ds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "aad.DomainServicesDeleteFuture", "Result", ds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ds, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -312,12 +272,11 @@ func (future DomainServicesDeleteFuture) Result(client DomainServicesClient) (ds
// DomainServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DomainServicesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DomainServicesUpdateFuture) Result(client DomainServicesClient) (ds DomainService, err error) {
+func (future *DomainServicesUpdateFuture) Result(client DomainServicesClient) (ds DomainService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -325,34 +284,15 @@ func (future DomainServicesUpdateFuture) Result(client DomainServicesClient) (ds
return
}
if !done {
- return ds, azure.NewAsyncOpIncompleteError("aad.DomainServicesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ds, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("aad.DomainServicesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ds.Response.Response, err = future.GetResult(sender); err == nil && ds.Response.Response.StatusCode != http.StatusNoContent {
+ ds, err = client.UpdateResponder(ds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "aad.DomainServicesUpdateFuture", "Result", ds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ds, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-06-01/aad/domainservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-06-01/aad/domainservices.go
index fc8cb8653..ea9c99e40 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-06-01/aad/domainservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-06-01/aad/domainservices.go
@@ -98,15 +98,17 @@ func (client DomainServicesClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DomainServicesClient) CreateOrUpdateSender(req *http.Request) (future DomainServicesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client DomainServicesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DomainServicesClient) DeleteSender(req *http.Request) (future DomainServicesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -472,15 +476,17 @@ func (client DomainServicesClient) UpdatePreparer(ctx context.Context, resourceG
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client DomainServicesClient) UpdateSender(req *http.Request) (future DomainServicesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-06-01/aad/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-06-01/aad/models.go
index 73265110b..1998186c5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-06-01/aad/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2017-06-01/aad/models.go
@@ -216,12 +216,11 @@ type DomainServiceProperties struct {
// operation.
type DomainServicesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DomainServicesCreateOrUpdateFuture) Result(client DomainServicesClient) (ds DomainService, err error) {
+func (future *DomainServicesCreateOrUpdateFuture) Result(client DomainServicesClient) (ds DomainService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -229,34 +228,15 @@ func (future DomainServicesCreateOrUpdateFuture) Result(client DomainServicesCli
return
}
if !done {
- return ds, azure.NewAsyncOpIncompleteError("aad.DomainServicesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ds, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("aad.DomainServicesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ds.Response.Response, err = future.GetResult(sender); err == nil && ds.Response.Response.StatusCode != http.StatusNoContent {
+ ds, err = client.CreateOrUpdateResponder(ds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "aad.DomainServicesCreateOrUpdateFuture", "Result", ds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ds, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -264,12 +244,11 @@ func (future DomainServicesCreateOrUpdateFuture) Result(client DomainServicesCli
// DomainServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DomainServicesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DomainServicesDeleteFuture) Result(client DomainServicesClient) (ds DomainService, err error) {
+func (future *DomainServicesDeleteFuture) Result(client DomainServicesClient) (ds DomainService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -277,34 +256,15 @@ func (future DomainServicesDeleteFuture) Result(client DomainServicesClient) (ds
return
}
if !done {
- return ds, azure.NewAsyncOpIncompleteError("aad.DomainServicesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ds, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("aad.DomainServicesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ds.Response.Response, err = future.GetResult(sender); err == nil && ds.Response.Response.StatusCode != http.StatusNoContent {
+ ds, err = client.DeleteResponder(ds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "aad.DomainServicesDeleteFuture", "Result", ds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ds, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -312,12 +272,11 @@ func (future DomainServicesDeleteFuture) Result(client DomainServicesClient) (ds
// DomainServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DomainServicesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DomainServicesUpdateFuture) Result(client DomainServicesClient) (ds DomainService, err error) {
+func (future *DomainServicesUpdateFuture) Result(client DomainServicesClient) (ds DomainService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -325,34 +284,15 @@ func (future DomainServicesUpdateFuture) Result(client DomainServicesClient) (ds
return
}
if !done {
- return ds, azure.NewAsyncOpIncompleteError("aad.DomainServicesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ds, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("aad.DomainServicesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ds.Response.Response, err = future.GetResult(sender); err == nil && ds.Response.Response.StatusCode != http.StatusNoContent {
+ ds, err = client.UpdateResponder(ds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "aad.DomainServicesUpdateFuture", "Result", ds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ds, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "aad.DomainServicesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/2018-01-01/eventgrid/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/2018-01-01/eventgrid/models.go
index e0c8c362d..3d2e9aaf5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/2018-01-01/eventgrid/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/2018-01-01/eventgrid/models.go
@@ -21,6 +21,33 @@ import (
"github.com/Azure/go-autorest/autorest/date"
)
+// JobState enumerates the values for job state.
+type JobState string
+
+const (
+ // Canceled The job was canceled. This is a final state for the job.
+ Canceled JobState = "Canceled"
+ // Canceling The job is in the process of being canceled. This is a transient state for the job.
+ Canceling JobState = "Canceling"
+ // Error The job has encountered an error. This is a final state for the job.
+ Error JobState = "Error"
+ // Finished The job is finished. This is a final state for the job.
+ Finished JobState = "Finished"
+ // Processing The job is processing. This is a transient state for the job.
+ Processing JobState = "Processing"
+ // Queued The job is in a queued state, waiting for resources to become available. This is a transient
+ // state.
+ Queued JobState = "Queued"
+ // Scheduled The job is being scheduled to run on an available resource. This is a transient state, between
+ // queued and processing states.
+ Scheduled JobState = "Scheduled"
+)
+
+// PossibleJobStateValues returns an array of possible values for the JobState const type.
+func PossibleJobStateValues() []JobState {
+ return []JobState{Canceled, Canceling, Error, Finished, Processing, Queued, Scheduled}
+}
+
// ContainerRegistryEventActor the agent that initiated the event. For most situations, this could be from the
// authorization context of the request.
type ContainerRegistryEventActor struct {
@@ -128,7 +155,7 @@ type ContainerRegistryImagePushedEventData struct {
// DeviceLifeCycleEventProperties schema of the Data property of an EventGridEvent for a device life cycle event
// (DeviceCreated, DeviceDeleted).
type DeviceLifeCycleEventProperties struct {
- // DeviceID - The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '.
+ // DeviceID - The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '.
DeviceID *string `json:"deviceId,omitempty"`
// HubName - Name of the IoT Hub where the device was created or deleted.
HubName *string `json:"hubName,omitempty"`
@@ -245,7 +272,7 @@ type EventHubCaptureFileCreatedEventData struct {
// IotHubDeviceCreatedEventData event data for Microsoft.Devices.DeviceCreated event.
type IotHubDeviceCreatedEventData struct {
- // DeviceID - The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '.
+ // DeviceID - The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '.
DeviceID *string `json:"deviceId,omitempty"`
// HubName - Name of the IoT Hub where the device was created or deleted.
HubName *string `json:"hubName,omitempty"`
@@ -259,7 +286,7 @@ type IotHubDeviceCreatedEventData struct {
// IotHubDeviceDeletedEventData event data for Microsoft.Devices.DeviceDeleted event.
type IotHubDeviceDeletedEventData struct {
- // DeviceID - The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '.
+ // DeviceID - The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '.
DeviceID *string `json:"deviceId,omitempty"`
// HubName - Name of the IoT Hub where the device was created or deleted.
HubName *string `json:"hubName,omitempty"`
@@ -271,6 +298,15 @@ type IotHubDeviceDeletedEventData struct {
Twin *DeviceTwinInfo `json:"twin,omitempty"`
}
+// MediaJobStateChangeEventData schema of the Data property of an EventGridEvent for a
+// Microsoft.Media.JobStateChange event.
+type MediaJobStateChangeEventData struct {
+ // PreviousState - The previous state of the Job. Possible values include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled'
+ PreviousState JobState `json:"previousState,omitempty"`
+ // State - The new state of the Job. Possible values include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled'
+ State JobState `json:"state,omitempty"`
+}
+
// ResourceDeleteCancelData schema of the Data property of an EventGridEvent for an
// Microsoft.Resources.ResourceDeleteCancel event. This is raised when a resource delete operation is canceled.
type ResourceDeleteCancelData struct {
@@ -435,6 +471,40 @@ type ResourceWriteSuccessData struct {
HTTPRequest *string `json:"httpRequest,omitempty"`
}
+// ServiceBusActiveMessagesAvailableWithNoListenersEventData schema of the Data property of an EventGridEvent for a
+// Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event.
+type ServiceBusActiveMessagesAvailableWithNoListenersEventData struct {
+ // NamespaceName - The namespace name of the Microsoft.ServiceBus resource.
+ NamespaceName *string `json:"namespaceName,omitempty"`
+ // RequestURI - The endpoint of the Microsoft.ServiceBus resource.
+ RequestURI *string `json:"requestUri,omitempty"`
+ // EntityType - The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'.
+ EntityType *string `json:"entityType,omitempty"`
+ // QueueName - The name of the Microsoft.ServiceBus queue. If the entity type is of type 'subscriber', then this value will be null.
+ QueueName *string `json:"queueName,omitempty"`
+ // TopicName - The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this value will be null.
+ TopicName *string `json:"topicName,omitempty"`
+ // SubscriptionName - The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value will be null.
+ SubscriptionName *string `json:"subscriptionName,omitempty"`
+}
+
+// ServiceBusDeadletterMessagesAvailableWithNoListenersEventData schema of the Data property of an EventGridEvent
+// for a Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event.
+type ServiceBusDeadletterMessagesAvailableWithNoListenersEventData struct {
+ // NamespaceName - The namespace name of the Microsoft.ServiceBus resource.
+ NamespaceName *string `json:"namespaceName,omitempty"`
+ // RequestURI - The endpoint of the Microsoft.ServiceBus resource.
+ RequestURI *string `json:"requestUri,omitempty"`
+ // EntityType - The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'.
+ EntityType *string `json:"entityType,omitempty"`
+ // QueueName - The name of the Microsoft.ServiceBus queue. If the entity type is of type 'subscriber', then this value will be null.
+ QueueName *string `json:"queueName,omitempty"`
+ // TopicName - The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this value will be null.
+ TopicName *string `json:"topicName,omitempty"`
+ // SubscriptionName - The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value will be null.
+ SubscriptionName *string `json:"subscriptionName,omitempty"`
+}
+
// StorageBlobCreatedEventData schema of the Data property of an EventGridEvent for an
// Microsoft.Storage.BlobCreated event.
type StorageBlobCreatedEventData struct {
@@ -480,3 +550,27 @@ type StorageBlobDeletedEventData struct {
// StorageDiagnostics - For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers.
StorageDiagnostics interface{} `json:"storageDiagnostics,omitempty"`
}
+
+// SubscriptionDeletedEventData schema of the Data property of an EventGridEvent for a
+// Microsoft.EventGrid.SubscriptionDeletedEvent.
+type SubscriptionDeletedEventData struct {
+ // EventSubscriptionID - The Azure resource ID of the deleted event subscription.
+ EventSubscriptionID *string `json:"eventSubscriptionId,omitempty"`
+}
+
+// SubscriptionValidationEventData schema of the Data property of an EventGridEvent for a
+// Microsoft.EventGrid.SubscriptionValidationEvent.
+type SubscriptionValidationEventData struct {
+ // ValidationCode - The validation code sent by Azure Event Grid to validate an event subscription. To complete the validation handshake, the subscriber must either respond with this validation code as part of the validation response, or perform a GET request on the validationUrl (available starting version 2018-05-01-preview).
+ ValidationCode *string `json:"validationCode,omitempty"`
+ // ValidationURL - The validation URL sent by Azure Event Grid (available starting version 2018-05-01-preview). To complete the validation handshake, the subscriber must either respond with the validationCode as part of the validation response, or perform a GET request on the validationUrl (available starting version 2018-05-01-preview).
+ ValidationURL *string `json:"validationUrl,omitempty"`
+}
+
+// SubscriptionValidationResponse to complete an event subscription validation handshake, a subscriber can use
+// either the validationCode or the validationUrl received in a SubscriptionValidationEvent. When the
+// validationCode is used, the SubscriptionValidationResponse can be used to build the response.
+type SubscriptionValidationResponse struct {
+ // ValidationResponse - The validation response sent by the subscriber to Azure Event Grid to complete the validation of an event subscription.
+ ValidationResponse *string `json:"validationResponse,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/eventsubscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/eventsubscriptions.go
index a5487f7d7..1f77e05d3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/eventsubscriptions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/eventsubscriptions.go
@@ -94,15 +94,17 @@ func (client EventSubscriptionsClient) CreateOrUpdatePreparer(ctx context.Contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client EventSubscriptionsClient) CreateOrUpdateSender(req *http.Request) (future EventSubscriptionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client EventSubscriptionsClient) DeletePreparer(ctx context.Context, scope
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client EventSubscriptionsClient) DeleteSender(req *http.Request) (future EventSubscriptionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -995,15 +999,17 @@ func (client EventSubscriptionsClient) UpdatePreparer(ctx context.Context, scope
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client EventSubscriptionsClient) UpdateSender(req *http.Request) (future EventSubscriptionsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/models.go
index 8a264027f..4d4e60b85 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/models.go
@@ -472,12 +472,11 @@ func (esp *EventSubscriptionProperties) UnmarshalJSON(body []byte) error {
// long-running operation.
type EventSubscriptionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EventSubscriptionsCreateOrUpdateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
+func (future *EventSubscriptionsCreateOrUpdateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -485,34 +484,15 @@ func (future EventSubscriptionsCreateOrUpdateFuture) Result(client EventSubscrip
return
}
if !done {
- return es, azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- es, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if es.Response.Response, err = future.GetResult(sender); err == nil && es.Response.Response.StatusCode != http.StatusNoContent {
+ es, err = client.CreateOrUpdateResponder(es.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateOrUpdateFuture", "Result", es.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- es, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -521,12 +501,11 @@ func (future EventSubscriptionsCreateOrUpdateFuture) Result(client EventSubscrip
// operation.
type EventSubscriptionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EventSubscriptionsDeleteFuture) Result(client EventSubscriptionsClient) (ar autorest.Response, err error) {
+func (future *EventSubscriptionsDeleteFuture) Result(client EventSubscriptionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -534,35 +513,10 @@ func (future EventSubscriptionsDeleteFuture) Result(client EventSubscriptionsCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -577,12 +531,11 @@ type EventSubscriptionsListResult struct {
// operation.
type EventSubscriptionsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EventSubscriptionsUpdateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
+func (future *EventSubscriptionsUpdateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -590,34 +543,15 @@ func (future EventSubscriptionsUpdateFuture) Result(client EventSubscriptionsCli
return
}
if !done {
- return es, azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- es, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if es.Response.Response, err = future.GetResult(sender); err == nil && es.Response.Response.StatusCode != http.StatusNoContent {
+ es, err = client.UpdateResponder(es.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", es.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- es, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -939,12 +873,11 @@ type TopicRegenerateKeyRequest struct {
// TopicsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TopicsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
+func (future *TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -952,34 +885,15 @@ func (future TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, e
return
}
if !done {
- return t, azure.NewAsyncOpIncompleteError("eventgrid.TopicsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- t, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.TopicsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
+ t, err = client.CreateOrUpdateResponder(t.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", t.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- t, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -987,12 +901,11 @@ func (future TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, e
// TopicsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TopicsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TopicsDeleteFuture) Result(client TopicsClient) (ar autorest.Response, err error) {
+func (future *TopicsDeleteFuture) Result(client TopicsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1000,35 +913,10 @@ func (future TopicsDeleteFuture) Result(client TopicsClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("eventgrid.TopicsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.TopicsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1051,12 +939,11 @@ type TopicsListResult struct {
// TopicsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TopicsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TopicsUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
+func (future *TopicsUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1064,34 +951,15 @@ func (future TopicsUpdateFuture) Result(client TopicsClient) (t Topic, err error
return
}
if !done {
- return t, azure.NewAsyncOpIncompleteError("eventgrid.TopicsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- t, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.TopicsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
+ t, err = client.UpdateResponder(t.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.TopicsUpdateFuture", "Result", t.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- t, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/topics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/topics.go
index eb1f89054..676b4730c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/topics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/topics.go
@@ -87,15 +87,17 @@ func (client TopicsClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) CreateOrUpdateSender(req *http.Request) (future TopicsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -156,15 +158,17 @@ func (client TopicsClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) DeleteSender(req *http.Request) (future TopicsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -635,15 +639,17 @@ func (client TopicsClient) UpdatePreparer(ctx context.Context, resourceGroupName
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) UpdateSender(req *http.Request) (future TopicsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2015-08-01/eventhub/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2015-08-01/eventhub/models.go
index 28ad9dd65..655ee6aa8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2015-08-01/eventhub/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2015-08-01/eventhub/models.go
@@ -992,12 +992,11 @@ func (nr *NamespaceResource) UnmarshalJSON(body []byte) error {
// operation.
type NamespacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (nr NamespaceResource, err error) {
+func (future *NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (nr NamespaceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1005,34 +1004,15 @@ func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (nr
return
}
if !done {
- return nr, azure.NewAsyncOpIncompleteError("eventhub.NamespacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.NamespacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventhub.NamespacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nr.Response.Response, err = future.GetResult(sender); err == nil && nr.Response.Response.StatusCode != http.StatusNoContent {
+ nr, err = client.CreateOrUpdateResponder(nr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventhub.NamespacesCreateOrUpdateFuture", "Result", nr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.NamespacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- nr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.NamespacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1040,12 +1020,11 @@ func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (nr
// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type NamespacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
+func (future *NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1053,35 +1032,10 @@ func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("eventhub.NamespacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.NamespacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventhub.NamespacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.NamespacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.NamespacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2015-08-01/eventhub/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2015-08-01/eventhub/namespaces.go
index c47ec2bcd..79489dd83 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2015-08-01/eventhub/namespaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2015-08-01/eventhub/namespaces.go
@@ -172,15 +172,17 @@ func (client NamespacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) CreateOrUpdateSender(req *http.Request) (future NamespacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -339,15 +341,17 @@ func (client NamespacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) DeleteSender(req *http.Request) (future NamespacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go
index 07a0faf85..386d0c64b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go
@@ -306,7 +306,11 @@ func (client ConsumerGroupsClient) GetResponder(resp *http.Response) (result Con
// resourceGroupName - name of the resource group within the azure subscription.
// namespaceName - the Namespace name
// eventHubName - the Event Hub name
-func (client ConsumerGroupsClient) ListByEventHub(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result ConsumerGroupListResultPage, err error) {
+// skip - skip 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 skip parameter that specifies a
+// starting point to use for subsequent calls.
+// top - may be used to limit the number of results to the most recent N usageDetails.
+func (client ConsumerGroupsClient) ListByEventHub(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, skip *int32, top *int32) (result ConsumerGroupListResultPage, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
@@ -315,12 +319,22 @@ func (client ConsumerGroupsClient) ListByEventHub(ctx context.Context, resourceG
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.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil},
+ {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, 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.NewError("eventhub.ConsumerGroupsClient", "ListByEventHub", err.Error())
}
result.fn = client.listByEventHubNextResults
- req, err := client.ListByEventHubPreparer(ctx, resourceGroupName, namespaceName, eventHubName)
+ req, err := client.ListByEventHubPreparer(ctx, resourceGroupName, namespaceName, eventHubName, skip, top)
if err != nil {
err = autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "ListByEventHub", nil, "Failure preparing request")
return
@@ -342,7 +356,7 @@ func (client ConsumerGroupsClient) ListByEventHub(ctx context.Context, resourceG
}
// ListByEventHubPreparer prepares the ListByEventHub request.
-func (client ConsumerGroupsClient) ListByEventHubPreparer(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (*http.Request, error) {
+func (client ConsumerGroupsClient) ListByEventHubPreparer(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, skip *int32, top *int32) (*http.Request, error) {
pathParameters := map[string]interface{}{
"eventHubName": autorest.Encode("path", eventHubName),
"namespaceName": autorest.Encode("path", namespaceName),
@@ -354,6 +368,12 @@ func (client ConsumerGroupsClient) ListByEventHubPreparer(ctx context.Context, r
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
+ if skip != nil {
+ queryParameters["$skip"] = autorest.Encode("query", *skip)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
preparer := autorest.CreatePreparer(
autorest.AsGet(),
@@ -405,7 +425,7 @@ func (client ConsumerGroupsClient) listByEventHubNextResults(lastResults Consume
}
// ListByEventHubComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ConsumerGroupsClient) ListByEventHubComplete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result ConsumerGroupListResultIterator, err error) {
- result.page, err = client.ListByEventHub(ctx, resourceGroupName, namespaceName, eventHubName)
+func (client ConsumerGroupsClient) ListByEventHubComplete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, skip *int32, top *int32) (result ConsumerGroupListResultIterator, err error) {
+ result.page, err = client.ListByEventHub(ctx, resourceGroupName, namespaceName, eventHubName, skip, top)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go
index b98f5e1cf..7228f2e33 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go
@@ -675,19 +675,33 @@ func (client EventHubsClient) ListAuthorizationRulesComplete(ctx context.Context
// Parameters:
// resourceGroupName - name of the resource group within the azure subscription.
// namespaceName - the Namespace name
-func (client EventHubsClient) ListByNamespace(ctx context.Context, resourceGroupName string, namespaceName string) (result ListResultPage, err error) {
+// skip - skip 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 skip parameter that specifies a
+// starting point to use for subsequent calls.
+// top - may be used to limit the number of results to the most recent N usageDetails.
+func (client EventHubsClient) ListByNamespace(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (result ListResultPage, 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 {
+ {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil},
+ {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, 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.NewError("eventhub.EventHubsClient", "ListByNamespace", err.Error())
}
result.fn = client.listByNamespaceNextResults
- req, err := client.ListByNamespacePreparer(ctx, resourceGroupName, namespaceName)
+ req, err := client.ListByNamespacePreparer(ctx, resourceGroupName, namespaceName, skip, top)
if err != nil {
err = autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListByNamespace", nil, "Failure preparing request")
return
@@ -709,7 +723,7 @@ func (client EventHubsClient) ListByNamespace(ctx context.Context, resourceGroup
}
// ListByNamespacePreparer prepares the ListByNamespace request.
-func (client EventHubsClient) ListByNamespacePreparer(ctx context.Context, resourceGroupName string, namespaceName string) (*http.Request, error) {
+func (client EventHubsClient) ListByNamespacePreparer(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (*http.Request, error) {
pathParameters := map[string]interface{}{
"namespaceName": autorest.Encode("path", namespaceName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
@@ -720,6 +734,12 @@ func (client EventHubsClient) ListByNamespacePreparer(ctx context.Context, resou
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
+ if skip != nil {
+ queryParameters["$skip"] = autorest.Encode("query", *skip)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
preparer := autorest.CreatePreparer(
autorest.AsGet(),
@@ -771,8 +791,8 @@ func (client EventHubsClient) listByNamespaceNextResults(lastResults ListResult)
}
// ListByNamespaceComplete enumerates all values, automatically crossing page boundaries as required.
-func (client EventHubsClient) ListByNamespaceComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result ListResultIterator, err error) {
- result.page, err = client.ListByNamespace(ctx, resourceGroupName, namespaceName)
+func (client EventHubsClient) ListByNamespaceComplete(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (result ListResultIterator, err error) {
+ result.page, err = client.ListByNamespace(ctx, resourceGroupName, namespaceName, skip, top)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/models.go
index 6d642772a..30cfd7c93 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/models.go
@@ -1595,12 +1595,11 @@ func (mVar *Model) UnmarshalJSON(body []byte) error {
// operation.
type NamespacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (en EHNamespace, err error) {
+func (future *NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (en EHNamespace, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1608,34 +1607,15 @@ func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (en
return
}
if !done {
- return en, azure.NewAsyncOpIncompleteError("eventhub.NamespacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- en, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.NamespacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventhub.NamespacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if en.Response.Response, err = future.GetResult(sender); err == nil && en.Response.Response.StatusCode != http.StatusNoContent {
+ en, err = client.CreateOrUpdateResponder(en.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventhub.NamespacesCreateOrUpdateFuture", "Result", en.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.NamespacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- en, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.NamespacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1643,12 +1623,11 @@ func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (en
// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type NamespacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
+func (future *NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1656,35 +1635,10 @@ func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("eventhub.NamespacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.NamespacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventhub.NamespacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.NamespacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.NamespacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go
index 5d69e5453..ee8818989 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go
@@ -183,15 +183,17 @@ func (client NamespacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) CreateOrUpdateSender(req *http.Request) (future NamespacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -349,15 +351,17 @@ func (client NamespacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) DeleteSender(req *http.Request) (future NamespacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2016-02-03/devices/iothubresource.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2016-02-03/devices/iothubresource.go
index b62b79ca2..642c2a80f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2016-02-03/devices/iothubresource.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2016-02-03/devices/iothubresource.go
@@ -256,15 +256,17 @@ func (client IotHubResourceClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client IotHubResourceClient) CreateOrUpdateSender(req *http.Request) (future IotHubResourceCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -325,15 +327,17 @@ func (client IotHubResourceClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client IotHubResourceClient) DeleteSender(req *http.Request) (future IotHubResourceDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2016-02-03/devices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2016-02-03/devices/models.go
index 0b31191bf..b4e615f7d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2016-02-03/devices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2016-02-03/devices/models.go
@@ -794,12 +794,11 @@ func (page IotHubQuotaMetricInfoListResultPage) Values() []IotHubQuotaMetricInfo
// operation.
type IotHubResourceCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
+func (future *IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -807,34 +806,15 @@ func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceCli
return
}
if !done {
- return ihd, azure.NewAsyncOpIncompleteError("devices.IotHubResourceCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ihd, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ihd.Response.Response, err = future.GetResult(sender); err == nil && ihd.Response.Response.StatusCode != http.StatusNoContent {
+ ihd, err = client.CreateOrUpdateResponder(ihd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", ihd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ihd, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -842,12 +822,11 @@ func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceCli
// IotHubResourceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type IotHubResourceDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so SetObject, err error) {
+func (future *IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so SetObject, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -855,34 +834,15 @@ func (future IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so
return
}
if !done {
- return so, azure.NewAsyncOpIncompleteError("devices.IotHubResourceDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- so, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.DeleteResponder(so.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", so.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- so, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-01-19/devices/iothubresource.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-01-19/devices/iothubresource.go
index 5cf0b55e6..fafb05710 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-01-19/devices/iothubresource.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-01-19/devices/iothubresource.go
@@ -266,15 +266,17 @@ func (client IotHubResourceClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client IotHubResourceClient) CreateOrUpdateSender(req *http.Request) (future IotHubResourceCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -335,15 +337,17 @@ func (client IotHubResourceClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client IotHubResourceClient) DeleteSender(req *http.Request) (future IotHubResourceDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-01-19/devices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-01-19/devices/models.go
index ccefb8b0f..6d1492538 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-01-19/devices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-01-19/devices/models.go
@@ -830,12 +830,11 @@ func (page IotHubQuotaMetricInfoListResultPage) Values() []IotHubQuotaMetricInfo
// operation.
type IotHubResourceCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
+func (future *IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -843,34 +842,15 @@ func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceCli
return
}
if !done {
- return ihd, azure.NewAsyncOpIncompleteError("devices.IotHubResourceCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ihd, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ihd.Response.Response, err = future.GetResult(sender); err == nil && ihd.Response.Response.StatusCode != http.StatusNoContent {
+ ihd, err = client.CreateOrUpdateResponder(ihd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", ihd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ihd, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -878,12 +858,11 @@ func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceCli
// IotHubResourceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type IotHubResourceDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so SetObject, err error) {
+func (future *IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so SetObject, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -891,34 +870,15 @@ func (future IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so
return
}
if !done {
- return so, azure.NewAsyncOpIncompleteError("devices.IotHubResourceDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- so, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.DeleteResponder(so.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", so.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- so, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices/iothubresource.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices/iothubresource.go
index cd05df353..591a82626 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices/iothubresource.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices/iothubresource.go
@@ -272,15 +272,17 @@ func (client IotHubResourceClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client IotHubResourceClient) CreateOrUpdateSender(req *http.Request) (future IotHubResourceCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -341,15 +343,17 @@ func (client IotHubResourceClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client IotHubResourceClient) DeleteSender(req *http.Request) (future IotHubResourceDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices/models.go
index 6e9820617..08a8d037a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices/models.go
@@ -912,12 +912,11 @@ func (page IotHubQuotaMetricInfoListResultPage) Values() []IotHubQuotaMetricInfo
// operation.
type IotHubResourceCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
+func (future *IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -925,34 +924,15 @@ func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceCli
return
}
if !done {
- return ihd, azure.NewAsyncOpIncompleteError("devices.IotHubResourceCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ihd, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ihd.Response.Response, err = future.GetResult(sender); err == nil && ihd.Response.Response.StatusCode != http.StatusNoContent {
+ ihd, err = client.CreateOrUpdateResponder(ihd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", ihd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ihd, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -960,12 +940,11 @@ func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceCli
// IotHubResourceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type IotHubResourceDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so SetObject, err error) {
+func (future *IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so SetObject, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -973,34 +952,15 @@ func (future IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so
return
}
if !done {
- return so, azure.NewAsyncOpIncompleteError("devices.IotHubResourceDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- so, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.DeleteResponder(so.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", so.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- so, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-01-22/devices/iothubresource.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-01-22/devices/iothubresource.go
index e1567e04e..29da96f8a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-01-22/devices/iothubresource.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-01-22/devices/iothubresource.go
@@ -269,15 +269,17 @@ func (client IotHubResourceClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client IotHubResourceClient) CreateOrUpdateSender(req *http.Request) (future IotHubResourceCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -338,15 +340,17 @@ func (client IotHubResourceClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client IotHubResourceClient) DeleteSender(req *http.Request) (future IotHubResourceDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1646,15 +1650,17 @@ func (client IotHubResourceClient) UpdatePreparer(ctx context.Context, resourceG
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client IotHubResourceClient) UpdateSender(req *http.Request) (future IotHubResourceUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-01-22/devices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-01-22/devices/models.go
index 1244db7d8..198b428c7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-01-22/devices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-01-22/devices/models.go
@@ -920,12 +920,11 @@ func (page IotHubQuotaMetricInfoListResultPage) Values() []IotHubQuotaMetricInfo
// operation.
type IotHubResourceCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
+func (future *IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -933,34 +932,15 @@ func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceCli
return
}
if !done {
- return ihd, azure.NewAsyncOpIncompleteError("devices.IotHubResourceCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ihd, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ihd.Response.Response, err = future.GetResult(sender); err == nil && ihd.Response.Response.StatusCode != http.StatusNoContent {
+ ihd, err = client.CreateOrUpdateResponder(ihd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", ihd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ihd, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -968,12 +948,11 @@ func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceCli
// IotHubResourceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type IotHubResourceDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so SetObject, err error) {
+func (future *IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so SetObject, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -981,34 +960,15 @@ func (future IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so
return
}
if !done {
- return so, azure.NewAsyncOpIncompleteError("devices.IotHubResourceDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- so, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.DeleteResponder(so.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", so.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- so, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1016,12 +976,11 @@ func (future IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so
// IotHubResourceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type IotHubResourceUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotHubResourceUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
+func (future *IotHubResourceUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1029,34 +988,15 @@ func (future IotHubResourceUpdateFuture) Result(client IotHubResourceClient) (ih
return
}
if !done {
- return ihd, azure.NewAsyncOpIncompleteError("devices.IotHubResourceUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ihd, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ihd.Response.Response, err = future.GetResult(sender); err == nil && ihd.Response.Response.StatusCode != http.StatusNoContent {
+ ihd, err = client.UpdateResponder(ihd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceUpdateFuture", "Result", ihd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ihd, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/iothubresource.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/iothubresource.go
index f24e58407..901015054 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/iothubresource.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/iothubresource.go
@@ -269,15 +269,17 @@ func (client IotHubResourceClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client IotHubResourceClient) CreateOrUpdateSender(req *http.Request) (future IotHubResourceCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -338,15 +340,17 @@ func (client IotHubResourceClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client IotHubResourceClient) DeleteSender(req *http.Request) (future IotHubResourceDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -579,6 +583,98 @@ func (client IotHubResourceClient) GetResponder(resp *http.Response) (result Iot
return
}
+// GetEndpointHealth get the health for routing endpoints.
+func (client IotHubResourceClient) GetEndpointHealth(ctx context.Context, resourceGroupName string, iotHubName string) (result EndpointHealthDataListResultPage, err error) {
+ result.fn = client.getEndpointHealthNextResults
+ req, err := client.GetEndpointHealthPreparer(ctx, resourceGroupName, iotHubName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "GetEndpointHealth", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetEndpointHealthSender(req)
+ if err != nil {
+ result.ehdlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "GetEndpointHealth", resp, "Failure sending request")
+ return
+ }
+
+ result.ehdlr, err = client.GetEndpointHealthResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "GetEndpointHealth", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetEndpointHealthPreparer prepares the GetEndpointHealth request.
+func (client IotHubResourceClient) GetEndpointHealthPreparer(ctx context.Context, resourceGroupName string, iotHubName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "iotHubName": autorest.Encode("path", iotHubName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.Devices/IotHubs/{iotHubName}/routingEndpointsHealth", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetEndpointHealthSender sends the GetEndpointHealth request. The method will close the
+// http.Response Body if it receives an error.
+func (client IotHubResourceClient) GetEndpointHealthSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetEndpointHealthResponder handles the response to the GetEndpointHealth request. The method always
+// closes the http.Response Body.
+func (client IotHubResourceClient) GetEndpointHealthResponder(resp *http.Response) (result EndpointHealthDataListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// getEndpointHealthNextResults retrieves the next set of results, if any.
+func (client IotHubResourceClient) getEndpointHealthNextResults(lastResults EndpointHealthDataListResult) (result EndpointHealthDataListResult, err error) {
+ req, err := lastResults.endpointHealthDataListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "getEndpointHealthNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.GetEndpointHealthSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "getEndpointHealthNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.GetEndpointHealthResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "getEndpointHealthNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// GetEndpointHealthComplete enumerates all values, automatically crossing page boundaries as required.
+func (client IotHubResourceClient) GetEndpointHealthComplete(ctx context.Context, resourceGroupName string, iotHubName string) (result EndpointHealthDataListResultIterator, err error) {
+ result.page, err = client.GetEndpointHealth(ctx, resourceGroupName, iotHubName)
+ return
+}
+
// GetEventHubConsumerGroup get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
// Parameters:
// resourceGroupName - the name of the resource group that contains the IoT hub.
@@ -1599,6 +1695,160 @@ func (client IotHubResourceClient) ListKeysComplete(ctx context.Context, resourc
return
}
+// TestAllRoutes test all routes configured in this Iot Hub
+// Parameters:
+// input - input for testing all routes
+// iotHubName - iotHub to be tested
+// resourceGroupName - resource group which Iot Hub belongs to
+func (client IotHubResourceClient) TestAllRoutes(ctx context.Context, input TestAllRoutesInput, iotHubName string, resourceGroupName string) (result TestAllRoutesResult, err error) {
+ req, err := client.TestAllRoutesPreparer(ctx, input, iotHubName, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "TestAllRoutes", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.TestAllRoutesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "TestAllRoutes", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.TestAllRoutesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "TestAllRoutes", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// TestAllRoutesPreparer prepares the TestAllRoutes request.
+func (client IotHubResourceClient) TestAllRoutesPreparer(ctx context.Context, input TestAllRoutesInput, iotHubName string, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "iotHubName": autorest.Encode("path", iotHubName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routing/routes/$testall", pathParameters),
+ autorest.WithJSON(input),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// TestAllRoutesSender sends the TestAllRoutes request. The method will close the
+// http.Response Body if it receives an error.
+func (client IotHubResourceClient) TestAllRoutesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// TestAllRoutesResponder handles the response to the TestAllRoutes request. The method always
+// closes the http.Response Body.
+func (client IotHubResourceClient) TestAllRoutesResponder(resp *http.Response) (result TestAllRoutesResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// TestRoute test the new route for this Iot Hub
+// Parameters:
+// input - route that needs to be tested
+// iotHubName - iotHub to be tested
+// resourceGroupName - resource group which Iot Hub belongs to
+func (client IotHubResourceClient) TestRoute(ctx context.Context, input TestRouteInput, iotHubName string, resourceGroupName string) (result TestRouteResult, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: input,
+ Constraints: []validation.Constraint{{Target: "input.Route", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "input.Route.Name", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "input.Route.Name", Name: validation.Pattern, Rule: `^[A-Za-z0-9-._]{1,64}$`, Chain: nil}}},
+ {Target: "input.Route.EndpointNames", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "input.Route.EndpointNames", Name: validation.MaxItems, Rule: 1, Chain: nil},
+ {Target: "input.Route.EndpointNames", Name: validation.MinItems, Rule: 1, Chain: nil},
+ }},
+ {Target: "input.Route.IsEnabled", Name: validation.Null, Rule: true, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("devices.IotHubResourceClient", "TestRoute", err.Error())
+ }
+
+ req, err := client.TestRoutePreparer(ctx, input, iotHubName, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "TestRoute", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.TestRouteSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "TestRoute", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.TestRouteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "TestRoute", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// TestRoutePreparer prepares the TestRoute request.
+func (client IotHubResourceClient) TestRoutePreparer(ctx context.Context, input TestRouteInput, iotHubName string, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "iotHubName": autorest.Encode("path", iotHubName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routing/routes/$testnew", pathParameters),
+ autorest.WithJSON(input),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// TestRouteSender sends the TestRoute request. The method will close the
+// http.Response Body if it receives an error.
+func (client IotHubResourceClient) TestRouteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// TestRouteResponder handles the response to the TestRoute request. The method always
+// closes the http.Response Body.
+func (client IotHubResourceClient) TestRouteResponder(resp *http.Response) (result TestRouteResult, 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 update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method
// Parameters:
// resourceGroupName - resource group identifier.
@@ -1646,15 +1896,17 @@ func (client IotHubResourceClient) UpdatePreparer(ctx context.Context, resourceG
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client IotHubResourceClient) UpdateSender(req *http.Request) (future IotHubResourceUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/models.go
index 9d30be124..957f00ba0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/models.go
@@ -82,6 +82,25 @@ func PossibleCapabilitiesValues() []Capabilities {
return []Capabilities{DeviceManagement, None}
}
+// EndpointHealthStatus enumerates the values for endpoint health status.
+type EndpointHealthStatus string
+
+const (
+ // Dead ...
+ Dead EndpointHealthStatus = "dead"
+ // Healthy ...
+ Healthy EndpointHealthStatus = "healthy"
+ // Unhealthy ...
+ Unhealthy EndpointHealthStatus = "unhealthy"
+ // Unknown ...
+ Unknown EndpointHealthStatus = "unknown"
+)
+
+// PossibleEndpointHealthStatusValues returns an array of possible values for the EndpointHealthStatus const type.
+func PossibleEndpointHealthStatusValues() []EndpointHealthStatus {
+ return []EndpointHealthStatus{Dead, Healthy, Unhealthy, Unknown}
+}
+
// IotHubNameUnavailabilityReason enumerates the values for iot hub name unavailability reason.
type IotHubNameUnavailabilityReason string
@@ -175,23 +194,23 @@ func PossibleIPFilterActionTypeValues() []IPFilterActionType {
type JobStatus string
const (
- // Cancelled ...
- Cancelled JobStatus = "cancelled"
- // Completed ...
- Completed JobStatus = "completed"
- // Enqueued ...
- Enqueued JobStatus = "enqueued"
- // Failed ...
- Failed JobStatus = "failed"
- // Running ...
- Running JobStatus = "running"
- // Unknown ...
- Unknown JobStatus = "unknown"
+ // JobStatusCancelled ...
+ JobStatusCancelled JobStatus = "cancelled"
+ // JobStatusCompleted ...
+ JobStatusCompleted JobStatus = "completed"
+ // JobStatusEnqueued ...
+ JobStatusEnqueued JobStatus = "enqueued"
+ // JobStatusFailed ...
+ JobStatusFailed JobStatus = "failed"
+ // JobStatusRunning ...
+ JobStatusRunning JobStatus = "running"
+ // JobStatusUnknown ...
+ JobStatusUnknown JobStatus = "unknown"
)
// PossibleJobStatusValues returns an array of possible values for the JobStatus const type.
func PossibleJobStatusValues() []JobStatus {
- return []JobStatus{Cancelled, Completed, Enqueued, Failed, Running, Unknown}
+ return []JobStatus{JobStatusCancelled, JobStatusCompleted, JobStatusEnqueued, JobStatusFailed, JobStatusRunning, JobStatusUnknown}
}
// JobType enumerates the values for job type.
@@ -244,23 +263,57 @@ func PossibleOperationMonitoringLevelValues() []OperationMonitoringLevel {
return []OperationMonitoringLevel{OperationMonitoringLevelError, OperationMonitoringLevelErrorInformation, OperationMonitoringLevelInformation, OperationMonitoringLevelNone}
}
+// RouteErrorSeverity enumerates the values for route error severity.
+type RouteErrorSeverity string
+
+const (
+ // Error ...
+ Error RouteErrorSeverity = "error"
+ // Warning ...
+ Warning RouteErrorSeverity = "warning"
+)
+
+// PossibleRouteErrorSeverityValues returns an array of possible values for the RouteErrorSeverity const type.
+func PossibleRouteErrorSeverityValues() []RouteErrorSeverity {
+ return []RouteErrorSeverity{Error, Warning}
+}
+
// RoutingSource enumerates the values for routing source.
type RoutingSource string
const (
- // DeviceJobLifecycleEvents ...
- DeviceJobLifecycleEvents RoutingSource = "DeviceJobLifecycleEvents"
- // DeviceLifecycleEvents ...
- DeviceLifecycleEvents RoutingSource = "DeviceLifecycleEvents"
- // DeviceMessages ...
- DeviceMessages RoutingSource = "DeviceMessages"
- // TwinChangeEvents ...
- TwinChangeEvents RoutingSource = "TwinChangeEvents"
+ // RoutingSourceDeviceJobLifecycleEvents ...
+ RoutingSourceDeviceJobLifecycleEvents RoutingSource = "DeviceJobLifecycleEvents"
+ // RoutingSourceDeviceLifecycleEvents ...
+ RoutingSourceDeviceLifecycleEvents RoutingSource = "DeviceLifecycleEvents"
+ // RoutingSourceDeviceMessages ...
+ RoutingSourceDeviceMessages RoutingSource = "DeviceMessages"
+ // RoutingSourceInvalid ...
+ RoutingSourceInvalid RoutingSource = "Invalid"
+ // RoutingSourceTwinChangeEvents ...
+ RoutingSourceTwinChangeEvents RoutingSource = "TwinChangeEvents"
)
// PossibleRoutingSourceValues returns an array of possible values for the RoutingSource const type.
func PossibleRoutingSourceValues() []RoutingSource {
- return []RoutingSource{DeviceJobLifecycleEvents, DeviceLifecycleEvents, DeviceMessages, TwinChangeEvents}
+ return []RoutingSource{RoutingSourceDeviceJobLifecycleEvents, RoutingSourceDeviceLifecycleEvents, RoutingSourceDeviceMessages, RoutingSourceInvalid, RoutingSourceTwinChangeEvents}
+}
+
+// TestResultStatus enumerates the values for test result status.
+type TestResultStatus string
+
+const (
+ // False ...
+ False TestResultStatus = "false"
+ // True ...
+ True TestResultStatus = "true"
+ // Undefined ...
+ Undefined TestResultStatus = "undefined"
+)
+
+// PossibleTestResultStatusValues returns an array of possible values for the TestResultStatus const type.
+func PossibleTestResultStatusValues() []TestResultStatus {
+ return []TestResultStatus{False, True, Undefined}
}
// CertificateBodyDescription the JSON-serialized X509 Certificate.
@@ -304,6 +357,8 @@ type CertificateProperties struct {
Created *date.TimeRFC1123 `json:"created,omitempty"`
// Updated - The certificate's last update date and time.
Updated *date.TimeRFC1123 `json:"updated,omitempty"`
+ // Certificate - The certificate content
+ Certificate *string `json:"certificate,omitempty"`
}
// CertificatePropertiesWithNonce the description of an X509 CA Certificate including the challenge nonce issued
@@ -323,6 +378,8 @@ type CertificatePropertiesWithNonce struct {
Updated *date.TimeRFC1123 `json:"updated,omitempty"`
// VerificationCode - The certificate's verification code that will be used for proof of possession.
VerificationCode *string `json:"verificationCode,omitempty"`
+ // Certificate - The certificate content
+ Certificate *string `json:"certificate,omitempty"`
}
// CertificateVerificationDescription the JSON-serialized leaf certificate
@@ -354,6 +411,116 @@ type CloudToDeviceProperties struct {
Feedback *FeedbackProperties `json:"feedback,omitempty"`
}
+// EndpointHealthData the health data for an endpoint
+type EndpointHealthData struct {
+ // EndpointID - Id of the endpoint
+ EndpointID *string `json:"endpointId,omitempty"`
+ // HealthStatus - Health status. Possible values include: 'Unknown', 'Healthy', 'Unhealthy', 'Dead'
+ HealthStatus EndpointHealthStatus `json:"healthStatus,omitempty"`
+}
+
+// EndpointHealthDataListResult the JSON-serialized array of EndpointHealthData objects with a next link.
+type EndpointHealthDataListResult struct {
+ autorest.Response `json:"-"`
+ // Value - JSON-serialized array of Endpoint health data
+ Value *[]EndpointHealthData `json:"value,omitempty"`
+ // NextLink - Link to more results
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// EndpointHealthDataListResultIterator provides access to a complete listing of EndpointHealthData values.
+type EndpointHealthDataListResultIterator struct {
+ i int
+ page EndpointHealthDataListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *EndpointHealthDataListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter EndpointHealthDataListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter EndpointHealthDataListResultIterator) Response() EndpointHealthDataListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter EndpointHealthDataListResultIterator) Value() EndpointHealthData {
+ if !iter.page.NotDone() {
+ return EndpointHealthData{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ehdlr EndpointHealthDataListResult) IsEmpty() bool {
+ return ehdlr.Value == nil || len(*ehdlr.Value) == 0
+}
+
+// endpointHealthDataListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ehdlr EndpointHealthDataListResult) endpointHealthDataListResultPreparer() (*http.Request, error) {
+ if ehdlr.NextLink == nil || len(to.String(ehdlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ehdlr.NextLink)))
+}
+
+// EndpointHealthDataListResultPage contains a page of EndpointHealthData values.
+type EndpointHealthDataListResultPage struct {
+ fn func(EndpointHealthDataListResult) (EndpointHealthDataListResult, error)
+ ehdlr EndpointHealthDataListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *EndpointHealthDataListResultPage) Next() error {
+ next, err := page.fn(page.ehdlr)
+ if err != nil {
+ return err
+ }
+ page.ehdlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page EndpointHealthDataListResultPage) NotDone() bool {
+ return !page.ehdlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page EndpointHealthDataListResultPage) Response() EndpointHealthDataListResult {
+ return page.ehdlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page EndpointHealthDataListResultPage) Values() []EndpointHealthData {
+ if page.ehdlr.IsEmpty() {
+ return nil
+ }
+ return *page.ehdlr.Value
+}
+
// ErrorDetails error details.
type ErrorDetails struct {
// Code - The error code.
@@ -577,9 +744,11 @@ type IotHubCapacity struct {
type IotHubDescription struct {
autorest.Response `json:"-"`
// Etag - The Etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal ETag convention.
- Etag *string `json:"etag,omitempty"`
+ Etag *string `json:"etag,omitempty"`
+ // Properties - IotHub properties
Properties *IotHubProperties `json:"properties,omitempty"`
- Sku *IotHubSkuInfo `json:"sku,omitempty"`
+ // Sku - IotHub SKU info
+ Sku *IotHubSkuInfo `json:"sku,omitempty"`
// ID - The resource identifier.
ID *string `json:"id,omitempty"`
// Name - The resource name.
@@ -928,12 +1097,11 @@ func (page IotHubQuotaMetricInfoListResultPage) Values() []IotHubQuotaMetricInfo
// operation.
type IotHubResourceCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
+func (future *IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -941,34 +1109,15 @@ func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceCli
return
}
if !done {
- return ihd, azure.NewAsyncOpIncompleteError("devices.IotHubResourceCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ihd, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ihd.Response.Response, err = future.GetResult(sender); err == nil && ihd.Response.Response.StatusCode != http.StatusNoContent {
+ ihd, err = client.CreateOrUpdateResponder(ihd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", ihd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ihd, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -976,12 +1125,11 @@ func (future IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceCli
// IotHubResourceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type IotHubResourceDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so SetObject, err error) {
+func (future *IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so SetObject, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -989,34 +1137,15 @@ func (future IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so
return
}
if !done {
- return so, azure.NewAsyncOpIncompleteError("devices.IotHubResourceDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- so, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.DeleteResponder(so.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", so.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- so, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1024,12 +1153,11 @@ func (future IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (so
// IotHubResourceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type IotHubResourceUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotHubResourceUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
+func (future *IotHubResourceUpdateFuture) Result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1037,34 +1165,15 @@ func (future IotHubResourceUpdateFuture) Result(client IotHubResourceClient) (ih
return
}
if !done {
- return ihd, azure.NewAsyncOpIncompleteError("devices.IotHubResourceUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ihd, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ihd.Response.Response, err = future.GetResult(sender); err == nil && ihd.Response.Response.StatusCode != http.StatusNoContent {
+ ihd, err = client.UpdateResponder(ihd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "devices.IotHubResourceUpdateFuture", "Result", ihd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ihd, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "devices.IotHubResourceUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1074,7 +1183,8 @@ type IotHubSkuDescription struct {
// ResourceType - The type of the resource.
ResourceType *string `json:"resourceType,omitempty"`
// Sku - The type of the resource.
- Sku *IotHubSkuInfo `json:"sku,omitempty"`
+ Sku *IotHubSkuInfo `json:"sku,omitempty"`
+ // Capacity - IotHub capacity
Capacity *IotHubCapacity `json:"capacity,omitempty"`
}
@@ -1211,7 +1321,7 @@ type JobResponse struct {
EndTimeUtc *date.TimeRFC1123 `json:"endTimeUtc,omitempty"`
// Type - The type of the job. Possible values include: 'JobTypeUnknown', 'JobTypeExport', 'JobTypeImport', 'JobTypeBackup', 'JobTypeReadDeviceProperties', 'JobTypeWriteDeviceProperties', 'JobTypeUpdateDeviceConfiguration', 'JobTypeRebootDevice', 'JobTypeFactoryResetDevice', 'JobTypeFirmwareUpdate'
Type JobType `json:"type,omitempty"`
- // Status - The status of the job. Possible values include: 'Unknown', 'Enqueued', 'Running', 'Completed', 'Failed', 'Cancelled'
+ // Status - The status of the job. Possible values include: 'JobStatusUnknown', 'JobStatusEnqueued', 'JobStatusRunning', 'JobStatusCompleted', 'JobStatusFailed', 'JobStatusCancelled'
Status JobStatus `json:"status,omitempty"`
// FailureReason - If status == failed, this string containing the reason for the failure.
FailureReason *string `json:"failureReason,omitempty"`
@@ -1323,6 +1433,12 @@ func (page JobResponseListResultPage) Values() []JobResponse {
return *page.jrlr.Value
}
+// MatchedRoute routes that matched
+type MatchedRoute struct {
+ // Properties - Properties of routes that matched
+ Properties *RouteProperties `json:"properties,omitempty"`
+}
+
// MessagingEndpointProperties the properties of the messaging endpoints used by this IoT hub.
type MessagingEndpointProperties struct {
// LockDurationAsIso8601 - The lock duration. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.
@@ -1333,6 +1449,14 @@ type MessagingEndpointProperties struct {
MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"`
}
+// Name name of Iot Hub type
+type Name struct {
+ // Value - IotHub type
+ Value *string `json:"value,omitempty"`
+ // LocalizedValue - Localized value of name
+ LocalizedValue *string `json:"localizedValue,omitempty"`
+}
+
// Operation ioT Hub REST API operation
type Operation struct {
// Name - Operation name: {provider}/{resource}/{read | write | action | delete}
@@ -1522,11 +1646,37 @@ func (r Resource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
+// RouteCompilationError compilation error when evaluating route
+type RouteCompilationError struct {
+ // Message - Route error message
+ Message *string `json:"message,omitempty"`
+ // Severity - Severity of the route error. Possible values include: 'Error', 'Warning'
+ Severity RouteErrorSeverity `json:"severity,omitempty"`
+ // Location - Location where the route error happened
+ Location *RouteErrorRange `json:"location,omitempty"`
+}
+
+// RouteErrorPosition position where the route error happened
+type RouteErrorPosition struct {
+ // Line - Line where the route error happened
+ Line *int32 `json:"line,omitempty"`
+ // Column - Column where the route error happened
+ Column *int32 `json:"column,omitempty"`
+}
+
+// RouteErrorRange range of route errors
+type RouteErrorRange struct {
+ // Start - Start where the route error happened
+ Start *RouteErrorPosition `json:"start,omitempty"`
+ // End - End where the route error happened
+ End *RouteErrorPosition `json:"end,omitempty"`
+}
+
// RouteProperties the properties of a routing rule that your IoT hub uses to route messages to endpoints.
type RouteProperties struct {
// Name - The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.
Name *string `json:"name,omitempty"`
- // Source - The source that the routing rule is to be applied to, such as DeviceMessages. Possible values include: 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents'
+ // Source - The source that the routing rule is to be applied to, such as DeviceMessages. Possible values include: 'RoutingSourceInvalid', 'RoutingSourceDeviceMessages', 'RoutingSourceTwinChangeEvents', 'RoutingSourceDeviceLifecycleEvents', 'RoutingSourceDeviceJobLifecycleEvents'
Source RoutingSource `json:"source,omitempty"`
// Condition - The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. For grammar, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language
Condition *string `json:"condition,omitempty"`
@@ -1562,6 +1712,31 @@ type RoutingEventHubProperties struct {
ResourceGroup *string `json:"resourceGroup,omitempty"`
}
+// RoutingMessage routing message
+type RoutingMessage struct {
+ // Body - Body of routing message
+ Body *string `json:"body,omitempty"`
+ // AppProperties - App properties
+ AppProperties map[string]*string `json:"appProperties"`
+ // SystemProperties - System properties
+ SystemProperties map[string]*string `json:"systemProperties"`
+}
+
+// MarshalJSON is the custom marshaler for RoutingMessage.
+func (rm RoutingMessage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rm.Body != nil {
+ objectMap["body"] = rm.Body
+ }
+ if rm.AppProperties != nil {
+ objectMap["appProperties"] = rm.AppProperties
+ }
+ if rm.SystemProperties != nil {
+ objectMap["systemProperties"] = rm.SystemProperties
+ }
+ return json.Marshal(objectMap)
+}
+
// RoutingProperties the routing related properties of the IoT hub. See:
// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging
type RoutingProperties struct {
@@ -1766,3 +1941,64 @@ func (tr TagsResource) MarshalJSON() ([]byte, error) {
}
return json.Marshal(objectMap)
}
+
+// TestAllRoutesInput input for testing all routes
+type TestAllRoutesInput struct {
+ // RoutingSource - Routing source. Possible values include: 'RoutingSourceInvalid', 'RoutingSourceDeviceMessages', 'RoutingSourceTwinChangeEvents', 'RoutingSourceDeviceLifecycleEvents', 'RoutingSourceDeviceJobLifecycleEvents'
+ RoutingSource RoutingSource `json:"routingSource,omitempty"`
+ // Message - Routing message
+ Message *RoutingMessage `json:"message,omitempty"`
+}
+
+// TestAllRoutesResult result of testing all routes
+type TestAllRoutesResult struct {
+ autorest.Response `json:"-"`
+ // Routes - JSON-serialized array of matched routes
+ Routes *[]MatchedRoute `json:"routes,omitempty"`
+}
+
+// TestRouteInput input for testing route
+type TestRouteInput struct {
+ // Message - Routing message
+ Message *RoutingMessage `json:"message,omitempty"`
+ // Route - Route properties
+ Route *RouteProperties `json:"route,omitempty"`
+}
+
+// TestRouteResult result of testing one route
+type TestRouteResult struct {
+ autorest.Response `json:"-"`
+ // Result - Result of testing route. Possible values include: 'Undefined', 'False', 'True'
+ Result TestResultStatus `json:"result,omitempty"`
+ // Details - Detailed result of testing route
+ Details *TestRouteResultDetails `json:"details,omitempty"`
+}
+
+// TestRouteResultDetails detailed result of testing a route
+type TestRouteResultDetails struct {
+ // CompilationErrors - JSON-serialized list of route compilation errors
+ CompilationErrors *[]RouteCompilationError `json:"compilationErrors,omitempty"`
+}
+
+// UserSubscriptionQuota user subscription quota response
+type UserSubscriptionQuota struct {
+ // ID - IotHub type id
+ ID *string `json:"id,omitempty"`
+ // Type - Response type
+ Type *string `json:"type,omitempty"`
+ // Unit - Unit of IotHub type
+ Unit *string `json:"unit,omitempty"`
+ // CurrentValue - Current number of IotHub type
+ CurrentValue *int32 `json:"currentValue,omitempty"`
+ // Limit - Numerical limit on IotHub type
+ Limit *int32 `json:"limit,omitempty"`
+ // Name - IotHub type
+ Name *Name `json:"name,omitempty"`
+}
+
+// UserSubscriptionQuotaListResult json-serialized array of User subscription quota response
+type UserSubscriptionQuotaListResult struct {
+ autorest.Response `json:"-"`
+ Value *[]UserSubscriptionQuota `json:"value,omitempty"`
+ NextLink *string `json:"nextLink,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/resourceprovidercommon.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/resourceprovidercommon.go
new file mode 100644
index 000000000..a80dd0c04
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/resourceprovidercommon.go
@@ -0,0 +1,102 @@
+package devices
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ResourceProviderCommonClient is the use this API to manage the IoT hubs in your Azure subscription.
+type ResourceProviderCommonClient struct {
+ BaseClient
+}
+
+// NewResourceProviderCommonClient creates an instance of the ResourceProviderCommonClient client.
+func NewResourceProviderCommonClient(subscriptionID string) ResourceProviderCommonClient {
+ return NewResourceProviderCommonClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewResourceProviderCommonClientWithBaseURI creates an instance of the ResourceProviderCommonClient client.
+func NewResourceProviderCommonClientWithBaseURI(baseURI string, subscriptionID string) ResourceProviderCommonClient {
+ return ResourceProviderCommonClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// GetSubscriptionQuota get the number of free and paid iot hubs in the subscription
+func (client ResourceProviderCommonClient) GetSubscriptionQuota(ctx context.Context) (result UserSubscriptionQuotaListResult, err error) {
+ req, err := client.GetSubscriptionQuotaPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "devices.ResourceProviderCommonClient", "GetSubscriptionQuota", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSubscriptionQuotaSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "devices.ResourceProviderCommonClient", "GetSubscriptionQuota", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetSubscriptionQuotaResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "devices.ResourceProviderCommonClient", "GetSubscriptionQuota", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetSubscriptionQuotaPreparer prepares the GetSubscriptionQuota request.
+func (client ResourceProviderCommonClient) GetSubscriptionQuotaPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Devices/usages", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSubscriptionQuotaSender sends the GetSubscriptionQuota request. The method will close the
+// http.Response Body if it receives an error.
+func (client ResourceProviderCommonClient) GetSubscriptionQuotaSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetSubscriptionQuotaResponder handles the response to the GetSubscriptionQuota request. The method always
+// closes the http.Response Body.
+func (client ResourceProviderCommonClient) GetSubscriptionQuotaResponder(resp *http.Response) (result UserSubscriptionQuotaListResult, 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/services/keyvault/2016-10-01/keyvault/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/models.go
index 0bdea2f1b..399f50567 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/models.go
@@ -44,13 +44,17 @@ func PossibleActionTypeValues() []ActionType {
type DeletionRecoveryLevel string
const (
- // Purgeable ...
+ // Purgeable Soft-delete is not enabled for this vault. A DELETE operation results in immediate and
+ // irreversible data loss.
Purgeable DeletionRecoveryLevel = "Purgeable"
- // Recoverable ...
+ // Recoverable Soft-delete is enabled for this vault and purge has been disabled. A deleted entity will
+ // remain in this state until recovered, or the end of the retention interval.
Recoverable DeletionRecoveryLevel = "Recoverable"
- // RecoverableProtectedSubscription ...
+ // RecoverableProtectedSubscription Soft-delete is enabled for this vault, and the subscription is
+ // protected against immediate deletion.
RecoverableProtectedSubscription DeletionRecoveryLevel = "Recoverable+ProtectedSubscription"
- // RecoverablePurgeable ...
+ // RecoverablePurgeable Soft-delete is enabled for this vault; A priveleged user may trigger an immediate,
+ // irreversible deletion(purge) of a deleted entity.
RecoverablePurgeable DeletionRecoveryLevel = "Recoverable+Purgeable"
)
@@ -63,13 +67,13 @@ func PossibleDeletionRecoveryLevelValues() []DeletionRecoveryLevel {
type JSONWebKeyCurveName string
const (
- // P256 ...
+ // P256 The NIST P-256 elliptic curve, AKA SECG curve SECP256R1.
P256 JSONWebKeyCurveName = "P-256"
- // P384 ...
+ // P384 The NIST P-384 elliptic curve, AKA SECG curve SECP384R1.
P384 JSONWebKeyCurveName = "P-384"
- // P521 ...
+ // P521 The NIST P-521 elliptic curve, AKA SECG curve SECP521R1.
P521 JSONWebKeyCurveName = "P-521"
- // SECP256K1 ...
+ // SECP256K1 The SECG SECP256K1 elliptic curve.
SECP256K1 JSONWebKeyCurveName = "SECP256K1"
)
@@ -1529,7 +1533,7 @@ func (kb KeyBundle) MarshalJSON() ([]byte, error) {
type KeyCreateParameters struct {
// Kty - The type of key to create. For valid values, see JsonWebKeyType. Possible values include: 'EC', 'ECHSM', 'RSA', 'RSAHSM', 'Oct'
Kty JSONWebKeyType `json:"kty,omitempty"`
- // KeySize - The key size in bytes. For example, 1024 or 2048.
+ // KeySize - The key size in bits. For example: 2048, 3072, or 4096 for RSA.
KeySize *int32 `json:"key_size,omitempty"`
KeyOps *[]JSONWebKeyOperation `json:"key_ops,omitempty"`
KeyAttributes *KeyAttributes `json:"attributes,omitempty"`
@@ -1746,7 +1750,7 @@ type KeyProperties struct {
Exportable *bool `json:"exportable,omitempty"`
// KeyType - The key type.
KeyType *string `json:"kty,omitempty"`
- // KeySize - The key size in bytes. For example; 1024 or 2048.
+ // KeySize - The key size in bits. For example: 2048, 3072, or 4096 for RSA.
KeySize *int32 `json:"key_size,omitempty"`
// ReuseKey - Indicates if the same key pair will be used on certificate renewal.
ReuseKey *bool `json:"reuse_key,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2016-10-01/keyvault/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2016-10-01/keyvault/models.go
index a887b0ee3..f28e0abbb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2016-10-01/keyvault/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2016-10-01/keyvault/models.go
@@ -1052,12 +1052,11 @@ type VaultProperties struct {
// VaultsPurgeDeletedFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VaultsPurgeDeletedFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VaultsPurgeDeletedFuture) Result(client VaultsClient) (ar autorest.Response, err error) {
+func (future *VaultsPurgeDeletedFuture) Result(client VaultsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1065,34 +1064,9 @@ func (future VaultsPurgeDeletedFuture) Result(client VaultsClient) (ar autorest.
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("keyvault.VaultsPurgeDeletedFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeDeletedResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "keyvault.VaultsPurgeDeletedFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("keyvault.VaultsPurgeDeletedFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "keyvault.VaultsPurgeDeletedFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeDeletedResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "keyvault.VaultsPurgeDeletedFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2016-10-01/keyvault/vaults.go b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2016-10-01/keyvault/vaults.go
index 9ee6ddc18..b9bf8b249 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2016-10-01/keyvault/vaults.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2016-10-01/keyvault/vaults.go
@@ -820,15 +820,17 @@ func (client VaultsClient) PurgeDeletedPreparer(ctx context.Context, vaultName s
// 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) (future VaultsPurgeDeletedFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/agreements.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/agreements.go
index 143db9072..78a062dd9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/agreements.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/agreements.go
@@ -786,3 +786,74 @@ func (client AgreementsClient) ListByIntegrationAccountsComplete(ctx context.Con
result.page, err = client.ListByIntegrationAccounts(ctx, resourceGroupName, integrationAccountName, top, filter)
return
}
+
+// ListContentCallbackURL get the content callback url.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// agreementName - the integration account agreement name.
+func (client AgreementsClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, listContentCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) {
+ req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, agreementName, listContentCallbackURL)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.AgreementsClient", "ListContentCallbackURL", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListContentCallbackURLSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.AgreementsClient", "ListContentCallbackURL", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListContentCallbackURLResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.AgreementsClient", "ListContentCallbackURL", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListContentCallbackURLPreparer prepares the ListContentCallbackURL request.
+func (client AgreementsClient) ListContentCallbackURLPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, listContentCallbackURL GetCallbackURLParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "agreementName": autorest.Encode("path", agreementName),
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl", pathParameters),
+ autorest.WithJSON(listContentCallbackURL),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListContentCallbackURLSender sends the ListContentCallbackURL request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgreementsClient) ListContentCallbackURLSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListContentCallbackURLResponder handles the response to the ListContentCallbackURL request. The method always
+// closes the http.Response Body.
+func (client AgreementsClient) ListContentCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, 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/services/logic/mgmt/2016-06-01/logic/integrationaccountassemblies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccountassemblies.go
new file mode 100644
index 000000000..dd45c29fd
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccountassemblies.go
@@ -0,0 +1,394 @@
+package logic
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// IntegrationAccountAssembliesClient is the REST API for Azure Logic Apps.
+type IntegrationAccountAssembliesClient struct {
+ BaseClient
+}
+
+// NewIntegrationAccountAssembliesClient creates an instance of the IntegrationAccountAssembliesClient client.
+func NewIntegrationAccountAssembliesClient(subscriptionID string) IntegrationAccountAssembliesClient {
+ return NewIntegrationAccountAssembliesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewIntegrationAccountAssembliesClientWithBaseURI creates an instance of the IntegrationAccountAssembliesClient
+// client.
+func NewIntegrationAccountAssembliesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountAssembliesClient {
+ return IntegrationAccountAssembliesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update an assembly for an integration account.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// assemblyArtifactName - the assembly artifact name.
+// assemblyArtifact - the assembly artifact.
+func (client IntegrationAccountAssembliesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string, assemblyArtifact AssemblyDefinition) (result AssemblyDefinition, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: assemblyArtifact,
+ Constraints: []validation.Constraint{{Target: "assemblyArtifact.Properties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "assemblyArtifact.Properties.AssemblyName", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("logic.IntegrationAccountAssembliesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client IntegrationAccountAssembliesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string, assemblyArtifact AssemblyDefinition) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "assemblyArtifactName": autorest.Encode("path", assemblyArtifactName),
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}", pathParameters),
+ autorest.WithJSON(assemblyArtifact),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client IntegrationAccountAssembliesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client IntegrationAccountAssembliesClient) CreateOrUpdateResponder(resp *http.Response) (result AssemblyDefinition, 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 assembly for an integration account.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// assemblyArtifactName - the assembly artifact name.
+func (client IntegrationAccountAssembliesClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, assemblyArtifactName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client IntegrationAccountAssembliesClient) DeletePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "assemblyArtifactName": autorest.Encode("path", assemblyArtifactName),
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ 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.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client IntegrationAccountAssembliesClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client IntegrationAccountAssembliesClient) 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 get an assembly for an integration account.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// assemblyArtifactName - the assembly artifact name.
+func (client IntegrationAccountAssembliesClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (result AssemblyDefinition, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, assemblyArtifactName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client IntegrationAccountAssembliesClient) GetPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "assemblyArtifactName": autorest.Encode("path", assemblyArtifactName),
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ 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.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client IntegrationAccountAssembliesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client IntegrationAccountAssembliesClient) GetResponder(resp *http.Response) (result AssemblyDefinition, 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 the assemblies for an integration account.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+func (client IntegrationAccountAssembliesClient) List(ctx context.Context, resourceGroupName string, integrationAccountName string) (result AssemblyCollection, err error) {
+ req, err := client.ListPreparer(ctx, resourceGroupName, integrationAccountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client IntegrationAccountAssembliesClient) ListPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ 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.Logic/integrationAccounts/{integrationAccountName}/assemblies", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client IntegrationAccountAssembliesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client IntegrationAccountAssembliesClient) ListResponder(resp *http.Response) (result AssemblyCollection, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListContentCallbackURL get the content callback url for an integration account assembly.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// assemblyArtifactName - the assembly artifact name.
+func (client IntegrationAccountAssembliesClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (result WorkflowTriggerCallbackURL, err error) {
+ req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, assemblyArtifactName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "ListContentCallbackURL", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListContentCallbackURLSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "ListContentCallbackURL", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListContentCallbackURLResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "ListContentCallbackURL", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListContentCallbackURLPreparer prepares the ListContentCallbackURL request.
+func (client IntegrationAccountAssembliesClient) ListContentCallbackURLPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "assemblyArtifactName": autorest.Encode("path", assemblyArtifactName),
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-06-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.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListContentCallbackURLSender sends the ListContentCallbackURL request. The method will close the
+// http.Response Body if it receives an error.
+func (client IntegrationAccountAssembliesClient) ListContentCallbackURLSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListContentCallbackURLResponder handles the response to the ListContentCallbackURL request. The method always
+// closes the http.Response Body.
+func (client IntegrationAccountAssembliesClient) ListContentCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, 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/services/logic/mgmt/2016-06-01/logic/integrationaccountbatchconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccountbatchconfigurations.go
new file mode 100644
index 000000000..579db5b4f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccountbatchconfigurations.go
@@ -0,0 +1,328 @@
+package logic
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// IntegrationAccountBatchConfigurationsClient is the REST API for Azure Logic Apps.
+type IntegrationAccountBatchConfigurationsClient struct {
+ BaseClient
+}
+
+// NewIntegrationAccountBatchConfigurationsClient creates an instance of the
+// IntegrationAccountBatchConfigurationsClient client.
+func NewIntegrationAccountBatchConfigurationsClient(subscriptionID string) IntegrationAccountBatchConfigurationsClient {
+ return NewIntegrationAccountBatchConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewIntegrationAccountBatchConfigurationsClientWithBaseURI creates an instance of the
+// IntegrationAccountBatchConfigurationsClient client.
+func NewIntegrationAccountBatchConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountBatchConfigurationsClient {
+ return IntegrationAccountBatchConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a batch configuration for an integration account.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// batchConfigurationName - the batch configuration name.
+// batchConfiguration - the batch configuration.
+func (client IntegrationAccountBatchConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string, batchConfiguration BatchConfiguration) (result BatchConfiguration, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: batchConfiguration,
+ Constraints: []validation.Constraint{{Target: "batchConfiguration.Properties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "batchConfiguration.Properties.BatchGroupName", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "batchConfiguration.Properties.ReleaseCriteria", Name: validation.Null, Rule: true, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("logic.IntegrationAccountBatchConfigurationsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client IntegrationAccountBatchConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string, batchConfiguration BatchConfiguration) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "batchConfigurationName": autorest.Encode("path", batchConfigurationName),
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}", pathParameters),
+ autorest.WithJSON(batchConfiguration),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client IntegrationAccountBatchConfigurationsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client IntegrationAccountBatchConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result BatchConfiguration, 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 a batch configuration for an integration account.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// batchConfigurationName - the batch configuration name.
+func (client IntegrationAccountBatchConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, batchConfigurationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client IntegrationAccountBatchConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "batchConfigurationName": autorest.Encode("path", batchConfigurationName),
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ 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.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client IntegrationAccountBatchConfigurationsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client IntegrationAccountBatchConfigurationsClient) 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 get a batch configuration for an integration account.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// batchConfigurationName - the batch configuration name.
+func (client IntegrationAccountBatchConfigurationsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string) (result BatchConfiguration, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, batchConfigurationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client IntegrationAccountBatchConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "batchConfigurationName": autorest.Encode("path", batchConfigurationName),
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ 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.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client IntegrationAccountBatchConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client IntegrationAccountBatchConfigurationsClient) GetResponder(resp *http.Response) (result BatchConfiguration, 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 the batch configurations for an integration account.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+func (client IntegrationAccountBatchConfigurationsClient) List(ctx context.Context, resourceGroupName string, integrationAccountName string) (result BatchConfigurationCollection, err error) {
+ req, err := client.ListPreparer(ctx, resourceGroupName, integrationAccountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client IntegrationAccountBatchConfigurationsClient) ListPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ 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.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client IntegrationAccountBatchConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client IntegrationAccountBatchConfigurationsClient) ListResponder(resp *http.Response) (result BatchConfigurationCollection, 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/services/logic/mgmt/2016-06-01/logic/integrationaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccounts.go
index a76b6f881..2f3cf5308 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccounts.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
"net/http"
)
@@ -504,6 +505,228 @@ func (client IntegrationAccountsClient) ListBySubscriptionComplete(ctx context.C
return
}
+// ListKeyVaultKeys gets the integration account's Key Vault keys.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// listKeyVaultKeys - the key vault parameters.
+func (client IntegrationAccountsClient) ListKeyVaultKeys(ctx context.Context, resourceGroupName string, integrationAccountName string, listKeyVaultKeys ListKeyVaultKeysDefinition) (result KeyVaultKeyCollection, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: listKeyVaultKeys,
+ Constraints: []validation.Constraint{{Target: "listKeyVaultKeys.KeyVault", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("logic.IntegrationAccountsClient", "ListKeyVaultKeys", err.Error())
+ }
+
+ req, err := client.ListKeyVaultKeysPreparer(ctx, resourceGroupName, integrationAccountName, listKeyVaultKeys)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListKeyVaultKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListKeyVaultKeysSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListKeyVaultKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListKeyVaultKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListKeyVaultKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListKeyVaultKeysPreparer prepares the ListKeyVaultKeys request.
+func (client IntegrationAccountsClient) ListKeyVaultKeysPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, listKeyVaultKeys ListKeyVaultKeysDefinition) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys", pathParameters),
+ autorest.WithJSON(listKeyVaultKeys),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListKeyVaultKeysSender sends the ListKeyVaultKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client IntegrationAccountsClient) ListKeyVaultKeysSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListKeyVaultKeysResponder handles the response to the ListKeyVaultKeys request. The method always
+// closes the http.Response Body.
+func (client IntegrationAccountsClient) ListKeyVaultKeysResponder(resp *http.Response) (result KeyVaultKeyCollection, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// LogTrackingEvents logs the integration account's tracking events.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// logTrackingEvents - the callback URL parameters.
+func (client IntegrationAccountsClient) LogTrackingEvents(ctx context.Context, resourceGroupName string, integrationAccountName string, logTrackingEvents TrackingEventsDefinition) (result autorest.Response, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: logTrackingEvents,
+ Constraints: []validation.Constraint{{Target: "logTrackingEvents.SourceType", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "logTrackingEvents.Events", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("logic.IntegrationAccountsClient", "LogTrackingEvents", err.Error())
+ }
+
+ req, err := client.LogTrackingEventsPreparer(ctx, resourceGroupName, integrationAccountName, logTrackingEvents)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "LogTrackingEvents", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.LogTrackingEventsSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "LogTrackingEvents", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.LogTrackingEventsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "LogTrackingEvents", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// LogTrackingEventsPreparer prepares the LogTrackingEvents request.
+func (client IntegrationAccountsClient) LogTrackingEventsPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, logTrackingEvents TrackingEventsDefinition) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents", pathParameters),
+ autorest.WithJSON(logTrackingEvents),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// LogTrackingEventsSender sends the LogTrackingEvents request. The method will close the
+// http.Response Body if it receives an error.
+func (client IntegrationAccountsClient) LogTrackingEventsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// LogTrackingEventsResponder handles the response to the LogTrackingEvents request. The method always
+// closes the http.Response Body.
+func (client IntegrationAccountsClient) LogTrackingEventsResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// RegenerateAccessKey regenerates the integration account access key.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// regenerateAccessKey - the access key type.
+func (client IntegrationAccountsClient) RegenerateAccessKey(ctx context.Context, resourceGroupName string, integrationAccountName string, regenerateAccessKey RegenerateActionParameter) (result IntegrationAccount, err error) {
+ req, err := client.RegenerateAccessKeyPreparer(ctx, resourceGroupName, integrationAccountName, regenerateAccessKey)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "RegenerateAccessKey", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.RegenerateAccessKeySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "RegenerateAccessKey", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.RegenerateAccessKeyResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "RegenerateAccessKey", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// RegenerateAccessKeyPreparer prepares the RegenerateAccessKey request.
+func (client IntegrationAccountsClient) RegenerateAccessKeyPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, regenerateAccessKey RegenerateActionParameter) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey", pathParameters),
+ autorest.WithJSON(regenerateAccessKey),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RegenerateAccessKeySender sends the RegenerateAccessKey request. The method will close the
+// http.Response Body if it receives an error.
+func (client IntegrationAccountsClient) RegenerateAccessKeySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// RegenerateAccessKeyResponder handles the response to the RegenerateAccessKey request. The method always
+// closes the http.Response Body.
+func (client IntegrationAccountsClient) RegenerateAccessKeyResponder(resp *http.Response) (result IntegrationAccount, 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 integration account.
// Parameters:
// resourceGroupName - the resource group name.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/maps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/maps.go
index dc9baca87..f05aac39f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/maps.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/maps.go
@@ -357,3 +357,74 @@ func (client MapsClient) ListByIntegrationAccountsComplete(ctx context.Context,
result.page, err = client.ListByIntegrationAccounts(ctx, resourceGroupName, integrationAccountName, top, filter)
return
}
+
+// ListContentCallbackURL get the content callback url.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// mapName - the integration account map name.
+func (client MapsClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, listContentCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) {
+ req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, mapName, listContentCallbackURL)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.MapsClient", "ListContentCallbackURL", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListContentCallbackURLSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.MapsClient", "ListContentCallbackURL", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListContentCallbackURLResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.MapsClient", "ListContentCallbackURL", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListContentCallbackURLPreparer prepares the ListContentCallbackURL request.
+func (client MapsClient) ListContentCallbackURLPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, listContentCallbackURL GetCallbackURLParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "mapName": autorest.Encode("path", mapName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl", pathParameters),
+ autorest.WithJSON(listContentCallbackURL),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListContentCallbackURLSender sends the ListContentCallbackURL request. The method will close the
+// http.Response Body if it receives an error.
+func (client MapsClient) ListContentCallbackURLSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListContentCallbackURLResponder handles the response to the ListContentCallbackURL request. The method always
+// closes the http.Response Body.
+func (client MapsClient) ListContentCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, 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/services/logic/mgmt/2016-06-01/logic/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/models.go
index 7ffdfe37b..5e545c016 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/models.go
@@ -25,23 +25,40 @@ import (
"net/http"
)
+// AccessKeyType enumerates the values for access key type.
+type AccessKeyType string
+
+const (
+ // NotSpecified ...
+ NotSpecified AccessKeyType = "NotSpecified"
+ // Primary ...
+ Primary AccessKeyType = "Primary"
+ // Secondary ...
+ Secondary AccessKeyType = "Secondary"
+)
+
+// PossibleAccessKeyTypeValues returns an array of possible values for the AccessKeyType const type.
+func PossibleAccessKeyTypeValues() []AccessKeyType {
+ return []AccessKeyType{NotSpecified, Primary, Secondary}
+}
+
// AgreementType enumerates the values for agreement type.
type AgreementType string
const (
- // AS2 ...
- AS2 AgreementType = "AS2"
- // Edifact ...
- Edifact AgreementType = "Edifact"
- // NotSpecified ...
- NotSpecified AgreementType = "NotSpecified"
- // X12 ...
- X12 AgreementType = "X12"
+ // AgreementTypeAS2 ...
+ AgreementTypeAS2 AgreementType = "AS2"
+ // AgreementTypeEdifact ...
+ AgreementTypeEdifact AgreementType = "Edifact"
+ // AgreementTypeNotSpecified ...
+ AgreementTypeNotSpecified AgreementType = "NotSpecified"
+ // AgreementTypeX12 ...
+ AgreementTypeX12 AgreementType = "X12"
)
// PossibleAgreementTypeValues returns an array of possible values for the AgreementType const type.
func PossibleAgreementTypeValues() []AgreementType {
- return []AgreementType{AS2, Edifact, NotSpecified, X12}
+ return []AgreementType{AgreementTypeAS2, AgreementTypeEdifact, AgreementTypeNotSpecified, AgreementTypeX12}
}
// DayOfWeek enumerates the values for day of week.
@@ -177,6 +194,29 @@ func PossibleEncryptionAlgorithmValues() []EncryptionAlgorithm {
return []EncryptionAlgorithm{EncryptionAlgorithmAES128, EncryptionAlgorithmAES192, EncryptionAlgorithmAES256, EncryptionAlgorithmDES3, EncryptionAlgorithmNone, EncryptionAlgorithmNotSpecified, EncryptionAlgorithmRC2}
}
+// EventLevel enumerates the values for event level.
+type EventLevel string
+
+const (
+ // Critical ...
+ Critical EventLevel = "Critical"
+ // Error ...
+ Error EventLevel = "Error"
+ // Informational ...
+ Informational EventLevel = "Informational"
+ // LogAlways ...
+ LogAlways EventLevel = "LogAlways"
+ // Verbose ...
+ Verbose EventLevel = "Verbose"
+ // Warning ...
+ Warning EventLevel = "Warning"
+)
+
+// PossibleEventLevelValues returns an array of possible values for the EventLevel const type.
+func PossibleEventLevelValues() []EventLevel {
+ return []EventLevel{Critical, Error, Informational, LogAlways, Verbose, Warning}
+}
+
// HashingAlgorithm enumerates the values for hashing algorithm.
type HashingAlgorithm string
@@ -421,6 +461,64 @@ func PossibleSkuNameValues() []SkuName {
return []SkuName{SkuNameBasic, SkuNameFree, SkuNameNotSpecified, SkuNamePremium, SkuNameShared, SkuNameStandard}
}
+// TrackEventsOperationOptions enumerates the values for track events operation options.
+type TrackEventsOperationOptions string
+
+const (
+ // DisableSourceInfoEnrich ...
+ DisableSourceInfoEnrich TrackEventsOperationOptions = "DisableSourceInfoEnrich"
+ // None ...
+ None TrackEventsOperationOptions = "None"
+)
+
+// PossibleTrackEventsOperationOptionsValues returns an array of possible values for the TrackEventsOperationOptions const type.
+func PossibleTrackEventsOperationOptionsValues() []TrackEventsOperationOptions {
+ return []TrackEventsOperationOptions{DisableSourceInfoEnrich, None}
+}
+
+// TrackingRecordType enumerates the values for tracking record type.
+type TrackingRecordType string
+
+const (
+ // TrackingRecordTypeAS2MDN ...
+ TrackingRecordTypeAS2MDN TrackingRecordType = "AS2MDN"
+ // TrackingRecordTypeAS2Message ...
+ TrackingRecordTypeAS2Message TrackingRecordType = "AS2Message"
+ // TrackingRecordTypeCustom ...
+ TrackingRecordTypeCustom TrackingRecordType = "Custom"
+ // TrackingRecordTypeEdifactFunctionalGroup ...
+ TrackingRecordTypeEdifactFunctionalGroup TrackingRecordType = "EdifactFunctionalGroup"
+ // TrackingRecordTypeEdifactFunctionalGroupAcknowledgment ...
+ TrackingRecordTypeEdifactFunctionalGroupAcknowledgment TrackingRecordType = "EdifactFunctionalGroupAcknowledgment"
+ // TrackingRecordTypeEdifactInterchange ...
+ TrackingRecordTypeEdifactInterchange TrackingRecordType = "EdifactInterchange"
+ // TrackingRecordTypeEdifactInterchangeAcknowledgment ...
+ TrackingRecordTypeEdifactInterchangeAcknowledgment TrackingRecordType = "EdifactInterchangeAcknowledgment"
+ // TrackingRecordTypeEdifactTransactionSet ...
+ TrackingRecordTypeEdifactTransactionSet TrackingRecordType = "EdifactTransactionSet"
+ // TrackingRecordTypeEdifactTransactionSetAcknowledgment ...
+ TrackingRecordTypeEdifactTransactionSetAcknowledgment TrackingRecordType = "EdifactTransactionSetAcknowledgment"
+ // TrackingRecordTypeNotSpecified ...
+ TrackingRecordTypeNotSpecified TrackingRecordType = "NotSpecified"
+ // TrackingRecordTypeX12FunctionalGroup ...
+ TrackingRecordTypeX12FunctionalGroup TrackingRecordType = "X12FunctionalGroup"
+ // TrackingRecordTypeX12FunctionalGroupAcknowledgment ...
+ TrackingRecordTypeX12FunctionalGroupAcknowledgment TrackingRecordType = "X12FunctionalGroupAcknowledgment"
+ // TrackingRecordTypeX12Interchange ...
+ TrackingRecordTypeX12Interchange TrackingRecordType = "X12Interchange"
+ // TrackingRecordTypeX12InterchangeAcknowledgment ...
+ TrackingRecordTypeX12InterchangeAcknowledgment TrackingRecordType = "X12InterchangeAcknowledgment"
+ // TrackingRecordTypeX12TransactionSet ...
+ TrackingRecordTypeX12TransactionSet TrackingRecordType = "X12TransactionSet"
+ // TrackingRecordTypeX12TransactionSetAcknowledgment ...
+ TrackingRecordTypeX12TransactionSetAcknowledgment TrackingRecordType = "X12TransactionSetAcknowledgment"
+)
+
+// PossibleTrackingRecordTypeValues returns an array of possible values for the TrackingRecordType const type.
+func PossibleTrackingRecordTypeValues() []TrackingRecordType {
+ return []TrackingRecordType{TrackingRecordTypeAS2MDN, TrackingRecordTypeAS2Message, TrackingRecordTypeCustom, TrackingRecordTypeEdifactFunctionalGroup, TrackingRecordTypeEdifactFunctionalGroupAcknowledgment, TrackingRecordTypeEdifactInterchange, TrackingRecordTypeEdifactInterchangeAcknowledgment, TrackingRecordTypeEdifactTransactionSet, TrackingRecordTypeEdifactTransactionSetAcknowledgment, TrackingRecordTypeNotSpecified, TrackingRecordTypeX12FunctionalGroup, TrackingRecordTypeX12FunctionalGroupAcknowledgment, TrackingRecordTypeX12Interchange, TrackingRecordTypeX12InterchangeAcknowledgment, TrackingRecordTypeX12TransactionSet, TrackingRecordTypeX12TransactionSetAcknowledgment}
+}
+
// TrailingSeparatorPolicy enumerates the values for trailing separator policy.
type TrailingSeparatorPolicy string
@@ -670,6 +768,12 @@ func PossibleX12TimeFormatValues() []X12TimeFormat {
return []X12TimeFormat{X12TimeFormatHHMM, X12TimeFormatHHMMSS, X12TimeFormatHHMMSSd, X12TimeFormatHHMMSSdd, X12TimeFormatNotSpecified}
}
+// AccessKeyRegenerateActionDefinition ...
+type AccessKeyRegenerateActionDefinition struct {
+ // KeyType - Possible values include: 'NotSpecified', 'Primary', 'Secondary'
+ KeyType AccessKeyType `json:"keyType,omitempty"`
+}
+
// AgreementContent the integration account agreement content.
type AgreementContent struct {
// AS2 - The AS2 agreement content.
@@ -680,7 +784,30 @@ type AgreementContent struct {
Edifact *EdifactAgreementContent `json:"edifact,omitempty"`
}
-// AS2AcknowledgementConnectionSettings the AS2 agreement acknowledegment connection settings.
+// ArtifactContentPropertiesDefinition the artifact content properties definition.
+type ArtifactContentPropertiesDefinition struct {
+ Content interface{} `json:"content,omitempty"`
+ // ContentType - The content type.
+ ContentType *string `json:"contentType,omitempty"`
+ // ContentLink - The content link.
+ ContentLink *ContentLink `json:"contentLink,omitempty"`
+ // CreatedTime - The artifact creation time.
+ CreatedTime *date.Time `json:"createdTime,omitempty"`
+ // ChangedTime - The artifact changed time.
+ ChangedTime *date.Time `json:"changedTime,omitempty"`
+ Metadata interface{} `json:"metadata,omitempty"`
+}
+
+// ArtifactProperties the artifact properties definition.
+type ArtifactProperties struct {
+ // CreatedTime - The artifact creation time.
+ CreatedTime *date.Time `json:"createdTime,omitempty"`
+ // ChangedTime - The artifact changed time.
+ ChangedTime *date.Time `json:"changedTime,omitempty"`
+ Metadata interface{} `json:"metadata,omitempty"`
+}
+
+// AS2AcknowledgementConnectionSettings the AS2 agreement acknowledgement connection settings.
type AS2AcknowledgementConnectionSettings struct {
// IgnoreCertificateNameMismatch - The value indicating whether to ignore mismatch in certificate name.
IgnoreCertificateNameMismatch *bool `json:"ignoreCertificateNameMismatch,omitempty"`
@@ -756,7 +883,7 @@ type AS2MessageConnectionSettings struct {
UnfoldHTTPHeaders *bool `json:"unfoldHttpHeaders,omitempty"`
}
-// AS2OneWayAgreement the integration account AS2 oneway agreement.
+// AS2OneWayAgreement the integration account AS2 one-way agreement.
type AS2OneWayAgreement struct {
// SenderBusinessIdentity - The sender business identity
SenderBusinessIdentity *BusinessIdentity `json:"senderBusinessIdentity,omitempty"`
@@ -832,12 +959,161 @@ type AS2ValidationSettings struct {
SigningAlgorithm SigningAlgorithm `json:"signingAlgorithm,omitempty"`
}
+// AssemblyCollection a collection of assembly definitions.
+type AssemblyCollection struct {
+ autorest.Response `json:"-"`
+ Value *[]AssemblyDefinition `json:"value,omitempty"`
+}
+
+// AssemblyDefinition the assembly definition.
+type AssemblyDefinition struct {
+ autorest.Response `json:"-"`
+ // Properties - The assembly properties.
+ Properties *AssemblyProperties `json:"properties,omitempty"`
+ // ID - The resource id.
+ ID *string `json:"id,omitempty"`
+ // Name - Gets the resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Gets the resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - The resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - The resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for AssemblyDefinition.
+func (ad AssemblyDefinition) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ad.Properties != nil {
+ objectMap["properties"] = ad.Properties
+ }
+ if ad.ID != nil {
+ objectMap["id"] = ad.ID
+ }
+ if ad.Name != nil {
+ objectMap["name"] = ad.Name
+ }
+ if ad.Type != nil {
+ objectMap["type"] = ad.Type
+ }
+ if ad.Location != nil {
+ objectMap["location"] = ad.Location
+ }
+ if ad.Tags != nil {
+ objectMap["tags"] = ad.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// AssemblyProperties the assembly properties definition.
+type AssemblyProperties struct {
+ // AssemblyName - The assembly name.
+ AssemblyName *string `json:"assemblyName,omitempty"`
+ // AssemblyVersion - The assembly version.
+ AssemblyVersion *string `json:"assemblyVersion,omitempty"`
+ // AssemblyCulture - The assembly culture.
+ AssemblyCulture *string `json:"assemblyCulture,omitempty"`
+ // AssemblyPublicKeyToken - The assembly public key token.
+ AssemblyPublicKeyToken *string `json:"assemblyPublicKeyToken,omitempty"`
+ Content interface{} `json:"content,omitempty"`
+ // ContentType - The content type.
+ ContentType *string `json:"contentType,omitempty"`
+ // ContentLink - The content link.
+ ContentLink *ContentLink `json:"contentLink,omitempty"`
+ // CreatedTime - The artifact creation time.
+ CreatedTime *date.Time `json:"createdTime,omitempty"`
+ // ChangedTime - The artifact changed time.
+ ChangedTime *date.Time `json:"changedTime,omitempty"`
+ Metadata interface{} `json:"metadata,omitempty"`
+}
+
+// AzureResourceErrorInfo the azure resource error info.
+type AzureResourceErrorInfo struct {
+ // Message - The error message.
+ Message *string `json:"message,omitempty"`
+ // Details - The error details.
+ Details *[]AzureResourceErrorInfo `json:"details,omitempty"`
+ // Code - The error code.
+ Code *string `json:"code,omitempty"`
+}
+
// B2BPartnerContent the B2B partner content.
type B2BPartnerContent struct {
// BusinessIdentities - The list of partner business identities.
BusinessIdentities *[]BusinessIdentity `json:"businessIdentities,omitempty"`
}
+// BatchConfiguration the batch configuration resource definition.
+type BatchConfiguration struct {
+ autorest.Response `json:"-"`
+ // Properties - The batch configuration properties.
+ Properties *BatchConfigurationProperties `json:"properties,omitempty"`
+ // ID - The resource id.
+ ID *string `json:"id,omitempty"`
+ // Name - Gets the resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Gets the resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - The resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - The resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for BatchConfiguration.
+func (bc BatchConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if bc.Properties != nil {
+ objectMap["properties"] = bc.Properties
+ }
+ if bc.ID != nil {
+ objectMap["id"] = bc.ID
+ }
+ if bc.Name != nil {
+ objectMap["name"] = bc.Name
+ }
+ if bc.Type != nil {
+ objectMap["type"] = bc.Type
+ }
+ if bc.Location != nil {
+ objectMap["location"] = bc.Location
+ }
+ if bc.Tags != nil {
+ objectMap["tags"] = bc.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// BatchConfigurationCollection a collection of batch configurations.
+type BatchConfigurationCollection struct {
+ autorest.Response `json:"-"`
+ Value *[]BatchConfiguration `json:"value,omitempty"`
+}
+
+// BatchConfigurationProperties the batch configuration properties definition.
+type BatchConfigurationProperties struct {
+ // BatchGroupName - The name of the batch group.
+ BatchGroupName *string `json:"batchGroupName,omitempty"`
+ // ReleaseCriteria - The batch release criteria.
+ ReleaseCriteria *BatchReleaseCriteria `json:"releaseCriteria,omitempty"`
+ // CreatedTime - The artifact creation time.
+ CreatedTime *date.Time `json:"createdTime,omitempty"`
+ // ChangedTime - The artifact changed time.
+ ChangedTime *date.Time `json:"changedTime,omitempty"`
+ Metadata interface{} `json:"metadata,omitempty"`
+}
+
+// BatchReleaseCriteria the batch release criteria.
+type BatchReleaseCriteria struct {
+ // MessageCount - The message count.
+ MessageCount *int32 `json:"messageCount,omitempty"`
+ // BatchSize - The batch size in bytes.
+ BatchSize *int32 `json:"batchSize,omitempty"`
+ // Recurrence - The recurrence.
+ Recurrence *WorkflowTriggerRecurrence `json:"recurrence,omitempty"`
+}
+
// BusinessIdentity the integration account partner's business identity.
type BusinessIdentity struct {
// Qualifier - The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32
@@ -921,7 +1197,7 @@ type EdifactDelimiterOverride struct {
MessageID *string `json:"messageId,omitempty"`
// MessageVersion - The message version.
MessageVersion *string `json:"messageVersion,omitempty"`
- // MessageRelease - The message releaseversion.
+ // MessageRelease - The message release.
MessageRelease *string `json:"messageRelease,omitempty"`
// DataElementSeparator - The data element separator.
DataElementSeparator *int32 `json:"dataElementSeparator,omitempty"`
@@ -943,7 +1219,7 @@ type EdifactDelimiterOverride struct {
TargetNamespace *string `json:"targetNamespace,omitempty"`
}
-// EdifactEnvelopeOverride the Edifact enevlope override settings.
+// EdifactEnvelopeOverride the Edifact envelope override settings.
type EdifactEnvelopeOverride struct {
// MessageID - The message id on which this envelope settings has to be applied.
MessageID *string `json:"messageId,omitempty"`
@@ -1211,6 +1487,12 @@ type EdifactValidationSettings struct {
TrailingSeparatorPolicy TrailingSeparatorPolicy `json:"trailingSeparatorPolicy,omitempty"`
}
+// ErrorInfo the error info.
+type ErrorInfo struct {
+ // Code - The error code.
+ Code *string `json:"code,omitempty"`
+}
+
// ErrorProperties 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 {
@@ -1220,13 +1502,37 @@ type ErrorProperties struct {
Message *string `json:"message,omitempty"`
}
-// ErrorResponse error reponse indicates Logic service is not able to process the incoming request. The error
+// ErrorResponse error response indicates Logic service is not able to process the incoming request. The error
// property contains the error details.
type ErrorResponse struct {
// Error - The error properties.
Error *ErrorProperties `json:"error,omitempty"`
}
+// Expression ...
+type Expression struct {
+ Text *string `json:"text,omitempty"`
+ Value interface{} `json:"value,omitempty"`
+ Subexpressions *[]Expression `json:"subexpressions,omitempty"`
+ Error *AzureResourceErrorInfo `json:"error,omitempty"`
+}
+
+// ExpressionRoot ...
+type ExpressionRoot struct {
+ // Path - The path.
+ Path *string `json:"path,omitempty"`
+ Text *string `json:"text,omitempty"`
+ Value interface{} `json:"value,omitempty"`
+ Subexpressions *[]Expression `json:"subexpressions,omitempty"`
+ Error *AzureResourceErrorInfo `json:"error,omitempty"`
+}
+
+// ExpressionTraces ...
+type ExpressionTraces struct {
+ autorest.Response `json:"-"`
+ Inputs *[]ExpressionRoot `json:"inputs,omitempty"`
+}
+
// GenerateUpgradedDefinitionParameters the parameters to generate upgraded definition.
type GenerateUpgradedDefinitionParameters struct {
// TargetSchemaVersion - The target schema version.
@@ -1397,7 +1703,7 @@ func (iaa *IntegrationAccountAgreement) UnmarshalJSON(body []byte) error {
// IntegrationAccountAgreementFilter the integration account agreement filter for odata query.
type IntegrationAccountAgreementFilter struct {
- // AgreementType - The agreement type of integration account agreement. Possible values include: 'NotSpecified', 'AS2', 'X12', 'Edifact'
+ // AgreementType - The agreement type of integration account agreement. Possible values include: 'AgreementTypeNotSpecified', 'AgreementTypeAS2', 'AgreementTypeX12', 'AgreementTypeEdifact'
AgreementType AgreementType `json:"agreementType,omitempty"`
}
@@ -1512,7 +1818,7 @@ type IntegrationAccountAgreementProperties struct {
ChangedTime *date.Time `json:"changedTime,omitempty"`
// Metadata - The metadata.
Metadata interface{} `json:"metadata,omitempty"`
- // AgreementType - The agreement type. Possible values include: 'NotSpecified', 'AS2', 'X12', 'Edifact'
+ // AgreementType - The agreement type. Possible values include: 'AgreementTypeNotSpecified', 'AgreementTypeAS2', 'AgreementTypeX12', 'AgreementTypeEdifact'
AgreementType AgreementType `json:"agreementType,omitempty"`
// HostPartner - The integration account partner that is set as host partner for this agreement.
HostPartner *string `json:"hostPartner,omitempty"`
@@ -2810,6 +3116,42 @@ type IntegrationAccountSku struct {
Name IntegrationAccountSkuName `json:"name,omitempty"`
}
+// JSONSchema the JSON schema.
+type JSONSchema struct {
+ autorest.Response `json:"-"`
+ // Title - The JSON title.
+ Title *string `json:"title,omitempty"`
+ // Content - The JSON content.
+ Content *string `json:"content,omitempty"`
+}
+
+// KeyVaultKey the key vault key.
+type KeyVaultKey struct {
+ // Kid - The key id.
+ Kid *string `json:"kid,omitempty"`
+ // Attributes - The key attributes.
+ Attributes *KeyVaultKeyAttributes `json:"attributes,omitempty"`
+}
+
+// KeyVaultKeyAttributes the key attributes.
+type KeyVaultKeyAttributes struct {
+ // Enabled - Whether the key is enabled or not.
+ Enabled *bool `json:"enabled,omitempty"`
+ // Created - When the key was created.
+ Created *int64 `json:"created,omitempty"`
+ // Updated - When the key was updated.
+ Updated *int64 `json:"updated,omitempty"`
+}
+
+// KeyVaultKeyCollection collection of key vault keys.
+type KeyVaultKeyCollection struct {
+ autorest.Response `json:"-"`
+ // Value - The key vault keys.
+ Value *[]KeyVaultKey `json:"value,omitempty"`
+ // SkipToken - The skip token.
+ SkipToken *string `json:"skipToken,omitempty"`
+}
+
// KeyVaultKeyReference the reference to the key vault key.
type KeyVaultKeyReference struct {
// KeyVault - The key vault reference.
@@ -2830,6 +3172,24 @@ type KeyVaultKeyReferenceKeyVault struct {
Type *string `json:"type,omitempty"`
}
+// KeyVaultReference the key vault reference.
+type KeyVaultReference struct {
+ // ID - The resource id.
+ ID *string `json:"id,omitempty"`
+ // Name - Gets the resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Gets the resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// ListKeyVaultKeysDefinition the list key vault keys definition.
+type ListKeyVaultKeysDefinition struct {
+ // KeyVault - The key vault reference.
+ KeyVault *KeyVaultReference `json:"keyVault,omitempty"`
+ // SkipToken - The skip token.
+ SkipToken *string `json:"skipToken,omitempty"`
+}
+
// Operation logic REST API operation
type Operation struct {
// Name - Operation name: {provider}/{resource}/{operation}
@@ -2951,6 +3311,51 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// OperationResult the operation result definition.
+type OperationResult struct {
+ // TrackingID - Gets the tracking id.
+ TrackingID *string `json:"trackingId,omitempty"`
+ // Inputs - Gets the inputs.
+ Inputs interface{} `json:"inputs,omitempty"`
+ // InputsLink - Gets the link to inputs.
+ InputsLink *ContentLink `json:"inputsLink,omitempty"`
+ // Outputs - Gets the outputs.
+ Outputs interface{} `json:"outputs,omitempty"`
+ // OutputsLink - Gets the link to outputs.
+ OutputsLink *ContentLink `json:"outputsLink,omitempty"`
+ // TrackedProperties - Gets the tracked properties.
+ TrackedProperties interface{} `json:"trackedProperties,omitempty"`
+ // RetryHistory - Gets the retry histories.
+ RetryHistory *[]RetryHistory `json:"retryHistory,omitempty"`
+ IterationCount *int32 `json:"iterationCount,omitempty"`
+ // StartTime - The start time of the workflow scope repetition.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - The end time of the workflow scope repetition.
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // Correlation - The correlation properties.
+ Correlation *RunActionCorrelation `json:"correlation,omitempty"`
+ // Status - The status of the workflow scope repetition. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored'
+ Status WorkflowStatus `json:"status,omitempty"`
+ // Code - The workflow scope repetition code.
+ Code *string `json:"code,omitempty"`
+ Error interface{} `json:"error,omitempty"`
+}
+
+// OperationResultProperties the run operation result properties.
+type OperationResultProperties struct {
+ // StartTime - The start time of the workflow scope repetition.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - The end time of the workflow scope repetition.
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // Correlation - The correlation properties.
+ Correlation *RunActionCorrelation `json:"correlation,omitempty"`
+ // Status - The status of the workflow scope repetition. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored'
+ Status WorkflowStatus `json:"status,omitempty"`
+ // Code - The workflow scope repetition code.
+ Code *string `json:"code,omitempty"`
+ Error interface{} `json:"error,omitempty"`
+}
+
// PartnerContent the integration account partner content.
type PartnerContent struct {
// B2b - The B2B partner content.
@@ -2971,7 +3376,7 @@ type RecurrenceSchedule struct {
MonthlyOccurrences *[]RecurrenceScheduleOccurrence `json:"monthlyOccurrences,omitempty"`
}
-// RecurrenceScheduleOccurrence the recurrence schedule occurence.
+// RecurrenceScheduleOccurrence the recurrence schedule occurrence.
type RecurrenceScheduleOccurrence struct {
// Day - The day of the week. Possible values include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'
Day DayOfWeek `json:"day,omitempty"`
@@ -2985,6 +3390,14 @@ type RegenerateActionParameter struct {
KeyType KeyType `json:"keyType,omitempty"`
}
+// RepetitionIndex the workflow run action repetition index.
+type RepetitionIndex struct {
+ // ScopeName - The scope.
+ ScopeName *string `json:"scopeName,omitempty"`
+ // ItemIndex - The index.
+ ItemIndex *int32 `json:"itemIndex,omitempty"`
+}
+
// Resource the base resource type.
type Resource struct {
// ID - The resource id.
@@ -3046,12 +3459,35 @@ type RetryHistory struct {
Error *ErrorResponse `json:"error,omitempty"`
}
+// RunActionCorrelation the workflow run action correlation properties.
+type RunActionCorrelation struct {
+ // ActionTrackingID - The action tracking identifier.
+ ActionTrackingID *string `json:"actionTrackingId,omitempty"`
+ // ClientTrackingID - The client tracking identifier.
+ ClientTrackingID *string `json:"clientTrackingId,omitempty"`
+ // ClientKeywords - The client keywords.
+ ClientKeywords *[]string `json:"clientKeywords,omitempty"`
+}
+
+// RunCorrelation the correlation properties.
+type RunCorrelation struct {
+ // ClientTrackingID - The client tracking identifier.
+ ClientTrackingID *string `json:"clientTrackingId,omitempty"`
+ // ClientKeywords - The client keywords.
+ ClientKeywords *[]string `json:"clientKeywords,omitempty"`
+}
+
// SetObject ...
type SetObject struct {
autorest.Response `json:"-"`
Value interface{} `json:"value,omitempty"`
}
+// SetTriggerStateActionDefinition ...
+type SetTriggerStateActionDefinition struct {
+ Source *WorkflowTrigger `json:"source,omitempty"`
+}
+
// Sku the sku type.
type Sku struct {
// Name - The name. Possible values include: 'SkuNameNotSpecified', 'SkuNameFree', 'SkuNameShared', 'SkuNameBasic', 'SkuNameStandard', 'SkuNamePremium'
@@ -3066,6 +3502,30 @@ type SubResource struct {
ID *string `json:"id,omitempty"`
}
+// TrackingEvent ...
+type TrackingEvent struct {
+ // EventLevel - Possible values include: 'LogAlways', 'Critical', 'Error', 'Warning', 'Informational', 'Verbose'
+ EventLevel EventLevel `json:"eventLevel,omitempty"`
+ EventTime *date.Time `json:"eventTime,omitempty"`
+ // RecordType - Possible values include: 'TrackingRecordTypeNotSpecified', 'TrackingRecordTypeCustom', 'TrackingRecordTypeAS2Message', 'TrackingRecordTypeAS2MDN', 'TrackingRecordTypeX12Interchange', 'TrackingRecordTypeX12FunctionalGroup', 'TrackingRecordTypeX12TransactionSet', 'TrackingRecordTypeX12InterchangeAcknowledgment', 'TrackingRecordTypeX12FunctionalGroupAcknowledgment', 'TrackingRecordTypeX12TransactionSetAcknowledgment', 'TrackingRecordTypeEdifactInterchange', 'TrackingRecordTypeEdifactFunctionalGroup', 'TrackingRecordTypeEdifactTransactionSet', 'TrackingRecordTypeEdifactInterchangeAcknowledgment', 'TrackingRecordTypeEdifactFunctionalGroupAcknowledgment', 'TrackingRecordTypeEdifactTransactionSetAcknowledgment'
+ RecordType TrackingRecordType `json:"recordType,omitempty"`
+ Error *TrackingEventErrorInfo `json:"error,omitempty"`
+}
+
+// TrackingEventErrorInfo ...
+type TrackingEventErrorInfo struct {
+ Message *string `json:"message,omitempty"`
+ Code *string `json:"code,omitempty"`
+}
+
+// TrackingEventsDefinition ...
+type TrackingEventsDefinition struct {
+ SourceType *string `json:"sourceType,omitempty"`
+ // TrackEventsOptions - Possible values include: 'None', 'DisableSourceInfoEnrich'
+ TrackEventsOptions TrackEventsOperationOptions `json:"trackEventsOptions,omitempty"`
+ Events *[]TrackingEvent `json:"events,omitempty"`
+}
+
// Workflow the workflow type.
type Workflow struct {
autorest.Response `json:"-"`
@@ -3666,6 +4126,154 @@ type WorkflowRunActionProperties struct {
RetryHistory *[]RetryHistory `json:"retryHistory,omitempty"`
}
+// WorkflowRunActionRepetitionDefinition the workflow run action repetition definition.
+type WorkflowRunActionRepetitionDefinition struct {
+ autorest.Response `json:"-"`
+ // WorkflowRunActionRepetitionProperties - The workflow run action repetition properties definition.
+ *WorkflowRunActionRepetitionProperties `json:"properties,omitempty"`
+ // ID - The resource id.
+ ID *string `json:"id,omitempty"`
+ // Name - Gets the resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Gets the resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - The resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - The resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for WorkflowRunActionRepetitionDefinition.
+func (wrard WorkflowRunActionRepetitionDefinition) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if wrard.WorkflowRunActionRepetitionProperties != nil {
+ objectMap["properties"] = wrard.WorkflowRunActionRepetitionProperties
+ }
+ if wrard.ID != nil {
+ objectMap["id"] = wrard.ID
+ }
+ if wrard.Name != nil {
+ objectMap["name"] = wrard.Name
+ }
+ if wrard.Type != nil {
+ objectMap["type"] = wrard.Type
+ }
+ if wrard.Location != nil {
+ objectMap["location"] = wrard.Location
+ }
+ if wrard.Tags != nil {
+ objectMap["tags"] = wrard.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for WorkflowRunActionRepetitionDefinition struct.
+func (wrard *WorkflowRunActionRepetitionDefinition) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var workflowRunActionRepetitionProperties WorkflowRunActionRepetitionProperties
+ err = json.Unmarshal(*v, &workflowRunActionRepetitionProperties)
+ if err != nil {
+ return err
+ }
+ wrard.WorkflowRunActionRepetitionProperties = &workflowRunActionRepetitionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ wrard.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ wrard.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ wrard.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ wrard.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ wrard.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// WorkflowRunActionRepetitionDefinitionCollection a collection of workflow run action repetitions.
+type WorkflowRunActionRepetitionDefinitionCollection struct {
+ autorest.Response `json:"-"`
+ Value *[]WorkflowRunActionRepetitionDefinition `json:"value,omitempty"`
+}
+
+// WorkflowRunActionRepetitionProperties the workflow run action repetition properties definition.
+type WorkflowRunActionRepetitionProperties struct {
+ // RepetitionIndexes - The repetition indexes.
+ RepetitionIndexes *[]RepetitionIndex `json:"repetitionIndexes,omitempty"`
+ // TrackingID - Gets the tracking id.
+ TrackingID *string `json:"trackingId,omitempty"`
+ // Inputs - Gets the inputs.
+ Inputs interface{} `json:"inputs,omitempty"`
+ // InputsLink - Gets the link to inputs.
+ InputsLink *ContentLink `json:"inputsLink,omitempty"`
+ // Outputs - Gets the outputs.
+ Outputs interface{} `json:"outputs,omitempty"`
+ // OutputsLink - Gets the link to outputs.
+ OutputsLink *ContentLink `json:"outputsLink,omitempty"`
+ // TrackedProperties - Gets the tracked properties.
+ TrackedProperties interface{} `json:"trackedProperties,omitempty"`
+ // RetryHistory - Gets the retry histories.
+ RetryHistory *[]RetryHistory `json:"retryHistory,omitempty"`
+ IterationCount *int32 `json:"iterationCount,omitempty"`
+ // StartTime - The start time of the workflow scope repetition.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - The end time of the workflow scope repetition.
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // Correlation - The correlation properties.
+ Correlation *RunActionCorrelation `json:"correlation,omitempty"`
+ // Status - The status of the workflow scope repetition. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored'
+ Status WorkflowStatus `json:"status,omitempty"`
+ // Code - The workflow scope repetition code.
+ Code *string `json:"code,omitempty"`
+ Error interface{} `json:"error,omitempty"`
+}
+
// WorkflowRunFilter the workflow run filter.
type WorkflowRunFilter struct {
// Status - The status of workflow run. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored'
@@ -3776,6 +4384,8 @@ func (page WorkflowRunListResultPage) Values() []WorkflowRun {
// WorkflowRunProperties the workflow run properties.
type WorkflowRunProperties struct {
+ // WaitEndTime - Gets the wait end time.
+ WaitEndTime *date.Time `json:"waitEndTime,omitempty"`
// StartTime - Gets the start time.
StartTime *date.Time `json:"startTime,omitempty"`
// EndTime - Gets the end time.
@@ -3803,6 +4413,9 @@ type WorkflowRunProperties struct {
// MarshalJSON is the custom marshaler for WorkflowRunProperties.
func (wrp WorkflowRunProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
+ if wrp.WaitEndTime != nil {
+ objectMap["waitEndTime"] = wrp.WaitEndTime
+ }
if wrp.StartTime != nil {
objectMap["startTime"] = wrp.StartTime
}
@@ -3849,6 +4462,8 @@ type WorkflowRunTrigger struct {
Outputs interface{} `json:"outputs,omitempty"`
// OutputsLink - Gets the link to outputs.
OutputsLink *ContentLink `json:"outputsLink,omitempty"`
+ // ScheduledTime - Gets the scheduled time.
+ ScheduledTime *date.Time `json:"scheduledTime,omitempty"`
// StartTime - Gets the start time.
StartTime *date.Time `json:"startTime,omitempty"`
// EndTime - Gets the end time.
@@ -4198,6 +4813,8 @@ type WorkflowTriggerListCallbackURLQueries struct {
Sv *string `json:"sv,omitempty"`
// Sig - The SAS signature.
Sig *string `json:"sig,omitempty"`
+ // Se - The SAS timestamp.
+ Se *string `json:"se,omitempty"`
}
// WorkflowTriggerListResult the list of workflow triggers.
@@ -4331,9 +4948,9 @@ type WorkflowTriggerRecurrence struct {
// Interval - The interval.
Interval *int32 `json:"interval,omitempty"`
// StartTime - The start time.
- StartTime *date.Time `json:"startTime,omitempty"`
+ StartTime *string `json:"startTime,omitempty"`
// EndTime - The end time.
- EndTime *date.Time `json:"endTime,omitempty"`
+ EndTime *string `json:"endTime,omitempty"`
// TimeZone - The time zone.
TimeZone *string `json:"timeZone,omitempty"`
// Schedule - The recurrence schedule.
@@ -4775,7 +5392,7 @@ type X12MessageIdentifier struct {
MessageID *string `json:"messageId,omitempty"`
}
-// X12OneWayAgreement the X12 oneway agreement.
+// X12OneWayAgreement the X12 one-way agreement.
type X12OneWayAgreement struct {
// SenderBusinessIdentity - The sender business identity
SenderBusinessIdentity *BusinessIdentity `json:"senderBusinessIdentity,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/partners.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/partners.go
index 0416ac223..297a94275 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/partners.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/partners.go
@@ -358,3 +358,74 @@ func (client PartnersClient) ListByIntegrationAccountsComplete(ctx context.Conte
result.page, err = client.ListByIntegrationAccounts(ctx, resourceGroupName, integrationAccountName, top, filter)
return
}
+
+// ListContentCallbackURL get the content callback url.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// partnerName - the integration account partner name.
+func (client PartnersClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, listContentCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) {
+ req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, partnerName, listContentCallbackURL)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.PartnersClient", "ListContentCallbackURL", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListContentCallbackURLSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.PartnersClient", "ListContentCallbackURL", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListContentCallbackURLResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.PartnersClient", "ListContentCallbackURL", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListContentCallbackURLPreparer prepares the ListContentCallbackURL request.
+func (client PartnersClient) ListContentCallbackURLPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, listContentCallbackURL GetCallbackURLParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "partnerName": autorest.Encode("path", partnerName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl", pathParameters),
+ autorest.WithJSON(listContentCallbackURL),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListContentCallbackURLSender sends the ListContentCallbackURL request. The method will close the
+// http.Response Body if it receives an error.
+func (client PartnersClient) ListContentCallbackURLSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListContentCallbackURLResponder handles the response to the ListContentCallbackURL request. The method always
+// closes the http.Response Body.
+func (client PartnersClient) ListContentCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, 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/services/logic/mgmt/2016-06-01/logic/schemas.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/schemas.go
index 8b926ffd0..66b790200 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/schemas.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/schemas.go
@@ -357,3 +357,74 @@ func (client SchemasClient) ListByIntegrationAccountsComplete(ctx context.Contex
result.page, err = client.ListByIntegrationAccounts(ctx, resourceGroupName, integrationAccountName, top, filter)
return
}
+
+// ListContentCallbackURL get the content callback url.
+// Parameters:
+// resourceGroupName - the resource group name.
+// integrationAccountName - the integration account name.
+// schemaName - the integration account schema name.
+func (client SchemasClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, listContentCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) {
+ req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, schemaName, listContentCallbackURL)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.SchemasClient", "ListContentCallbackURL", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListContentCallbackURLSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.SchemasClient", "ListContentCallbackURL", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListContentCallbackURLResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.SchemasClient", "ListContentCallbackURL", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListContentCallbackURLPreparer prepares the ListContentCallbackURL request.
+func (client SchemasClient) ListContentCallbackURLPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, listContentCallbackURL GetCallbackURLParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "integrationAccountName": autorest.Encode("path", integrationAccountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "schemaName": autorest.Encode("path", schemaName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl", pathParameters),
+ autorest.WithJSON(listContentCallbackURL),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListContentCallbackURLSender sends the ListContentCallbackURL request. The method will close the
+// http.Response Body if it receives an error.
+func (client SchemasClient) ListContentCallbackURLSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListContentCallbackURLResponder handles the response to the ListContentCallbackURL request. The method always
+// closes the http.Response Body.
+func (client SchemasClient) ListContentCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, 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/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitions.go
new file mode 100644
index 000000000..b5269af98
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitions.go
@@ -0,0 +1,258 @@
+package logic
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// WorkflowRunActionRepetitionsClient is the REST API for Azure Logic Apps.
+type WorkflowRunActionRepetitionsClient struct {
+ BaseClient
+}
+
+// NewWorkflowRunActionRepetitionsClient creates an instance of the WorkflowRunActionRepetitionsClient client.
+func NewWorkflowRunActionRepetitionsClient(subscriptionID string) WorkflowRunActionRepetitionsClient {
+ return NewWorkflowRunActionRepetitionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWorkflowRunActionRepetitionsClientWithBaseURI creates an instance of the WorkflowRunActionRepetitionsClient
+// client.
+func NewWorkflowRunActionRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsClient {
+ return WorkflowRunActionRepetitionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get get a workflow run action repetition.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// runName - the workflow run name.
+// actionName - the workflow action name.
+// repetitionName - the workflow repetition.
+func (client WorkflowRunActionRepetitionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result WorkflowRunActionRepetitionDefinition, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client WorkflowRunActionRepetitionsClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "actionName": autorest.Encode("path", actionName),
+ "repetitionName": autorest.Encode("path", repetitionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runName": autorest.Encode("path", runName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ 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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowRunActionRepetitionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client WorkflowRunActionRepetitionsClient) GetResponder(resp *http.Response) (result WorkflowRunActionRepetitionDefinition, 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 of a workflow run action repetitions.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// runName - the workflow run name.
+// actionName - the workflow action name.
+func (client WorkflowRunActionRepetitionsClient) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result WorkflowRunActionRepetitionDefinitionCollection, err error) {
+ req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, runName, actionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client WorkflowRunActionRepetitionsClient) ListPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "actionName": autorest.Encode("path", actionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runName": autorest.Encode("path", runName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ 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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowRunActionRepetitionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client WorkflowRunActionRepetitionsClient) ListResponder(resp *http.Response) (result WorkflowRunActionRepetitionDefinitionCollection, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListExpressionTraces lists a workflow run expression trace.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// runName - the workflow run name.
+// actionName - the workflow action name.
+// repetitionName - the workflow repetition.
+func (client WorkflowRunActionRepetitionsClient) ListExpressionTraces(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result ExpressionTraces, err error) {
+ req, err := client.ListExpressionTracesPreparer(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "ListExpressionTraces", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListExpressionTracesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "ListExpressionTraces", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListExpressionTracesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "ListExpressionTraces", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListExpressionTracesPreparer prepares the ListExpressionTraces request.
+func (client WorkflowRunActionRepetitionsClient) ListExpressionTracesPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "actionName": autorest.Encode("path", actionName),
+ "repetitionName": autorest.Encode("path", repetitionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runName": autorest.Encode("path", runName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ const APIVersion = "2016-06-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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListExpressionTracesSender sends the ListExpressionTraces request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowRunActionRepetitionsClient) ListExpressionTracesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListExpressionTracesResponder handles the response to the ListExpressionTraces request. The method always
+// closes the http.Response Body.
+func (client WorkflowRunActionRepetitionsClient) ListExpressionTracesResponder(resp *http.Response) (result ExpressionTraces, 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/services/logic/mgmt/2016-06-01/logic/workflowrunactions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactions.go
index a8db2a715..cd0b1b6ce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactions.go
@@ -214,3 +214,74 @@ func (client WorkflowRunActionsClient) ListComplete(ctx context.Context, resourc
result.page, err = client.List(ctx, resourceGroupName, workflowName, runName, top, filter)
return
}
+
+// ListExpressionTraces lists a workflow run expression trace.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// runName - the workflow run name.
+// actionName - the workflow action name.
+func (client WorkflowRunActionsClient) ListExpressionTraces(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result ExpressionTraces, err error) {
+ req, err := client.ListExpressionTracesPreparer(ctx, resourceGroupName, workflowName, runName, actionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "ListExpressionTraces", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListExpressionTracesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "ListExpressionTraces", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListExpressionTracesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "ListExpressionTraces", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListExpressionTracesPreparer prepares the ListExpressionTraces request.
+func (client WorkflowRunActionsClient) ListExpressionTracesPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "actionName": autorest.Encode("path", actionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runName": autorest.Encode("path", runName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ const APIVersion = "2016-06-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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListExpressionTracesSender sends the ListExpressionTraces request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowRunActionsClient) ListExpressionTracesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListExpressionTracesResponder handles the response to the ListExpressionTraces request. The method always
+// closes the http.Response Body.
+func (client WorkflowRunActionsClient) ListExpressionTracesResponder(resp *http.Response) (result ExpressionTraces, 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/services/logic/mgmt/2016-06-01/logic/workflowrunactionscopedrepetitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionscopedrepetitions.go
new file mode 100644
index 000000000..4d76cb59d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionscopedrepetitions.go
@@ -0,0 +1,186 @@
+package logic
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// WorkflowRunActionScopedRepetitionsClient is the REST API for Azure Logic Apps.
+type WorkflowRunActionScopedRepetitionsClient struct {
+ BaseClient
+}
+
+// NewWorkflowRunActionScopedRepetitionsClient creates an instance of the WorkflowRunActionScopedRepetitionsClient
+// client.
+func NewWorkflowRunActionScopedRepetitionsClient(subscriptionID string) WorkflowRunActionScopedRepetitionsClient {
+ return NewWorkflowRunActionScopedRepetitionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWorkflowRunActionScopedRepetitionsClientWithBaseURI creates an instance of the
+// WorkflowRunActionScopedRepetitionsClient client.
+func NewWorkflowRunActionScopedRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionScopedRepetitionsClient {
+ return WorkflowRunActionScopedRepetitionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get get a workflow run action scoped repetition.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// runName - the workflow run name.
+// actionName - the workflow action name.
+// repetitionName - the workflow repetition.
+func (client WorkflowRunActionScopedRepetitionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result WorkflowRunActionRepetitionDefinition, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopedRepetitionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopedRepetitionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopedRepetitionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client WorkflowRunActionScopedRepetitionsClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "actionName": autorest.Encode("path", actionName),
+ "repetitionName": autorest.Encode("path", repetitionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runName": autorest.Encode("path", runName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ 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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowRunActionScopedRepetitionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client WorkflowRunActionScopedRepetitionsClient) GetResponder(resp *http.Response) (result WorkflowRunActionRepetitionDefinition, 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 the workflow run action scoped repetitions.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// runName - the workflow run name.
+// actionName - the workflow action name.
+func (client WorkflowRunActionScopedRepetitionsClient) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result WorkflowRunActionRepetitionDefinitionCollection, err error) {
+ req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, runName, actionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopedRepetitionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopedRepetitionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopedRepetitionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client WorkflowRunActionScopedRepetitionsClient) ListPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "actionName": autorest.Encode("path", actionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runName": autorest.Encode("path", runName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ 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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowRunActionScopedRepetitionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client WorkflowRunActionScopedRepetitionsClient) ListResponder(resp *http.Response) (result WorkflowRunActionRepetitionDefinitionCollection, 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/services/logic/mgmt/2016-06-01/logic/workflowrunoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunoperations.go
new file mode 100644
index 000000000..6070849e5
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunoperations.go
@@ -0,0 +1,111 @@
+package logic
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// WorkflowRunOperationsClient is the REST API for Azure Logic Apps.
+type WorkflowRunOperationsClient struct {
+ BaseClient
+}
+
+// NewWorkflowRunOperationsClient creates an instance of the WorkflowRunOperationsClient client.
+func NewWorkflowRunOperationsClient(subscriptionID string) WorkflowRunOperationsClient {
+ return NewWorkflowRunOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWorkflowRunOperationsClientWithBaseURI creates an instance of the WorkflowRunOperationsClient client.
+func NewWorkflowRunOperationsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunOperationsClient {
+ return WorkflowRunOperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets an operation for a run.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// runName - the workflow run name.
+// operationID - the workflow operation id.
+func (client WorkflowRunOperationsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, operationID string) (result WorkflowRun, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, operationID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunOperationsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunOperationsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunOperationsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client WorkflowRunOperationsClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, operationID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "operationId": autorest.Encode("path", operationID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runName": autorest.Encode("path", runName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ 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.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowRunOperationsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client WorkflowRunOperationsClient) GetResponder(resp *http.Response) (result WorkflowRun, 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/services/logic/mgmt/2016-06-01/logic/workflows.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflows.go
index e17996fc9..f5c38750a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflows.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflows.go
@@ -644,6 +644,76 @@ func (client WorkflowsClient) ListBySubscriptionComplete(ctx context.Context, to
return
}
+// ListCallbackURL get the workflow callback Url.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// listCallbackURL - which callback url to list.
+func (client WorkflowsClient) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, listCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) {
+ req, err := client.ListCallbackURLPreparer(ctx, resourceGroupName, workflowName, listCallbackURL)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListCallbackURL", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListCallbackURLSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListCallbackURL", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListCallbackURLResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListCallbackURL", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListCallbackURLPreparer prepares the ListCallbackURL request.
+func (client WorkflowsClient) ListCallbackURLPreparer(ctx context.Context, resourceGroupName string, workflowName string, listCallbackURL GetCallbackURLParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ const APIVersion = "2016-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl", pathParameters),
+ autorest.WithJSON(listCallbackURL),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListCallbackURLSender sends the ListCallbackURL request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowsClient) ListCallbackURLSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListCallbackURLResponder handles the response to the ListCallbackURL request. The method always
+// closes the http.Response Body.
+func (client WorkflowsClient) ListCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// ListSwagger gets an OpenAPI definition for the workflow.
// Parameters:
// resourceGroupName - the resource group name.
@@ -711,6 +781,75 @@ func (client WorkflowsClient) ListSwaggerResponder(resp *http.Response) (result
return
}
+// Move moves an existing workflow.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// move - the workflow to move.
+func (client WorkflowsClient) Move(ctx context.Context, resourceGroupName string, workflowName string, move Workflow) (result autorest.Response, err error) {
+ req, err := client.MovePreparer(ctx, resourceGroupName, workflowName, move)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Move", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.MoveSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Move", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.MoveResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Move", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// MovePreparer prepares the Move request.
+func (client WorkflowsClient) MovePreparer(ctx context.Context, resourceGroupName string, workflowName string, move Workflow) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ const APIVersion = "2016-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move", pathParameters),
+ autorest.WithJSON(move),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// MoveSender sends the Move request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowsClient) MoveSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// MoveResponder handles the response to the Move request. The method always
+// closes the http.Response Body.
+func (client WorkflowsClient) MoveResponder(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
+}
+
// RegenerateAccessKey regenerates the callback URL access key for request triggers.
// Parameters:
// resourceGroupName - the resource group name.
@@ -920,3 +1059,72 @@ func (client WorkflowsClient) ValidateResponder(resp *http.Response) (result aut
result.Response = resp
return
}
+
+// ValidateWorkflow validates the workflow.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// validate - the workflow.
+func (client WorkflowsClient) ValidateWorkflow(ctx context.Context, resourceGroupName string, workflowName string, validate Workflow) (result autorest.Response, err error) {
+ req, err := client.ValidateWorkflowPreparer(ctx, resourceGroupName, workflowName, validate)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ValidateWorkflow", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ValidateWorkflowSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ValidateWorkflow", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ValidateWorkflowResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ValidateWorkflow", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ValidateWorkflowPreparer prepares the ValidateWorkflow request.
+func (client WorkflowsClient) ValidateWorkflowPreparer(ctx context.Context, resourceGroupName string, workflowName string, validate Workflow) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ const APIVersion = "2016-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate", pathParameters),
+ autorest.WithJSON(validate),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ValidateWorkflowSender sends the ValidateWorkflow request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowsClient) ValidateWorkflowSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ValidateWorkflowResponder handles the response to the ValidateWorkflow request. The method always
+// closes the http.Response Body.
+func (client WorkflowsClient) ValidateWorkflowResponder(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/services/logic/mgmt/2016-06-01/logic/workflowtriggers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowtriggers.go
index 5419773ac..8034efb73 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowtriggers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowtriggers.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
"net/http"
)
@@ -108,6 +109,75 @@ func (client WorkflowTriggersClient) GetResponder(resp *http.Response) (result W
return
}
+// GetSchemaJSON get the trigger schema as JSON.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// triggerName - the workflow trigger name.
+func (client WorkflowTriggersClient) GetSchemaJSON(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result JSONSchema, err error) {
+ req, err := client.GetSchemaJSONPreparer(ctx, resourceGroupName, workflowName, triggerName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "GetSchemaJSON", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSchemaJSONSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "GetSchemaJSON", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetSchemaJSONResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "GetSchemaJSON", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetSchemaJSONPreparer prepares the GetSchemaJSON request.
+func (client WorkflowTriggersClient) GetSchemaJSONPreparer(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "triggerName": autorest.Encode("path", triggerName),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ 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.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSchemaJSONSender sends the GetSchemaJSON request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowTriggersClient) GetSchemaJSONSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetSchemaJSONResponder handles the response to the GetSchemaJSON request. The method always
+// closes the http.Response Body.
+func (client WorkflowTriggersClient) GetSchemaJSONResponder(resp *http.Response) (result JSONSchema, 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 workflow triggers.
// Parameters:
// resourceGroupName - the resource group name.
@@ -211,7 +281,7 @@ func (client WorkflowTriggersClient) ListComplete(ctx context.Context, resourceG
return
}
-// ListCallbackURL gets the callback URL for a workflow trigger.
+// ListCallbackURL get the callback URL for a workflow trigger.
// Parameters:
// resourceGroupName - the resource group name.
// workflowName - the workflow name.
@@ -280,6 +350,74 @@ func (client WorkflowTriggersClient) ListCallbackURLResponder(resp *http.Respons
return
}
+// Reset resets a workflow trigger.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// triggerName - the workflow trigger name.
+func (client WorkflowTriggersClient) Reset(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result autorest.Response, err error) {
+ req, err := client.ResetPreparer(ctx, resourceGroupName, workflowName, triggerName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Reset", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ResetSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Reset", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ResetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Reset", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ResetPreparer prepares the Reset request.
+func (client WorkflowTriggersClient) ResetPreparer(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "triggerName": autorest.Encode("path", triggerName),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ const APIVersion = "2016-06-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.Logic/workflows/{workflowName}/triggers/{triggerName}/reset", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ResetSender sends the Reset request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowTriggersClient) ResetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ResetResponder handles the response to the Reset request. The method always
+// closes the http.Response Body.
+func (client WorkflowTriggersClient) ResetResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
// Run runs a workflow trigger.
// Parameters:
// resourceGroupName - the resource group name.
@@ -348,3 +486,80 @@ func (client WorkflowTriggersClient) RunResponder(resp *http.Response) (result S
result.Response = autorest.Response{Response: resp}
return
}
+
+// SetState sets the state of a workflow trigger.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// triggerName - the workflow trigger name.
+// setState - the workflow trigger state.
+func (client WorkflowTriggersClient) SetState(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, setState SetTriggerStateActionDefinition) (result autorest.Response, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: setState,
+ Constraints: []validation.Constraint{{Target: "setState.Source", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("logic.WorkflowTriggersClient", "SetState", err.Error())
+ }
+
+ req, err := client.SetStatePreparer(ctx, resourceGroupName, workflowName, triggerName, setState)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "SetState", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.SetStateSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "SetState", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.SetStateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "SetState", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// SetStatePreparer prepares the SetState request.
+func (client WorkflowTriggersClient) SetStatePreparer(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, setState SetTriggerStateActionDefinition) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "triggerName": autorest.Encode("path", triggerName),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ const APIVersion = "2016-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState", pathParameters),
+ autorest.WithJSON(setState),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// SetStateSender sends the SetState request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowTriggersClient) SetStateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// SetStateResponder handles the response to the SetState request. The method always
+// closes the http.Response Body.
+func (client WorkflowTriggersClient) SetStateResponder(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/services/logic/mgmt/2016-06-01/logic/workflowversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowversions.go
index d059fa80a..ebfb7b4d8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowversions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowversions.go
@@ -207,7 +207,7 @@ func (client WorkflowVersionsClient) ListComplete(ctx context.Context, resourceG
return
}
-// ListCallbackURL lists the callback URL for a trigger of a workflow version.
+// ListCallbackURL get the callback url for a trigger of a workflow version.
// Parameters:
// resourceGroupName - the resource group name.
// workflowName - the workflow name.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/client.go
new file mode 100644
index 000000000..48869d974
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/client.go
@@ -0,0 +1,52 @@
+// Package workspaces implements the Azure ARM Workspaces service API version 2016-04-01.
+//
+// These APIs allow end users to operate on Azure Machine Learning Workspace resources. They support CRUD operations
+// for Azure Machine Learning Workspaces.
+package workspaces
+
+// 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 Workspaces
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Workspaces.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/models.go
new file mode 100644
index 000000000..ab27b4406
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/models.go
@@ -0,0 +1,443 @@
+package workspaces
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/to"
+ "net/http"
+)
+
+// State enumerates the values for state.
+type State string
+
+const (
+ // Deleted ...
+ Deleted State = "Deleted"
+ // Disabled ...
+ Disabled State = "Disabled"
+ // Enabled ...
+ Enabled State = "Enabled"
+ // Migrated ...
+ Migrated State = "Migrated"
+ // Registered ...
+ Registered State = "Registered"
+ // Unregistered ...
+ Unregistered State = "Unregistered"
+ // Updated ...
+ Updated State = "Updated"
+)
+
+// PossibleStateValues returns an array of possible values for the State const type.
+func PossibleStateValues() []State {
+ return []State{Deleted, Disabled, Enabled, Migrated, Registered, Unregistered, Updated}
+}
+
+// WorkspaceType enumerates the values for workspace type.
+type WorkspaceType string
+
+const (
+ // Anonymous ...
+ Anonymous WorkspaceType = "Anonymous"
+ // Free ...
+ Free WorkspaceType = "Free"
+ // PaidPremium ...
+ PaidPremium WorkspaceType = "PaidPremium"
+ // PaidStandard ...
+ PaidStandard WorkspaceType = "PaidStandard"
+ // Production ...
+ Production WorkspaceType = "Production"
+)
+
+// PossibleWorkspaceTypeValues returns an array of possible values for the WorkspaceType const type.
+func PossibleWorkspaceTypeValues() []WorkspaceType {
+ return []WorkspaceType{Anonymous, Free, PaidPremium, PaidStandard, Production}
+}
+
+// ErrorResponse the error response send when an operation fails.
+type ErrorResponse struct {
+ // Code - error code
+ Code *string `json:"code,omitempty"`
+ // Message - error message
+ Message *string `json:"message,omitempty"`
+}
+
+// KeysResponse workspace authorization keys for a workspace.
+type KeysResponse struct {
+ autorest.Response `json:"-"`
+ // PrimaryToken - Primary authorization key for this workspace.
+ PrimaryToken *string `json:"primaryToken,omitempty"`
+ // SecondaryToken - Secondary authorization key for this workspace.
+ SecondaryToken *string `json:"secondaryToken,omitempty"`
+}
+
+// ListResult the result of a request to list machine learning workspace keys.
+type ListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to request the next list of machine learning workspaces.
+ Value *[]Workspace `json:"value,omitempty"`
+ // NextLink - The URI that can be used to request the next list of machine learning workspaces.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListResultIterator provides access to a complete listing of Workspace values.
+type ListResultIterator struct {
+ i int
+ page ListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ListResultIterator) Response() ListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ListResultIterator) Value() Workspace {
+ if !iter.page.NotDone() {
+ return Workspace{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lr ListResult) IsEmpty() bool {
+ return lr.Value == nil || len(*lr.Value) == 0
+}
+
+// listResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lr ListResult) listResultPreparer() (*http.Request, error) {
+ if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lr.NextLink)))
+}
+
+// ListResultPage contains a page of Workspace values.
+type ListResultPage struct {
+ fn func(ListResult) (ListResult, error)
+ lr ListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ListResultPage) Next() error {
+ next, err := page.fn(page.lr)
+ if err != nil {
+ return err
+ }
+ page.lr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListResultPage) NotDone() bool {
+ return !page.lr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListResultPage) Response() ListResult {
+ return page.lr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListResultPage) Values() []Workspace {
+ if page.lr.IsEmpty() {
+ return nil
+ }
+ return *page.lr.Value
+}
+
+// Operation azure Machine Learning Studio REST API operation
+type Operation struct {
+ // Name - Operation name: {provider}/{resource}/{operation}
+ Name *string `json:"name,omitempty"`
+ // Display - Display name of operation
+ Display *OperationDisplay `json:"display,omitempty"`
+}
+
+// OperationDisplay display name of operation
+type OperationDisplay struct {
+ // Provider - The resource provider name: Microsoft.MachineLearning
+ Provider *string `json:"provider,omitempty"`
+ // Resource - The resource on which the operation is performed.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - The operation that users can perform.
+ Operation *string `json:"operation,omitempty"`
+ // Description - The description for the operation.
+ Description *string `json:"description,omitempty"`
+}
+
+// OperationListResult an array of operations supported by the resource provider.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of AML Studio operations supported by the AML Studio resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+}
+
+// Properties the properties of a machine learning workspace.
+type Properties struct {
+ // UserStorageAccountID - The fully qualified arm id of the storage account associated with this workspace.
+ UserStorageAccountID *string `json:"userStorageAccountId,omitempty"`
+ // OwnerEmail - The email id of the owner for this workspace.
+ OwnerEmail *string `json:"ownerEmail,omitempty"`
+ // WorkspaceType - The type of this workspace. Possible values include: 'Production', 'Free', 'Anonymous', 'PaidStandard', 'PaidPremium'
+ WorkspaceType WorkspaceType `json:"workspaceType,omitempty"`
+ // WorkspaceState - The current state of workspace resource. Possible values include: 'Deleted', 'Enabled', 'Disabled', 'Migrated', 'Updated', 'Registered', 'Unregistered'
+ WorkspaceState State `json:"workspaceState,omitempty"`
+ // WorkspaceID - The immutable id associated with this workspace.
+ WorkspaceID *string `json:"workspaceId,omitempty"`
+ // CreationTime - The creation time for this workspace resource.
+ CreationTime *string `json:"creationTime,omitempty"`
+ // StudioEndpoint - The regional endpoint for the machine learning studio service which hosts this workspace.
+ StudioEndpoint *string `json:"studioEndpoint,omitempty"`
+ // KeyVaultIdentifierID - The key vault identifier used for encrypted workspaces.
+ KeyVaultIdentifierID *string `json:"keyVaultIdentifierId,omitempty"`
+}
+
+// PropertiesUpdateParameters the parameters for updating the properties of a machine learning workspace.
+type PropertiesUpdateParameters struct {
+ // WorkspaceState - The current state of workspace resource. Possible values include: 'Deleted', 'Enabled', 'Disabled', 'Migrated', 'Updated', 'Registered', 'Unregistered'
+ WorkspaceState State `json:"workspaceState,omitempty"`
+ // KeyVaultIdentifierID - The key vault identifier used for encrypted workspaces.
+ KeyVaultIdentifierID *string `json:"keyVaultIdentifierId,omitempty"`
+}
+
+// Resource an Azure resource.
+type Resource struct {
+ // ID - The resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource.
+ Type *string `json:"type,omitempty"`
+ // Location - The location of the resource. This cannot be changed after the resource is created.
+ Location *string `json:"location,omitempty"`
+ // Tags - The tags of the resource.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.ID != nil {
+ objectMap["id"] = r.ID
+ }
+ if r.Name != nil {
+ objectMap["name"] = r.Name
+ }
+ if r.Type != nil {
+ objectMap["type"] = r.Type
+ }
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UpdateParameters the parameters for updating a machine learning workspace.
+type UpdateParameters struct {
+ // Tags - The resource tags for the machine learning workspace.
+ Tags map[string]*string `json:"tags"`
+ // PropertiesUpdateParameters - The properties that the machine learning workspace will be updated with.
+ *PropertiesUpdateParameters `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for UpdateParameters.
+func (up UpdateParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if up.Tags != nil {
+ objectMap["tags"] = up.Tags
+ }
+ if up.PropertiesUpdateParameters != nil {
+ objectMap["properties"] = up.PropertiesUpdateParameters
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for UpdateParameters struct.
+func (up *UpdateParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ up.Tags = tags
+ }
+ case "properties":
+ if v != nil {
+ var propertiesUpdateParameters PropertiesUpdateParameters
+ err = json.Unmarshal(*v, &propertiesUpdateParameters)
+ if err != nil {
+ return err
+ }
+ up.PropertiesUpdateParameters = &propertiesUpdateParameters
+ }
+ }
+ }
+
+ return nil
+}
+
+// Workspace an object that represents a machine learning workspace.
+type Workspace struct {
+ autorest.Response `json:"-"`
+ // Properties - The properties of the machine learning workspace.
+ *Properties `json:"properties,omitempty"`
+ // ID - The resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource.
+ Type *string `json:"type,omitempty"`
+ // Location - The location of the resource. This cannot be changed after the resource is created.
+ Location *string `json:"location,omitempty"`
+ // Tags - The tags of the resource.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Workspace.
+func (w Workspace) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if w.Properties != nil {
+ objectMap["properties"] = w.Properties
+ }
+ if w.ID != nil {
+ objectMap["id"] = w.ID
+ }
+ if w.Name != nil {
+ objectMap["name"] = w.Name
+ }
+ if w.Type != nil {
+ objectMap["type"] = w.Type
+ }
+ if w.Location != nil {
+ objectMap["location"] = w.Location
+ }
+ if w.Tags != nil {
+ objectMap["tags"] = w.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Workspace struct.
+func (w *Workspace) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var properties Properties
+ err = json.Unmarshal(*v, &properties)
+ if err != nil {
+ return err
+ }
+ w.Properties = &properties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ w.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ w.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ w.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ w.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ w.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/operations.go
new file mode 100644
index 000000000..495f5029f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/operations.go
@@ -0,0 +1,99 @@
+package workspaces
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// OperationsClient is the these APIs allow end users to operate on Azure Machine Learning Workspace resources. They
+// support CRUD operations for Azure Machine Learning Workspaces.
+type OperationsClient struct {
+ BaseClient
+}
+
+// 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 Azure Machine Learning Studio REST API operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.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, "workspaces.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2016-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.MachineLearning/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// 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/services/machinelearning/mgmt/2016-04-01/workspaces/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/version.go
new file mode 100644
index 000000000..fc638b4ae
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/version.go
@@ -0,0 +1,30 @@
+package workspaces
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " workspaces/2016-04-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/workspaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/workspaces.go
new file mode 100644
index 000000000..0b75bd281
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2016-04-01/workspaces/workspaces.go
@@ -0,0 +1,638 @@
+package workspaces
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// Client is the these APIs allow end users to operate on Azure Machine Learning Workspace resources. They support CRUD
+// operations for Azure Machine Learning Workspaces.
+type Client struct {
+ BaseClient
+}
+
+// NewClient creates an instance of the Client client.
+func NewClient(subscriptionID string) Client {
+ return NewClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewClientWithBaseURI creates an instance of the Client client.
+func NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
+ return Client{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a workspace with the specified parameters.
+// Parameters:
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+// workspaceName - the name of the machine learning workspace.
+// parameters - the parameters for creating or updating a machine learning workspace.
+func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result Workspace, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.UserStorageAccountID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("workspaces.Client", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (*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 = "2016-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/workspaces/{workspaceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client Client) CreateOrUpdateResponder(resp *http.Response) (result Workspace, 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 a machine learning workspace.
+// Parameters:
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+// workspaceName - the name of the machine learning workspace.
+func (client Client) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client Client) DeletePreparer(ctx context.Context, 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 = "2016-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.MachineLearning/workspaces/{workspaceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client Client) 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 properties of the specified machine learning workspace.
+// Parameters:
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+// workspaceName - the name of the machine learning workspace.
+func (client Client) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result Workspace, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client Client) GetPreparer(ctx context.Context, 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 = "2016-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.MachineLearning/workspaces/{workspaceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client Client) GetResponder(resp *http.Response) (result Workspace, 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 available machine learning workspaces under the specified subscription.
+func (client Client) List(ctx context.Context) (result ListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client Client) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearning/workspaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client Client) ListResponder(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
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client Client) listNextResults(lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "workspaces.Client", "listNextResults", 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, "workspaces.Client", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client Client) ListComplete(ctx context.Context) (result ListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup lists all the available machine learning workspaces under the specified resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListResultPage, err error) {
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.lr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.lr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client Client) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-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.MachineLearning/workspaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client Client) 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 Client) listByResourceGroupNextResults(lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "workspaces.Client", "listByResourceGroupNextResults", 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, "workspaces.Client", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client Client) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListResultIterator, err error) {
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListWorkspaceKeys list the authorization keys associated with this workspace.
+// Parameters:
+// workspaceName - the name of the machine learning workspace.
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+func (client Client) ListWorkspaceKeys(ctx context.Context, workspaceName string, resourceGroupName string) (result KeysResponse, err error) {
+ req, err := client.ListWorkspaceKeysPreparer(ctx, workspaceName, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ListWorkspaceKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListWorkspaceKeysSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ListWorkspaceKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListWorkspaceKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ListWorkspaceKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListWorkspaceKeysPreparer prepares the ListWorkspaceKeys request.
+func (client Client) ListWorkspaceKeysPreparer(ctx context.Context, workspaceName string, resourceGroupName 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 = "2016-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.MachineLearning/workspaces/{workspaceName}/listWorkspaceKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListWorkspaceKeysSender sends the ListWorkspaceKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ListWorkspaceKeysSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListWorkspaceKeysResponder handles the response to the ListWorkspaceKeys request. The method always
+// closes the http.Response Body.
+func (client Client) ListWorkspaceKeysResponder(resp *http.Response) (result KeysResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ResyncStorageKeys resync storage keys associated with this workspace.
+// Parameters:
+// workspaceName - the name of the machine learning workspace.
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+func (client Client) ResyncStorageKeys(ctx context.Context, workspaceName string, resourceGroupName string) (result autorest.Response, err error) {
+ req, err := client.ResyncStorageKeysPreparer(ctx, workspaceName, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ResyncStorageKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ResyncStorageKeysSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ResyncStorageKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ResyncStorageKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "ResyncStorageKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ResyncStorageKeysPreparer prepares the ResyncStorageKeys request.
+func (client Client) ResyncStorageKeysPreparer(ctx context.Context, workspaceName string, resourceGroupName 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 = "2016-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.MachineLearning/workspaces/{workspaceName}/resyncStorageKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ResyncStorageKeysSender sends the ResyncStorageKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ResyncStorageKeysSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ResyncStorageKeysResponder handles the response to the ResyncStorageKeys request. The method always
+// closes the http.Response Body.
+func (client Client) ResyncStorageKeysResponder(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 machine learning workspace with the specified parameters.
+// Parameters:
+// resourceGroupName - the name of the resource group to which the machine learning workspace belongs.
+// workspaceName - the name of the machine learning workspace.
+// parameters - the parameters for updating a machine learning workspace.
+func (client Client) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters UpdateParameters) (result Workspace, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, workspaceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "workspaces.Client", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, parameters UpdateParameters) (*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 = "2016-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/workspaces/{workspaceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client Client) UpdateResponder(resp *http.Response) (result Workspace, 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/services/machinelearning/mgmt/2017-01-01/webservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2017-01-01/webservices/models.go
index 872d4dd9e..68005488b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2017-01-01/webservices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2017-01-01/webservices/models.go
@@ -330,12 +330,11 @@ type CommitmentPlan struct {
// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateOrUpdateFuture) Result(client Client) (ws WebService, err error) {
+func (future *CreateOrUpdateFuture) Result(client Client) (ws WebService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -343,34 +342,15 @@ func (future CreateOrUpdateFuture) Result(client Client) (ws WebService, err err
return
}
if !done {
- return ws, azure.NewAsyncOpIncompleteError("webservices.CreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ws, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.CreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("webservices.CreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ws.Response.Response, err = future.GetResult(sender); err == nil && ws.Response.Response.StatusCode != http.StatusNoContent {
+ ws, err = client.CreateOrUpdateResponder(ws.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "webservices.CreateOrUpdateFuture", "Result", ws.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.CreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ws, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.CreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -379,12 +359,11 @@ func (future CreateOrUpdateFuture) Result(client Client) (ws WebService, err err
// operation.
type CreateRegionalPropertiesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateRegionalPropertiesFuture) Result(client Client) (aos AsyncOperationStatus, err error) {
+func (future *CreateRegionalPropertiesFuture) Result(client Client) (aos AsyncOperationStatus, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -392,34 +371,15 @@ func (future CreateRegionalPropertiesFuture) Result(client Client) (aos AsyncOpe
return
}
if !done {
- return aos, azure.NewAsyncOpIncompleteError("webservices.CreateRegionalPropertiesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- aos, err = client.CreateRegionalPropertiesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.CreateRegionalPropertiesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("webservices.CreateRegionalPropertiesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if aos.Response.Response, err = future.GetResult(sender); err == nil && aos.Response.Response.StatusCode != http.StatusNoContent {
+ aos, err = client.CreateRegionalPropertiesResponder(aos.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "webservices.CreateRegionalPropertiesFuture", "Result", aos.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.CreateRegionalPropertiesFuture", "Result", resp, "Failure sending request")
- return
- }
- aos, err = client.CreateRegionalPropertiesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.CreateRegionalPropertiesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -739,12 +699,11 @@ type Parameter struct {
// PatchFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PatchFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PatchFuture) Result(client Client) (ws WebService, err error) {
+func (future *PatchFuture) Result(client Client) (ws WebService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -752,34 +711,15 @@ func (future PatchFuture) Result(client Client) (ws WebService, err error) {
return
}
if !done {
- return ws, azure.NewAsyncOpIncompleteError("webservices.PatchFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ws, err = client.PatchResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.PatchFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("webservices.PatchFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ws.Response.Response, err = future.GetResult(sender); err == nil && ws.Response.Response.StatusCode != http.StatusNoContent {
+ ws, err = client.PatchResponder(ws.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "webservices.PatchFuture", "Result", ws.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.PatchFuture", "Result", resp, "Failure sending request")
- return
- }
- ws, err = client.PatchResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.PatchFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1113,12 +1053,11 @@ type RealtimeConfiguration struct {
// RemoveFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RemoveFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RemoveFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *RemoveFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1126,35 +1065,10 @@ func (future RemoveFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("webservices.RemoveFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RemoveResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.RemoveFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("webservices.RemoveFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.RemoveFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RemoveResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.RemoveFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go
index a64d925b2..e91ea0e4c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go
@@ -119,15 +119,17 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupNa
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -193,15 +195,17 @@ func (client Client) CreateRegionalPropertiesPreparer(ctx context.Context, resou
// CreateRegionalPropertiesSender sends the CreateRegionalProperties request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateRegionalPropertiesSender(req *http.Request) (future CreateRegionalPropertiesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -597,15 +601,17 @@ func (client Client) PatchPreparer(ctx context.Context, resourceGroupName string
// PatchSender sends the Patch request. The method will close the
// http.Response Body if it receives an error.
func (client Client) PatchSender(req *http.Request) (future PatchFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -666,15 +672,17 @@ func (client Client) RemovePreparer(ctx context.Context, resourceGroupName strin
// RemoveSender sends the Remove request. The method will close the
// http.Response Body if it receives an error.
func (client Client) RemoveSender(req *http.Request) (future RemoveFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2017-01-01-preview/maps/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2017-01-01-preview/maps/accounts.go
new file mode 100644
index 000000000..619631c7b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2017-01-01-preview/maps/accounts.go
@@ -0,0 +1,721 @@
+package maps
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// AccountsClient is the resource Provider
+type AccountsClient struct {
+ BaseClient
+}
+
+// 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)}
+}
+
+// CreateOrUpdate create or update a Maps Account. A Maps Account holds the keys which allow access to the Maps REST
+// APIs.
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+// accountName - the name of the Maps Account.
+// mapsAccountCreateParameters - the new or updated parameters for the Maps Account.
+func (client AccountsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, mapsAccountCreateParameters AccountCreateParameters) (result Account, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: mapsAccountCreateParameters,
+ Constraints: []validation.Constraint{{Target: "mapsAccountCreateParameters.Location", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "mapsAccountCreateParameters.Sku", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "mapsAccountCreateParameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("maps.AccountsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, mapsAccountCreateParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.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, "maps.AccountsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client AccountsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, mapsAccountCreateParameters AccountCreateParameters) (*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 = "2017-01-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}", pathParameters),
+ autorest.WithJSON(mapsAccountCreateParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) CreateOrUpdateResponder(resp *http.Response) (result Account, 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 a Maps Account.
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+// accountName - the name of the Maps Account.
+func (client AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client AccountsClient) DeletePreparer(ctx context.Context, 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 = "2017-01-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.Maps/accounts/{accountName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get get a Maps Account.
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+// accountName - the name of the Maps Account.
+func (client AccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string) (result Account, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.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, "maps.AccountsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client AccountsClient) GetPreparer(ctx context.Context, 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 = "2017-01-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.Maps/accounts/{accountName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) GetResponder(resp *http.Response) (result Account, 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 get all Maps Accounts in a Resource Group
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result Accounts, err error) {
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.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, "maps.AccountsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-01-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.Maps/accounts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (result Accounts, 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 get all Maps Accounts in a Subscription
+func (client AccountsClient) ListBySubscription(ctx context.Context) (result Accounts, err error) {
+ req, err := client.ListBySubscriptionPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListBySubscription", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client AccountsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-01-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Maps/accounts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) ListBySubscriptionResponder(resp *http.Response) (result Accounts, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListKeys get the keys to use with the Maps APIs. A key is used to authenticate and authorize access to the Maps REST
+// APIs. Only one key is needed at a time; two are given to provide seamless key regeneration.
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+// accountName - the name of the Maps Account.
+func (client AccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result AccountKeys, err error) {
+ req, err := client.ListKeysPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListKeysSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListKeysPreparer prepares the ListKeys request.
+func (client AccountsClient) ListKeysPreparer(ctx context.Context, 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 = "2017-01-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.Maps/accounts/{accountName}/listKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListKeysSender sends the ListKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) ListKeysSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListKeysResponder handles the response to the ListKeys request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) ListKeysResponder(resp *http.Response) (result AccountKeys, 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
+}
+
+// ListOperations list operations available for the Maps Resource Provider
+func (client AccountsClient) ListOperations(ctx context.Context) (result Operations, err error) {
+ req, err := client.ListOperationsPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListOperations", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListOperationsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListOperations", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListOperationsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListOperations", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListOperationsPreparer prepares the ListOperations request.
+func (client AccountsClient) ListOperationsPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2017-01-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Maps/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListOperationsSender sends the ListOperations request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) ListOperationsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListOperationsResponder handles the response to the ListOperations request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) ListOperationsResponder(resp *http.Response) (result Operations, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Move moves Maps Accounts from one ResourceGroup (or Subscription) to another
+// Parameters:
+// resourceGroupName - the name of the resource group that contains Maps Account to move.
+// moveRequest - the details of the Maps Account move.
+func (client AccountsClient) Move(ctx context.Context, resourceGroupName string, moveRequest AccountsMoveRequest) (result autorest.Response, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: moveRequest,
+ Constraints: []validation.Constraint{{Target: "moveRequest.TargetResourceGroup", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "moveRequest.ResourceIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("maps.AccountsClient", "Move", err.Error())
+ }
+
+ req, err := client.MovePreparer(ctx, resourceGroupName, moveRequest)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Move", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.MoveSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Move", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.MoveResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Move", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// MovePreparer prepares the Move request.
+func (client AccountsClient) MovePreparer(ctx context.Context, resourceGroupName string, moveRequest AccountsMoveRequest) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-01-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources", pathParameters),
+ autorest.WithJSON(moveRequest),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// MoveSender sends the Move request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) MoveSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// MoveResponder handles the response to the Move request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) MoveResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// RegenerateKeys regenerate either the primary or secondary key for use with the Maps APIs. The old key will stop
+// working immediately.
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+// accountName - the name of the Maps Account.
+// keySpecification - which key to regenerate: primary or secondary.
+func (client AccountsClient) RegenerateKeys(ctx context.Context, resourceGroupName string, accountName string, keySpecification KeySpecification) (result AccountKeys, err error) {
+ req, err := client.RegenerateKeysPreparer(ctx, resourceGroupName, accountName, keySpecification)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "RegenerateKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.RegenerateKeysSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "RegenerateKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.RegenerateKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "RegenerateKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// RegenerateKeysPreparer prepares the RegenerateKeys request.
+func (client AccountsClient) RegenerateKeysPreparer(ctx context.Context, resourceGroupName string, accountName string, keySpecification KeySpecification) (*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 = "2017-01-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/regenerateKey", pathParameters),
+ autorest.WithJSON(keySpecification),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RegenerateKeysSender sends the RegenerateKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) RegenerateKeysSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) RegenerateKeysResponder(resp *http.Response) (result AccountKeys, 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
+}
+
+// Update updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku and Tags.
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+// accountName - the name of the Maps Account.
+// mapsAccountUpdateParameters - the updated parameters for the Maps Account.
+func (client AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, mapsAccountUpdateParameters AccountUpdateParameters) (result Account, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, mapsAccountUpdateParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, mapsAccountUpdateParameters 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 = "2017-01-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}", pathParameters),
+ autorest.WithJSON(mapsAccountUpdateParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) UpdateResponder(resp *http.Response) (result Account, 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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2017-01-01-preview/maps/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2017-01-01-preview/maps/client.go
new file mode 100644
index 000000000..fb8fbf27e
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2017-01-01-preview/maps/client.go
@@ -0,0 +1,51 @@
+// Package maps implements the Azure ARM Maps service API version 2017-01-01-preview.
+//
+// Resource Provider
+package maps
+
+// 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 Maps
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Maps.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2017-01-01-preview/maps/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2017-01-01-preview/maps/models.go
new file mode 100644
index 000000000..8bea700af
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2017-01-01-preview/maps/models.go
@@ -0,0 +1,226 @@
+package maps
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+)
+
+// KeyType enumerates the values for key type.
+type KeyType string
+
+const (
+ // Primary ...
+ Primary KeyType = "primary"
+ // Secondary ...
+ Secondary KeyType = "secondary"
+)
+
+// PossibleKeyTypeValues returns an array of possible values for the KeyType const type.
+func PossibleKeyTypeValues() []KeyType {
+ return []KeyType{Primary, Secondary}
+}
+
+// Account an Azure resource which represents access to a suite of Maps REST APIs.
+type Account struct {
+ autorest.Response `json:"-"`
+ // Location - The location of the resource.
+ Location *string `json:"location,omitempty"`
+ // Tags - Gets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
+ Tags map[string]*string `json:"tags"`
+ // Sku - The SKU of this account.
+ Sku *Sku `json:"sku,omitempty"`
+ // ID - The fully qualified Maps Account resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the Maps Account, which is unique within a Resource Group.
+ Name *string `json:"name,omitempty"`
+ // Type - Azure resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Account.
+func (a Account) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if a.Location != nil {
+ objectMap["location"] = a.Location
+ }
+ if a.Tags != nil {
+ objectMap["tags"] = a.Tags
+ }
+ if a.Sku != nil {
+ objectMap["sku"] = a.Sku
+ }
+ if a.ID != nil {
+ objectMap["id"] = a.ID
+ }
+ if a.Name != nil {
+ objectMap["name"] = a.Name
+ }
+ if a.Type != nil {
+ objectMap["type"] = a.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AccountCreateParameters parameters used to create a new Maps Account.
+type AccountCreateParameters struct {
+ // Location - The location of the resource.
+ Location *string `json:"location,omitempty"`
+ // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
+ Tags map[string]*string `json:"tags"`
+ // Sku - The SKU of this account.
+ Sku *Sku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AccountCreateParameters.
+func (acp AccountCreateParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if acp.Location != nil {
+ objectMap["location"] = acp.Location
+ }
+ if acp.Tags != nil {
+ objectMap["tags"] = acp.Tags
+ }
+ if acp.Sku != nil {
+ objectMap["sku"] = acp.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// AccountKeys the set of keys which can be used to access the Maps REST APIs. Two keys are provided for key
+// rotation without interruption.
+type AccountKeys struct {
+ autorest.Response `json:"-"`
+ // ID - The full Azure resource identifier of the Maps Account.
+ ID *string `json:"id,omitempty"`
+ // PrimaryKey - The primary key for accessing the Maps REST APIs.
+ PrimaryKey *string `json:"primaryKey,omitempty"`
+ // SecondaryKey - The secondary key for accessing the Maps REST APIs.
+ SecondaryKey *string `json:"secondaryKey,omitempty"`
+}
+
+// Accounts a list of Maps Accounts.
+type Accounts struct {
+ autorest.Response `json:"-"`
+ // Value - a Maps Account.
+ Value *[]Account `json:"value,omitempty"`
+}
+
+// AccountsMoveRequest the description of what resources to move between resource groups.
+type AccountsMoveRequest struct {
+ // TargetResourceGroup - The name of the destination resource group.
+ TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
+ // ResourceIds - A list of resource names to move from the source resource group.
+ ResourceIds *[]string `json:"resourceIds,omitempty"`
+}
+
+// AccountUpdateParameters parameters used to update an existing Maps Account.
+type AccountUpdateParameters struct {
+ // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
+ Tags map[string]*string `json:"tags"`
+ // Sku - The SKU of this account.
+ Sku *Sku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AccountUpdateParameters.
+func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if aup.Tags != nil {
+ objectMap["tags"] = aup.Tags
+ }
+ if aup.Sku != nil {
+ objectMap["sku"] = aup.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// Error this object is returned when an error occurs in the Maps API
+type Error struct {
+ // Code - Error code.
+ Code *string `json:"code,omitempty"`
+ // Message - If available, a human readable description of the error.
+ Message *string `json:"message,omitempty"`
+ // Target - If available, the component generating the error.
+ Target *string `json:"target,omitempty"`
+ // Details - If available, a list of additional details about the error.
+ Details *[]ErrorDetailsItem `json:"details,omitempty"`
+}
+
+// ErrorDetailsItem ...
+type ErrorDetailsItem struct {
+ // Code - Error code.
+ Code *string `json:"code,omitempty"`
+ // Message - If available, a human readable description of the error.
+ Message *string `json:"message,omitempty"`
+ // Target - If available, the component generating the error.
+ Target *string `json:"target,omitempty"`
+}
+
+// KeySpecification whether the operation refers to the primary or secondary key.
+type KeySpecification struct {
+ // KeyType - Whether the operation refers to the primary or secondary key. Possible values include: 'Primary', 'Secondary'
+ KeyType KeyType `json:"keyType,omitempty"`
+}
+
+// Operations the set of operations available for Maps.
+type Operations struct {
+ autorest.Response `json:"-"`
+ // Value - An operation available for Maps.
+ Value *[]OperationsValueItem `json:"value,omitempty"`
+}
+
+// OperationsValueItem ...
+type OperationsValueItem struct {
+ // Name - Operation name: {provider}/{resource}/{operation}.
+ Name *string `json:"name,omitempty"`
+ // Display - The human-readable description of the operation.
+ Display *OperationsValueItemDisplay `json:"display,omitempty"`
+ // Origin - The origin of the operation.
+ Origin *string `json:"origin,omitempty"`
+}
+
+// OperationsValueItemDisplay the human-readable description of the operation.
+type OperationsValueItemDisplay struct {
+ // Provider - Service provider: Microsoft Maps.
+ Provider *string `json:"provider,omitempty"`
+ // Resource - Resource on which the operation is performed.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - The action that users can perform, based on their permission level.
+ Operation *string `json:"operation,omitempty"`
+ // Description - The description of the operation.
+ Description *string `json:"description,omitempty"`
+}
+
+// Resource an Azure resource
+type Resource struct {
+ // ID - The fully qualified Maps Account resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the Maps Account, which is unique within a Resource Group.
+ Name *string `json:"name,omitempty"`
+ // Type - Azure resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// Sku the SKU of the Maps Account.
+type Sku struct {
+ // Name - The name of the SKU, in standard format (such as S0).
+ Name *string `json:"name,omitempty"`
+ // Tier - Gets the sku tier. This is based on the SKU name.
+ Tier *string `json:"tier,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2017-01-01-preview/maps/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2017-01-01-preview/maps/version.go
new file mode 100644
index 000000000..67ee57bb8
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2017-01-01-preview/maps/version.go
@@ -0,0 +1,30 @@
+package maps
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " maps/2017-01-01-preview"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps/accounts.go
new file mode 100644
index 000000000..6f492cbc7
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps/accounts.go
@@ -0,0 +1,721 @@
+package maps
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// AccountsClient is the resource Provider
+type AccountsClient struct {
+ BaseClient
+}
+
+// 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)}
+}
+
+// CreateOrUpdate create or update a Maps Account. A Maps Account holds the keys which allow access to the Maps REST
+// APIs.
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+// accountName - the name of the Maps Account.
+// mapsAccountCreateParameters - the new or updated parameters for the Maps Account.
+func (client AccountsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, mapsAccountCreateParameters AccountCreateParameters) (result Account, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: mapsAccountCreateParameters,
+ Constraints: []validation.Constraint{{Target: "mapsAccountCreateParameters.Location", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "mapsAccountCreateParameters.Sku", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "mapsAccountCreateParameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("maps.AccountsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, mapsAccountCreateParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.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, "maps.AccountsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client AccountsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, mapsAccountCreateParameters AccountCreateParameters) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}", pathParameters),
+ autorest.WithJSON(mapsAccountCreateParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) CreateOrUpdateResponder(resp *http.Response) (result Account, 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 a Maps Account.
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+// accountName - the name of the Maps Account.
+func (client AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client AccountsClient) DeletePreparer(ctx context.Context, 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 = "2018-05-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.Maps/accounts/{accountName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get get a Maps Account.
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+// accountName - the name of the Maps Account.
+func (client AccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string) (result Account, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.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, "maps.AccountsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client AccountsClient) GetPreparer(ctx context.Context, 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 = "2018-05-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.Maps/accounts/{accountName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) GetResponder(resp *http.Response) (result Account, 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 get all Maps Accounts in a Resource Group
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result Accounts, err error) {
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.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, "maps.AccountsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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.Maps/accounts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (result Accounts, 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 get all Maps Accounts in a Subscription
+func (client AccountsClient) ListBySubscription(ctx context.Context) (result Accounts, err error) {
+ req, err := client.ListBySubscriptionPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListBySubscription", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client AccountsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Maps/accounts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) ListBySubscriptionResponder(resp *http.Response) (result Accounts, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListKeys get the keys to use with the Maps APIs. A key is used to authenticate and authorize access to the Maps REST
+// APIs. Only one key is needed at a time; two are given to provide seamless key regeneration.
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+// accountName - the name of the Maps Account.
+func (client AccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result AccountKeys, err error) {
+ req, err := client.ListKeysPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListKeysSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListKeysPreparer prepares the ListKeys request.
+func (client AccountsClient) ListKeysPreparer(ctx context.Context, 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 = "2018-05-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.Maps/accounts/{accountName}/listKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListKeysSender sends the ListKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) ListKeysSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListKeysResponder handles the response to the ListKeys request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) ListKeysResponder(resp *http.Response) (result AccountKeys, 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
+}
+
+// ListOperations list operations available for the Maps Resource Provider
+func (client AccountsClient) ListOperations(ctx context.Context) (result Operations, err error) {
+ req, err := client.ListOperationsPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListOperations", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListOperationsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListOperations", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListOperationsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "ListOperations", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListOperationsPreparer prepares the ListOperations request.
+func (client AccountsClient) ListOperationsPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Maps/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListOperationsSender sends the ListOperations request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) ListOperationsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListOperationsResponder handles the response to the ListOperations request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) ListOperationsResponder(resp *http.Response) (result Operations, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Move moves Maps Accounts from one ResourceGroup (or Subscription) to another
+// Parameters:
+// resourceGroupName - the name of the resource group that contains Maps Account to move.
+// moveRequest - the details of the Maps Account move.
+func (client AccountsClient) Move(ctx context.Context, resourceGroupName string, moveRequest AccountsMoveRequest) (result autorest.Response, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: moveRequest,
+ Constraints: []validation.Constraint{{Target: "moveRequest.TargetResourceGroup", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "moveRequest.ResourceIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("maps.AccountsClient", "Move", err.Error())
+ }
+
+ req, err := client.MovePreparer(ctx, resourceGroupName, moveRequest)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Move", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.MoveSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Move", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.MoveResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Move", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// MovePreparer prepares the Move request.
+func (client AccountsClient) MovePreparer(ctx context.Context, resourceGroupName string, moveRequest AccountsMoveRequest) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources", pathParameters),
+ autorest.WithJSON(moveRequest),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// MoveSender sends the Move request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) MoveSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// MoveResponder handles the response to the Move request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) MoveResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// RegenerateKeys regenerate either the primary or secondary key for use with the Maps APIs. The old key will stop
+// working immediately.
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+// accountName - the name of the Maps Account.
+// keySpecification - which key to regenerate: primary or secondary.
+func (client AccountsClient) RegenerateKeys(ctx context.Context, resourceGroupName string, accountName string, keySpecification KeySpecification) (result AccountKeys, err error) {
+ req, err := client.RegenerateKeysPreparer(ctx, resourceGroupName, accountName, keySpecification)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "RegenerateKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.RegenerateKeysSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "RegenerateKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.RegenerateKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "RegenerateKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// RegenerateKeysPreparer prepares the RegenerateKeys request.
+func (client AccountsClient) RegenerateKeysPreparer(ctx context.Context, resourceGroupName string, accountName string, keySpecification KeySpecification) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/regenerateKey", pathParameters),
+ autorest.WithJSON(keySpecification),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RegenerateKeysSender sends the RegenerateKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) RegenerateKeysSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) RegenerateKeysResponder(resp *http.Response) (result AccountKeys, 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
+}
+
+// Update updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku and Tags.
+// Parameters:
+// resourceGroupName - the name of the Azure Resource Group.
+// accountName - the name of the Maps Account.
+// mapsAccountUpdateParameters - the updated parameters for the Maps Account.
+func (client AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, mapsAccountUpdateParameters AccountUpdateParameters) (result Account, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, mapsAccountUpdateParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "maps.AccountsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, mapsAccountUpdateParameters 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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}", pathParameters),
+ autorest.WithJSON(mapsAccountUpdateParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) UpdateResponder(resp *http.Response) (result Account, 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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps/client.go
new file mode 100644
index 000000000..55340f47f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps/client.go
@@ -0,0 +1,51 @@
+// Package maps implements the Azure ARM Maps service API version 2018-05-01.
+//
+// Resource Provider
+package maps
+
+// 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 Maps
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Maps.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps/models.go
new file mode 100644
index 000000000..8bea700af
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps/models.go
@@ -0,0 +1,226 @@
+package maps
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+)
+
+// KeyType enumerates the values for key type.
+type KeyType string
+
+const (
+ // Primary ...
+ Primary KeyType = "primary"
+ // Secondary ...
+ Secondary KeyType = "secondary"
+)
+
+// PossibleKeyTypeValues returns an array of possible values for the KeyType const type.
+func PossibleKeyTypeValues() []KeyType {
+ return []KeyType{Primary, Secondary}
+}
+
+// Account an Azure resource which represents access to a suite of Maps REST APIs.
+type Account struct {
+ autorest.Response `json:"-"`
+ // Location - The location of the resource.
+ Location *string `json:"location,omitempty"`
+ // Tags - Gets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
+ Tags map[string]*string `json:"tags"`
+ // Sku - The SKU of this account.
+ Sku *Sku `json:"sku,omitempty"`
+ // ID - The fully qualified Maps Account resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the Maps Account, which is unique within a Resource Group.
+ Name *string `json:"name,omitempty"`
+ // Type - Azure resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Account.
+func (a Account) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if a.Location != nil {
+ objectMap["location"] = a.Location
+ }
+ if a.Tags != nil {
+ objectMap["tags"] = a.Tags
+ }
+ if a.Sku != nil {
+ objectMap["sku"] = a.Sku
+ }
+ if a.ID != nil {
+ objectMap["id"] = a.ID
+ }
+ if a.Name != nil {
+ objectMap["name"] = a.Name
+ }
+ if a.Type != nil {
+ objectMap["type"] = a.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AccountCreateParameters parameters used to create a new Maps Account.
+type AccountCreateParameters struct {
+ // Location - The location of the resource.
+ Location *string `json:"location,omitempty"`
+ // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
+ Tags map[string]*string `json:"tags"`
+ // Sku - The SKU of this account.
+ Sku *Sku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AccountCreateParameters.
+func (acp AccountCreateParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if acp.Location != nil {
+ objectMap["location"] = acp.Location
+ }
+ if acp.Tags != nil {
+ objectMap["tags"] = acp.Tags
+ }
+ if acp.Sku != nil {
+ objectMap["sku"] = acp.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// AccountKeys the set of keys which can be used to access the Maps REST APIs. Two keys are provided for key
+// rotation without interruption.
+type AccountKeys struct {
+ autorest.Response `json:"-"`
+ // ID - The full Azure resource identifier of the Maps Account.
+ ID *string `json:"id,omitempty"`
+ // PrimaryKey - The primary key for accessing the Maps REST APIs.
+ PrimaryKey *string `json:"primaryKey,omitempty"`
+ // SecondaryKey - The secondary key for accessing the Maps REST APIs.
+ SecondaryKey *string `json:"secondaryKey,omitempty"`
+}
+
+// Accounts a list of Maps Accounts.
+type Accounts struct {
+ autorest.Response `json:"-"`
+ // Value - a Maps Account.
+ Value *[]Account `json:"value,omitempty"`
+}
+
+// AccountsMoveRequest the description of what resources to move between resource groups.
+type AccountsMoveRequest struct {
+ // TargetResourceGroup - The name of the destination resource group.
+ TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
+ // ResourceIds - A list of resource names to move from the source resource group.
+ ResourceIds *[]string `json:"resourceIds,omitempty"`
+}
+
+// AccountUpdateParameters parameters used to update an existing Maps Account.
+type AccountUpdateParameters struct {
+ // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
+ Tags map[string]*string `json:"tags"`
+ // Sku - The SKU of this account.
+ Sku *Sku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AccountUpdateParameters.
+func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if aup.Tags != nil {
+ objectMap["tags"] = aup.Tags
+ }
+ if aup.Sku != nil {
+ objectMap["sku"] = aup.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// Error this object is returned when an error occurs in the Maps API
+type Error struct {
+ // Code - Error code.
+ Code *string `json:"code,omitempty"`
+ // Message - If available, a human readable description of the error.
+ Message *string `json:"message,omitempty"`
+ // Target - If available, the component generating the error.
+ Target *string `json:"target,omitempty"`
+ // Details - If available, a list of additional details about the error.
+ Details *[]ErrorDetailsItem `json:"details,omitempty"`
+}
+
+// ErrorDetailsItem ...
+type ErrorDetailsItem struct {
+ // Code - Error code.
+ Code *string `json:"code,omitempty"`
+ // Message - If available, a human readable description of the error.
+ Message *string `json:"message,omitempty"`
+ // Target - If available, the component generating the error.
+ Target *string `json:"target,omitempty"`
+}
+
+// KeySpecification whether the operation refers to the primary or secondary key.
+type KeySpecification struct {
+ // KeyType - Whether the operation refers to the primary or secondary key. Possible values include: 'Primary', 'Secondary'
+ KeyType KeyType `json:"keyType,omitempty"`
+}
+
+// Operations the set of operations available for Maps.
+type Operations struct {
+ autorest.Response `json:"-"`
+ // Value - An operation available for Maps.
+ Value *[]OperationsValueItem `json:"value,omitempty"`
+}
+
+// OperationsValueItem ...
+type OperationsValueItem struct {
+ // Name - Operation name: {provider}/{resource}/{operation}.
+ Name *string `json:"name,omitempty"`
+ // Display - The human-readable description of the operation.
+ Display *OperationsValueItemDisplay `json:"display,omitempty"`
+ // Origin - The origin of the operation.
+ Origin *string `json:"origin,omitempty"`
+}
+
+// OperationsValueItemDisplay the human-readable description of the operation.
+type OperationsValueItemDisplay struct {
+ // Provider - Service provider: Microsoft Maps.
+ Provider *string `json:"provider,omitempty"`
+ // Resource - Resource on which the operation is performed.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - The action that users can perform, based on their permission level.
+ Operation *string `json:"operation,omitempty"`
+ // Description - The description of the operation.
+ Description *string `json:"description,omitempty"`
+}
+
+// Resource an Azure resource
+type Resource struct {
+ // ID - The fully qualified Maps Account resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the Maps Account, which is unique within a Resource Group.
+ Name *string `json:"name,omitempty"`
+ // Type - Azure resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// Sku the SKU of the Maps Account.
+type Sku struct {
+ // Name - The name of the SKU, in standard format (such as S0).
+ Name *string `json:"name,omitempty"`
+ // Tier - Gets the sku tier. This is based on the SKU name.
+ Tier *string `json:"tier,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps/version.go
new file mode 100644
index 000000000..13a5ddd30
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps/version.go
@@ -0,0 +1,30 @@
+package maps
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " maps/2018-05-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/checknameavailability.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/checknameavailability.go
index 5260dd2a4..aff51201d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/checknameavailability.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/checknameavailability.go
@@ -26,8 +26,8 @@ import (
)
// CheckNameAvailabilityClient is the the Microsoft Azure management API provides create, read, update, and delete
-// functionality for Azure MySQL resources including servers, databases, firewall rules, log files and configurations
-// with new business model.
+// functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and
+// configurations with new business model.
type CheckNameAvailabilityClient struct {
BaseClient
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/client.go
index 296701a8b..97fc51c4a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/client.go
@@ -1,7 +1,7 @@
// Package mysql implements the Azure ARM Mysql service API version 2017-12-01.
//
// The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources
-// including servers, databases, firewall rules, log files and configurations with new business model.
+// including servers, databases, firewall rules, VNET rules, log files and configurations with new business model.
package mysql
// Copyright (c) Microsoft and contributors. All rights reserved.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/configurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/configurations.go
index f0b7b5b0e..c2d669c9d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/configurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/configurations.go
@@ -25,8 +25,8 @@ import (
)
// ConfigurationsClient is the the Microsoft Azure management API provides create, read, update, and delete
-// functionality for Azure MySQL resources including servers, databases, firewall rules, log files and configurations
-// with new business model.
+// functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and
+// configurations with new business model.
type ConfigurationsClient struct {
BaseClient
}
@@ -91,15 +91,17 @@ func (client ConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future ConfigurationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/databases.go
index 35f97fe54..d65948373 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/databases.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/databases.go
@@ -25,8 +25,8 @@ import (
)
// DatabasesClient is the the Microsoft Azure management API provides create, read, update, and delete functionality
-// for Azure MySQL resources including servers, databases, firewall rules, log files and configurations with new
-// business model.
+// for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations
+// with new business model.
type DatabasesClient struct {
BaseClient
}
@@ -91,15 +91,17 @@ func (client DatabasesClient) CreateOrUpdatePreparer(ctx context.Context, resour
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future DatabasesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -163,15 +165,17 @@ func (client DatabasesClient) DeletePreparer(ctx context.Context, resourceGroupN
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) DeleteSender(req *http.Request) (future DatabasesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/firewallrules.go
index 1d2a04d2a..528aeaa2f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/firewallrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/firewallrules.go
@@ -26,8 +26,8 @@ import (
)
// FirewallRulesClient is the the Microsoft Azure management API provides create, read, update, and delete
-// functionality for Azure MySQL resources including servers, databases, firewall rules, log files and configurations
-// with new business model.
+// functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and
+// configurations with new business model.
type FirewallRulesClient struct {
BaseClient
}
@@ -103,15 +103,17 @@ func (client FirewallRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallRulesClient) CreateOrUpdateSender(req *http.Request) (future FirewallRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -175,15 +177,17 @@ func (client FirewallRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallRulesClient) DeleteSender(req *http.Request) (future FirewallRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/locationbasedperformancetier.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/locationbasedperformancetier.go
index 7b056f0aa..16c645ad8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/locationbasedperformancetier.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/locationbasedperformancetier.go
@@ -25,8 +25,8 @@ import (
)
// LocationBasedPerformanceTierClient is the the Microsoft Azure management API provides create, read, update, and
-// delete functionality for Azure MySQL resources including servers, databases, firewall rules, log files and
-// configurations with new business model.
+// delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files
+// and configurations with new business model.
type LocationBasedPerformanceTierClient struct {
BaseClient
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/logfiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/logfiles.go
index 15b1ad921..ef252ba46 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/logfiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/logfiles.go
@@ -25,8 +25,8 @@ import (
)
// LogFilesClient is the the Microsoft Azure management API provides create, read, update, and delete functionality for
-// Azure MySQL resources including servers, databases, firewall rules, log files and configurations with new business
-// model.
+// Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with
+// new business model.
type LogFilesClient struct {
BaseClient
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/models.go
index 7c8afc8a4..2511603f4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/models.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
"net/http"
)
@@ -140,6 +141,27 @@ func PossibleSslEnforcementEnumValues() []SslEnforcementEnum {
return []SslEnforcementEnum{SslEnforcementEnumDisabled, SslEnforcementEnumEnabled}
}
+// VirtualNetworkRuleState enumerates the values for virtual network rule state.
+type VirtualNetworkRuleState string
+
+const (
+ // Deleting ...
+ Deleting VirtualNetworkRuleState = "Deleting"
+ // Initializing ...
+ Initializing VirtualNetworkRuleState = "Initializing"
+ // InProgress ...
+ InProgress VirtualNetworkRuleState = "InProgress"
+ // Ready ...
+ Ready VirtualNetworkRuleState = "Ready"
+ // Unknown ...
+ Unknown VirtualNetworkRuleState = "Unknown"
+)
+
+// PossibleVirtualNetworkRuleStateValues returns an array of possible values for the VirtualNetworkRuleState const type.
+func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState {
+ return []VirtualNetworkRuleState{Deleting, Initializing, InProgress, Ready, Unknown}
+}
+
// Configuration represents a Configuration.
type Configuration struct {
autorest.Response `json:"-"`
@@ -249,12 +271,11 @@ type ConfigurationProperties struct {
// operation.
type ConfigurationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConfigurationsCreateOrUpdateFuture) Result(client ConfigurationsClient) (c Configuration, err error) {
+func (future *ConfigurationsCreateOrUpdateFuture) Result(client ConfigurationsClient) (c Configuration, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -262,34 +283,15 @@ func (future ConfigurationsCreateOrUpdateFuture) Result(client ConfigurationsCli
return
}
if !done {
- return c, azure.NewAsyncOpIncompleteError("mysql.ConfigurationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- c, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.ConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("mysql.ConfigurationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.CreateOrUpdateResponder(c.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "mysql.ConfigurationsCreateOrUpdateFuture", "Result", c.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.ConfigurationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- c, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.ConfigurationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -395,12 +397,11 @@ type DatabaseProperties struct {
// operation.
type DatabasesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
+func (future *DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -408,34 +409,15 @@ func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Da
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("mysql.DatabasesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.DatabasesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("mysql.DatabasesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "mysql.DatabasesCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.DatabasesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.DatabasesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -443,12 +425,11 @@ func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Da
// DatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesDeleteFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
+func (future *DatabasesDeleteFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -456,35 +437,10 @@ func (future DatabasesDeleteFuture) Result(client DatabasesClient) (ar autorest.
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("mysql.DatabasesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.DatabasesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("mysql.DatabasesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.DatabasesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.DatabasesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -589,12 +545,11 @@ type FirewallRuleProperties struct {
// operation.
type FirewallRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FirewallRulesCreateOrUpdateFuture) Result(client FirewallRulesClient) (fr FirewallRule, err error) {
+func (future *FirewallRulesCreateOrUpdateFuture) Result(client FirewallRulesClient) (fr FirewallRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -602,34 +557,15 @@ func (future FirewallRulesCreateOrUpdateFuture) Result(client FirewallRulesClien
return
}
if !done {
- return fr, azure.NewAsyncOpIncompleteError("mysql.FirewallRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.FirewallRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("mysql.FirewallRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fr.Response.Response, err = future.GetResult(sender); err == nil && fr.Response.Response.StatusCode != http.StatusNoContent {
+ fr, err = client.CreateOrUpdateResponder(fr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "mysql.FirewallRulesCreateOrUpdateFuture", "Result", fr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.FirewallRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- fr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.FirewallRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -637,12 +573,11 @@ func (future FirewallRulesCreateOrUpdateFuture) Result(client FirewallRulesClien
// FirewallRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type FirewallRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FirewallRulesDeleteFuture) Result(client FirewallRulesClient) (ar autorest.Response, err error) {
+func (future *FirewallRulesDeleteFuture) Result(client FirewallRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -650,35 +585,10 @@ func (future FirewallRulesDeleteFuture) Result(client FirewallRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("mysql.FirewallRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.FirewallRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("mysql.FirewallRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.FirewallRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.FirewallRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1430,12 +1340,11 @@ func (spfr ServerPropertiesForRestore) AsBasicServerPropertiesForCreate() (Basic
// ServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersCreateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersCreateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1443,34 +1352,15 @@ func (future ServersCreateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("mysql.ServersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.ServersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("mysql.ServersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "mysql.ServersCreateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.ServersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.ServersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1478,12 +1368,11 @@ func (future ServersCreateFuture) Result(client ServersClient) (s Server, err er
// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1491,47 +1380,21 @@ func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("mysql.ServersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.ServersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("mysql.ServersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.ServersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.ServersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1539,34 +1402,15 @@ func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("mysql.ServersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.ServersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("mysql.ServersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "mysql.ServersUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.ServersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "mysql.ServersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1708,3 +1552,249 @@ func (tr TrackedResource) MarshalJSON() ([]byte, error) {
}
return json.Marshal(objectMap)
}
+
+// VirtualNetworkRule a virtual network rule.
+type VirtualNetworkRule struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkRuleProperties - Resource properties.
+ *VirtualNetworkRuleProperties `json:"properties,omitempty"`
+ // ID - Resource ID
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkRule.
+func (vnr VirtualNetworkRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vnr.VirtualNetworkRuleProperties != nil {
+ objectMap["properties"] = vnr.VirtualNetworkRuleProperties
+ }
+ if vnr.ID != nil {
+ objectMap["id"] = vnr.ID
+ }
+ if vnr.Name != nil {
+ objectMap["name"] = vnr.Name
+ }
+ if vnr.Type != nil {
+ objectMap["type"] = vnr.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkRule struct.
+func (vnr *VirtualNetworkRule) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualNetworkRuleProperties VirtualNetworkRuleProperties
+ err = json.Unmarshal(*v, &virtualNetworkRuleProperties)
+ if err != nil {
+ return err
+ }
+ vnr.VirtualNetworkRuleProperties = &virtualNetworkRuleProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vnr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vnr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vnr.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkRuleListResult a list of virtual network rules.
+type VirtualNetworkRuleListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of results.
+ Value *[]VirtualNetworkRule `json:"value,omitempty"`
+ // NextLink - Link to retrieve next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualNetworkRuleListResultIterator provides access to a complete listing of VirtualNetworkRule values.
+type VirtualNetworkRuleListResultIterator struct {
+ i int
+ page VirtualNetworkRuleListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualNetworkRuleListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkRuleListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualNetworkRuleListResultIterator) Response() VirtualNetworkRuleListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualNetworkRuleListResultIterator) Value() VirtualNetworkRule {
+ if !iter.page.NotDone() {
+ return VirtualNetworkRule{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool {
+ return vnrlr.Value == nil || len(*vnrlr.Value) == 0
+}
+
+// virtualNetworkRuleListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer() (*http.Request, error) {
+ if vnrlr.NextLink == nil || len(to.String(vnrlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnrlr.NextLink)))
+}
+
+// VirtualNetworkRuleListResultPage contains a page of VirtualNetworkRule values.
+type VirtualNetworkRuleListResultPage struct {
+ fn func(VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)
+ vnrlr VirtualNetworkRuleListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualNetworkRuleListResultPage) Next() error {
+ next, err := page.fn(page.vnrlr)
+ if err != nil {
+ return err
+ }
+ page.vnrlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkRuleListResultPage) NotDone() bool {
+ return !page.vnrlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkRuleListResultPage) Response() VirtualNetworkRuleListResult {
+ return page.vnrlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkRuleListResultPage) Values() []VirtualNetworkRule {
+ if page.vnrlr.IsEmpty() {
+ return nil
+ }
+ return *page.vnrlr.Value
+}
+
+// VirtualNetworkRuleProperties properties of a virtual network rule.
+type VirtualNetworkRuleProperties struct {
+ // VirtualNetworkSubnetID - The ARM resource id of the virtual network subnet.
+ VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"`
+ // IgnoreMissingVnetServiceEndpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
+ IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"`
+ // State - Virtual Network Rule State. Possible values include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown'
+ State VirtualNetworkRuleState `json:"state,omitempty"`
+}
+
+// VirtualNetworkRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkRulesCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetworkRulesClient) (vnr VirtualNetworkRule, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("mysql.VirtualNetworkRulesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnr.Response.Response, err = future.GetResult(sender); err == nil && vnr.Response.Response.StatusCode != http.StatusNoContent {
+ vnr, err = client.CreateOrUpdateResponder(vnr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", vnr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualNetworkRulesDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkRulesDeleteFuture) Result(client VirtualNetworkRulesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("mysql.VirtualNetworkRulesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/operations.go
index 22a04483f..6c36b558e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/operations.go
@@ -25,8 +25,8 @@ import (
)
// OperationsClient is the the Microsoft Azure management API provides create, read, update, and delete functionality
-// for Azure MySQL resources including servers, databases, firewall rules, log files and configurations with new
-// business model.
+// for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations
+// with new business model.
type OperationsClient struct {
BaseClient
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/servers.go
index c64bcec73..66b2f6678 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/servers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/servers.go
@@ -26,8 +26,8 @@ import (
)
// ServersClient is the the Microsoft Azure management API provides create, read, update, and delete functionality for
-// Azure MySQL resources including servers, databases, firewall rules, log files and configurations with new business
-// model.
+// Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with
+// new business model.
type ServersClient struct {
BaseClient
}
@@ -101,15 +101,17 @@ func (client ServersClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) CreateSender(req *http.Request) (future ServersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -171,15 +173,17 @@ func (client ServersClient) DeletePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -440,15 +444,17 @@ func (client ServersClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/virtualnetworkrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/virtualnetworkrules.go
new file mode 100644
index 000000000..99b70e42d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/virtualnetworkrules.go
@@ -0,0 +1,366 @@
+package mysql
+
+// 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 (
+ "context"
+ "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 Microsoft Azure management API provides create, read, update, and delete
+// functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and
+// configurations with new business model.
+type VirtualNetworkRulesClient struct {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// virtualNetworkRuleName - the name of the virtual network rule.
+// parameters - the requested virtual Network Rule Resource state.
+func (client VirtualNetworkRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule) (result VirtualNetworkRulesCreateOrUpdateFuture, err error) {
+ 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 {
+ return result, validation.NewError("mysql.VirtualNetworkRulesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualNetworkRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule) (*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 = "2017-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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) (future VirtualNetworkRulesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the virtual network rule with the given name.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// virtualNetworkRuleName - the name of the virtual network rule.
+func (client VirtualNetworkRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRulesDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualNetworkRulesClient) DeletePreparer(ctx context.Context, 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 = "2017-12-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.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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) (future VirtualNetworkRulesDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// virtualNetworkRuleName - the name of the virtual network rule.
+func (client VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRule, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mysql.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, "mysql.VirtualNetworkRulesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualNetworkRulesClient) GetPreparer(ctx context.Context, 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 = "2017-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.DBforMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+func (client VirtualNetworkRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultPage, err error) {
+ result.fn = client.listByServerNextResults
+ req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesClient", "ListByServer", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByServerSender(req)
+ if err != nil {
+ result.vnrlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesClient", "ListByServer", resp, "Failure sending request")
+ return
+ }
+
+ result.vnrlr, err = client.ListByServerResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesClient", "ListByServer", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByServerPreparer prepares the ListByServer request.
+func (client VirtualNetworkRulesClient) ListByServerPreparer(ctx context.Context, 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-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.DBforMySQL/servers/{serverName}/virtualNetworkRules", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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, "mysql.VirtualNetworkRulesClient", "listByServerNextResults", 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, "mysql.VirtualNetworkRulesClient", "listByServerNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByServerResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesClient", "listByServerNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByServerComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualNetworkRulesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultIterator, err error) {
+ result.page, err = client.ListByServer(ctx, resourceGroupName, serverName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/applicationgateways.go
index dd4757ae8..8a58abf4f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/applicationgateways.go
@@ -86,15 +86,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -473,15 +477,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -541,15 +547,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go
index e9b3f1027..1422f9216 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitpeerings.go
index 84e7d0b2c..8dd16d9f6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitpeerings.go
@@ -88,15 +88,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuits.go
index 1b6246cad..8fb0d036f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/interfaces.go
index f989d7bc7..c04fd87fc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/loadbalancers.go
index c2f0b9768..ee6656e66 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/localnetworkgateways.go
index 4e7d86fcc..79eeb0d8f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/localnetworkgateways.go
@@ -86,15 +86,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/models.go
index 4efbedb85..ea0d516db 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/models.go
@@ -1621,12 +1621,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1634,34 +1633,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1670,12 +1650,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1683,35 +1662,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1821,12 +1775,11 @@ type ApplicationGatewaySslCertificatePropertiesFormat struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1834,35 +1787,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1870,12 +1798,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1883,35 +1810,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2517,12 +2419,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2530,34 +2431,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2566,12 +2448,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2579,35 +2460,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2944,12 +2800,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2957,34 +2812,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2993,12 +2829,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3006,35 +2841,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3177,12 +2987,11 @@ func (page ExpressRouteCircuitsArpTableListResultPage) Values() []ExpressRouteCi
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3190,34 +2999,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3226,12 +3016,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3239,35 +3028,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4259,8 +4023,10 @@ type InterfaceIPConfigurationPropertiesFormat struct {
// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
Subnet *Subnet `json:"subnet,omitempty"`
- PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
- ProvisioningState *string `json:"provisioningState,omitempty"`
+ // Primary - Gets whether this is a primary customer address on the network interface.
+ Primary *bool `json:"primary,omitempty"`
+ PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
+ ProvisioningState *string `json:"provisioningState,omitempty"`
}
// InterfaceListResult response for the ListNetworkInterface API service call.
@@ -4391,12 +4157,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4404,34 +4169,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4439,12 +4185,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4452,35 +4197,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4829,12 +4549,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4842,34 +4561,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4877,12 +4577,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4890,35 +4589,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5269,12 +4943,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5282,34 +4955,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5318,12 +4972,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5331,35 +4984,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5690,12 +5318,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5703,34 +5330,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5739,12 +5347,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5752,35 +5359,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6135,12 +5717,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6148,34 +5729,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6183,12 +5745,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6196,35 +5757,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6467,12 +6003,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6480,34 +6015,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6515,12 +6031,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6528,35 +6043,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6805,12 +6295,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6818,34 +6307,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6853,12 +6323,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6866,35 +6335,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7110,12 +6554,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7123,34 +6566,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7158,12 +6582,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7171,35 +6594,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7410,12 +6808,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7423,34 +6820,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7458,12 +6836,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7471,35 +6848,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8136,12 +7488,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8149,34 +7500,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8185,12 +7517,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8198,35 +7529,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8234,12 +7540,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8247,34 +7552,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8283,12 +7569,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8296,34 +7581,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8552,12 +7818,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8565,34 +7830,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8601,12 +7847,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8614,35 +7859,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8660,12 +7880,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8673,34 +7892,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8825,12 +8025,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8838,34 +8037,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8874,12 +8054,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8887,35 +8066,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/publicipaddresses.go
index f733de4f0..89202698b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routes.go
index c8c41ea1f..e1d39c23b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routetables.go
index 74097ca5b..7a28b433e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securitygroups.go
index 42dd80275..62b190391 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securitygroups.go
@@ -86,15 +86,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securityrules.go
index 1040fe1a3..145092ec2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/securityrules.go
@@ -98,15 +98,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/subnets.go
index 886a65126..2eecaa850 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgatewayconnections.go
index 67456bf52..687b8f3c0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgatewayconnections.go
@@ -87,15 +87,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -156,15 +158,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -459,15 +463,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -534,15 +540,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgateways.go
index 191c7e675..c2f5368ef 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworkgateways.go
@@ -86,15 +86,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -458,15 +462,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworks.go
index 0ad02f2a0..35ee18d69 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/virtualnetworks.go
@@ -86,15 +86,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/applicationgateways.go
index 9e536bf16..9ff8384ac 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/applicationgateways.go
@@ -86,15 +86,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -474,15 +478,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -543,15 +549,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/expressroutecircuitauthorizations.go
index 4afde3b39..591176cb2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -163,15 +165,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/expressroutecircuitpeerings.go
index 07ce797ea..598ccc19c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/expressroutecircuitpeerings.go
@@ -88,15 +88,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/expressroutecircuits.go
index 6f4b5d441..d95dd65a3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -616,15 +620,17 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -690,15 +696,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -764,15 +772,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/interfaces.go
index a8cd4e3f0..4e37fac18 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/loadbalancers.go
index 39f904881..9bf3e9e37 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/localnetworkgateways.go
index e8a32a64a..e2cf82388 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/localnetworkgateways.go
@@ -88,15 +88,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/models.go
index 8a1ac34b3..b33d10cc9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/models.go
@@ -1632,12 +1632,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1645,34 +1644,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1681,12 +1661,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1694,35 +1673,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1832,12 +1786,11 @@ type ApplicationGatewaySslCertificatePropertiesFormat struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1845,35 +1798,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1881,12 +1809,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1894,35 +1821,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2531,12 +2433,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2544,34 +2445,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2580,12 +2462,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2593,35 +2474,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2958,12 +2814,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2971,34 +2826,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3007,12 +2843,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3020,35 +2855,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3115,12 +2925,11 @@ type ExpressRouteCircuitsArpTableListResult struct {
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3128,34 +2937,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3164,12 +2954,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3177,35 +2966,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3233,12 +2997,11 @@ type ExpressRouteCircuitSku struct {
// long-running operation.
type ExpressRouteCircuitsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3246,34 +3009,15 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3282,12 +3026,11 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3295,34 +3038,15 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3331,12 +3055,11 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
// long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3344,34 +3067,15 @@ func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client Exp
return
}
if !done {
- return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4301,12 +4005,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4314,34 +4017,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4349,12 +4033,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4362,35 +4045,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4739,12 +4397,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4752,34 +4409,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4787,12 +4425,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4800,35 +4437,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5179,12 +4791,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5192,34 +4803,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5228,12 +4820,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5241,35 +4832,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5600,12 +5166,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5613,34 +5178,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5649,12 +5195,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5662,35 +5207,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6047,12 +5567,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6060,34 +5579,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6095,12 +5595,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6108,35 +5607,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6379,12 +5853,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6392,34 +5865,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6427,12 +5881,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6440,35 +5893,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6717,12 +6145,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6730,34 +6157,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6765,12 +6173,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6778,35 +6185,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7022,12 +6404,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7035,34 +6416,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7070,12 +6432,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7083,35 +6444,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7322,12 +6658,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7335,34 +6670,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7370,12 +6686,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7383,35 +6698,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7953,12 +7243,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7966,34 +7255,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8002,12 +7272,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8015,35 +7284,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8051,12 +7295,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8064,34 +7307,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8100,12 +7324,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8113,34 +7336,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8369,12 +7573,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8382,34 +7585,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8418,12 +7602,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8431,35 +7614,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8477,12 +7635,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8490,34 +7647,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8642,12 +7780,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8655,34 +7792,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8691,12 +7809,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8704,35 +7821,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/publicipaddresses.go
index 2c6aac4a9..1ca5d2852 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/routes.go
index b8ed455ff..18d9d63a1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/routetables.go
index 875af2cd3..97686f248 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/securitygroups.go
index c91c11053..074daf7df 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/securitygroups.go
@@ -87,15 +87,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -156,15 +158,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/securityrules.go
index ce02fbd7e..50323a579 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/securityrules.go
@@ -99,15 +99,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/subnets.go
index 5ff5e1524..cc9051749 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/virtualnetworkgatewayconnections.go
index e5a8c6ae6..b5f42d946 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/virtualnetworkgatewayconnections.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -463,15 +467,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -538,15 +544,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/virtualnetworkgateways.go
index cbbaadabd..3f6f06824 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/virtualnetworkgateways.go
@@ -88,15 +88,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -464,15 +468,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/virtualnetworks.go
index 210b9c18c..3c1587505 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-03-30/network/virtualnetworks.go
@@ -86,15 +86,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/applicationgateways.go
index e5108e08f..fc59fb645 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/applicationgateways.go
@@ -86,15 +86,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -474,15 +478,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -543,15 +549,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/expressroutecircuitauthorizations.go
index 86f30474d..7216115a2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/expressroutecircuitauthorizations.go
@@ -92,15 +92,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -164,15 +166,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/expressroutecircuitpeerings.go
index 7f0da217e..878cbad6d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/expressroutecircuitpeerings.go
@@ -88,15 +88,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/expressroutecircuits.go
index 28344fd5c..3fc7210a8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -616,15 +620,17 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -690,15 +696,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -764,15 +772,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/interfaces.go
index 3d8fcea49..965fd7235 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -295,15 +299,17 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -624,15 +630,17 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/loadbalancers.go
index 60733c0dd..cfdb7eb5a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/localnetworkgateways.go
index ebc05fe2e..6bd70fc5f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/localnetworkgateways.go
@@ -88,15 +88,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/models.go
index dac6d5661..a674e8ad7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/models.go
@@ -1799,12 +1799,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1812,34 +1811,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1848,12 +1828,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1861,35 +1840,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2005,12 +1959,11 @@ type ApplicationGatewaySslPolicy struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2018,35 +1971,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2054,12 +1982,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2067,35 +1994,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2781,12 +2683,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2794,34 +2695,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2830,12 +2712,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2843,35 +2724,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3212,12 +3068,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3225,34 +3080,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3261,12 +3097,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3274,35 +3109,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3371,12 +3181,11 @@ type ExpressRouteCircuitsArpTableListResult struct {
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3384,34 +3193,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3420,12 +3210,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3433,35 +3222,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3489,12 +3253,11 @@ type ExpressRouteCircuitSku struct {
// long-running operation.
type ExpressRouteCircuitsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3502,34 +3265,15 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3538,12 +3282,11 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3551,34 +3294,15 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3587,12 +3311,11 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
// long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3600,34 +3323,15 @@ func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client Exp
return
}
if !done {
- return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4557,12 +4261,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4570,34 +4273,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4605,12 +4289,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4618,35 +4301,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4654,12 +4312,11 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
// long-running operation.
type InterfacesGetEffectiveRouteTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4667,34 +4324,15 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
return
}
if !done {
- return erlr, azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erlr, err = client.GetEffectiveRouteTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure sending request")
- return
- }
- erlr, err = client.GetEffectiveRouteTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4703,12 +4341,11 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
// long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4716,34 +4353,15 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
return
}
if !done {
- return ensglr, azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure sending request")
- return
- }
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5102,12 +4720,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5115,34 +4732,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5150,12 +4748,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5163,35 +4760,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5542,12 +5114,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5555,34 +5126,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5591,12 +5143,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5604,35 +5155,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5963,12 +5489,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5976,34 +5501,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6012,12 +5518,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6025,35 +5530,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6500,12 +5980,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6513,34 +5992,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6548,12 +6008,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6561,35 +6020,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6832,12 +6266,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6845,34 +6278,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6880,12 +6294,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6893,35 +6306,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7170,12 +6558,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7183,34 +6570,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7218,12 +6586,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7231,35 +6598,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7475,12 +6817,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7488,34 +6829,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7523,12 +6845,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7536,35 +6857,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7777,12 +7073,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7790,34 +7085,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7825,12 +7101,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7838,35 +7113,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8503,12 +7753,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8516,34 +7765,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8552,12 +7782,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8565,35 +7794,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8601,12 +7805,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8614,34 +7817,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8650,12 +7834,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8663,34 +7846,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8919,12 +8083,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8932,34 +8095,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8968,12 +8112,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8981,35 +8124,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9027,12 +8145,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9040,34 +8157,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9380,12 +8478,11 @@ type VirtualNetworkPeeringPropertiesFormat struct {
// long-running operation.
type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9393,34 +8490,15 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vnp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9429,12 +8507,11 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9442,35 +8519,10 @@ func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPee
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9494,12 +8546,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9507,34 +8558,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9543,12 +8575,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9556,35 +8587,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/publicipaddresses.go
index 608d8e8f1..b87da14df 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/routes.go
index c7a0ee426..119870e6c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/routetables.go
index 5fb91e48e..b99008d5e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/securitygroups.go
index cbb006748..f90df7cf5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/securitygroups.go
@@ -87,15 +87,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -156,15 +158,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/securityrules.go
index 269068c79..86ec85ed6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/securityrules.go
@@ -99,15 +99,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/subnets.go
index 7f47a5a31..f78eafe61 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworkgatewayconnections.go
index 6f6c8d723..f8b61b113 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworkgatewayconnections.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -463,15 +467,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -538,15 +544,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworkgateways.go
index 68aae9dac..bcded5660 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworkgateways.go
@@ -88,15 +88,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -464,15 +468,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworkpeerings.go
index a6cccd2f4..032d7142b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworkpeerings.go
@@ -88,15 +88,17 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworks.go
index cc6e23d69..528d17c7a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-06-01/network/virtualnetworks.go
@@ -157,15 +157,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -226,15 +228,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/applicationgateways.go
index f2cee2902..743244c4c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/applicationgateways.go
@@ -88,15 +88,17 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// BackendHealthSender sends the BackendHealth request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -238,15 +242,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -556,15 +562,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -624,15 +632,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/expressroutecircuitauthorizations.go
index f3f72ef7d..6fa4e50ab 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/expressroutecircuitpeerings.go
index d7c1a328d..94b8bd178 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/expressroutecircuitpeerings.go
@@ -88,15 +88,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/expressroutecircuits.go
index 67b7d385b..b5d6070ee 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -613,15 +617,17 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -687,15 +693,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -761,15 +769,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/interfaces.go
index abee0d8f0..02740e01d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -294,15 +298,17 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -621,15 +627,17 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/loadbalancers.go
index b411a51dc..ce916f6db 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/localnetworkgateways.go
index caad08358..473022fe0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/localnetworkgateways.go
@@ -94,15 +94,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -163,15 +165,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/models.go
index 6dd943263..5f859f5b3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/models.go
@@ -2061,12 +2061,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysBackendHealthFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2074,34 +2073,15 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
return
}
if !done {
- return agbh, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- agbh, err = client.BackendHealthResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure sending request")
- return
- }
- agbh, err = client.BackendHealthResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2110,12 +2090,11 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2123,34 +2102,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2159,12 +2119,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2172,35 +2131,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2316,12 +2250,11 @@ type ApplicationGatewaySslPolicy struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2329,35 +2262,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2365,12 +2273,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2378,35 +2285,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3122,12 +3004,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3135,34 +3016,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3171,12 +3033,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3184,35 +3045,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3553,12 +3389,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3566,34 +3401,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3602,12 +3418,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3615,35 +3430,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3712,12 +3502,11 @@ type ExpressRouteCircuitsArpTableListResult struct {
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3725,34 +3514,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3761,12 +3531,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3774,35 +3543,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3830,12 +3574,11 @@ type ExpressRouteCircuitSku struct {
// long-running operation.
type ExpressRouteCircuitsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3843,34 +3586,15 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3879,12 +3603,11 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3892,34 +3615,15 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3928,12 +3632,11 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
// long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3941,34 +3644,15 @@ func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client Exp
return
}
if !done {
- return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5002,12 +4686,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5015,34 +4698,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5050,12 +4714,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5063,35 +4726,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5099,12 +4737,11 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
// long-running operation.
type InterfacesGetEffectiveRouteTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5112,34 +4749,15 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
return
}
if !done {
- return erlr, azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erlr, err = client.GetEffectiveRouteTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure sending request")
- return
- }
- erlr, err = client.GetEffectiveRouteTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5148,12 +4766,11 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
// long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5161,34 +4778,15 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
return
}
if !done {
- return ensglr, azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure sending request")
- return
- }
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5547,12 +5145,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5560,34 +5157,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5595,12 +5173,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5608,35 +5185,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5987,12 +5539,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6000,34 +5551,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6036,12 +5568,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6049,35 +5580,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6385,12 +5891,11 @@ type PacketCaptureResultProperties struct {
// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6398,34 +5903,15 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
return
}
if !done {
- return pcr, azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6433,12 +5919,11 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6446,35 +5931,10 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6482,12 +5942,11 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
// operation.
type PacketCapturesGetStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6495,34 +5954,15 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
return
}
if !done {
- return pcqsr, azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcqsr, err = client.GetStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- pcqsr, err = client.GetStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6530,12 +5970,11 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6543,35 +5982,10 @@ func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6820,12 +6234,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6833,34 +6246,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6869,12 +6263,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6882,35 +6275,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7371,12 +6739,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7384,34 +6751,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7419,12 +6767,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7432,35 +6779,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7703,12 +7025,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7716,34 +7037,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7751,12 +7053,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7764,35 +7065,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8048,12 +7324,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8061,34 +7336,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8096,12 +7352,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8109,35 +7364,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8376,12 +7606,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8389,34 +7618,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8424,12 +7634,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8437,35 +7646,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8686,12 +7870,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8699,34 +7882,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8734,12 +7898,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8747,35 +7910,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9596,12 +8734,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9609,34 +8746,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9645,12 +8763,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9658,35 +8775,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9694,12 +8786,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9707,34 +8798,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9743,12 +8815,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9756,34 +8827,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10012,12 +9064,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10025,34 +9076,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10061,12 +9093,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10074,35 +9105,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10110,12 +9116,11 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
// long-running operation.
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10123,34 +9128,15 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetAdvertisedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetAdvertisedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10159,12 +9145,11 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
// long-running operation.
type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10172,34 +9157,15 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
return
}
if !done {
- return bpslr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bpslr, err = client.GetBgpPeerStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- bpslr, err = client.GetBgpPeerStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10208,12 +9174,11 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
// long-running operation.
type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10221,34 +9186,15 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetLearnedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetLearnedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10267,12 +9213,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10280,34 +9225,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10620,12 +9546,11 @@ type VirtualNetworkPeeringPropertiesFormat struct {
// long-running operation.
type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10633,34 +9558,15 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vnp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10669,12 +9575,11 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10682,35 +9587,10 @@ func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPee
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10734,12 +9614,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10747,34 +9626,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10783,12 +9643,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10796,35 +9655,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11159,12 +9993,11 @@ type WatcherPropertiesFormat struct {
// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
+func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11172,35 +10005,10 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11208,12 +10016,11 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
// operation.
type WatchersGetFlowLogStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11221,34 +10028,15 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.GetFlowLogStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.GetFlowLogStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11256,12 +10044,11 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersGetNextHopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
+func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11269,34 +10056,15 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
return
}
if !done {
- return nhr, azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nhr, err = client.GetNextHopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure sending request")
- return
- }
- nhr, err = client.GetNextHopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11305,12 +10073,11 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
// operation.
type WatchersGetTroubleshootingFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11318,34 +10085,15 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11354,12 +10102,11 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
// long-running operation.
type WatchersGetTroubleshootingResultFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11367,34 +10114,15 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResultResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResultResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11403,12 +10131,11 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
// operation.
type WatchersGetVMSecurityRulesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11416,34 +10143,15 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
return
}
if !done {
- return sgvr, azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sgvr, err = client.GetVMSecurityRulesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure sending request")
- return
- }
- sgvr, err = client.GetVMSecurityRulesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11452,12 +10160,11 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
// operation.
type WatchersSetFlowLogConfigurationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11465,34 +10172,15 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.SetFlowLogConfigurationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.SetFlowLogConfigurationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11500,12 +10188,11 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersVerifyIPFlowFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11513,34 +10200,15 @@ func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr Ver
return
}
if !done {
- return vifr, azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vifr, err = client.VerifyIPFlowResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure sending request")
- return
- }
- vifr, err = client.VerifyIPFlowResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/packetcaptures.go
index e1061f2ea..cde256df9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/packetcaptures.go
@@ -98,15 +98,17 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -308,15 +312,17 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// GetStatusSender sends the GetStatus request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +452,17 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/publicipaddresses.go
index da6da4d27..ef1f87422 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/routes.go
index 3efe5bb39..035f0042c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/routetables.go
index b0cbdf74c..3ecf6751b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/securitygroups.go
index 0911eabed..e83571142 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/securitygroups.go
@@ -86,15 +86,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/securityrules.go
index 36ad09a5c..91630cf62 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/securityrules.go
@@ -98,15 +98,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/subnets.go
index 2d9acd631..404a80fb5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworkgatewayconnections.go
index eb4ceb118..fcf14901f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworkgatewayconnections.go
@@ -107,15 +107,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -488,15 +492,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -569,15 +575,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworkgateways.go
index 5e1324cd9..cd1af4446 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworkgateways.go
@@ -94,15 +94,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -163,15 +165,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -372,15 +376,17 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -445,15 +451,17 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -515,15 +523,17 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -682,15 +692,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworkpeerings.go
index b9025cce9..a5f1e4f08 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworkpeerings.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,15 +162,17 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworks.go
index f39dd1020..43c2f64c1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/virtualnetworks.go
@@ -157,15 +157,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -226,15 +228,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/watchers.go
index 345b64f34..3abcddf37 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-09-01/network/watchers.go
@@ -154,15 +154,17 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -298,15 +300,17 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -378,15 +382,17 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// GetNextHopSender sends the GetNextHop request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -536,15 +542,17 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -614,15 +622,17 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -692,15 +702,17 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -901,15 +913,17 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -983,15 +997,17 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/applicationgateways.go
index 515b8aeee..5336c6479 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/applicationgateways.go
@@ -88,15 +88,17 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// BackendHealthSender sends the BackendHealth request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -238,15 +242,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -556,15 +562,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -624,15 +632,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/expressroutecircuitauthorizations.go
index c9eff43ff..e50abfd35 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/expressroutecircuitpeerings.go
index 44dcf05fa..a8e1c829f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/expressroutecircuitpeerings.go
@@ -88,15 +88,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/expressroutecircuits.go
index e3810002c..9b2533d37 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -613,15 +617,17 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -687,15 +693,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -761,15 +769,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/interfaces.go
index acbb089aa..3af41ac17 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -294,15 +298,17 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -621,15 +627,17 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/loadbalancers.go
index 6d89cb4a8..2a3fbac54 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/localnetworkgateways.go
index 2a2d8b130..8223e9734 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/localnetworkgateways.go
@@ -93,15 +93,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/models.go
index 9fe1db120..7bf348ac5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/models.go
@@ -2072,12 +2072,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysBackendHealthFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2085,34 +2084,15 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
return
}
if !done {
- return agbh, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- agbh, err = client.BackendHealthResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure sending request")
- return
- }
- agbh, err = client.BackendHealthResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2121,12 +2101,11 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2134,34 +2113,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2170,12 +2130,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2183,35 +2142,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2327,12 +2261,11 @@ type ApplicationGatewaySslPolicy struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2340,35 +2273,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2376,12 +2284,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2389,35 +2296,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3363,12 +3245,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3376,34 +3257,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3412,12 +3274,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3425,35 +3286,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3796,12 +3632,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3809,34 +3644,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3845,12 +3661,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3858,35 +3673,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3955,12 +3745,11 @@ type ExpressRouteCircuitsArpTableListResult struct {
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3968,34 +3757,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4004,12 +3774,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4017,35 +3786,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4073,12 +3817,11 @@ type ExpressRouteCircuitSku struct {
// long-running operation.
type ExpressRouteCircuitsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4086,34 +3829,15 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4122,12 +3846,11 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4135,34 +3858,15 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4171,12 +3875,11 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
// long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4184,34 +3887,15 @@ func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client Exp
return
}
if !done {
- return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5245,12 +4929,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5258,34 +4941,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5293,12 +4957,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5306,35 +4969,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5342,12 +4980,11 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
// long-running operation.
type InterfacesGetEffectiveRouteTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5355,34 +4992,15 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
return
}
if !done {
- return erlr, azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erlr, err = client.GetEffectiveRouteTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure sending request")
- return
- }
- erlr, err = client.GetEffectiveRouteTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5391,12 +5009,11 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
// long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5404,34 +5021,15 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
return
}
if !done {
- return ensglr, azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure sending request")
- return
- }
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5790,12 +5388,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5803,34 +5400,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5838,12 +5416,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5851,35 +5428,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6230,12 +5782,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6243,34 +5794,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6279,12 +5811,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6292,35 +5823,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6628,12 +6134,11 @@ type PacketCaptureResultProperties struct {
// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6641,34 +6146,15 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
return
}
if !done {
- return pcr, azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6676,12 +6162,11 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6689,35 +6174,10 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6725,12 +6185,11 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
// operation.
type PacketCapturesGetStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6738,34 +6197,15 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
return
}
if !done {
- return pcqsr, azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcqsr, err = client.GetStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- pcqsr, err = client.GetStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6773,12 +6213,11 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6786,35 +6225,10 @@ func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7265,12 +6679,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7278,34 +6691,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7314,12 +6708,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7327,35 +6720,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8161,12 +7529,11 @@ type RouteFilterRulePropertiesFormat struct {
// operation.
type RouteFilterRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8174,34 +7541,15 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8210,12 +7558,11 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
// operation.
type RouteFilterRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
+func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8223,35 +7570,10 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8259,12 +7581,11 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFilterRulesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8272,34 +7593,15 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.UpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8308,12 +7610,11 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFiltersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8321,34 +7622,15 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8356,12 +7638,11 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
+func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8369,47 +7650,21 @@ func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8417,34 +7672,15 @@ func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf Rou
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.UpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8566,12 +7802,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8579,34 +7814,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8614,12 +7830,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8627,35 +7842,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8898,12 +8088,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8911,34 +8100,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8946,12 +8116,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8959,35 +8128,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9243,12 +8387,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9256,34 +8399,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9291,12 +8415,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9304,35 +8427,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9571,12 +8669,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9584,34 +8681,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9619,12 +8697,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9632,35 +8709,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9881,12 +8933,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9894,34 +8945,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9929,12 +8961,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9942,35 +8973,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10791,12 +9797,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10804,34 +9809,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10840,12 +9826,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10853,35 +9838,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10889,12 +9849,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10902,34 +9861,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10938,12 +9878,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10951,34 +9890,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11207,12 +10127,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11220,34 +10139,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11256,12 +10156,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11269,35 +10168,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11305,12 +10179,11 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
// long-running operation.
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11318,34 +10191,15 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetAdvertisedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetAdvertisedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11354,12 +10208,11 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
// long-running operation.
type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11367,34 +10220,15 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
return
}
if !done {
- return bpslr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bpslr, err = client.GetBgpPeerStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- bpslr, err = client.GetBgpPeerStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11403,12 +10237,11 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
// long-running operation.
type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11416,34 +10249,15 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetLearnedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetLearnedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11462,12 +10276,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11475,34 +10288,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11815,12 +10609,11 @@ type VirtualNetworkPeeringPropertiesFormat struct {
// long-running operation.
type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11828,34 +10621,15 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vnp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11864,12 +10638,11 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11877,35 +10650,10 @@ func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPee
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11929,12 +10677,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11942,34 +10689,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11978,12 +10706,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11991,35 +10718,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12354,12 +11056,11 @@ type WatcherPropertiesFormat struct {
// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
+func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12367,35 +11068,10 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12403,12 +11079,11 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
// operation.
type WatchersGetFlowLogStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12416,34 +11091,15 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.GetFlowLogStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.GetFlowLogStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12451,12 +11107,11 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersGetNextHopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
+func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12464,34 +11119,15 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
return
}
if !done {
- return nhr, azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nhr, err = client.GetNextHopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure sending request")
- return
- }
- nhr, err = client.GetNextHopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12500,12 +11136,11 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
// operation.
type WatchersGetTroubleshootingFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12513,34 +11148,15 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12549,12 +11165,11 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
// long-running operation.
type WatchersGetTroubleshootingResultFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12562,34 +11177,15 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResultResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResultResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12598,12 +11194,11 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
// operation.
type WatchersGetVMSecurityRulesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12611,34 +11206,15 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
return
}
if !done {
- return sgvr, azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sgvr, err = client.GetVMSecurityRulesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure sending request")
- return
- }
- sgvr, err = client.GetVMSecurityRulesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12647,12 +11223,11 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
// operation.
type WatchersSetFlowLogConfigurationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12660,34 +11235,15 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.SetFlowLogConfigurationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.SetFlowLogConfigurationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12695,12 +11251,11 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersVerifyIPFlowFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12708,34 +11263,15 @@ func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr Ver
return
}
if !done {
- return vifr, azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vifr, err = client.VerifyIPFlowResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure sending request")
- return
- }
- vifr, err = client.VerifyIPFlowResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/packetcaptures.go
index b50739049..25177fd26 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/packetcaptures.go
@@ -98,15 +98,17 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -308,15 +312,17 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// GetStatusSender sends the GetStatus request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +452,17 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/publicipaddresses.go
index 95c28757e..88a14a453 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routefilterrules.go
index 4525fe7a4..67917eac9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routefilterrules.go
@@ -98,15 +98,17 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -406,15 +410,17 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routefilters.go
index c648251df..d3c7d13dc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routefilters.go
@@ -86,15 +86,17 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routes.go
index b9d0cd090..0e5ee0f68 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routetables.go
index b3e03c2fc..160f994a8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/securitygroups.go
index 1c3627568..ee117e742 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/securitygroups.go
@@ -86,15 +86,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/securityrules.go
index 6ec082f3f..99bf4b10f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/securityrules.go
@@ -98,15 +98,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/subnets.go
index 5e19fdb2c..dc21977e0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworkgatewayconnections.go
index e98eeaf80..a4498937e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworkgatewayconnections.go
@@ -101,15 +101,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -482,15 +486,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -563,15 +569,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworkgateways.go
index 6274a1f58..c4b9b5b0f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworkgateways.go
@@ -93,15 +93,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -371,15 +375,17 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -444,15 +450,17 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -514,15 +522,17 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -681,15 +691,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworkpeerings.go
index 7ef6a9e4b..778cf88fa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworkpeerings.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,15 +162,17 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworks.go
index a0baa9e8f..65245b36a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/virtualnetworks.go
@@ -157,15 +157,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -226,15 +228,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/watchers.go
index 0bc44dd32..99258675b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2016-12-01/network/watchers.go
@@ -154,15 +154,17 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -298,15 +300,17 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -378,15 +382,17 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// GetNextHopSender sends the GetNextHop request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -536,15 +542,17 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -614,15 +622,17 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -692,15 +702,17 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -901,15 +913,17 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -983,15 +997,17 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/applicationgateways.go
index 41cd7be21..93f5d8c6c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/applicationgateways.go
@@ -88,15 +88,17 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// BackendHealthSender sends the BackendHealth request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -172,15 +174,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -241,15 +245,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -621,15 +627,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -689,15 +697,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/expressroutecircuitauthorizations.go
index db9605f6d..248098f31 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/expressroutecircuitpeerings.go
index 1d3b3e2c0..420800f22 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/expressroutecircuitpeerings.go
@@ -88,15 +88,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/expressroutecircuits.go
index 6c4996875..4722bfc17 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -613,15 +617,17 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -687,15 +693,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -761,15 +769,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/interfaces.go
index dd3295c6f..adf3171a4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -294,15 +298,17 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -621,15 +627,17 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/loadbalancers.go
index 6e278e37b..6860c263d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/localnetworkgateways.go
index a99a60d36..a2e9d344d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/localnetworkgateways.go
@@ -95,15 +95,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/models.go
index 284574f01..c90d40018 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/models.go
@@ -2464,12 +2464,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysBackendHealthFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2477,34 +2476,15 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
return
}
if !done {
- return agbh, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- agbh, err = client.BackendHealthResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure sending request")
- return
- }
- agbh, err = client.BackendHealthResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2513,12 +2493,11 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2526,34 +2505,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2562,12 +2522,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2575,35 +2534,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2719,12 +2653,11 @@ type ApplicationGatewaySslPolicy struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2732,35 +2665,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2768,12 +2676,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2781,35 +2688,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3832,12 +3714,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3845,34 +3726,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3881,12 +3743,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3894,35 +3755,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4267,12 +4103,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4280,34 +4115,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4316,12 +4132,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4329,35 +4144,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4426,12 +4216,11 @@ type ExpressRouteCircuitsArpTableListResult struct {
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4439,34 +4228,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4475,12 +4245,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4488,35 +4257,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4544,12 +4288,11 @@ type ExpressRouteCircuitSku struct {
// long-running operation.
type ExpressRouteCircuitsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4557,34 +4300,15 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4593,12 +4317,11 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4606,34 +4329,15 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4642,12 +4346,11 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
// long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4655,34 +4358,15 @@ func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client Exp
return
}
if !done {
- return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5716,12 +5400,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5729,34 +5412,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5764,12 +5428,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5777,35 +5440,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5813,12 +5451,11 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
// long-running operation.
type InterfacesGetEffectiveRouteTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5826,34 +5463,15 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
return
}
if !done {
- return erlr, azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erlr, err = client.GetEffectiveRouteTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure sending request")
- return
- }
- erlr, err = client.GetEffectiveRouteTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5862,12 +5480,11 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
// long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5875,34 +5492,15 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
return
}
if !done {
- return ensglr, azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure sending request")
- return
- }
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6295,12 +5893,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6308,34 +5905,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6343,12 +5921,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6356,35 +5933,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6735,12 +6287,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6748,34 +6299,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6784,12 +6316,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6797,35 +6328,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7133,12 +6639,11 @@ type PacketCaptureResultProperties struct {
// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7146,34 +6651,15 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
return
}
if !done {
- return pcr, azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7181,12 +6667,11 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7194,35 +6679,10 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7230,12 +6690,11 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
// operation.
type PacketCapturesGetStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7243,34 +6702,15 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
return
}
if !done {
- return pcqsr, azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcqsr, err = client.GetStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- pcqsr, err = client.GetStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7278,12 +6718,11 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7291,35 +6730,10 @@ func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7770,12 +7184,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7783,34 +7196,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7819,12 +7213,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7832,35 +7225,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8666,12 +8034,11 @@ type RouteFilterRulePropertiesFormat struct {
// operation.
type RouteFilterRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8679,34 +8046,15 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8715,12 +8063,11 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
// operation.
type RouteFilterRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
+func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8728,35 +8075,10 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8764,12 +8086,11 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFilterRulesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8777,34 +8098,15 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.UpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8813,12 +8115,11 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFiltersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8826,34 +8127,15 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8861,12 +8143,11 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
+func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8874,47 +8155,21 @@ func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8922,34 +8177,15 @@ func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf Rou
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.UpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9071,12 +8307,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9084,34 +8319,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9119,12 +8335,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9132,35 +8347,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9403,12 +8593,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9416,34 +8605,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9451,12 +8621,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9464,35 +8633,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9748,12 +8892,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9761,34 +8904,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9796,12 +8920,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9809,35 +8932,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10076,12 +9174,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10089,34 +9186,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10124,12 +9202,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10137,35 +9214,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10386,12 +9438,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10399,34 +9450,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10434,12 +9466,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10447,35 +9478,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11300,12 +10306,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11313,34 +10318,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11349,12 +10335,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11362,35 +10347,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11398,12 +10358,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11411,34 +10370,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11447,12 +10387,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11460,34 +10399,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11716,12 +10636,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11729,34 +10648,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11765,12 +10665,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11778,35 +10677,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11814,12 +10688,11 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
// long-running operation.
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11827,34 +10700,15 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetAdvertisedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetAdvertisedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11863,12 +10717,11 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
// long-running operation.
type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11876,34 +10729,15 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
return
}
if !done {
- return bpslr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bpslr, err = client.GetBgpPeerStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- bpslr, err = client.GetBgpPeerStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11912,12 +10746,11 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
// long-running operation.
type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11925,34 +10758,15 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetLearnedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetLearnedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11971,12 +10785,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11984,34 +10797,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12426,12 +11220,11 @@ type VirtualNetworkPeeringPropertiesFormat struct {
// long-running operation.
type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12439,34 +11232,15 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vnp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12475,12 +11249,11 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12488,35 +11261,10 @@ func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPee
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12540,12 +11288,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12553,34 +11300,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12589,12 +11317,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12602,35 +11329,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12988,12 +11690,11 @@ type WatcherPropertiesFormat struct {
// operation.
type WatchersCheckConnectivityFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
+func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13001,34 +11702,15 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
return
}
if !done {
- return ci, azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ci, err = client.CheckConnectivityResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CheckConnectivityResponder(ci.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure sending request")
- return
- }
- ci, err = client.CheckConnectivityResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13036,12 +11718,11 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
+func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13049,35 +11730,10 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13085,12 +11741,11 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
// operation.
type WatchersGetFlowLogStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13098,34 +11753,15 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.GetFlowLogStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.GetFlowLogStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13133,12 +11769,11 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersGetNextHopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
+func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13146,34 +11781,15 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
return
}
if !done {
- return nhr, azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nhr, err = client.GetNextHopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure sending request")
- return
- }
- nhr, err = client.GetNextHopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13182,12 +11798,11 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
// operation.
type WatchersGetTroubleshootingFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13195,34 +11810,15 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13231,12 +11827,11 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
// long-running operation.
type WatchersGetTroubleshootingResultFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13244,34 +11839,15 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResultResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResultResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13280,12 +11856,11 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
// operation.
type WatchersGetVMSecurityRulesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13293,34 +11868,15 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
return
}
if !done {
- return sgvr, azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sgvr, err = client.GetVMSecurityRulesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure sending request")
- return
- }
- sgvr, err = client.GetVMSecurityRulesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13329,12 +11885,11 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
// operation.
type WatchersSetFlowLogConfigurationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13342,34 +11897,15 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.SetFlowLogConfigurationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.SetFlowLogConfigurationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13377,12 +11913,11 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersVerifyIPFlowFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13390,34 +11925,15 @@ func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr Ver
return
}
if !done {
- return vifr, azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vifr, err = client.VerifyIPFlowResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure sending request")
- return
- }
- vifr, err = client.VerifyIPFlowResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/packetcaptures.go
index 4fd40ccc5..0f2652e51 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/packetcaptures.go
@@ -98,15 +98,17 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -308,15 +312,17 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// GetStatusSender sends the GetStatus request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +452,17 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/publicipaddresses.go
index 09ffdb6d0..be5d0343f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routefilterrules.go
index aa86ae06f..cbe7d5c61 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routefilterrules.go
@@ -98,15 +98,17 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -406,15 +410,17 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routefilters.go
index 0e48d6a74..848b087f4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routefilters.go
@@ -86,15 +86,17 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routes.go
index f6e4f66a5..dd0bd8b68 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routetables.go
index 61b5fc537..c0b82469d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/securitygroups.go
index 88c2e6bba..4708f5752 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/securitygroups.go
@@ -86,15 +86,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/securityrules.go
index cb37b6161..014f30fc2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/securityrules.go
@@ -98,15 +98,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/subnets.go
index 668382b04..0cae8a0c0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworkgatewayconnections.go
index 889764c31..aa8537c97 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworkgatewayconnections.go
@@ -101,15 +101,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -482,15 +486,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -563,15 +569,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworkgateways.go
index bbf3665ea..749ad07c8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworkgateways.go
@@ -93,15 +93,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -371,15 +375,17 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -444,15 +450,17 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -514,15 +522,17 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -681,15 +691,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworkpeerings.go
index 056d93480..6c1614aa2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworkpeerings.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,15 +162,17 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworks.go
index 3fd689645..ee087eae5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/virtualnetworks.go
@@ -157,15 +157,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -226,15 +228,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/watchers.go
index 0fbba3882..602fa31cf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-03-01/network/watchers.go
@@ -96,15 +96,17 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
// 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) (future WatchersCheckConnectivityFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -235,15 +237,17 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -379,15 +383,17 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -459,15 +465,17 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// GetNextHopSender sends the GetNextHop request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -617,15 +625,17 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -695,15 +705,17 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -773,15 +785,17 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -982,15 +996,17 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1064,15 +1080,17 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/applicationgateways.go
index 3aff93f1b..9e4733220 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/applicationgateways.go
@@ -88,15 +88,17 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// BackendHealthSender sends the BackendHealth request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -172,15 +174,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -241,15 +245,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -838,15 +844,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -906,15 +914,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/expressroutecircuitauthorizations.go
index 59742d4c9..1bac9f246 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/expressroutecircuitpeerings.go
index dec49e0df..86aaa0dfc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/expressroutecircuitpeerings.go
@@ -88,15 +88,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/expressroutecircuits.go
index c0696b9ad..e5d4f90d5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -613,15 +617,17 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -687,15 +693,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -761,15 +769,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/inboundnatrules.go
index 9624490c4..1ef83df66 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/inboundnatrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/inboundnatrules.go
@@ -108,15 +108,17 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// 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) (future InboundNatRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -179,15 +181,17 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource
// 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) (future InboundNatRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/interfaces.go
index c80f3b11b..4968401d5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -294,15 +298,17 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -621,15 +627,17 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/loadbalancers.go
index 37c2d035e..e61fac434 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/localnetworkgateways.go
index 373346551..72a57709d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/localnetworkgateways.go
@@ -95,15 +95,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/models.go
index c99b743f1..ddfb833f4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/models.go
@@ -3136,12 +3136,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysBackendHealthFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3149,34 +3148,15 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
return
}
if !done {
- return agbh, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- agbh, err = client.BackendHealthResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure sending request")
- return
- }
- agbh, err = client.BackendHealthResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3185,12 +3165,11 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3198,34 +3177,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3234,12 +3194,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3247,35 +3206,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3488,12 +3422,11 @@ type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3501,35 +3434,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3537,12 +3445,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3550,35 +3457,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4764,12 +4646,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4777,34 +4658,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4813,12 +4675,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4826,35 +4687,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5203,12 +5039,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5216,34 +5051,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5252,12 +5068,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5265,35 +5080,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5362,12 +5152,11 @@ type ExpressRouteCircuitsArpTableListResult struct {
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5375,34 +5164,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5411,12 +5181,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5424,35 +5193,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5480,12 +5224,11 @@ type ExpressRouteCircuitSku struct {
// long-running operation.
type ExpressRouteCircuitsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5493,34 +5236,15 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5529,12 +5253,11 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5542,34 +5265,15 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5578,12 +5282,11 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
// long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5591,34 +5294,15 @@ func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client Exp
return
}
if !done {
- return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6402,12 +6086,11 @@ type InboundNatRulePropertiesFormat struct {
// operation.
type InboundNatRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
+func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6415,34 +6098,15 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
return
}
if !done {
- return inr, azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- inr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
+ inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- inr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6451,12 +6115,11 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
// operation.
type InboundNatRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
+func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6464,35 +6127,10 @@ func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7083,12 +6721,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7096,34 +6733,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7131,12 +6749,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7144,35 +6761,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7180,12 +6772,11 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
// long-running operation.
type InterfacesGetEffectiveRouteTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7193,34 +6784,15 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
return
}
if !done {
- return erlr, azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erlr, err = client.GetEffectiveRouteTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure sending request")
- return
- }
- erlr, err = client.GetEffectiveRouteTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7229,12 +6801,11 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
// long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7242,34 +6813,15 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
return
}
if !done {
- return ensglr, azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure sending request")
- return
- }
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8075,12 +7627,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8088,34 +7639,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8123,12 +7655,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8136,35 +7667,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8518,12 +8024,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8531,34 +8036,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8567,12 +8053,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8580,35 +8065,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8917,12 +8377,11 @@ type PacketCaptureResultProperties struct {
// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8930,34 +8389,15 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
return
}
if !done {
- return pcr, azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8965,12 +8405,11 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8978,35 +8417,10 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9014,12 +8428,11 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
// operation.
type PacketCapturesGetStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9027,34 +8440,15 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
return
}
if !done {
- return pcqsr, azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcqsr, err = client.GetStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- pcqsr, err = client.GetStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9062,12 +8456,11 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9075,35 +8468,10 @@ func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9571,12 +8939,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9584,34 +8951,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9620,12 +8968,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9633,35 +8980,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10471,12 +9793,11 @@ type RouteFilterRulePropertiesFormat struct {
// operation.
type RouteFilterRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10484,34 +9805,15 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10520,12 +9822,11 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
// operation.
type RouteFilterRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
+func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10533,35 +9834,10 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10569,12 +9845,11 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFilterRulesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10582,34 +9857,15 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.UpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10618,12 +9874,11 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFiltersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10631,34 +9886,15 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10666,12 +9902,11 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
+func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10679,47 +9914,21 @@ func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10727,34 +9936,15 @@ func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf Rou
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.UpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10876,12 +10066,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10889,34 +10078,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10924,12 +10094,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10937,35 +10106,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11209,12 +10353,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11222,34 +10365,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11257,12 +10381,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11270,35 +10393,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11555,12 +10653,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11568,34 +10665,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11603,12 +10681,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11616,35 +10693,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11892,12 +10944,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11905,34 +10956,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11940,12 +10972,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11953,35 +10984,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12215,12 +11221,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12228,34 +11233,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12263,12 +11249,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12276,35 +11261,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13302,12 +12262,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13315,34 +12274,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13351,12 +12291,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13364,35 +12303,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13400,12 +12314,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13413,34 +12326,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13449,12 +12343,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13462,34 +12355,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13824,12 +12698,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13837,34 +12710,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13873,12 +12727,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13886,35 +12739,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13922,12 +12750,11 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
// a long-running operation.
type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13935,34 +12762,15 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GeneratevpnclientpackageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GeneratevpnclientpackageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13971,12 +12779,11 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
// long-running operation.
type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13984,34 +12791,15 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GenerateVpnProfileResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GenerateVpnProfileResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GenerateVpnProfileResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14020,12 +12808,11 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
// long-running operation.
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14033,34 +12820,15 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetAdvertisedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetAdvertisedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14069,12 +12837,11 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
// long-running operation.
type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14082,34 +12849,15 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
return
}
if !done {
- return bpslr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bpslr, err = client.GetBgpPeerStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- bpslr, err = client.GetBgpPeerStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14118,12 +12866,11 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
// long-running operation.
type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14131,34 +12878,15 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetLearnedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetLearnedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14177,12 +12905,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14190,34 +12917,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14633,12 +13341,11 @@ type VirtualNetworkPeeringPropertiesFormat struct {
// long-running operation.
type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14646,34 +13353,15 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vnp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14682,12 +13370,11 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14695,35 +13382,10 @@ func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPee
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14747,12 +13409,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14760,34 +13421,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14796,12 +13438,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14809,35 +13450,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15209,12 +13825,11 @@ type WatcherPropertiesFormat struct {
// operation.
type WatchersCheckConnectivityFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
+func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15222,34 +13837,15 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
return
}
if !done {
- return ci, azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ci, err = client.CheckConnectivityResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CheckConnectivityResponder(ci.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure sending request")
- return
- }
- ci, err = client.CheckConnectivityResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15257,12 +13853,11 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
+func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15270,35 +13865,10 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15306,12 +13876,11 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
// operation.
type WatchersGetFlowLogStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15319,34 +13888,15 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.GetFlowLogStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.GetFlowLogStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15354,12 +13904,11 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersGetNextHopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
+func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15367,34 +13916,15 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
return
}
if !done {
- return nhr, azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nhr, err = client.GetNextHopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure sending request")
- return
- }
- nhr, err = client.GetNextHopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15403,12 +13933,11 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
// operation.
type WatchersGetTroubleshootingFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15416,34 +13945,15 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15452,12 +13962,11 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
// long-running operation.
type WatchersGetTroubleshootingResultFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15465,34 +13974,15 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResultResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResultResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15501,12 +13991,11 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
// operation.
type WatchersGetVMSecurityRulesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15514,34 +14003,15 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
return
}
if !done {
- return sgvr, azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sgvr, err = client.GetVMSecurityRulesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure sending request")
- return
- }
- sgvr, err = client.GetVMSecurityRulesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15550,12 +14020,11 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
// operation.
type WatchersSetFlowLogConfigurationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15563,34 +14032,15 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.SetFlowLogConfigurationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.SetFlowLogConfigurationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15598,12 +14048,11 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersVerifyIPFlowFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15611,34 +14060,15 @@ func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr Ver
return
}
if !done {
- return vifr, azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vifr, err = client.VerifyIPFlowResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure sending request")
- return
- }
- vifr, err = client.VerifyIPFlowResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/packetcaptures.go
index 6f91c0072..d53f88a7b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/packetcaptures.go
@@ -98,15 +98,17 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -308,15 +312,17 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// GetStatusSender sends the GetStatus request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +452,17 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/publicipaddresses.go
index 73a3da9df..c610b84be 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routefilterrules.go
index 1ae64d2cd..f9c9763e7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routefilterrules.go
@@ -98,15 +98,17 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -406,15 +410,17 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routefilters.go
index 92de46a09..f26df6cf9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routefilters.go
@@ -86,15 +86,17 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routes.go
index f4e1b7e61..0e060665f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routetables.go
index de139c10d..69ba32ffc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/securitygroups.go
index df83fab82..dd98fe318 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/securitygroups.go
@@ -86,15 +86,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/securityrules.go
index 4c6d447ba..f51c103bf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/securityrules.go
@@ -88,15 +88,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/subnets.go
index 813742223..6ac6dc287 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworkgatewayconnections.go
index 593e9b7f9..bc7979add 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworkgatewayconnections.go
@@ -101,15 +101,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -482,15 +486,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -563,15 +569,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworkgateways.go
index 88de84b53..fe2069a12 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworkgateways.go
@@ -93,15 +93,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -234,15 +238,17 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx
// 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) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -307,15 +313,17 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex
// 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) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +454,17 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -519,15 +529,17 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -589,15 +601,17 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -851,15 +865,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworkpeerings.go
index 57da7ff71..09f2c9dc1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworkpeerings.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,15 +162,17 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworks.go
index 5e9d4d8a5..77566d60b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/virtualnetworks.go
@@ -157,15 +157,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -226,15 +228,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/watchers.go
index f7ee7abce..4541f9bd8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network/watchers.go
@@ -96,15 +96,17 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
// 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) (future WatchersCheckConnectivityFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -235,15 +237,17 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -379,15 +383,17 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -459,15 +465,17 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// GetNextHopSender sends the GetNextHop request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -617,15 +625,17 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -695,15 +705,17 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -773,15 +785,17 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -982,15 +996,17 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1064,15 +1080,17 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/applicationgateways.go
index 131d49f32..a254aabc7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/applicationgateways.go
@@ -88,15 +88,17 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// BackendHealthSender sends the BackendHealth request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -172,15 +174,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -241,15 +245,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -838,15 +844,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -906,15 +914,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/expressroutecircuitauthorizations.go
index 76ac0e26d..a3d78d049 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/expressroutecircuitpeerings.go
index 4ee17d3dc..29d718612 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/expressroutecircuitpeerings.go
@@ -88,15 +88,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/expressroutecircuits.go
index 40202d2fd..b77e4b10b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -613,15 +617,17 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -687,15 +693,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -761,15 +769,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/inboundnatrules.go
index 7ff7e6223..583b59e3c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/inboundnatrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/inboundnatrules.go
@@ -108,15 +108,17 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// 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) (future InboundNatRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -179,15 +181,17 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource
// 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) (future InboundNatRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/interfaces.go
index 0d31b774c..df27308d4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -294,15 +298,17 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -621,15 +627,17 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/loadbalancers.go
index 3bae6788b..662edf6a1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/localnetworkgateways.go
index 35ec48b4f..3f52f59c9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/localnetworkgateways.go
@@ -95,15 +95,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/models.go
index 01358b68e..f46401a9f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/models.go
@@ -3164,12 +3164,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysBackendHealthFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3177,34 +3176,15 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
return
}
if !done {
- return agbh, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- agbh, err = client.BackendHealthResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure sending request")
- return
- }
- agbh, err = client.BackendHealthResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3213,12 +3193,11 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3226,34 +3205,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3262,12 +3222,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3275,35 +3234,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3516,12 +3450,11 @@ type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3529,35 +3462,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3565,12 +3473,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3578,35 +3485,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4792,12 +4674,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4805,34 +4686,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4841,12 +4703,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4854,35 +4715,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5231,12 +5067,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5244,34 +5079,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5280,12 +5096,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5293,35 +5108,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5390,12 +5180,11 @@ type ExpressRouteCircuitsArpTableListResult struct {
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5403,34 +5192,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5439,12 +5209,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5452,35 +5221,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5508,12 +5252,11 @@ type ExpressRouteCircuitSku struct {
// long-running operation.
type ExpressRouteCircuitsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5521,34 +5264,15 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5557,12 +5281,11 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5570,34 +5293,15 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5606,12 +5310,11 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
// long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5619,34 +5322,15 @@ func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client Exp
return
}
if !done {
- return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6430,12 +6114,11 @@ type InboundNatRulePropertiesFormat struct {
// operation.
type InboundNatRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
+func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6443,34 +6126,15 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
return
}
if !done {
- return inr, azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- inr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
+ inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- inr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6479,12 +6143,11 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
// operation.
type InboundNatRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
+func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6492,35 +6155,10 @@ func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7111,12 +6749,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7124,34 +6761,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7159,12 +6777,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7172,35 +6789,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7208,12 +6800,11 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
// long-running operation.
type InterfacesGetEffectiveRouteTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7221,34 +6812,15 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
return
}
if !done {
- return erlr, azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erlr, err = client.GetEffectiveRouteTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure sending request")
- return
- }
- erlr, err = client.GetEffectiveRouteTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7257,12 +6829,11 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
// long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7270,34 +6841,15 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
return
}
if !done {
- return ensglr, azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure sending request")
- return
- }
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8117,12 +7669,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8130,34 +7681,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8165,12 +7697,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8178,35 +7709,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8568,12 +8074,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8581,34 +8086,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8617,12 +8103,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8630,35 +8115,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8967,12 +8427,11 @@ type PacketCaptureResultProperties struct {
// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8980,34 +8439,15 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
return
}
if !done {
- return pcr, azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9015,12 +8455,11 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9028,35 +8467,10 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9064,12 +8478,11 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
// operation.
type PacketCapturesGetStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9077,34 +8490,15 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
return
}
if !done {
- return pcqsr, azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcqsr, err = client.GetStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- pcqsr, err = client.GetStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9112,12 +8506,11 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9125,35 +8518,10 @@ func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9635,12 +9003,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9648,34 +9015,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9684,12 +9032,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9697,35 +9044,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10541,12 +9863,11 @@ type RouteFilterRulePropertiesFormat struct {
// operation.
type RouteFilterRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10554,34 +9875,15 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10590,12 +9892,11 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
// operation.
type RouteFilterRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
+func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10603,35 +9904,10 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10639,12 +9915,11 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFilterRulesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10652,34 +9927,15 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.UpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10688,12 +9944,11 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFiltersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10701,34 +9956,15 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10736,12 +9972,11 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
+func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10749,47 +9984,21 @@ func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10797,34 +10006,15 @@ func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf Rou
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.UpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10946,12 +10136,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10959,34 +10148,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10994,12 +10164,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11007,35 +10176,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11279,12 +10423,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11292,34 +10435,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11327,12 +10451,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11340,35 +10463,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11625,12 +10723,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11638,34 +10735,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11673,12 +10751,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11686,35 +10763,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11962,12 +11014,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11975,34 +11026,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12010,12 +11042,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12023,35 +11054,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12285,12 +11291,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12298,34 +11303,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12333,12 +11319,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12346,35 +11331,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13374,12 +12334,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13387,34 +12346,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13423,12 +12363,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13436,35 +12375,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13472,12 +12386,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13485,34 +12398,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13521,12 +12415,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13534,34 +12427,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13896,12 +12770,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13909,34 +12782,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13945,12 +12799,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13958,35 +12811,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13994,12 +12822,11 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
// a long-running operation.
type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14007,34 +12834,15 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GeneratevpnclientpackageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GeneratevpnclientpackageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14043,12 +12851,11 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
// long-running operation.
type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14056,34 +12863,15 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GenerateVpnProfileResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GenerateVpnProfileResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GenerateVpnProfileResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14092,12 +12880,11 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
// long-running operation.
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14105,34 +12892,15 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetAdvertisedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetAdvertisedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14141,12 +12909,11 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
// long-running operation.
type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14154,34 +12921,15 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
return
}
if !done {
- return bpslr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bpslr, err = client.GetBgpPeerStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- bpslr, err = client.GetBgpPeerStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14190,12 +12938,11 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
// long-running operation.
type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14203,34 +12950,15 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetLearnedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetLearnedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14239,12 +12967,11 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14252,34 +12979,15 @@ func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GetVpnProfilePackageURLResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GetVpnProfilePackageURLResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14298,12 +13006,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14311,34 +13018,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14754,12 +13442,11 @@ type VirtualNetworkPeeringPropertiesFormat struct {
// long-running operation.
type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14767,34 +13454,15 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vnp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14803,12 +13471,11 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14816,35 +13483,10 @@ func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPee
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14868,12 +13510,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14881,34 +13522,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14917,12 +13539,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14930,35 +13551,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15330,12 +13926,11 @@ type WatcherPropertiesFormat struct {
// operation.
type WatchersCheckConnectivityFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
+func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15343,34 +13938,15 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
return
}
if !done {
- return ci, azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ci, err = client.CheckConnectivityResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CheckConnectivityResponder(ci.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure sending request")
- return
- }
- ci, err = client.CheckConnectivityResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15378,12 +13954,11 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
+func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15391,35 +13966,10 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15427,12 +13977,11 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
// operation.
type WatchersGetFlowLogStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15440,34 +13989,15 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.GetFlowLogStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.GetFlowLogStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15475,12 +14005,11 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersGetNextHopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
+func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15488,34 +14017,15 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
return
}
if !done {
- return nhr, azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nhr, err = client.GetNextHopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure sending request")
- return
- }
- nhr, err = client.GetNextHopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15524,12 +14034,11 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
// operation.
type WatchersGetTroubleshootingFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15537,34 +14046,15 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15573,12 +14063,11 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
// long-running operation.
type WatchersGetTroubleshootingResultFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15586,34 +14075,15 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResultResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResultResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15622,12 +14092,11 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
// operation.
type WatchersGetVMSecurityRulesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15635,34 +14104,15 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
return
}
if !done {
- return sgvr, azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sgvr, err = client.GetVMSecurityRulesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure sending request")
- return
- }
- sgvr, err = client.GetVMSecurityRulesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15671,12 +14121,11 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
// operation.
type WatchersSetFlowLogConfigurationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15684,34 +14133,15 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.SetFlowLogConfigurationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.SetFlowLogConfigurationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15719,12 +14149,11 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersVerifyIPFlowFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15732,34 +14161,15 @@ func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr Ver
return
}
if !done {
- return vifr, azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vifr, err = client.VerifyIPFlowResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure sending request")
- return
- }
- vifr, err = client.VerifyIPFlowResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/packetcaptures.go
index a00e2be68..b7a1240e5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/packetcaptures.go
@@ -98,15 +98,17 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -308,15 +312,17 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// GetStatusSender sends the GetStatus request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +452,17 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/publicipaddresses.go
index 4ed1faf84..1f0851669 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routefilterrules.go
index 109c266c7..a2f61cd6e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routefilterrules.go
@@ -98,15 +98,17 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -406,15 +410,17 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routefilters.go
index 3fc59d650..9a8224b52 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routefilters.go
@@ -86,15 +86,17 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routes.go
index 4da6a6a52..e33db09a6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routetables.go
index e0bef6140..35e45c541 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/securitygroups.go
index 50951731c..1da019f4f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/securitygroups.go
@@ -86,15 +86,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/securityrules.go
index 6d2318eb9..8d8f988b2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/securityrules.go
@@ -88,15 +88,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/subnets.go
index 0173daf87..46b97b646 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworkgatewayconnections.go
index a76d41fa4..29bdb1d00 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworkgatewayconnections.go
@@ -101,15 +101,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -482,15 +486,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -563,15 +569,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworkgateways.go
index 1ea1c7461..d7e5c4335 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworkgateways.go
@@ -93,15 +93,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -234,15 +238,17 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx
// 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) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -307,15 +313,17 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex
// 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) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +454,17 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -519,15 +529,17 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -589,15 +601,17 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -659,15 +673,17 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c
// 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) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -921,15 +937,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworkpeerings.go
index 216fbb8cd..37e1c54d6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworkpeerings.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,15 +162,17 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworks.go
index b62401d64..2a88833bd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/virtualnetworks.go
@@ -157,15 +157,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -226,15 +228,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/watchers.go
index fd4289618..f807efb30 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-01/network/watchers.go
@@ -96,15 +96,17 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
// 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) (future WatchersCheckConnectivityFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -235,15 +237,17 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -379,15 +383,17 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -459,15 +465,17 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// GetNextHopSender sends the GetNextHop request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -617,15 +625,17 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -695,15 +705,17 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -773,15 +785,17 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -982,15 +996,17 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1064,15 +1080,17 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/applicationgateways.go
index 7206327b0..fe1991614 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/applicationgateways.go
@@ -88,15 +88,17 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// BackendHealthSender sends the BackendHealth request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -172,15 +174,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -241,15 +245,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -838,15 +844,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -906,15 +914,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -977,15 +987,17 @@ func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (future ApplicationGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/applicationsecuritygroups.go
index 133c1552c..4d1a255a4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/applicationsecuritygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/applicationsecuritygroups.go
@@ -86,15 +86,17 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context
// 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) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context
// 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) (future ApplicationSecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/expressroutecircuitauthorizations.go
index 8e947afac..2860cd697 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/expressroutecircuitpeerings.go
index 5813098ef..b129f3c2e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/expressroutecircuitpeerings.go
@@ -88,15 +88,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/expressroutecircuits.go
index add90435b..0a11eb949 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -613,15 +617,17 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -687,15 +693,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -761,15 +769,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -833,15 +843,17 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCircuitsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/inboundnatrules.go
index 3820400e2..64c604441 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/inboundnatrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/inboundnatrules.go
@@ -108,15 +108,17 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// 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) (future InboundNatRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -179,15 +181,17 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource
// 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) (future InboundNatRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/interfaces.go
index 55a0fe6d9..5632e32b2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -294,15 +298,17 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -699,15 +705,17 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1068,15 +1076,17 @@ func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceG
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future InterfacesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/loadbalancers.go
index d2706bd2b..f62ad7b99 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future LoadBalancersUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/localnetworkgateways.go
index 7872ca814..b20ca1df7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/localnetworkgateways.go
@@ -95,15 +95,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -413,15 +417,17 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future LocalNetworkGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/models.go
index 15cf9c6f0..794e1c31c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/models.go
@@ -3166,12 +3166,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysBackendHealthFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3179,34 +3178,15 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
return
}
if !done {
- return agbh, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- agbh, err = client.BackendHealthResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure sending request")
- return
- }
- agbh, err = client.BackendHealthResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3215,12 +3195,11 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3228,34 +3207,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3264,12 +3224,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3277,35 +3236,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3518,12 +3452,11 @@ type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3531,35 +3464,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3567,12 +3475,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3580,35 +3487,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3616,12 +3498,11 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
// operation.
type ApplicationGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3629,34 +3510,15 @@ func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatew
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.UpdateTagsResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4024,12 +3886,11 @@ type ApplicationSecurityGroupPropertiesFormat struct {
// long-running operation.
type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
+func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4037,34 +3898,15 @@ func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client Applic
return
}
if !done {
- return asg, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- asg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
+ asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- asg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4073,12 +3915,11 @@ func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client Applic
// operation.
type ApplicationSecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4086,35 +3927,10 @@ func (future ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSec
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5294,12 +5110,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5307,34 +5122,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5343,12 +5139,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5356,35 +5151,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5733,12 +5503,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5746,34 +5515,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5782,12 +5532,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5795,35 +5544,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5892,12 +5616,11 @@ type ExpressRouteCircuitsArpTableListResult struct {
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5905,34 +5628,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5941,12 +5645,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5954,35 +5657,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6010,12 +5688,11 @@ type ExpressRouteCircuitSku struct {
// long-running operation.
type ExpressRouteCircuitsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6023,34 +5700,15 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6059,12 +5717,11 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6072,34 +5729,15 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6108,12 +5746,11 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
// long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6121,34 +5758,15 @@ func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client Exp
return
}
if !done {
- return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6190,12 +5808,11 @@ type ExpressRouteCircuitStats struct {
// operation.
type ExpressRouteCircuitsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6203,34 +5820,15 @@ func (future ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCir
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.UpdateTagsResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6981,12 +6579,11 @@ type InboundNatRulePropertiesFormat struct {
// operation.
type InboundNatRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
+func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6994,34 +6591,15 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
return
}
if !done {
- return inr, azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- inr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
+ inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- inr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7030,12 +6608,11 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
// operation.
type InboundNatRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
+func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7043,35 +6620,10 @@ func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7664,12 +7216,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7677,34 +7228,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7712,12 +7244,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7725,35 +7256,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7761,12 +7267,11 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
// long-running operation.
type InterfacesGetEffectiveRouteTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7774,34 +7279,15 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
return
}
if !done {
- return erlr, azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erlr, err = client.GetEffectiveRouteTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure sending request")
- return
- }
- erlr, err = client.GetEffectiveRouteTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7810,12 +7296,11 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
// long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7823,34 +7308,15 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
return
}
if !done {
- return ensglr, azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure sending request")
- return
- }
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7858,12 +7324,11 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7871,34 +7336,15 @@ func (future InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Inte
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.UpdateTagsResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8718,12 +8164,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8731,34 +8176,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8766,12 +8192,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8779,35 +8204,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8821,12 +8221,11 @@ type LoadBalancerSku struct {
// operation.
type LoadBalancersUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8834,34 +8233,15 @@ func (future LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.UpdateTagsResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9218,12 +8598,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9231,34 +8610,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9267,12 +8627,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9280,35 +8639,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9316,12 +8650,11 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
// operation.
type LocalNetworkGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9329,34 +8662,15 @@ func (future LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGat
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.UpdateTagsResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9918,12 +9232,11 @@ type PacketCaptureResultProperties struct {
// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9931,34 +9244,15 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
return
}
if !done {
- return pcr, azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9966,12 +9260,11 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9979,35 +9272,10 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10015,12 +9283,11 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
// operation.
type PacketCapturesGetStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10028,34 +9295,15 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
return
}
if !done {
- return pcqsr, azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcqsr, err = client.GetStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- pcqsr, err = client.GetStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10063,12 +9311,11 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10076,35 +9323,10 @@ func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10586,12 +9808,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10599,34 +9820,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10635,12 +9837,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10648,35 +9849,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10684,12 +9860,11 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
// operation.
type PublicIPAddressesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10697,34 +9872,15 @@ func (future PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesC
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.UpdateTagsResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11541,12 +10697,11 @@ type RouteFilterRulePropertiesFormat struct {
// operation.
type RouteFilterRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11554,34 +10709,15 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11590,12 +10726,11 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
// operation.
type RouteFilterRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
+func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11603,35 +10738,10 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11639,12 +10749,11 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFilterRulesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11652,34 +10761,15 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.UpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11688,12 +10778,11 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFiltersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11701,34 +10790,15 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11736,12 +10806,11 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
+func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11749,47 +10818,21 @@ func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11797,34 +10840,15 @@ func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf Rou
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.UpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11946,12 +10970,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11959,34 +10982,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11994,12 +10998,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12007,35 +11010,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12279,12 +11257,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12292,34 +11269,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12327,12 +11285,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12340,35 +11297,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12376,12 +11308,11 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
// operation.
type RouteTablesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12389,34 +11320,15 @@ func (future RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt R
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.UpdateTagsResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12674,12 +11586,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12687,34 +11598,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12722,12 +11614,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12735,35 +11626,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12771,12 +11637,11 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
// operation.
type SecurityGroupsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12784,34 +11649,15 @@ func (future SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient)
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.UpdateTagsResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13064,12 +11910,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13077,34 +11922,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13112,12 +11938,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13125,35 +11950,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13387,12 +12187,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13400,34 +12199,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13435,12 +12215,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13448,35 +12227,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14492,12 +13246,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14505,34 +13258,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14541,12 +13275,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14554,35 +13287,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14590,12 +13298,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14603,34 +13310,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14639,12 +13327,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14652,34 +13339,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14688,12 +13356,11 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
// long-running operation.
type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
+func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14701,34 +13368,15 @@ func (future VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client Vir
return
}
if !done {
- return vngcle, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngcle, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngcle.Response.Response, err = future.GetResult(sender); err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent {
+ vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vngcle, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15063,12 +13711,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15076,34 +13723,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15112,12 +13740,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15125,35 +13752,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15161,12 +13763,11 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
// a long-running operation.
type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15174,34 +13775,15 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GeneratevpnclientpackageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GeneratevpnclientpackageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15210,12 +13792,11 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
// long-running operation.
type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15223,34 +13804,15 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GenerateVpnProfileResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GenerateVpnProfileResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GenerateVpnProfileResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15259,12 +13821,11 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
// long-running operation.
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15272,34 +13833,15 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetAdvertisedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetAdvertisedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15308,12 +13850,11 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
// long-running operation.
type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15321,34 +13862,15 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
return
}
if !done {
- return bpslr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bpslr, err = client.GetBgpPeerStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- bpslr, err = client.GetBgpPeerStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15357,12 +13879,11 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
// long-running operation.
type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15370,34 +13891,15 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetLearnedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetLearnedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15406,12 +13908,11 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15419,34 +13920,15 @@ func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GetVpnProfilePackageURLResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GetVpnProfilePackageURLResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15465,12 +13947,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15478,34 +13959,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15514,12 +13976,11 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
// long-running operation.
type VirtualNetworkGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15527,34 +13988,15 @@ func (future VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetwor
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.UpdateTagsResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15972,12 +14414,11 @@ type VirtualNetworkPeeringPropertiesFormat struct {
// long-running operation.
type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15985,34 +14426,15 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vnp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16021,12 +14443,11 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16034,35 +14455,10 @@ func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPee
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16090,12 +14486,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16103,34 +14498,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16139,12 +14515,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16152,35 +14527,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16188,12 +14538,11 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
// operation.
type VirtualNetworksUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16201,34 +14550,15 @@ func (future VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClien
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.UpdateTagsResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16611,12 +14941,11 @@ type WatcherPropertiesFormat struct {
// operation.
type WatchersCheckConnectivityFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
+func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16624,34 +14953,15 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
return
}
if !done {
- return ci, azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ci, err = client.CheckConnectivityResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CheckConnectivityResponder(ci.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure sending request")
- return
- }
- ci, err = client.CheckConnectivityResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16659,12 +14969,11 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
+func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16672,35 +14981,10 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16708,12 +14992,11 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
// long-running operation.
type WatchersGetAzureReachabilityReportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
+func (future *WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16721,34 +15004,15 @@ func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersCli
return
}
if !done {
- return arr, azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- arr, err = client.GetAzureReachabilityReportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
+ arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure sending request")
- return
- }
- arr, err = client.GetAzureReachabilityReportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16757,12 +15021,11 @@ func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersCli
// operation.
type WatchersGetFlowLogStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16770,34 +15033,15 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.GetFlowLogStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.GetFlowLogStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16805,12 +15049,11 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersGetNextHopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
+func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16818,34 +15061,15 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
return
}
if !done {
- return nhr, azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nhr, err = client.GetNextHopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure sending request")
- return
- }
- nhr, err = client.GetNextHopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16854,12 +15078,11 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
// operation.
type WatchersGetTroubleshootingFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16867,34 +15090,15 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16903,12 +15107,11 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
// long-running operation.
type WatchersGetTroubleshootingResultFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16916,34 +15119,15 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResultResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResultResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16952,12 +15136,11 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
// operation.
type WatchersGetVMSecurityRulesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16965,34 +15148,15 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
return
}
if !done {
- return sgvr, azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sgvr, err = client.GetVMSecurityRulesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure sending request")
- return
- }
- sgvr, err = client.GetVMSecurityRulesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17001,12 +15165,11 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
// operation.
type WatchersListAvailableProvidersFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
+func (future *WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17014,34 +15177,15 @@ func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient)
return
}
if !done {
- return apl, azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- apl, err = client.ListAvailableProvidersResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
+ apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure sending request")
- return
- }
- apl, err = client.ListAvailableProvidersResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17050,12 +15194,11 @@ func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient)
// operation.
type WatchersSetFlowLogConfigurationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17063,34 +15206,15 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.SetFlowLogConfigurationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.SetFlowLogConfigurationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17098,12 +15222,11 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersVerifyIPFlowFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17111,34 +15234,15 @@ func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr Ver
return
}
if !done {
- return vifr, azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vifr, err = client.VerifyIPFlowResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure sending request")
- return
- }
- vifr, err = client.VerifyIPFlowResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/packetcaptures.go
index 36bf64892..78b6b80d9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/packetcaptures.go
@@ -98,15 +98,17 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -308,15 +312,17 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// GetStatusSender sends the GetStatus request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +452,17 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/publicipaddresses.go
index 301b84597..c49d425fe 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -769,15 +773,17 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (future PublicIPAddressesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routefilterrules.go
index 152ac5e1d..70181ed68 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routefilterrules.go
@@ -98,15 +98,17 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -406,15 +410,17 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routefilters.go
index db8f0ecc1..5c4f503fd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routefilters.go
@@ -86,15 +86,17 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routes.go
index 8d4054bd5..a1ac17b7d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routetables.go
index f953d9e82..c839f21b0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future RouteTablesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/securitygroups.go
index d8ab89df0..e20eaeef3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/securitygroups.go
@@ -86,15 +86,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future SecurityGroupsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/securityrules.go
index d7489b377..e1761f252 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/securityrules.go
@@ -88,15 +88,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/subnets.go
index 16d256354..13f8a8bf1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworkgatewayconnections.go
index 011f852f3..694d1f4f4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworkgatewayconnections.go
@@ -101,15 +101,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -482,15 +486,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -563,15 +569,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -635,15 +643,17 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworkgateways.go
index 5c027ce5d..b45b6bd82 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworkgateways.go
@@ -93,15 +93,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -234,15 +238,17 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx
// 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) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -307,15 +313,17 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex
// 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) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +454,17 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -519,15 +529,17 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -589,15 +601,17 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -659,15 +673,17 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c
// 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) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -921,15 +937,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1060,15 +1078,17 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworkpeerings.go
index 47c8df88d..a0a54eea9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworkpeerings.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,15 +162,17 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworks.go
index cdc9dbf33..afcd4b75c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/virtualnetworks.go
@@ -157,15 +157,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -226,15 +228,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -646,15 +650,17 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future VirtualNetworksUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/watchers.go
index 25c50de7d..992df7b25 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/watchers.go
@@ -96,15 +96,17 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
// 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) (future WatchersCheckConnectivityFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -235,15 +237,17 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -383,15 +387,17 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont
// 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) (future WatchersGetAzureReachabilityReportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -461,15 +467,17 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -541,15 +549,17 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// GetNextHopSender sends the GetNextHop request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -699,15 +709,17 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -777,15 +789,17 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -855,15 +869,17 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1054,15 +1070,17 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context,
// 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) (future WatchersListAvailableProvidersFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1136,15 +1154,17 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1288,15 +1308,17 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationgateways.go
index 6d15258a1..c2df9f154 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationgateways.go
@@ -88,15 +88,17 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// BackendHealthSender sends the BackendHealth request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -172,15 +174,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -241,15 +245,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -838,15 +844,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -906,15 +914,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -977,15 +987,17 @@ func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (future ApplicationGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationsecuritygroups.go
index c6d745601..aa87a213e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationsecuritygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationsecuritygroups.go
@@ -86,15 +86,17 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context
// 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) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context
// 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) (future ApplicationSecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/connectionmonitors.go
index c71c32f16..ff69a37e0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/connectionmonitors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/connectionmonitors.go
@@ -99,15 +99,17 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -376,15 +380,17 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour
// QuerySender sends the Query request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -447,15 +453,17 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -517,15 +525,17 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitauthorizations.go
index a78e1a2da..6f3b94561 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go
index bf9554471..facb493d8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go
@@ -100,15 +100,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -171,15 +173,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuits.go
index a484e181b..3d3c9de6a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -613,15 +617,17 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -687,15 +693,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -761,15 +769,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -833,15 +843,17 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCircuitsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/inboundnatrules.go
index 592220805..328fe233f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/inboundnatrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/inboundnatrules.go
@@ -108,15 +108,17 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// 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) (future InboundNatRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -179,15 +181,17 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource
// 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) (future InboundNatRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/interfaces.go
index 7f34e4ba6..08f3a3708 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -294,15 +298,17 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -699,15 +705,17 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1068,15 +1076,17 @@ func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceG
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future InterfacesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancers.go
index 267789a0b..f5a7ee090 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future LoadBalancersUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/localnetworkgateways.go
index 09603f947..130d53517 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/localnetworkgateways.go
@@ -95,15 +95,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -413,15 +417,17 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future LocalNetworkGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/models.go
index f903a363c..da4d5474a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/models.go
@@ -3202,12 +3202,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysBackendHealthFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3215,34 +3214,15 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
return
}
if !done {
- return agbh, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- agbh, err = client.BackendHealthResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure sending request")
- return
- }
- agbh, err = client.BackendHealthResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3251,12 +3231,11 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3264,34 +3243,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3300,12 +3260,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3313,35 +3272,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3554,12 +3488,11 @@ type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3567,35 +3500,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3603,12 +3511,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3616,35 +3523,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3652,12 +3534,11 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
// operation.
type ApplicationGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3665,34 +3546,15 @@ func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatew
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.UpdateTagsResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4060,12 +3922,11 @@ type ApplicationSecurityGroupPropertiesFormat struct {
// long-running operation.
type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
+func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4073,34 +3934,15 @@ func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client Applic
return
}
if !done {
- return asg, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- asg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
+ asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- asg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4109,12 +3951,11 @@ func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client Applic
// operation.
type ApplicationSecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4122,35 +3963,10 @@ func (future ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSec
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4995,12 +4811,11 @@ type ConnectionMonitorResultProperties struct {
// long-running operation.
type ConnectionMonitorsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
+func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5008,34 +4823,15 @@ func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMon
return
}
if !done {
- return cmr, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cmr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
+ cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- cmr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5044,12 +4840,11 @@ func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMon
// operation.
type ConnectionMonitorsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5057,35 +4852,10 @@ func (future ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5101,12 +4871,11 @@ type ConnectionMonitorSource struct {
// operation.
type ConnectionMonitorsQueryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
+func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5114,34 +4883,15 @@ func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClie
return
}
if !done {
- return cmqr, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cmqr, err = client.QueryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
+ cmqr, err = client.QueryResponder(cmqr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", resp, "Failure sending request")
- return
- }
- cmqr, err = client.QueryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5150,12 +4900,11 @@ func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClie
// operation.
type ConnectionMonitorsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5163,35 +4912,10 @@ func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClie
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5199,12 +4923,11 @@ func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClie
// operation.
type ConnectionMonitorsStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5212,35 +4935,10 @@ func (future ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5835,12 +5533,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5848,34 +5545,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5884,12 +5562,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5897,35 +5574,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6274,12 +5926,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6287,34 +5938,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6323,12 +5955,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6336,35 +5967,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6433,12 +6039,11 @@ type ExpressRouteCircuitsArpTableListResult struct {
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6446,34 +6051,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6482,12 +6068,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6495,35 +6080,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6551,12 +6111,11 @@ type ExpressRouteCircuitSku struct {
// long-running operation.
type ExpressRouteCircuitsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6564,34 +6123,15 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6600,12 +6140,11 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6613,34 +6152,15 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6649,12 +6169,11 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
// long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6662,34 +6181,15 @@ func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client Exp
return
}
if !done {
- return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6731,12 +6231,11 @@ type ExpressRouteCircuitStats struct {
// operation.
type ExpressRouteCircuitsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6744,34 +6243,15 @@ func (future ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCir
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.UpdateTagsResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7522,12 +7002,11 @@ type InboundNatRulePropertiesFormat struct {
// operation.
type InboundNatRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
+func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7535,34 +7014,15 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
return
}
if !done {
- return inr, azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- inr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
+ inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- inr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7571,12 +7031,11 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
// operation.
type InboundNatRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
+func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7584,35 +7043,10 @@ func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8205,12 +7639,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8218,34 +7651,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8253,12 +7667,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8266,35 +7679,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8302,12 +7690,11 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
// long-running operation.
type InterfacesGetEffectiveRouteTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8315,34 +7702,15 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
return
}
if !done {
- return erlr, azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erlr, err = client.GetEffectiveRouteTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure sending request")
- return
- }
- erlr, err = client.GetEffectiveRouteTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8351,12 +7719,11 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
// long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8364,34 +7731,15 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
return
}
if !done {
- return ensglr, azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure sending request")
- return
- }
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8399,12 +7747,11 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8412,34 +7759,15 @@ func (future InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Inte
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.UpdateTagsResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9259,12 +8587,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9272,34 +8599,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9307,12 +8615,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9320,35 +8627,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9362,12 +8644,11 @@ type LoadBalancerSku struct {
// operation.
type LoadBalancersUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9375,34 +8656,15 @@ func (future LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.UpdateTagsResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9759,12 +9021,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9772,34 +9033,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9808,12 +9050,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9821,35 +9062,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9857,12 +9073,11 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
// operation.
type LocalNetworkGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9870,34 +9085,15 @@ func (future LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGat
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.UpdateTagsResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10459,12 +9655,11 @@ type PacketCaptureResultProperties struct {
// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10472,34 +9667,15 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
return
}
if !done {
- return pcr, azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10507,12 +9683,11 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10520,35 +9695,10 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10556,12 +9706,11 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
// operation.
type PacketCapturesGetStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10569,34 +9718,15 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
return
}
if !done {
- return pcqsr, azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcqsr, err = client.GetStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- pcqsr, err = client.GetStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10604,12 +9734,11 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10617,35 +9746,10 @@ func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11127,12 +10231,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11140,34 +10243,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11176,12 +10260,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11189,35 +10272,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11225,12 +10283,11 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
// operation.
type PublicIPAddressesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11238,34 +10295,15 @@ func (future PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesC
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.UpdateTagsResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12082,12 +11120,11 @@ type RouteFilterRulePropertiesFormat struct {
// operation.
type RouteFilterRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12095,34 +11132,15 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12131,12 +11149,11 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
// operation.
type RouteFilterRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
+func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12144,35 +11161,10 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12180,12 +11172,11 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFilterRulesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12193,34 +11184,15 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.UpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12229,12 +11201,11 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFiltersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12242,34 +11213,15 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12277,12 +11229,11 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
+func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12290,47 +11241,21 @@ func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12338,34 +11263,15 @@ func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf Rou
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.UpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12487,12 +11393,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12500,34 +11405,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12535,12 +11421,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12548,35 +11433,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12822,12 +11682,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12835,34 +11694,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12870,12 +11710,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12883,35 +11722,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12919,12 +11733,11 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
// operation.
type RouteTablesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12932,34 +11745,15 @@ func (future RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt R
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.UpdateTagsResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13217,12 +12011,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13230,34 +12023,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13265,12 +12039,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13278,35 +12051,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13314,12 +12062,11 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
// operation.
type SecurityGroupsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13327,34 +12074,15 @@ func (future SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient)
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.UpdateTagsResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13607,12 +12335,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13620,34 +12347,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13655,12 +12363,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13668,35 +12375,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13930,12 +12612,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13943,34 +12624,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13978,12 +12640,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13991,35 +12652,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15039,12 +13675,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15052,34 +13687,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15088,12 +13704,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15101,35 +13716,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15137,12 +13727,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15150,34 +13739,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15186,12 +13756,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15199,34 +13768,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15235,12 +13785,11 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
// long-running operation.
type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
+func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15248,34 +13797,15 @@ func (future VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client Vir
return
}
if !done {
- return vngcle, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngcle, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngcle.Response.Response, err = future.GetResult(sender); err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent {
+ vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vngcle, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15610,12 +14140,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15623,34 +14152,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15659,12 +14169,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15672,35 +14181,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15708,12 +14192,11 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
// a long-running operation.
type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15721,34 +14204,15 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GeneratevpnclientpackageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GeneratevpnclientpackageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15757,12 +14221,11 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
// long-running operation.
type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15770,34 +14233,15 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GenerateVpnProfileResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GenerateVpnProfileResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GenerateVpnProfileResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15806,12 +14250,11 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
// long-running operation.
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15819,34 +14262,15 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetAdvertisedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetAdvertisedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15855,12 +14279,11 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
// long-running operation.
type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15868,34 +14291,15 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
return
}
if !done {
- return bpslr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bpslr, err = client.GetBgpPeerStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- bpslr, err = client.GetBgpPeerStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15904,12 +14308,11 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
// long-running operation.
type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15917,34 +14320,15 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetLearnedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetLearnedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15953,12 +14337,11 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15966,34 +14349,15 @@ func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GetVpnProfilePackageURLResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GetVpnProfilePackageURLResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16012,12 +14376,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16025,34 +14388,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16061,12 +14405,11 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
// long-running operation.
type VirtualNetworkGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16074,34 +14417,15 @@ func (future VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetwor
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.UpdateTagsResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16519,12 +14843,11 @@ type VirtualNetworkPeeringPropertiesFormat struct {
// long-running operation.
type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16532,34 +14855,15 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vnp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16568,12 +14872,11 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16581,35 +14884,10 @@ func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPee
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16637,12 +14915,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16650,34 +14927,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16686,12 +14944,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16699,35 +14956,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16735,12 +14967,11 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
// operation.
type VirtualNetworksUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16748,34 +14979,15 @@ func (future VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClien
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.UpdateTagsResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17158,12 +15370,11 @@ type WatcherPropertiesFormat struct {
// operation.
type WatchersCheckConnectivityFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
+func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17171,34 +15382,15 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
return
}
if !done {
- return ci, azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ci, err = client.CheckConnectivityResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CheckConnectivityResponder(ci.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure sending request")
- return
- }
- ci, err = client.CheckConnectivityResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17206,12 +15398,11 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
+func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17219,35 +15410,10 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -17255,12 +15421,11 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
// long-running operation.
type WatchersGetAzureReachabilityReportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
+func (future *WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17268,34 +15433,15 @@ func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersCli
return
}
if !done {
- return arr, azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- arr, err = client.GetAzureReachabilityReportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
+ arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure sending request")
- return
- }
- arr, err = client.GetAzureReachabilityReportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17304,12 +15450,11 @@ func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersCli
// operation.
type WatchersGetFlowLogStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17317,34 +15462,15 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.GetFlowLogStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.GetFlowLogStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17352,12 +15478,11 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersGetNextHopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
+func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17365,34 +15490,15 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
return
}
if !done {
- return nhr, azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nhr, err = client.GetNextHopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure sending request")
- return
- }
- nhr, err = client.GetNextHopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17401,12 +15507,11 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
// operation.
type WatchersGetTroubleshootingFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17414,34 +15519,15 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17450,12 +15536,11 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
// long-running operation.
type WatchersGetTroubleshootingResultFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17463,34 +15548,15 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResultResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResultResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17499,12 +15565,11 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
// operation.
type WatchersGetVMSecurityRulesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17512,34 +15577,15 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
return
}
if !done {
- return sgvr, azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sgvr, err = client.GetVMSecurityRulesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure sending request")
- return
- }
- sgvr, err = client.GetVMSecurityRulesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17548,12 +15594,11 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
// operation.
type WatchersListAvailableProvidersFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
+func (future *WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17561,34 +15606,15 @@ func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient)
return
}
if !done {
- return apl, azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- apl, err = client.ListAvailableProvidersResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
+ apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure sending request")
- return
- }
- apl, err = client.ListAvailableProvidersResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17597,12 +15623,11 @@ func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient)
// operation.
type WatchersSetFlowLogConfigurationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17610,34 +15635,15 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.SetFlowLogConfigurationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.SetFlowLogConfigurationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17645,12 +15651,11 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersVerifyIPFlowFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17658,34 +15663,15 @@ func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr Ver
return
}
if !done {
- return vifr, azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vifr, err = client.VerifyIPFlowResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure sending request")
- return
- }
- vifr, err = client.VerifyIPFlowResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/packetcaptures.go
index ae4f6b62a..c246fd4b3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/packetcaptures.go
@@ -98,15 +98,17 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -308,15 +312,17 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// GetStatusSender sends the GetStatus request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +452,17 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/publicipaddresses.go
index 44e20d25b..0ff2be14b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -769,15 +773,17 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (future PublicIPAddressesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilterrules.go
index 5d9cd0cfb..35f5a7bf1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilterrules.go
@@ -98,15 +98,17 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -406,15 +410,17 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilters.go
index f3473d22f..4907bf508 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilters.go
@@ -86,15 +86,17 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routes.go
index afeccf00f..51be7bc2f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routetables.go
index 66746bc9f..031b515d5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future RouteTablesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securitygroups.go
index 8e507e287..6b0ad5dd8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securitygroups.go
@@ -86,15 +86,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future SecurityGroupsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securityrules.go
index b30c03f48..f543ff981 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securityrules.go
@@ -88,15 +88,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/subnets.go
index 34bb2ab1f..21ab25d73 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go
index 15f773eb8..7b2b49229 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go
@@ -101,15 +101,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -482,15 +486,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -563,15 +569,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -635,15 +643,17 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgateways.go
index df83b12e5..8d5af88a8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgateways.go
@@ -93,15 +93,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -234,15 +238,17 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx
// 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) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -307,15 +313,17 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex
// 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) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +454,17 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -519,15 +529,17 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -589,15 +601,17 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -659,15 +673,17 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c
// 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) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -921,15 +937,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1060,15 +1078,17 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkpeerings.go
index 489d76ae4..b0795507d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkpeerings.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,15 +162,17 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworks.go
index ee8351693..3e09c72cc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworks.go
@@ -157,15 +157,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -226,15 +228,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -646,15 +650,17 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future VirtualNetworksUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/watchers.go
index 16293f3dd..619e57acc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/watchers.go
@@ -96,15 +96,17 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
// 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) (future WatchersCheckConnectivityFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -235,15 +237,17 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -383,15 +387,17 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont
// 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) (future WatchersGetAzureReachabilityReportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -461,15 +467,17 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -541,15 +549,17 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// GetNextHopSender sends the GetNextHop request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -693,15 +703,17 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -771,15 +783,17 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -849,15 +863,17 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1048,15 +1064,17 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context,
// 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) (future WatchersListAvailableProvidersFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1130,15 +1148,17 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1282,15 +1302,17 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/applicationgateways.go
index ae0da7f82..0fc00771b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/applicationgateways.go
@@ -88,15 +88,17 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// BackendHealthSender sends the BackendHealth request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -172,15 +174,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -241,15 +245,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -838,15 +844,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -906,15 +914,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -977,15 +987,17 @@ func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (future ApplicationGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/applicationsecuritygroups.go
index 069c250cb..60a788822 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/applicationsecuritygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/applicationsecuritygroups.go
@@ -86,15 +86,17 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context
// 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) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context
// 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) (future ApplicationSecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/connectionmonitors.go
index 1c2f01d2d..c09e3e322 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/connectionmonitors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/connectionmonitors.go
@@ -99,15 +99,17 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -376,15 +380,17 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour
// QuerySender sends the Query request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -447,15 +453,17 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -517,15 +525,17 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/expressroutecircuitauthorizations.go
index ba5951e0c..21f23383e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/expressroutecircuitpeerings.go
index 7ad236f64..77e5c4a62 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/expressroutecircuitpeerings.go
@@ -100,15 +100,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -171,15 +173,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/expressroutecircuits.go
index 9af7c32a7..739459ae2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -613,15 +617,17 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -687,15 +693,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -761,15 +769,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -833,15 +843,17 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCircuitsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/inboundnatrules.go
index 9543ace65..b35a9d21f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/inboundnatrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/inboundnatrules.go
@@ -108,15 +108,17 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// 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) (future InboundNatRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -179,15 +181,17 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource
// 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) (future InboundNatRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/interfaces.go
index d1ed6ee59..6bfcb6886 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -294,15 +298,17 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -699,15 +705,17 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1068,15 +1076,17 @@ func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceG
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future InterfacesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/loadbalancers.go
index 0d35e2e4a..95ee240fd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future LoadBalancersUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/localnetworkgateways.go
index 5e11d1d69..6118e787a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/localnetworkgateways.go
@@ -95,15 +95,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -413,15 +417,17 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future LocalNetworkGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/models.go
index 6eac5aa8a..08bd717d6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/models.go
@@ -3202,12 +3202,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysBackendHealthFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3215,34 +3214,15 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
return
}
if !done {
- return agbh, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- agbh, err = client.BackendHealthResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure sending request")
- return
- }
- agbh, err = client.BackendHealthResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3251,12 +3231,11 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3264,34 +3243,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3300,12 +3260,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3313,35 +3272,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3554,12 +3488,11 @@ type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3567,35 +3500,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3603,12 +3511,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3616,35 +3523,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3652,12 +3534,11 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
// operation.
type ApplicationGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3665,34 +3546,15 @@ func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatew
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.UpdateTagsResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4060,12 +3922,11 @@ type ApplicationSecurityGroupPropertiesFormat struct {
// long-running operation.
type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
+func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4073,34 +3934,15 @@ func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client Applic
return
}
if !done {
- return asg, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- asg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
+ asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- asg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4109,12 +3951,11 @@ func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client Applic
// operation.
type ApplicationSecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4122,35 +3963,10 @@ func (future ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSec
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4995,12 +4811,11 @@ type ConnectionMonitorResultProperties struct {
// long-running operation.
type ConnectionMonitorsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
+func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5008,34 +4823,15 @@ func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMon
return
}
if !done {
- return cmr, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cmr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
+ cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- cmr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5044,12 +4840,11 @@ func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMon
// operation.
type ConnectionMonitorsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5057,35 +4852,10 @@ func (future ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5101,12 +4871,11 @@ type ConnectionMonitorSource struct {
// operation.
type ConnectionMonitorsQueryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
+func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5114,34 +4883,15 @@ func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClie
return
}
if !done {
- return cmqr, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cmqr, err = client.QueryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
+ cmqr, err = client.QueryResponder(cmqr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", resp, "Failure sending request")
- return
- }
- cmqr, err = client.QueryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5150,12 +4900,11 @@ func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClie
// operation.
type ConnectionMonitorsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5163,35 +4912,10 @@ func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClie
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5199,12 +4923,11 @@ func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClie
// operation.
type ConnectionMonitorsStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5212,35 +4935,10 @@ func (future ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5835,12 +5533,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5848,34 +5545,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5884,12 +5562,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5897,35 +5574,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6274,12 +5926,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6287,34 +5938,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6323,12 +5955,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6336,35 +5967,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6433,12 +6039,11 @@ type ExpressRouteCircuitsArpTableListResult struct {
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6446,34 +6051,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6482,12 +6068,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6495,35 +6080,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6551,12 +6111,11 @@ type ExpressRouteCircuitSku struct {
// long-running operation.
type ExpressRouteCircuitsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6564,34 +6123,15 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6600,12 +6140,11 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6613,34 +6152,15 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6649,12 +6169,11 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
// long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6662,34 +6181,15 @@ func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client Exp
return
}
if !done {
- return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6731,12 +6231,11 @@ type ExpressRouteCircuitStats struct {
// operation.
type ExpressRouteCircuitsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6744,34 +6243,15 @@ func (future ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCir
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.UpdateTagsResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7526,12 +7006,11 @@ type InboundNatRulePropertiesFormat struct {
// operation.
type InboundNatRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
+func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7539,34 +7018,15 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
return
}
if !done {
- return inr, azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- inr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
+ inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- inr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7575,12 +7035,11 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
// operation.
type InboundNatRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
+func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7588,35 +7047,10 @@ func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8209,12 +7643,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8222,34 +7655,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8257,12 +7671,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8270,35 +7683,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8306,12 +7694,11 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
// long-running operation.
type InterfacesGetEffectiveRouteTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8319,34 +7706,15 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
return
}
if !done {
- return erlr, azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erlr, err = client.GetEffectiveRouteTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure sending request")
- return
- }
- erlr, err = client.GetEffectiveRouteTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8355,12 +7723,11 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
// long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8368,34 +7735,15 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
return
}
if !done {
- return ensglr, azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure sending request")
- return
- }
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8403,12 +7751,11 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8416,34 +7763,15 @@ func (future InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Inte
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.UpdateTagsResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9271,12 +8599,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9284,34 +8611,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9319,12 +8627,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9332,35 +8639,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9374,12 +8656,11 @@ type LoadBalancerSku struct {
// operation.
type LoadBalancersUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9387,34 +8668,15 @@ func (future LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.UpdateTagsResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9771,12 +9033,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9784,34 +9045,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9820,12 +9062,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9833,35 +9074,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9869,12 +9085,11 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
// operation.
type LocalNetworkGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9882,34 +9097,15 @@ func (future LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGat
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.UpdateTagsResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10471,12 +9667,11 @@ type PacketCaptureResultProperties struct {
// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10484,34 +9679,15 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
return
}
if !done {
- return pcr, azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10519,12 +9695,11 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10532,35 +9707,10 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10568,12 +9718,11 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
// operation.
type PacketCapturesGetStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10581,34 +9730,15 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
return
}
if !done {
- return pcqsr, azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcqsr, err = client.GetStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- pcqsr, err = client.GetStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10616,12 +9746,11 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10629,35 +9758,10 @@ func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11125,12 +10229,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11138,34 +10241,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11174,12 +10258,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11187,35 +10270,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11223,12 +10281,11 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
// operation.
type PublicIPAddressesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11236,34 +10293,15 @@ func (future PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesC
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.UpdateTagsResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12068,12 +11106,11 @@ type RouteFilterRulePropertiesFormat struct {
// operation.
type RouteFilterRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12081,34 +11118,15 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12117,12 +11135,11 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
// operation.
type RouteFilterRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
+func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12130,35 +11147,10 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12166,12 +11158,11 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFilterRulesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12179,34 +11170,15 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.UpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12215,12 +11187,11 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFiltersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12228,34 +11199,15 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12263,12 +11215,11 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
+func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12276,47 +11227,21 @@ func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12324,34 +11249,15 @@ func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf Rou
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.UpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12473,12 +11379,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12486,34 +11391,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12521,12 +11407,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12534,35 +11419,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12808,12 +11668,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12821,34 +11680,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12856,12 +11696,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12869,35 +11708,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12905,12 +11719,11 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
// operation.
type RouteTablesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12918,34 +11731,15 @@ func (future RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt R
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.UpdateTagsResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13203,12 +11997,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13216,34 +12009,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13251,12 +12025,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13264,35 +12037,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13300,12 +12048,11 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
// operation.
type SecurityGroupsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13313,34 +12060,15 @@ func (future SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient)
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.UpdateTagsResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13593,12 +12321,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13606,34 +12333,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13641,12 +12349,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13654,35 +12361,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13916,12 +12598,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13929,34 +12610,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13964,12 +12626,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13977,35 +12638,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15025,12 +13661,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15038,34 +13673,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15074,12 +13690,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15087,35 +13702,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15123,12 +13713,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15136,34 +13725,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15172,12 +13742,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15185,34 +13754,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15221,12 +13771,11 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
// long-running operation.
type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
+func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15234,34 +13783,15 @@ func (future VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client Vir
return
}
if !done {
- return vngcle, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngcle, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngcle.Response.Response, err = future.GetResult(sender); err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent {
+ vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vngcle, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15596,12 +14126,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15609,34 +14138,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15645,12 +14155,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15658,35 +14167,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15694,12 +14178,11 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
// a long-running operation.
type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15707,34 +14190,15 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GeneratevpnclientpackageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GeneratevpnclientpackageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15743,12 +14207,11 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
// long-running operation.
type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15756,34 +14219,15 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GenerateVpnProfileResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GenerateVpnProfileResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GenerateVpnProfileResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15792,12 +14236,11 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
// long-running operation.
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15805,34 +14248,15 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetAdvertisedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetAdvertisedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15841,12 +14265,11 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
// long-running operation.
type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15854,34 +14277,15 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
return
}
if !done {
- return bpslr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bpslr, err = client.GetBgpPeerStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- bpslr, err = client.GetBgpPeerStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15890,12 +14294,11 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
// long-running operation.
type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15903,34 +14306,15 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetLearnedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetLearnedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15939,12 +14323,11 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15952,34 +14335,15 @@ func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GetVpnProfilePackageURLResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GetVpnProfilePackageURLResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15998,12 +14362,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16011,34 +14374,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16047,12 +14391,11 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
// long-running operation.
type VirtualNetworkGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16060,34 +14403,15 @@ func (future VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetwor
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.UpdateTagsResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16505,12 +14829,11 @@ type VirtualNetworkPeeringPropertiesFormat struct {
// long-running operation.
type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16518,34 +14841,15 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vnp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16554,12 +14858,11 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16567,35 +14870,10 @@ func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPee
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16623,12 +14901,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16636,34 +14913,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16672,12 +14930,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16685,35 +14942,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16721,12 +14953,11 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
// operation.
type VirtualNetworksUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16734,34 +14965,15 @@ func (future VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClien
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.UpdateTagsResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17144,12 +15356,11 @@ type WatcherPropertiesFormat struct {
// operation.
type WatchersCheckConnectivityFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
+func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17157,34 +15368,15 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
return
}
if !done {
- return ci, azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ci, err = client.CheckConnectivityResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CheckConnectivityResponder(ci.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure sending request")
- return
- }
- ci, err = client.CheckConnectivityResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17192,12 +15384,11 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
+func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17205,35 +15396,10 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -17241,12 +15407,11 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
// long-running operation.
type WatchersGetAzureReachabilityReportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
+func (future *WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17254,34 +15419,15 @@ func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersCli
return
}
if !done {
- return arr, azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- arr, err = client.GetAzureReachabilityReportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
+ arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure sending request")
- return
- }
- arr, err = client.GetAzureReachabilityReportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17290,12 +15436,11 @@ func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersCli
// operation.
type WatchersGetFlowLogStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17303,34 +15448,15 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.GetFlowLogStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.GetFlowLogStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17338,12 +15464,11 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersGetNextHopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
+func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17351,34 +15476,15 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
return
}
if !done {
- return nhr, azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nhr, err = client.GetNextHopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure sending request")
- return
- }
- nhr, err = client.GetNextHopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17387,12 +15493,11 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
// operation.
type WatchersGetTroubleshootingFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17400,34 +15505,15 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17436,12 +15522,11 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
// long-running operation.
type WatchersGetTroubleshootingResultFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17449,34 +15534,15 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResultResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResultResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17485,12 +15551,11 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
// operation.
type WatchersGetVMSecurityRulesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17498,34 +15563,15 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
return
}
if !done {
- return sgvr, azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sgvr, err = client.GetVMSecurityRulesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure sending request")
- return
- }
- sgvr, err = client.GetVMSecurityRulesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17534,12 +15580,11 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
// operation.
type WatchersListAvailableProvidersFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
+func (future *WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17547,34 +15592,15 @@ func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient)
return
}
if !done {
- return apl, azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- apl, err = client.ListAvailableProvidersResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
+ apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure sending request")
- return
- }
- apl, err = client.ListAvailableProvidersResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17583,12 +15609,11 @@ func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient)
// operation.
type WatchersSetFlowLogConfigurationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17596,34 +15621,15 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.SetFlowLogConfigurationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.SetFlowLogConfigurationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17631,12 +15637,11 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersVerifyIPFlowFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17644,34 +15649,15 @@ func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr Ver
return
}
if !done {
- return vifr, azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vifr, err = client.VerifyIPFlowResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure sending request")
- return
- }
- vifr, err = client.VerifyIPFlowResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/packetcaptures.go
index edebe11e5..46379c722 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/packetcaptures.go
@@ -98,15 +98,17 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -308,15 +312,17 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// GetStatusSender sends the GetStatus request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +452,17 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/publicipaddresses.go
index fad2f83f9..ed7e162db 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -769,15 +773,17 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (future PublicIPAddressesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routefilterrules.go
index ca1f01590..48d7e2e99 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routefilterrules.go
@@ -98,15 +98,17 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -406,15 +410,17 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routefilters.go
index cdc5a38ca..74bbdc9a0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routefilters.go
@@ -86,15 +86,17 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routes.go
index 3bdf00094..7d037c814 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routetables.go
index 1c544f0b0..0731fe768 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future RouteTablesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/securitygroups.go
index 1cb1e194b..ef06d58b3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/securitygroups.go
@@ -86,15 +86,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future SecurityGroupsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/securityrules.go
index e2f3451de..eb5eddfd7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/securityrules.go
@@ -88,15 +88,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/subnets.go
index 5dd96a4d4..e6c341df3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworkgatewayconnections.go
index fe4ca0e33..a3d2b79b0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworkgatewayconnections.go
@@ -101,15 +101,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -482,15 +486,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -563,15 +569,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -635,15 +643,17 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworkgateways.go
index 0c7f9bb18..9058d3b7b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworkgateways.go
@@ -93,15 +93,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -234,15 +238,17 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx
// 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) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -307,15 +313,17 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex
// 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) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +454,17 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -519,15 +529,17 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -589,15 +601,17 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -659,15 +673,17 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c
// 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) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -921,15 +937,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1060,15 +1078,17 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworkpeerings.go
index eb6b98f8d..a36a9bad0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworkpeerings.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,15 +162,17 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworks.go
index 9247fd61c..7a860bc57 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/virtualnetworks.go
@@ -157,15 +157,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -226,15 +228,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -646,15 +650,17 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future VirtualNetworksUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/watchers.go
index 4150d2439..f9fa4430c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-11-01/network/watchers.go
@@ -96,15 +96,17 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
// 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) (future WatchersCheckConnectivityFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -235,15 +237,17 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -383,15 +387,17 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont
// 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) (future WatchersGetAzureReachabilityReportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -461,15 +467,17 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -541,15 +549,17 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// GetNextHopSender sends the GetNextHop request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -693,15 +703,17 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -771,15 +783,17 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -849,15 +863,17 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1048,15 +1064,17 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context,
// 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) (future WatchersListAvailableProvidersFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1130,15 +1148,17 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1282,15 +1302,17 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/applicationgateways.go
index b899b2eb7..bee104bec 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/applicationgateways.go
@@ -88,15 +88,17 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// BackendHealthSender sends the BackendHealth request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -245,15 +249,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -842,15 +848,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -910,15 +918,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -981,15 +991,17 @@ func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (future ApplicationGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/applicationsecuritygroups.go
index 2e253f62b..727b7b1c1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/applicationsecuritygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/applicationsecuritygroups.go
@@ -86,15 +86,17 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context
// 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) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context
// 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) (future ApplicationSecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/connectionmonitors.go
index 30d1acf16..d19cbad06 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/connectionmonitors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/connectionmonitors.go
@@ -99,15 +99,17 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -376,15 +380,17 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour
// QuerySender sends the Query request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -447,15 +453,17 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -517,15 +525,17 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/expressroutecircuitauthorizations.go
index 9a415408f..35f9e2744 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/expressroutecircuitpeerings.go
index a457594fa..ae71fb22a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/expressroutecircuitpeerings.go
@@ -100,15 +100,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -171,15 +173,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/expressroutecircuits.go
index f5daa6c82..b48f75e10 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -613,15 +617,17 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -687,15 +693,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -761,15 +769,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -833,15 +843,17 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCircuitsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/inboundnatrules.go
index 13655aae2..5e976c919 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/inboundnatrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/inboundnatrules.go
@@ -108,15 +108,17 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// 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) (future InboundNatRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -179,15 +181,17 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource
// 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) (future InboundNatRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/interfaces.go
index b839481f7..6165ccc6d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -294,15 +298,17 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -699,15 +705,17 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1068,15 +1076,17 @@ func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceG
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future InterfacesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/loadbalancers.go
index 79c13ecd7..7513f9d14 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future LoadBalancersUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/localnetworkgateways.go
index 2e9319e12..e43ee6f27 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/localnetworkgateways.go
@@ -95,15 +95,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -413,15 +417,17 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future LocalNetworkGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/models.go
index 2da829618..994808f03 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/models.go
@@ -3202,12 +3202,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysBackendHealthFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3215,34 +3214,15 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
return
}
if !done {
- return agbh, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- agbh, err = client.BackendHealthResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure sending request")
- return
- }
- agbh, err = client.BackendHealthResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3251,12 +3231,11 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3264,34 +3243,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3300,12 +3260,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3313,35 +3272,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3554,12 +3488,11 @@ type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3567,35 +3500,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3603,12 +3511,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3616,35 +3523,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3652,12 +3534,11 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
// operation.
type ApplicationGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3665,34 +3546,15 @@ func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatew
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.UpdateTagsResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4064,12 +3926,11 @@ type ApplicationSecurityGroupPropertiesFormat struct {
// long-running operation.
type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
+func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4077,34 +3938,15 @@ func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client Applic
return
}
if !done {
- return asg, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- asg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
+ asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- asg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4113,12 +3955,11 @@ func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client Applic
// operation.
type ApplicationSecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4126,35 +3967,10 @@ func (future ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSec
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4999,12 +4815,11 @@ type ConnectionMonitorResultProperties struct {
// long-running operation.
type ConnectionMonitorsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
+func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5012,34 +4827,15 @@ func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMon
return
}
if !done {
- return cmr, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cmr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
+ cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- cmr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5048,12 +4844,11 @@ func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMon
// operation.
type ConnectionMonitorsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5061,35 +4856,10 @@ func (future ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5105,12 +4875,11 @@ type ConnectionMonitorSource struct {
// operation.
type ConnectionMonitorsQueryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
+func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5118,34 +4887,15 @@ func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClie
return
}
if !done {
- return cmqr, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cmqr, err = client.QueryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
+ cmqr, err = client.QueryResponder(cmqr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", resp, "Failure sending request")
- return
- }
- cmqr, err = client.QueryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5154,12 +4904,11 @@ func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClie
// operation.
type ConnectionMonitorsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5167,35 +4916,10 @@ func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClie
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5203,12 +4927,11 @@ func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClie
// operation.
type ConnectionMonitorsStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5216,35 +4939,10 @@ func (future ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5839,12 +5537,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5852,34 +5549,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5888,12 +5566,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5901,35 +5578,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6278,12 +5930,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6291,34 +5942,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6327,12 +5959,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6340,35 +5971,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6437,12 +6043,11 @@ type ExpressRouteCircuitsArpTableListResult struct {
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6450,34 +6055,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6486,12 +6072,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6499,35 +6084,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6555,12 +6115,11 @@ type ExpressRouteCircuitSku struct {
// long-running operation.
type ExpressRouteCircuitsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6568,34 +6127,15 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6604,12 +6144,11 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6617,34 +6156,15 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6653,12 +6173,11 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
// long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6666,34 +6185,15 @@ func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client Exp
return
}
if !done {
- return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6735,12 +6235,11 @@ type ExpressRouteCircuitStats struct {
// operation.
type ExpressRouteCircuitsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6748,34 +6247,15 @@ func (future ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCir
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.UpdateTagsResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7544,12 +7024,11 @@ type InboundNatRulePropertiesFormat struct {
// operation.
type InboundNatRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
+func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7557,34 +7036,15 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
return
}
if !done {
- return inr, azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- inr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
+ inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- inr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7593,12 +7053,11 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
// operation.
type InboundNatRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
+func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7606,35 +7065,10 @@ func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8227,12 +7661,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8240,34 +7673,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8275,12 +7689,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8288,35 +7701,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8324,12 +7712,11 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
// long-running operation.
type InterfacesGetEffectiveRouteTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8337,34 +7724,15 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
return
}
if !done {
- return erlr, azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erlr, err = client.GetEffectiveRouteTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure sending request")
- return
- }
- erlr, err = client.GetEffectiveRouteTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8373,12 +7741,11 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
// long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8386,34 +7753,15 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
return
}
if !done {
- return ensglr, azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure sending request")
- return
- }
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8421,12 +7769,11 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8434,34 +7781,15 @@ func (future InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Inte
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.UpdateTagsResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9289,12 +8617,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9302,34 +8629,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9337,12 +8645,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9350,35 +8657,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9392,12 +8674,11 @@ type LoadBalancerSku struct {
// operation.
type LoadBalancersUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9405,34 +8686,15 @@ func (future LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.UpdateTagsResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9789,12 +9051,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9802,34 +9063,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9838,12 +9080,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9851,35 +9092,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9887,12 +9103,11 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
// operation.
type LocalNetworkGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9900,34 +9115,15 @@ func (future LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGat
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.UpdateTagsResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10545,12 +9741,11 @@ type PacketCaptureResultProperties struct {
// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10558,34 +9753,15 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
return
}
if !done {
- return pcr, azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10593,12 +9769,11 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10606,35 +9781,10 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10642,12 +9792,11 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
// operation.
type PacketCapturesGetStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10655,34 +9804,15 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
return
}
if !done {
- return pcqsr, azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcqsr, err = client.GetStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- pcqsr, err = client.GetStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10690,12 +9820,11 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10703,35 +9832,10 @@ func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11199,12 +10303,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11212,34 +10315,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11248,12 +10332,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11261,35 +10344,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11297,12 +10355,11 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
// operation.
type PublicIPAddressesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11310,34 +10367,15 @@ func (future PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesC
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.UpdateTagsResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12142,12 +11180,11 @@ type RouteFilterRulePropertiesFormat struct {
// operation.
type RouteFilterRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12155,34 +11192,15 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12191,12 +11209,11 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
// operation.
type RouteFilterRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
+func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12204,35 +11221,10 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12240,12 +11232,11 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFilterRulesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12253,34 +11244,15 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.UpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12289,12 +11261,11 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFiltersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12302,34 +11273,15 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12337,12 +11289,11 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
+func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12350,47 +11301,21 @@ func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12398,34 +11323,15 @@ func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf Rou
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.UpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12547,12 +11453,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12560,34 +11465,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12595,12 +11481,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12608,35 +11493,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12882,12 +11742,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12895,34 +11754,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12930,12 +11770,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12943,35 +11782,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12979,12 +11793,11 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
// operation.
type RouteTablesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12992,34 +11805,15 @@ func (future RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt R
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.UpdateTagsResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13277,12 +12071,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13290,34 +12083,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13325,12 +12099,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13338,35 +12111,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13374,12 +12122,11 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
// operation.
type SecurityGroupsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13387,34 +12134,15 @@ func (future SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient)
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.UpdateTagsResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13667,12 +12395,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13680,34 +12407,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13715,12 +12423,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13728,35 +12435,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13990,12 +12672,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14003,34 +12684,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14038,12 +12700,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14051,35 +12712,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15116,12 +13752,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15129,34 +13764,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15165,12 +13781,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15178,35 +13793,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15214,12 +13804,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15227,34 +13816,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15263,12 +13833,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15276,34 +13845,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15312,12 +13862,11 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
// long-running operation.
type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
+func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15325,34 +13874,15 @@ func (future VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client Vir
return
}
if !done {
- return vngcle, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngcle, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngcle.Response.Response, err = future.GetResult(sender); err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent {
+ vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vngcle, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15687,12 +14217,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15700,34 +14229,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15736,12 +14246,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15749,35 +14258,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15785,12 +14269,11 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
// a long-running operation.
type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15798,34 +14281,15 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GeneratevpnclientpackageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GeneratevpnclientpackageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15834,12 +14298,11 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
// long-running operation.
type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15847,34 +14310,15 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GenerateVpnProfileResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GenerateVpnProfileResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GenerateVpnProfileResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15883,12 +14327,11 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
// long-running operation.
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15896,34 +14339,15 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetAdvertisedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetAdvertisedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15932,12 +14356,11 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
// long-running operation.
type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15945,34 +14368,15 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
return
}
if !done {
- return bpslr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bpslr, err = client.GetBgpPeerStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- bpslr, err = client.GetBgpPeerStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15981,12 +14385,11 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
// long-running operation.
type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15994,34 +14397,15 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetLearnedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetLearnedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16030,12 +14414,11 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16043,34 +14426,15 @@ func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GetVpnProfilePackageURLResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GetVpnProfilePackageURLResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16089,12 +14453,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16102,34 +14465,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16138,12 +14482,11 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
// long-running operation.
type VirtualNetworkGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16151,34 +14494,15 @@ func (future VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetwor
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.UpdateTagsResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16596,12 +14920,11 @@ type VirtualNetworkPeeringPropertiesFormat struct {
// long-running operation.
type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16609,34 +14932,15 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vnp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16645,12 +14949,11 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16658,35 +14961,10 @@ func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPee
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16714,12 +14992,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16727,34 +15004,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16763,12 +15021,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16776,35 +15033,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16812,12 +15044,11 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
// operation.
type VirtualNetworksUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16825,34 +15056,15 @@ func (future VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClien
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.UpdateTagsResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17234,12 +15446,11 @@ type WatcherPropertiesFormat struct {
// operation.
type WatchersCheckConnectivityFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
+func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17247,34 +15458,15 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
return
}
if !done {
- return ci, azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ci, err = client.CheckConnectivityResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CheckConnectivityResponder(ci.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure sending request")
- return
- }
- ci, err = client.CheckConnectivityResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17282,12 +15474,11 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
+func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17295,35 +15486,10 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -17331,12 +15497,11 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
// long-running operation.
type WatchersGetAzureReachabilityReportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
+func (future *WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17344,34 +15509,15 @@ func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersCli
return
}
if !done {
- return arr, azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- arr, err = client.GetAzureReachabilityReportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
+ arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure sending request")
- return
- }
- arr, err = client.GetAzureReachabilityReportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17380,12 +15526,11 @@ func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersCli
// operation.
type WatchersGetFlowLogStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17393,34 +15538,15 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.GetFlowLogStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.GetFlowLogStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17428,12 +15554,11 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersGetNextHopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
+func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17441,34 +15566,15 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
return
}
if !done {
- return nhr, azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nhr, err = client.GetNextHopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure sending request")
- return
- }
- nhr, err = client.GetNextHopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17477,12 +15583,11 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
// operation.
type WatchersGetTroubleshootingFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17490,34 +15595,15 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17526,12 +15612,11 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
// long-running operation.
type WatchersGetTroubleshootingResultFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17539,34 +15624,15 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResultResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResultResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17575,12 +15641,11 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
// operation.
type WatchersGetVMSecurityRulesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17588,34 +15653,15 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
return
}
if !done {
- return sgvr, azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sgvr, err = client.GetVMSecurityRulesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure sending request")
- return
- }
- sgvr, err = client.GetVMSecurityRulesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17624,12 +15670,11 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
// operation.
type WatchersListAvailableProvidersFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
+func (future *WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17637,34 +15682,15 @@ func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient)
return
}
if !done {
- return apl, azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- apl, err = client.ListAvailableProvidersResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
+ apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure sending request")
- return
- }
- apl, err = client.ListAvailableProvidersResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17673,12 +15699,11 @@ func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient)
// operation.
type WatchersSetFlowLogConfigurationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17686,34 +15711,15 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.SetFlowLogConfigurationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.SetFlowLogConfigurationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17721,12 +15727,11 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersVerifyIPFlowFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17734,34 +15739,15 @@ func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr Ver
return
}
if !done {
- return vifr, azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vifr, err = client.VerifyIPFlowResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure sending request")
- return
- }
- vifr, err = client.VerifyIPFlowResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/packetcaptures.go
index 8854af9bc..eb9a1376f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/packetcaptures.go
@@ -98,15 +98,17 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -308,15 +312,17 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// GetStatusSender sends the GetStatus request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +452,17 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/publicipaddresses.go
index 443e8e576..956756f94 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -769,15 +773,17 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (future PublicIPAddressesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routefilterrules.go
index fff242cdc..42afb6949 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routefilterrules.go
@@ -98,15 +98,17 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -406,15 +410,17 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routefilters.go
index c3ff6977e..f2df3875e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routefilters.go
@@ -86,15 +86,17 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routes.go
index 8c3256885..9a716de45 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routetables.go
index a3254325d..21f30e9c9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future RouteTablesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/securitygroups.go
index 05ca6451d..0c6d7f78e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/securitygroups.go
@@ -86,15 +86,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future SecurityGroupsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/securityrules.go
index 1ee1aae34..942c34def 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/securityrules.go
@@ -88,15 +88,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/subnets.go
index f1410cea8..b288b8ba8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworkgatewayconnections.go
index 326776b55..d7a1d50a6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworkgatewayconnections.go
@@ -101,15 +101,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -482,15 +486,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -563,15 +569,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -635,15 +643,17 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworkgateways.go
index 490bdfa1f..aa314cddf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworkgateways.go
@@ -93,15 +93,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -234,15 +238,17 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx
// 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) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -307,15 +313,17 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex
// 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) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +454,17 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -519,15 +529,17 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -589,15 +601,17 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -659,15 +673,17 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c
// 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) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -921,15 +937,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1060,15 +1078,17 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworkpeerings.go
index ad4c1eb39..8b6b0765d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworkpeerings.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,15 +162,17 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworks.go
index e2eef47cc..261bdb40d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/virtualnetworks.go
@@ -157,15 +157,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -226,15 +228,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -646,15 +650,17 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future VirtualNetworksUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/watchers.go
index 3545f4a38..877534e4e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network/watchers.go
@@ -96,15 +96,17 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
// 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) (future WatchersCheckConnectivityFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -235,15 +237,17 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -383,15 +387,17 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont
// 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) (future WatchersGetAzureReachabilityReportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -461,15 +467,17 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -541,15 +549,17 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// GetNextHopSender sends the GetNextHop request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -693,15 +703,17 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -771,15 +783,17 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -849,15 +863,17 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1048,15 +1064,17 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context,
// 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) (future WatchersListAvailableProvidersFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1138,15 +1156,17 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1290,15 +1310,17 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/applicationgateways.go
index b4b845347..e4f3bb709 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/applicationgateways.go
@@ -88,15 +88,17 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// BackendHealthSender sends the BackendHealth request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -245,15 +249,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -842,15 +848,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -910,15 +918,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -981,15 +991,17 @@ func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (future ApplicationGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/applicationsecuritygroups.go
index cb475af10..0e485abf3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/applicationsecuritygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/applicationsecuritygroups.go
@@ -86,15 +86,17 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context
// 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) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context
// 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) (future ApplicationSecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/connectionmonitors.go
index 294e3f467..ad1fd2d40 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/connectionmonitors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/connectionmonitors.go
@@ -99,15 +99,17 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -376,15 +380,17 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour
// QuerySender sends the Query request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -447,15 +453,17 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -517,15 +525,17 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/ddosprotectionplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/ddosprotectionplans.go
index e5bdb9aac..e9bae9900 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/ddosprotectionplans.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/ddosprotectionplans.go
@@ -86,15 +86,17 @@ func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) CreateOrUpdateSender(req *http.Request) (future DdosProtectionPlansCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) DeleteSender(req *http.Request) (future DdosProtectionPlansDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuitauthorizations.go
index 0d8f705b7..b4315a8e7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuitconnections.go
index 9ba133d68..46279215c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuitconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuitconnections.go
@@ -92,15 +92,17 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -165,15 +167,17 @@ func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Co
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuitpeerings.go
index da2b5862d..c34b65266 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuitpeerings.go
@@ -100,15 +100,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -171,15 +173,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuits.go
index 65884df92..92a3cd0f8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -613,15 +617,17 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -687,15 +693,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -761,15 +769,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -833,15 +843,17 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCircuitsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecrossconnectionpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecrossconnectionpeerings.go
index c86466550..4b165d1be 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecrossconnectionpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecrossconnectionpeerings.go
@@ -103,15 +103,17 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdatePreparer(c
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -174,15 +176,17 @@ func (client ExpressRouteCrossConnectionPeeringsClient) DeletePreparer(ctx conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecrossconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecrossconnections.go
index 917aa9dba..d54cbf615 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecrossconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/expressroutecrossconnections.go
@@ -87,15 +87,17 @@ func (client ExpressRouteCrossConnectionsClient) CreateOrUpdatePreparer(ctx cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -318,15 +320,17 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTablePreparer(ctx contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -485,15 +489,17 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTablePreparer(ctx con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -559,15 +565,17 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryPreparer(
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -631,15 +639,17 @@ func (client ExpressRouteCrossConnectionsClient) UpdateTagsPreparer(ctx context.
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCrossConnectionsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/inboundnatrules.go
index 5e518e79a..3567b1585 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/inboundnatrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/inboundnatrules.go
@@ -108,15 +108,17 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// 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) (future InboundNatRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -179,15 +181,17 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource
// 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) (future InboundNatRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/interfaces.go
index 349b2cb73..36a2faa5a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -294,15 +298,17 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -699,15 +705,17 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1068,15 +1076,17 @@ func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceG
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future InterfacesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/loadbalancers.go
index 320811aee..5e9c83e02 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future LoadBalancersUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/localnetworkgateways.go
index 02bb5a626..5ba0ba0f1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/localnetworkgateways.go
@@ -95,15 +95,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -413,15 +417,17 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future LocalNetworkGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/models.go
index f293bfbc5..cc7612e6e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/models.go
@@ -3295,12 +3295,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysBackendHealthFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3308,34 +3307,15 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
return
}
if !done {
- return agbh, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- agbh, err = client.BackendHealthResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure sending request")
- return
- }
- agbh, err = client.BackendHealthResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3344,12 +3324,11 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3357,34 +3336,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3393,12 +3353,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3406,35 +3365,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3647,12 +3581,11 @@ type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3660,35 +3593,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3696,12 +3604,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3709,35 +3616,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3745,12 +3627,11 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
// operation.
type ApplicationGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3758,34 +3639,15 @@ func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatew
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.UpdateTagsResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4157,12 +4019,11 @@ type ApplicationSecurityGroupPropertiesFormat struct {
// long-running operation.
type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
+func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4170,34 +4031,15 @@ func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client Applic
return
}
if !done {
- return asg, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- asg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
+ asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- asg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4206,12 +4048,11 @@ func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client Applic
// operation.
type ApplicationSecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4219,35 +4060,10 @@ func (future ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSec
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5094,12 +4910,11 @@ type ConnectionMonitorResultProperties struct {
// long-running operation.
type ConnectionMonitorsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
+func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5107,34 +4922,15 @@ func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMon
return
}
if !done {
- return cmr, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cmr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
+ cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- cmr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5143,12 +4939,11 @@ func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMon
// operation.
type ConnectionMonitorsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5156,35 +4951,10 @@ func (future ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5200,12 +4970,11 @@ type ConnectionMonitorSource struct {
// operation.
type ConnectionMonitorsQueryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
+func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5213,34 +4982,15 @@ func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClie
return
}
if !done {
- return cmqr, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cmqr, err = client.QueryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
+ cmqr, err = client.QueryResponder(cmqr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", resp, "Failure sending request")
- return
- }
- cmqr, err = client.QueryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5249,12 +4999,11 @@ func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClie
// operation.
type ConnectionMonitorsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5262,35 +5011,10 @@ func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClie
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5298,12 +5022,11 @@ func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClie
// operation.
type ConnectionMonitorsStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5311,35 +5034,10 @@ func (future ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5685,12 +5383,11 @@ type DdosProtectionPlanPropertiesFormat struct {
// long-running operation.
type DdosProtectionPlansCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
+func (future *DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5698,34 +5395,15 @@ func (future DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtecti
return
}
if !done {
- return dpp, azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- dpp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
+ dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- dpp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5734,12 +5412,11 @@ func (future DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtecti
// operation.
type DdosProtectionPlansDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
+func (future *DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5747,35 +5424,10 @@ func (future DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6271,12 +5923,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6284,34 +5935,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6320,12 +5952,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6333,35 +5964,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6466,12 +6072,11 @@ type ExpressRouteCircuitConnectionPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
+func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6479,34 +6084,15 @@ func (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client E
return
}
if !done {
- return ercc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
+ ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6515,12 +6101,11 @@ func (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client E
// long-running operation.
type ExpressRouteCircuitConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6528,35 +6113,10 @@ func (future ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRo
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6907,12 +6467,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6920,34 +6479,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6956,12 +6496,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6969,35 +6508,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7072,12 +6586,11 @@ type ExpressRouteCircuitsArpTableListResult struct {
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7085,34 +6598,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7121,12 +6615,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7134,35 +6627,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7190,12 +6658,11 @@ type ExpressRouteCircuitSku struct {
// long-running operation.
type ExpressRouteCircuitsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7203,34 +6670,15 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7239,12 +6687,11 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7252,34 +6699,15 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7288,12 +6716,11 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
// long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7301,34 +6728,15 @@ func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client Exp
return
}
if !done {
- return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7370,12 +6778,11 @@ type ExpressRouteCircuitStats struct {
// operation.
type ExpressRouteCircuitsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7383,34 +6790,15 @@ func (future ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCir
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.UpdateTagsResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7864,12 +7252,11 @@ type ExpressRouteCrossConnectionPeeringProperties struct {
// of a long-running operation.
type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
+func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7877,34 +7264,15 @@ func (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(cli
return
}
if !done {
- return erccp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erccp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
+ erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erccp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7913,12 +7281,11 @@ func (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(cli
// long-running operation.
type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7926,35 +7293,10 @@ func (future ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client Expr
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7998,12 +7340,11 @@ type ExpressRouteCrossConnectionRoutesTableSummary struct {
// long-running operation.
type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
+func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8011,34 +7352,15 @@ func (future ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client Exp
return
}
if !done {
- return ercc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
+ ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8047,12 +7369,11 @@ func (future ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client Exp
// long-running operation.
type ExpressRouteCrossConnectionsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionsListArpTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCrossConnectionsListArpTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8060,34 +7381,15 @@ func (future ExpressRouteCrossConnectionsListArpTableFuture) Result(client Expre
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8096,12 +7398,11 @@ func (future ExpressRouteCrossConnectionsListArpTableFuture) Result(client Expre
// long-running operation.
type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8109,34 +7410,15 @@ func (future ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client Ex
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8145,12 +7427,11 @@ func (future ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client Ex
// results of a long-running operation.
type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8158,34 +7439,15 @@ func (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(cl
return
}
if !done {
- return erccrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erccrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- erccrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8204,12 +7466,11 @@ type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
// long-running operation.
type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
+func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8217,34 +7478,15 @@ func (future ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client Express
return
}
if !done {
- return ercc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercc, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
+ ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- ercc, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9017,12 +8259,11 @@ type InboundNatRulePropertiesFormat struct {
// operation.
type InboundNatRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
+func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9030,34 +8271,15 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
return
}
if !done {
- return inr, azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- inr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
+ inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- inr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9066,12 +8288,11 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
// operation.
type InboundNatRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
+func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9079,35 +8300,10 @@ func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9700,12 +8896,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9713,34 +8908,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9748,12 +8924,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9761,35 +8936,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9797,12 +8947,11 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
// long-running operation.
type InterfacesGetEffectiveRouteTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9810,34 +8959,15 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
return
}
if !done {
- return erlr, azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erlr, err = client.GetEffectiveRouteTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure sending request")
- return
- }
- erlr, err = client.GetEffectiveRouteTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9846,12 +8976,11 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
// long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9859,34 +8988,15 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
return
}
if !done {
- return ensglr, azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure sending request")
- return
- }
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9894,12 +9004,11 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9907,34 +9016,15 @@ func (future InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Inte
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.UpdateTagsResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10762,12 +9852,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10775,34 +9864,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10810,12 +9880,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10823,35 +9892,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10865,12 +9909,11 @@ type LoadBalancerSku struct {
// operation.
type LoadBalancersUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10878,34 +9921,15 @@ func (future LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.UpdateTagsResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11262,12 +10286,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11275,34 +10298,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11311,12 +10315,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11324,35 +10327,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11360,12 +10338,11 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
// operation.
type LocalNetworkGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11373,34 +10350,15 @@ func (future LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGat
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.UpdateTagsResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11962,12 +10920,11 @@ type PacketCaptureResultProperties struct {
// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11975,34 +10932,15 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
return
}
if !done {
- return pcr, azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12010,12 +10948,11 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12023,35 +10960,10 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12059,12 +10971,11 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
// operation.
type PacketCapturesGetStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12072,34 +10983,15 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
return
}
if !done {
- return pcqsr, azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcqsr, err = client.GetStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- pcqsr, err = client.GetStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12107,12 +10999,11 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12120,35 +11011,10 @@ func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12621,12 +11487,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12634,34 +11499,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12670,12 +11516,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12683,35 +11528,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12719,12 +11539,11 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
// operation.
type PublicIPAddressesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12732,34 +11551,15 @@ func (future PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesC
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.UpdateTagsResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13564,12 +12364,11 @@ type RouteFilterRulePropertiesFormat struct {
// operation.
type RouteFilterRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13577,34 +12376,15 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13613,12 +12393,11 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
// operation.
type RouteFilterRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
+func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13626,35 +12405,10 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13662,12 +12416,11 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFilterRulesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13675,34 +12428,15 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.UpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13711,12 +12445,11 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFiltersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13724,34 +12457,15 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13759,12 +12473,11 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
+func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13772,47 +12485,21 @@ func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13820,34 +12507,15 @@ func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf Rou
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.UpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13969,12 +12637,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13982,34 +12649,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14017,12 +12665,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14030,35 +12677,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14304,12 +12926,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14317,34 +12938,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14352,12 +12954,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14365,35 +12966,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14401,12 +12977,11 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
// operation.
type RouteTablesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14414,34 +12989,15 @@ func (future RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt R
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.UpdateTagsResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14699,12 +13255,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14712,34 +13267,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14747,12 +13283,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14760,35 +13295,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14796,12 +13306,11 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
// operation.
type SecurityGroupsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14809,34 +13318,15 @@ func (future SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient)
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.UpdateTagsResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15089,12 +13579,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15102,34 +13591,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15137,12 +13607,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15150,35 +13619,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15412,12 +13856,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15425,34 +13868,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15460,12 +13884,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15473,35 +13896,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16521,12 +14919,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16534,34 +14931,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16570,12 +14948,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16583,35 +14960,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16619,12 +14971,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16632,34 +14983,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16668,12 +15000,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16681,34 +15012,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16717,12 +15029,11 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
// long-running operation.
type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
+func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16730,34 +15041,15 @@ func (future VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client Vir
return
}
if !done {
- return vngcle, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngcle, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngcle.Response.Response, err = future.GetResult(sender); err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent {
+ vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vngcle, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17092,12 +15384,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17105,34 +15396,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17141,12 +15413,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17154,35 +15425,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -17190,12 +15436,11 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
// a long-running operation.
type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17203,34 +15448,15 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GeneratevpnclientpackageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GeneratevpnclientpackageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17239,12 +15465,11 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
// long-running operation.
type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17252,34 +15477,15 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GenerateVpnProfileResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GenerateVpnProfileResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GenerateVpnProfileResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17288,12 +15494,11 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
// long-running operation.
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17301,34 +15506,15 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetAdvertisedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetAdvertisedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17337,12 +15523,11 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
// long-running operation.
type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17350,34 +15535,15 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
return
}
if !done {
- return bpslr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bpslr, err = client.GetBgpPeerStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- bpslr, err = client.GetBgpPeerStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17386,12 +15552,11 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
// long-running operation.
type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17399,34 +15564,15 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetLearnedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetLearnedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17435,12 +15581,11 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
// of a long-running operation.
type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
+func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17448,34 +15593,15 @@ func (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(cli
return
}
if !done {
- return vcipp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vcipp, err = client.GetVpnclientIpsecParametersResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
+ vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", resp, "Failure sending request")
- return
- }
- vcipp, err = client.GetVpnclientIpsecParametersResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17484,12 +15610,11 @@ func (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(cli
// a long-running operation.
type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17497,34 +15622,15 @@ func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GetVpnProfilePackageURLResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GetVpnProfilePackageURLResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17543,12 +15649,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17556,34 +15661,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17592,12 +15678,11 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
// of a long-running operation.
type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
+func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17605,34 +15690,15 @@ func (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(cli
return
}
if !done {
- return vcipp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vcipp, err = client.SetVpnclientIpsecParametersResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
+ vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", resp, "Failure sending request")
- return
- }
- vcipp, err = client.SetVpnclientIpsecParametersResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17641,12 +15707,11 @@ func (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(cli
// long-running operation.
type VirtualNetworkGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17654,34 +15719,15 @@ func (future VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetwor
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.UpdateTagsResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18099,12 +16145,11 @@ type VirtualNetworkPeeringPropertiesFormat struct {
// long-running operation.
type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18112,34 +16157,15 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vnp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18148,12 +16174,11 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18161,35 +16186,10 @@ func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPee
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -18219,12 +16219,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18232,34 +16231,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18268,12 +16248,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18281,35 +16260,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -18317,12 +16271,11 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
// operation.
type VirtualNetworksUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18330,34 +16283,15 @@ func (future VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClien
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.UpdateTagsResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18763,12 +16697,11 @@ type WatcherPropertiesFormat struct {
// operation.
type WatchersCheckConnectivityFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
+func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18776,34 +16709,15 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
return
}
if !done {
- return ci, azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ci, err = client.CheckConnectivityResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CheckConnectivityResponder(ci.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure sending request")
- return
- }
- ci, err = client.CheckConnectivityResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18811,12 +16725,11 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
+func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18824,35 +16737,10 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -18860,12 +16748,11 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
// long-running operation.
type WatchersGetAzureReachabilityReportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
+func (future *WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18873,34 +16760,15 @@ func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersCli
return
}
if !done {
- return arr, azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- arr, err = client.GetAzureReachabilityReportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
+ arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure sending request")
- return
- }
- arr, err = client.GetAzureReachabilityReportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18909,12 +16777,11 @@ func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersCli
// operation.
type WatchersGetFlowLogStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18922,34 +16789,15 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.GetFlowLogStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.GetFlowLogStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18957,12 +16805,11 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersGetNextHopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
+func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18970,34 +16817,15 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
return
}
if !done {
- return nhr, azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nhr, err = client.GetNextHopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure sending request")
- return
- }
- nhr, err = client.GetNextHopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -19006,12 +16834,11 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
// operation.
type WatchersGetTroubleshootingFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -19019,34 +16846,15 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -19055,12 +16863,11 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
// long-running operation.
type WatchersGetTroubleshootingResultFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -19068,34 +16875,15 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResultResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResultResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -19104,12 +16892,11 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
// operation.
type WatchersGetVMSecurityRulesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -19117,34 +16904,15 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
return
}
if !done {
- return sgvr, azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sgvr, err = client.GetVMSecurityRulesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure sending request")
- return
- }
- sgvr, err = client.GetVMSecurityRulesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -19153,12 +16921,11 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
// operation.
type WatchersListAvailableProvidersFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
+func (future *WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -19166,34 +16933,15 @@ func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient)
return
}
if !done {
- return apl, azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- apl, err = client.ListAvailableProvidersResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
+ apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure sending request")
- return
- }
- apl, err = client.ListAvailableProvidersResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -19202,12 +16950,11 @@ func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient)
// operation.
type WatchersSetFlowLogConfigurationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -19215,34 +16962,15 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.SetFlowLogConfigurationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.SetFlowLogConfigurationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -19250,12 +16978,11 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersVerifyIPFlowFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -19263,34 +16990,15 @@ func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr Ver
return
}
if !done {
- return vifr, azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vifr, err = client.VerifyIPFlowResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure sending request")
- return
- }
- vifr, err = client.VerifyIPFlowResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/packetcaptures.go
index 0ca9c9c52..e4751614d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/packetcaptures.go
@@ -98,15 +98,17 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -308,15 +312,17 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// GetStatusSender sends the GetStatus request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +452,17 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/publicipaddresses.go
index 863bf6be1..9e1b40fac 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -769,15 +773,17 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (future PublicIPAddressesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routefilterrules.go
index 8ee423da9..9e56445bb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routefilterrules.go
@@ -98,15 +98,17 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -406,15 +410,17 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routefilters.go
index 425c2e85f..cf6476523 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routefilters.go
@@ -86,15 +86,17 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routes.go
index ac8db7d86..87ce9756e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routetables.go
index 17d3b2ddb..69017a988 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future RouteTablesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/securitygroups.go
index 4c21f6f7d..1514ca49d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/securitygroups.go
@@ -86,15 +86,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future SecurityGroupsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/securityrules.go
index 152b1d3a4..172f5681b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/securityrules.go
@@ -88,15 +88,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/subnets.go
index 479dad170..ee152baa5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworkgatewayconnections.go
index 906208456..5b7906bfc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworkgatewayconnections.go
@@ -101,15 +101,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -482,15 +486,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -563,15 +569,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -635,15 +643,17 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworkgateways.go
index 04c2c239b..41b7a48cb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworkgateways.go
@@ -93,15 +93,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -234,15 +238,17 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx
// 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) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -307,15 +313,17 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex
// 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) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +454,17 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -519,15 +529,17 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -589,15 +601,17 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -660,15 +674,17 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersPreparer(c
// GetVpnclientIpsecParametersSender sends the GetVpnclientIpsecParameters request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -730,15 +746,17 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c
// 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) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -992,15 +1010,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1073,15 +1093,17 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersPreparer(c
// SetVpnclientIpsecParametersSender sends the SetVpnclientIpsecParameters request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1212,15 +1234,17 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworkpeerings.go
index 013b82da9..852ab5b4f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworkpeerings.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,15 +162,17 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworks.go
index 21f1bd2da..dab249ae2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/virtualnetworks.go
@@ -157,15 +157,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -226,15 +228,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -646,15 +650,17 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future VirtualNetworksUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/watchers.go
index 9bf16890b..46f93c3e3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-02-01/network/watchers.go
@@ -96,15 +96,17 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
// 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) (future WatchersCheckConnectivityFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -235,15 +237,17 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -383,15 +387,17 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont
// 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) (future WatchersGetAzureReachabilityReportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -461,15 +467,17 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -541,15 +549,17 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// GetNextHopSender sends the GetNextHop request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -693,15 +703,17 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -771,15 +783,17 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -849,15 +863,17 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1048,15 +1064,17 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context,
// 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) (future WatchersListAvailableProvidersFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1130,15 +1148,17 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1282,15 +1302,17 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/applicationgateways.go
index 107e9c4be..e697a3fe0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/applicationgateways.go
@@ -88,15 +88,17 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// BackendHealthSender sends the BackendHealth request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -245,15 +249,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -842,15 +848,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -910,15 +918,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -981,15 +991,17 @@ func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (future ApplicationGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/applicationsecuritygroups.go
index a6e64ca3d..6a200feca 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/applicationsecuritygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/applicationsecuritygroups.go
@@ -86,15 +86,17 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context
// 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) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context
// 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) (future ApplicationSecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/connectionmonitors.go
index c05e9c17c..72025998b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/connectionmonitors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/connectionmonitors.go
@@ -99,15 +99,17 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -376,15 +380,17 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour
// QuerySender sends the Query request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -447,15 +453,17 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -517,15 +525,17 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/ddosprotectionplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/ddosprotectionplans.go
index ab5fa3db0..dff8aa645 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/ddosprotectionplans.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/ddosprotectionplans.go
@@ -86,15 +86,17 @@ func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) CreateOrUpdateSender(req *http.Request) (future DdosProtectionPlansCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) DeleteSender(req *http.Request) (future DdosProtectionPlansDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitauthorizations.go
index 07f63ac71..68b111b93 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitconnections.go
index 39305131f..9755bb336 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitconnections.go
@@ -92,15 +92,17 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -165,15 +167,17 @@ func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Co
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go
index 0cd2d1af3..af6b0c2c3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go
@@ -100,15 +100,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -171,15 +173,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuits.go
index ae664efca..0549350fb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -613,15 +617,17 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -687,15 +693,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -761,15 +769,17 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -833,15 +843,17 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCircuitsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecrossconnectionpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecrossconnectionpeerings.go
index 1c9148555..314d902cb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecrossconnectionpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecrossconnectionpeerings.go
@@ -103,15 +103,17 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdatePreparer(c
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -174,15 +176,17 @@ func (client ExpressRouteCrossConnectionPeeringsClient) DeletePreparer(ctx conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecrossconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecrossconnections.go
index e42d52d93..85457ebf7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecrossconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecrossconnections.go
@@ -87,15 +87,17 @@ func (client ExpressRouteCrossConnectionsClient) CreateOrUpdatePreparer(ctx cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -318,15 +320,17 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTablePreparer(ctx contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListArpTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -485,15 +489,17 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTablePreparer(ctx con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -559,15 +565,17 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryPreparer(
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -631,15 +639,17 @@ func (client ExpressRouteCrossConnectionsClient) UpdateTagsPreparer(ctx context.
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCrossConnectionsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/inboundnatrules.go
index de136b182..d1330fe9b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/inboundnatrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/inboundnatrules.go
@@ -108,15 +108,17 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// 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) (future InboundNatRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -179,15 +181,17 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource
// 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) (future InboundNatRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/interfaces.go
index 6d1133d48..a72e77330 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -294,15 +298,17 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -699,15 +705,17 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1068,15 +1076,17 @@ func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceG
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future InterfacesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/loadbalancers.go
index 1206ad7cd..ed6509e96 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future LoadBalancersUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/localnetworkgateways.go
index c9e9f3d41..386ed2e43 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/localnetworkgateways.go
@@ -95,15 +95,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -413,15 +417,17 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future LocalNetworkGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/models.go
index 65b0398a5..10f6868e5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/models.go
@@ -1261,6 +1261,12 @@ type VirtualNetworkGatewaySkuName string
const (
// VirtualNetworkGatewaySkuNameBasic ...
VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic"
+ // VirtualNetworkGatewaySkuNameErGw1AZ ...
+ VirtualNetworkGatewaySkuNameErGw1AZ VirtualNetworkGatewaySkuName = "ErGw1AZ"
+ // VirtualNetworkGatewaySkuNameErGw2AZ ...
+ VirtualNetworkGatewaySkuNameErGw2AZ VirtualNetworkGatewaySkuName = "ErGw2AZ"
+ // VirtualNetworkGatewaySkuNameErGw3AZ ...
+ VirtualNetworkGatewaySkuNameErGw3AZ VirtualNetworkGatewaySkuName = "ErGw3AZ"
// VirtualNetworkGatewaySkuNameHighPerformance ...
VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance"
// VirtualNetworkGatewaySkuNameStandard ...
@@ -1269,15 +1275,21 @@ const (
VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance"
// VirtualNetworkGatewaySkuNameVpnGw1 ...
VirtualNetworkGatewaySkuNameVpnGw1 VirtualNetworkGatewaySkuName = "VpnGw1"
+ // VirtualNetworkGatewaySkuNameVpnGw1AZ ...
+ VirtualNetworkGatewaySkuNameVpnGw1AZ VirtualNetworkGatewaySkuName = "VpnGw1AZ"
// VirtualNetworkGatewaySkuNameVpnGw2 ...
VirtualNetworkGatewaySkuNameVpnGw2 VirtualNetworkGatewaySkuName = "VpnGw2"
+ // VirtualNetworkGatewaySkuNameVpnGw2AZ ...
+ VirtualNetworkGatewaySkuNameVpnGw2AZ VirtualNetworkGatewaySkuName = "VpnGw2AZ"
// VirtualNetworkGatewaySkuNameVpnGw3 ...
VirtualNetworkGatewaySkuNameVpnGw3 VirtualNetworkGatewaySkuName = "VpnGw3"
+ // VirtualNetworkGatewaySkuNameVpnGw3AZ ...
+ VirtualNetworkGatewaySkuNameVpnGw3AZ VirtualNetworkGatewaySkuName = "VpnGw3AZ"
)
// PossibleVirtualNetworkGatewaySkuNameValues returns an array of possible values for the VirtualNetworkGatewaySkuName const type.
func PossibleVirtualNetworkGatewaySkuNameValues() []VirtualNetworkGatewaySkuName {
- return []VirtualNetworkGatewaySkuName{VirtualNetworkGatewaySkuNameBasic, VirtualNetworkGatewaySkuNameHighPerformance, VirtualNetworkGatewaySkuNameStandard, VirtualNetworkGatewaySkuNameUltraPerformance, VirtualNetworkGatewaySkuNameVpnGw1, VirtualNetworkGatewaySkuNameVpnGw2, VirtualNetworkGatewaySkuNameVpnGw3}
+ return []VirtualNetworkGatewaySkuName{VirtualNetworkGatewaySkuNameBasic, VirtualNetworkGatewaySkuNameErGw1AZ, VirtualNetworkGatewaySkuNameErGw2AZ, VirtualNetworkGatewaySkuNameErGw3AZ, VirtualNetworkGatewaySkuNameHighPerformance, VirtualNetworkGatewaySkuNameStandard, VirtualNetworkGatewaySkuNameUltraPerformance, VirtualNetworkGatewaySkuNameVpnGw1, VirtualNetworkGatewaySkuNameVpnGw1AZ, VirtualNetworkGatewaySkuNameVpnGw2, VirtualNetworkGatewaySkuNameVpnGw2AZ, VirtualNetworkGatewaySkuNameVpnGw3, VirtualNetworkGatewaySkuNameVpnGw3AZ}
}
// VirtualNetworkGatewaySkuTier enumerates the values for virtual network gateway sku tier.
@@ -1286,6 +1298,12 @@ type VirtualNetworkGatewaySkuTier string
const (
// VirtualNetworkGatewaySkuTierBasic ...
VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic"
+ // VirtualNetworkGatewaySkuTierErGw1AZ ...
+ VirtualNetworkGatewaySkuTierErGw1AZ VirtualNetworkGatewaySkuTier = "ErGw1AZ"
+ // VirtualNetworkGatewaySkuTierErGw2AZ ...
+ VirtualNetworkGatewaySkuTierErGw2AZ VirtualNetworkGatewaySkuTier = "ErGw2AZ"
+ // VirtualNetworkGatewaySkuTierErGw3AZ ...
+ VirtualNetworkGatewaySkuTierErGw3AZ VirtualNetworkGatewaySkuTier = "ErGw3AZ"
// VirtualNetworkGatewaySkuTierHighPerformance ...
VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance"
// VirtualNetworkGatewaySkuTierStandard ...
@@ -1294,15 +1312,21 @@ const (
VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance"
// VirtualNetworkGatewaySkuTierVpnGw1 ...
VirtualNetworkGatewaySkuTierVpnGw1 VirtualNetworkGatewaySkuTier = "VpnGw1"
+ // VirtualNetworkGatewaySkuTierVpnGw1AZ ...
+ VirtualNetworkGatewaySkuTierVpnGw1AZ VirtualNetworkGatewaySkuTier = "VpnGw1AZ"
// VirtualNetworkGatewaySkuTierVpnGw2 ...
VirtualNetworkGatewaySkuTierVpnGw2 VirtualNetworkGatewaySkuTier = "VpnGw2"
+ // VirtualNetworkGatewaySkuTierVpnGw2AZ ...
+ VirtualNetworkGatewaySkuTierVpnGw2AZ VirtualNetworkGatewaySkuTier = "VpnGw2AZ"
// VirtualNetworkGatewaySkuTierVpnGw3 ...
VirtualNetworkGatewaySkuTierVpnGw3 VirtualNetworkGatewaySkuTier = "VpnGw3"
+ // VirtualNetworkGatewaySkuTierVpnGw3AZ ...
+ VirtualNetworkGatewaySkuTierVpnGw3AZ VirtualNetworkGatewaySkuTier = "VpnGw3AZ"
)
// PossibleVirtualNetworkGatewaySkuTierValues returns an array of possible values for the VirtualNetworkGatewaySkuTier const type.
func PossibleVirtualNetworkGatewaySkuTierValues() []VirtualNetworkGatewaySkuTier {
- return []VirtualNetworkGatewaySkuTier{VirtualNetworkGatewaySkuTierBasic, VirtualNetworkGatewaySkuTierHighPerformance, VirtualNetworkGatewaySkuTierStandard, VirtualNetworkGatewaySkuTierUltraPerformance, VirtualNetworkGatewaySkuTierVpnGw1, VirtualNetworkGatewaySkuTierVpnGw2, VirtualNetworkGatewaySkuTierVpnGw3}
+ return []VirtualNetworkGatewaySkuTier{VirtualNetworkGatewaySkuTierBasic, VirtualNetworkGatewaySkuTierErGw1AZ, VirtualNetworkGatewaySkuTierErGw2AZ, VirtualNetworkGatewaySkuTierErGw3AZ, VirtualNetworkGatewaySkuTierHighPerformance, VirtualNetworkGatewaySkuTierStandard, VirtualNetworkGatewaySkuTierUltraPerformance, VirtualNetworkGatewaySkuTierVpnGw1, VirtualNetworkGatewaySkuTierVpnGw1AZ, VirtualNetworkGatewaySkuTierVpnGw2, VirtualNetworkGatewaySkuTierVpnGw2AZ, VirtualNetworkGatewaySkuTierVpnGw3, VirtualNetworkGatewaySkuTierVpnGw3AZ}
}
// VirtualNetworkGatewayType enumerates the values for virtual network gateway type.
@@ -1500,7 +1524,7 @@ func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
type ApplicationGatewayAuthenticationCertificate struct {
*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
+ // Name - Name of the authentication certificate that is unique within an Application Gateway.
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
@@ -1845,7 +1869,7 @@ type ApplicationGatewayBackendAddress struct {
// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
type ApplicationGatewayBackendAddressPool struct {
*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
- // Name - Resource that is unique within a resource group. This name can be used to access the resource.
+ // Name - Name of the backend address pool that is unique within an Application Gateway.
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
@@ -1982,7 +2006,7 @@ type ApplicationGatewayBackendHealthServer struct {
// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
type ApplicationGatewayBackendHTTPSettings struct {
*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
+ // Name - Name of the backend http settings that is unique within an Application Gateway.
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
@@ -2076,9 +2100,9 @@ func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) e
// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
// application gateway.
type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
- // Port - Port
+ // Port - The destination port on the backend.
Port *int32 `json:"port,omitempty"`
- // Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
+ // Protocol - The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
@@ -2262,7 +2286,7 @@ type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
type ApplicationGatewayFrontendIPConfiguration struct {
*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
+ // Name - Name of the frontend IP configuration that is unique within an Application Gateway.
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
@@ -2371,7 +2395,7 @@ type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
// ApplicationGatewayFrontendPort frontend port of an application gateway.
type ApplicationGatewayFrontendPort struct {
*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
+ // Name - Name of the frontend port that is unique within an Application Gateway
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
@@ -2473,7 +2497,7 @@ type ApplicationGatewayFrontendPortPropertiesFormat struct {
// ApplicationGatewayHTTPListener http listener of an application gateway.
type ApplicationGatewayHTTPListener struct {
*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
+ // Name - Name of the HTTP listener that is unique within an Application Gateway.
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
@@ -2570,7 +2594,7 @@ type ApplicationGatewayHTTPListenerPropertiesFormat struct {
FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
// FrontendPort - Frontend port resource of an application gateway.
FrontendPort *SubResource `json:"frontendPort,omitempty"`
- // Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
+ // Protocol - Protocol of the HTTP listener. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
// HostName - Host name of HTTP listener.
HostName *string `json:"hostName,omitempty"`
@@ -2586,7 +2610,7 @@ type ApplicationGatewayHTTPListenerPropertiesFormat struct {
// IP configuration is allowed.
type ApplicationGatewayIPConfiguration struct {
*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
+ // Name - Name of the IP configuration that is unique within an Application Gateway.
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
@@ -2790,7 +2814,7 @@ func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
type ApplicationGatewayPathRule struct {
*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
+ // Name - Name of the path rule that is unique within an Application Gateway.
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
@@ -2898,7 +2922,7 @@ type ApplicationGatewayPathRulePropertiesFormat struct {
// ApplicationGatewayProbe probe of the application gateway.
type ApplicationGatewayProbe struct {
*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
+ // Name - Name of the probe that is unique within an Application Gateway.
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
@@ -2999,7 +3023,7 @@ type ApplicationGatewayProbeHealthResponseMatch struct {
// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
type ApplicationGatewayProbePropertiesFormat struct {
- // Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
+ // Protocol - The protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
// Host - Host name to send the probe to.
Host *string `json:"host,omitempty"`
@@ -3066,7 +3090,7 @@ type ApplicationGatewayPropertiesFormat struct {
// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
type ApplicationGatewayRedirectConfiguration struct {
*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
+ // Name - Name of the redirect configuration that is unique within an Application Gateway.
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
@@ -3181,7 +3205,7 @@ type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
type ApplicationGatewayRequestRoutingRule struct {
*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
+ // Name - Name of the request routing rule that is unique within an Application Gateway.
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
@@ -3279,7 +3303,7 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
// BackendAddressPool - Backend address pool resource of the application gateway.
BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
- // BackendHTTPSettings - Frontend port resource of the application gateway.
+ // BackendHTTPSettings - Backend http settings resource of the application gateway.
BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
// HTTPListener - Http listener resource of the application gateway.
HTTPListener *SubResource `json:"httpListener,omitempty"`
@@ -3295,12 +3319,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysBackendHealthFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3308,34 +3331,15 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
return
}
if !done {
- return agbh, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- agbh, err = client.BackendHealthResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure sending request")
- return
- }
- agbh, err = client.BackendHealthResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3344,12 +3348,11 @@ func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGa
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3357,34 +3360,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3393,12 +3377,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3406,35 +3389,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3451,7 +3409,7 @@ type ApplicationGatewaySku struct {
// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
type ApplicationGatewaySslCertificate struct {
*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
+ // Name - Name of the SSL certificate that is unique within an Application Gateway.
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
@@ -3571,7 +3529,7 @@ type ApplicationGatewaySslPolicy struct {
// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
type ApplicationGatewaySslPredefinedPolicy struct {
autorest.Response `json:"-"`
- // Name - Name of Ssl predefined policy.
+ // Name - Name of the Ssl predefined policy.
Name *string `json:"name,omitempty"`
*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
// ID - Resource ID.
@@ -3647,12 +3605,11 @@ type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3660,35 +3617,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3696,12 +3628,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3709,35 +3640,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3745,12 +3651,11 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
// operation.
type ApplicationGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3758,34 +3663,15 @@ func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatew
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.UpdateTagsResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3794,7 +3680,7 @@ func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatew
// PathBasedRouting.
type ApplicationGatewayURLPathMap struct {
*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
+ // Name - Name of the URL path map that is unique within an Application Gateway.
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
@@ -4157,12 +4043,11 @@ type ApplicationSecurityGroupPropertiesFormat struct {
// long-running operation.
type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
+func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4170,34 +4055,15 @@ func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client Applic
return
}
if !done {
- return asg, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- asg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
+ asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- asg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4206,12 +4072,11 @@ func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client Applic
// operation.
type ApplicationSecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4219,35 +4084,10 @@ func (future ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSec
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5094,12 +4934,11 @@ type ConnectionMonitorResultProperties struct {
// long-running operation.
type ConnectionMonitorsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
+func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5107,34 +4946,15 @@ func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMon
return
}
if !done {
- return cmr, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cmr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
+ cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- cmr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5143,12 +4963,11 @@ func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMon
// operation.
type ConnectionMonitorsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5156,35 +4975,10 @@ func (future ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5200,12 +4994,11 @@ type ConnectionMonitorSource struct {
// operation.
type ConnectionMonitorsQueryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
+func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5213,34 +5006,15 @@ func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClie
return
}
if !done {
- return cmqr, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cmqr, err = client.QueryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
+ cmqr, err = client.QueryResponder(cmqr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", resp, "Failure sending request")
- return
- }
- cmqr, err = client.QueryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5249,12 +5023,11 @@ func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClie
// operation.
type ConnectionMonitorsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5262,35 +5035,10 @@ func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClie
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5298,12 +5046,11 @@ func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClie
// operation.
type ConnectionMonitorsStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5311,35 +5058,10 @@ func (future ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5685,12 +5407,11 @@ type DdosProtectionPlanPropertiesFormat struct {
// long-running operation.
type DdosProtectionPlansCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
+func (future *DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5698,34 +5419,15 @@ func (future DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtecti
return
}
if !done {
- return dpp, azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- dpp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
+ dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- dpp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5734,12 +5436,11 @@ func (future DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtecti
// operation.
type DdosProtectionPlansDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
+func (future *DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5747,35 +5448,10 @@ func (future DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6176,9 +5852,9 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
type ExpressRouteCircuitArpTable struct {
- // Age - Age
+ // Age - Entry age in minutes
Age *int32 `json:"age,omitempty"`
- // Interface - Interface
+ // Interface - Interface address
Interface *string `json:"interface,omitempty"`
// IPAddress - The IP address.
IPAddress *string `json:"ipAddress,omitempty"`
@@ -6271,12 +5947,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6284,34 +5959,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6320,12 +5976,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6333,35 +5988,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6466,12 +6096,11 @@ type ExpressRouteCircuitConnectionPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
+func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6479,34 +6108,15 @@ func (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client E
return
}
if !done {
- return ercc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
+ ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6515,12 +6125,11 @@ func (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client E
// long-running operation.
type ExpressRouteCircuitConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6528,35 +6137,10 @@ func (future ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRo
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6907,12 +6491,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6920,34 +6503,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6956,12 +6520,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6969,35 +6532,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7033,21 +6571,21 @@ type ExpressRouteCircuitReference struct {
// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
type ExpressRouteCircuitRoutesTable struct {
- // NetworkProperty - network
+ // NetworkProperty - IP address of a network entity
NetworkProperty *string `json:"network,omitempty"`
- // NextHop - nextHop
+ // NextHop - NextHop address
NextHop *string `json:"nextHop,omitempty"`
- // LocPrf - locPrf
+ // LocPrf - Local preference value as set with the set local-preference route-map configuration command
LocPrf *string `json:"locPrf,omitempty"`
- // Weight - weight.
+ // Weight - Route Weight.
Weight *int32 `json:"weight,omitempty"`
- // Path - path
+ // Path - Autonomous system paths to the destination network.
Path *string `json:"path,omitempty"`
}
// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
type ExpressRouteCircuitRoutesTableSummary struct {
- // Neighbor - Neighbor
+ // Neighbor - IP address of the neighbor.
Neighbor *string `json:"neighbor,omitempty"`
// V - BGP version number spoken to the neighbor.
V *int32 `json:"v,omitempty"`
@@ -7072,12 +6610,11 @@ type ExpressRouteCircuitsArpTableListResult struct {
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7085,34 +6622,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7121,12 +6639,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7134,35 +6651,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7190,12 +6682,11 @@ type ExpressRouteCircuitSku struct {
// long-running operation.
type ExpressRouteCircuitsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7203,34 +6694,15 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7239,12 +6711,11 @@ func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteC
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7252,34 +6723,15 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7288,12 +6740,11 @@ func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRou
// long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7301,34 +6752,15 @@ func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client Exp
return
}
if !done {
- return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7370,12 +6802,11 @@ type ExpressRouteCircuitStats struct {
// operation.
type ExpressRouteCircuitsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7383,34 +6814,15 @@ func (future ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCir
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.UpdateTagsResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7864,12 +7276,11 @@ type ExpressRouteCrossConnectionPeeringProperties struct {
// of a long-running operation.
type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
+func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7877,34 +7288,15 @@ func (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(cli
return
}
if !done {
- return erccp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erccp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
+ erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erccp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7913,12 +7305,11 @@ func (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(cli
// long-running operation.
type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7926,35 +7317,10 @@ func (future ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client Expr
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7998,12 +7364,11 @@ type ExpressRouteCrossConnectionRoutesTableSummary struct {
// long-running operation.
type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
+func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8011,34 +7376,15 @@ func (future ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client Exp
return
}
if !done {
- return ercc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
+ ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8047,12 +7393,11 @@ func (future ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client Exp
// long-running operation.
type ExpressRouteCrossConnectionsListArpTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionsListArpTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+func (future *ExpressRouteCrossConnectionsListArpTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8060,34 +7405,15 @@ func (future ExpressRouteCrossConnectionsListArpTableFuture) Result(client Expre
return
}
if !done {
- return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercatlr, err = client.ListArpTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercatlr, err = client.ListArpTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8096,12 +7422,11 @@ func (future ExpressRouteCrossConnectionsListArpTableFuture) Result(client Expre
// long-running operation.
type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8109,34 +7434,15 @@ func (future ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client Ex
return
}
if !done {
- return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercrtlr, err = client.ListRoutesTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", resp, "Failure sending request")
- return
- }
- ercrtlr, err = client.ListRoutesTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8145,12 +7451,11 @@ func (future ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client Ex
// results of a long-running operation.
type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
+func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8158,34 +7463,15 @@ func (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(cl
return
}
if !done {
- return erccrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erccrtslr, err = client.ListRoutesTableSummaryResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request")
- return
- }
- erccrtslr, err = client.ListRoutesTableSummaryResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8204,12 +7490,11 @@ type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
// long-running operation.
type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
+func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8217,34 +7502,15 @@ func (future ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client Express
return
}
if !done {
- return ercc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercc, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
+ ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- ercc, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8479,12 +7745,13 @@ type ExpressRouteServiceProviderPropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// FlowLogInformation information on the configuration of flow log.
+// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
type FlowLogInformation struct {
autorest.Response `json:"-"`
- // TargetResourceID - The ID of the resource to configure for flow logging.
- TargetResourceID *string `json:"targetResourceId,omitempty"`
- *FlowLogProperties `json:"properties,omitempty"`
+ // TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+ *FlowLogProperties `json:"properties,omitempty"`
+ FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
}
// MarshalJSON is the custom marshaler for FlowLogInformation.
@@ -8496,6 +7763,9 @@ func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
if fli.FlowLogProperties != nil {
objectMap["properties"] = fli.FlowLogProperties
}
+ if fli.FlowAnalyticsConfiguration != nil {
+ objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
+ }
return json.Marshal(objectMap)
}
@@ -8526,6 +7796,15 @@ func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
}
fli.FlowLogProperties = &flowLogProperties
}
+ case "flowAnalyticsConfiguration":
+ if v != nil {
+ var flowAnalyticsConfiguration TrafficAnalyticsProperties
+ err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
+ if err != nil {
+ return err
+ }
+ fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
+ }
}
}
@@ -8541,9 +7820,10 @@ type FlowLogProperties struct {
RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
}
-// FlowLogStatusParameters parameters that define a resource to query flow log status.
+// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics (optional)
+// status.
type FlowLogStatusParameters struct {
- // TargetResourceID - The target resource where getting the flow logging status.
+ // TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
TargetResourceID *string `json:"targetResourceId,omitempty"`
}
@@ -9017,12 +8297,11 @@ type InboundNatRulePropertiesFormat struct {
// operation.
type InboundNatRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
+func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9030,34 +8309,15 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
return
}
if !done {
- return inr, azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- inr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
+ inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- inr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9066,12 +8326,11 @@ func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesC
// operation.
type InboundNatRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
+func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9079,35 +8338,10 @@ func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9700,12 +8934,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9713,34 +8946,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9748,12 +8962,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9761,35 +8974,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9797,12 +8985,11 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
// long-running operation.
type InterfacesGetEffectiveRouteTableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9810,34 +8997,15 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
return
}
if !done {
- return erlr, azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erlr, err = client.GetEffectiveRouteTableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure sending request")
- return
- }
- erlr, err = client.GetEffectiveRouteTableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9846,12 +9014,11 @@ func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCli
// long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9859,34 +9026,15 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
return
}
if !done {
- return ensglr, azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure sending request")
- return
- }
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9894,12 +9042,11 @@ func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client I
// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9907,34 +9054,15 @@ func (future InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Inte
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.UpdateTagsResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10762,12 +9890,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10775,34 +9902,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10810,12 +9918,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10823,35 +9930,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10865,12 +9947,11 @@ type LoadBalancerSku struct {
// operation.
type LoadBalancersUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10878,34 +9959,15 @@ func (future LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.UpdateTagsResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11262,12 +10324,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11275,34 +10336,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11311,12 +10353,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11324,35 +10365,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11360,12 +10376,11 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
// operation.
type LocalNetworkGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11373,34 +10388,15 @@ func (future LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGat
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.UpdateTagsResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11962,12 +10958,11 @@ type PacketCaptureResultProperties struct {
// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11975,34 +10970,15 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
return
}
if !done {
- return pcr, azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12010,12 +10986,11 @@ func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pc
// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12023,35 +10998,10 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12059,12 +11009,11 @@ func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar
// operation.
type PacketCapturesGetStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12072,34 +11021,15 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
return
}
if !done {
- return pcqsr, azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcqsr, err = client.GetStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- pcqsr, err = client.GetStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12107,12 +11037,11 @@ func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PacketCapturesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12120,35 +11049,10 @@ func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12621,12 +11525,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12634,34 +11537,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -12670,12 +11554,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12683,35 +11566,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -12719,12 +11577,11 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
// operation.
type PublicIPAddressesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -12732,34 +11589,15 @@ func (future PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesC
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.UpdateTagsResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13564,12 +12402,11 @@ type RouteFilterRulePropertiesFormat struct {
// operation.
type RouteFilterRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13577,34 +12414,15 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13613,12 +12431,11 @@ func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRule
// operation.
type RouteFilterRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
+func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13626,35 +12443,10 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13662,12 +12454,11 @@ func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFilterRulesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13675,34 +12466,15 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
return
}
if !done {
- return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rfr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.UpdateResponder(rfr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rfr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13711,12 +12483,11 @@ func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient)
// operation.
type RouteFiltersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13724,34 +12495,15 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13759,12 +12511,11 @@ func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient)
// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
+func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13772,47 +12523,21 @@ func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteFiltersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13820,34 +12545,15 @@ func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf Rou
return
}
if !done {
- return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rf, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.UpdateResponder(rf.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rf, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13969,12 +12675,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13982,34 +12687,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14017,12 +12703,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14030,35 +12715,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14304,12 +12964,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14317,34 +12976,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14352,12 +12992,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14365,35 +13004,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14401,12 +13015,11 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
// operation.
type RouteTablesUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14414,34 +13027,15 @@ func (future RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt R
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.UpdateTagsResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14699,12 +13293,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14712,34 +13305,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14747,12 +13321,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14760,35 +13333,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14796,12 +13344,11 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
// operation.
type SecurityGroupsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14809,34 +13356,15 @@ func (future SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient)
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.UpdateTagsResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15089,12 +13617,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15102,34 +13629,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15137,12 +13645,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15150,35 +13657,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15412,12 +13894,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15425,34 +13906,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15460,12 +13922,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15473,35 +13934,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15570,6 +14006,23 @@ type TopologyResource struct {
Associations *[]TopologyAssociation `json:"associations,omitempty"`
}
+// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
+type TrafficAnalyticsConfigurationProperties struct {
+ // Enabled - Flag to enable/disable traffic analytics.
+ Enabled *bool `json:"enabled,omitempty"`
+ // WorkspaceID - The resource guid of the attached workspace
+ WorkspaceID *string `json:"workspaceId,omitempty"`
+ // WorkspaceRegion - The location of the attached workspace
+ WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
+ // WorkspaceResourceID - Resource Id of the attached workspace
+ WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
+}
+
+// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
+type TrafficAnalyticsProperties struct {
+ NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
+}
+
// TroubleshootingDetails information gained from troubleshooting of specified resource.
type TroubleshootingDetails struct {
// ID - The id of the get troubleshoot operation.
@@ -16521,12 +14974,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16534,34 +14986,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16570,12 +15003,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16583,35 +15015,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16619,12 +15026,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16632,34 +15038,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16668,12 +15055,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16681,34 +15067,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16717,12 +15084,11 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
// long-running operation.
type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
+func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16730,34 +15096,15 @@ func (future VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client Vir
return
}
if !done {
- return vngcle, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngcle, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngcle.Response.Response, err = future.GetResult(sender); err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent {
+ vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vngcle, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17092,12 +15439,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17105,34 +15451,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17141,12 +15468,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17154,35 +15480,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -17190,12 +15491,11 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
// a long-running operation.
type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17203,34 +15503,15 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GeneratevpnclientpackageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GeneratevpnclientpackageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17239,12 +15520,11 @@ func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client
// long-running operation.
type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17252,34 +15532,15 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GenerateVpnProfileResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GenerateVpnProfileResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GenerateVpnProfileResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17288,12 +15549,11 @@ func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virtu
// long-running operation.
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17301,34 +15561,15 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetAdvertisedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetAdvertisedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17337,12 +15578,11 @@ func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Virt
// long-running operation.
type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17350,34 +15590,15 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
return
}
if !done {
- return bpslr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bpslr, err = client.GetBgpPeerStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- bpslr, err = client.GetBgpPeerStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17386,12 +15607,11 @@ func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtual
// long-running operation.
type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17399,34 +15619,15 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
return
}
if !done {
- return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- grlr, err = client.GetLearnedRoutesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure sending request")
- return
- }
- grlr, err = client.GetLearnedRoutesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17435,12 +15636,11 @@ func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtual
// of a long-running operation.
type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
+func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17448,34 +15648,15 @@ func (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(cli
return
}
if !done {
- return vcipp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vcipp, err = client.GetVpnclientIpsecParametersResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
+ vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", resp, "Failure sending request")
- return
- }
- vcipp, err = client.GetVpnclientIpsecParametersResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17484,12 +15665,11 @@ func (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(cli
// a long-running operation.
type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17497,43 +15677,24 @@ func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.GetVpnProfilePackageURLResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.GetVpnProfilePackageURLResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure responding to request")
}
return
}
// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
type VirtualNetworkGatewaySku struct {
- // Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3'
+ // Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
- // Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3'
+ // Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
// Capacity - The capacity.
Capacity *int32 `json:"capacity,omitempty"`
@@ -17543,12 +15704,11 @@ type VirtualNetworkGatewaySku struct {
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17556,34 +15716,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17592,12 +15733,11 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
// of a long-running operation.
type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
+func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17605,34 +15745,15 @@ func (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(cli
return
}
if !done {
- return vcipp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vcipp, err = client.SetVpnclientIpsecParametersResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
+ vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", resp, "Failure sending request")
- return
- }
- vcipp, err = client.SetVpnclientIpsecParametersResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17641,12 +15762,11 @@ func (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(cli
// long-running operation.
type VirtualNetworkGatewaysUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17654,34 +15774,15 @@ func (future VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetwor
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.UpdateTagsResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18099,12 +16200,11 @@ type VirtualNetworkPeeringPropertiesFormat struct {
// long-running operation.
type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18112,34 +16212,15 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vnp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18148,12 +16229,11 @@ func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18161,35 +16241,10 @@ func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPee
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -18219,12 +16274,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18232,34 +16286,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18268,12 +16303,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18281,35 +16315,10 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -18317,12 +16326,11 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
// operation.
type VirtualNetworksUpdateTagsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18330,34 +16338,15 @@ func (future VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClien
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.UpdateTagsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.UpdateTagsResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18763,12 +16752,11 @@ type WatcherPropertiesFormat struct {
// operation.
type WatchersCheckConnectivityFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
+func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18776,34 +16764,15 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
return
}
if !done {
- return ci, azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ci, err = client.CheckConnectivityResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CheckConnectivityResponder(ci.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure sending request")
- return
- }
- ci, err = client.CheckConnectivityResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18811,12 +16780,11 @@ func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
+func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18824,35 +16792,10 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -18860,12 +16803,11 @@ func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Re
// long-running operation.
type WatchersGetAzureReachabilityReportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
+func (future *WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18873,34 +16815,15 @@ func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersCli
return
}
if !done {
- return arr, azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- arr, err = client.GetAzureReachabilityReportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
+ arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure sending request")
- return
- }
- arr, err = client.GetAzureReachabilityReportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18909,12 +16832,11 @@ func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersCli
// operation.
type WatchersGetFlowLogStatusFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18922,34 +16844,15 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.GetFlowLogStatusResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.GetFlowLogStatusResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -18957,12 +16860,11 @@ func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersGetNextHopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
+func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -18970,34 +16872,15 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
return
}
if !done {
- return nhr, azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nhr, err = client.GetNextHopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure sending request")
- return
- }
- nhr, err = client.GetNextHopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -19006,12 +16889,11 @@ func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHo
// operation.
type WatchersGetTroubleshootingFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -19019,34 +16901,15 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -19055,12 +16918,11 @@ func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr
// long-running operation.
type WatchersGetTroubleshootingResultFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -19068,34 +16930,15 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
return
}
if !done {
- return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- tr, err = client.GetTroubleshootingResultResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure sending request")
- return
- }
- tr, err = client.GetTroubleshootingResultResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -19104,12 +16947,11 @@ func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClien
// operation.
type WatchersGetVMSecurityRulesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -19117,34 +16959,15 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
return
}
if !done {
- return sgvr, azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sgvr, err = client.GetVMSecurityRulesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure sending request")
- return
- }
- sgvr, err = client.GetVMSecurityRulesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -19153,12 +16976,11 @@ func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sg
// operation.
type WatchersListAvailableProvidersFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
+func (future *WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -19166,34 +16988,15 @@ func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient)
return
}
if !done {
- return apl, azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- apl, err = client.ListAvailableProvidersResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
+ apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure sending request")
- return
- }
- apl, err = client.ListAvailableProvidersResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -19202,12 +17005,11 @@ func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient)
// operation.
type WatchersSetFlowLogConfigurationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -19215,34 +17017,15 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
return
}
if !done {
- return fli, azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fli, err = client.SetFlowLogConfigurationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure sending request")
- return
- }
- fli, err = client.SetFlowLogConfigurationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -19250,12 +17033,11 @@ func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient
// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WatchersVerifyIPFlowFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -19263,34 +17045,15 @@ func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr Ver
return
}
if !done {
- return vifr, azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vifr, err = client.VerifyIPFlowResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure sending request")
- return
- }
- vifr, err = client.VerifyIPFlowResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/packetcaptures.go
index db9a87c7e..7422bf793 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/packetcaptures.go
@@ -98,15 +98,17 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -308,15 +312,17 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// GetStatusSender sends the GetStatus request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +452,17 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/publicipaddresses.go
index d39dbb329..661b3de84 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/publicipaddresses.go
@@ -98,15 +98,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -769,15 +773,17 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (future PublicIPAddressesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routefilterrules.go
index 39311adeb..f05bc5386 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routefilterrules.go
@@ -98,15 +98,17 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -406,15 +410,17 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routefilters.go
index d30ceb3e3..8dfbfb052 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routefilters.go
@@ -86,15 +86,17 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routes.go
index be59a6d5c..716e84126 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routetables.go
index 705378f31..dca74ad77 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future RouteTablesUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/securitygroups.go
index 79d17c21f..60a23073e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/securitygroups.go
@@ -86,15 +86,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -480,15 +484,17 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future SecurityGroupsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/securityrules.go
index f35e404c7..b80d4de41 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/securityrules.go
@@ -88,15 +88,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/subnets.go
index 979e58078..9e84618cb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/subnets.go
@@ -88,15 +88,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go
index a7e18d73c..047ad1232 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go
@@ -101,15 +101,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -482,15 +486,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -563,15 +569,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -635,15 +643,17 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkgateways.go
index 4e6b9db34..f9035959c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkgateways.go
@@ -93,15 +93,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -162,15 +164,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -234,15 +238,17 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx
// 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) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -307,15 +313,17 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex
// 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) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -446,15 +454,17 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -519,15 +529,17 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -589,15 +601,17 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -660,15 +674,17 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersPreparer(c
// GetVpnclientIpsecParametersSender sends the GetVpnclientIpsecParameters request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -730,15 +746,17 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c
// 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) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -992,15 +1010,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1073,15 +1093,17 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersPreparer(c
// SetVpnclientIpsecParametersSender sends the SetVpnclientIpsecParameters request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1212,15 +1234,17 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkpeerings.go
index 0ddfb76dc..83bd94c09 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkpeerings.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,15 +162,17 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworks.go
index 74b487491..4de0e606e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworks.go
@@ -157,15 +157,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -226,15 +228,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -646,15 +650,17 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future VirtualNetworksUpdateTagsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/watchers.go
index ca8c61c94..0d9725f91 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/watchers.go
@@ -96,15 +96,17 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
// 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) (future WatchersCheckConnectivityFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -235,15 +237,17 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -383,15 +387,17 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont
// 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) (future WatchersGetAzureReachabilityReportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -408,11 +414,11 @@ func (client WatchersClient) GetAzureReachabilityReportResponder(resp *http.Resp
return
}
-// GetFlowLogStatus queries status of flow log on a specified resource.
+// GetFlowLogStatus queries status of flow log and traffic analytics (optional) on a specified resource.
// Parameters:
// resourceGroupName - the name of the network watcher resource group.
// networkWatcherName - the name of the network watcher resource.
-// parameters - parameters that define a resource to query flow log status.
+// parameters - parameters that define a resource to query flow log and traffic analytics (optional) status.
func (client WatchersClient) GetFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters) (result WatchersGetFlowLogStatusFuture, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
@@ -461,15 +467,17 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -541,15 +549,17 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// GetNextHopSender sends the GetNextHop request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -693,15 +703,17 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -771,15 +783,17 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -849,15 +863,17 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1048,15 +1064,17 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context,
// 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) (future WatchersListAvailableProvidersFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1073,7 +1091,7 @@ func (client WatchersClient) ListAvailableProvidersResponder(resp *http.Response
return
}
-// SetFlowLogConfiguration configures flow log on a specified resource.
+// SetFlowLogConfiguration configures flow log and traffic analytics (optional) on a specified resource.
// Parameters:
// resourceGroupName - the name of the network watcher resource group.
// networkWatcherName - the name of the network watcher resource.
@@ -1085,6 +1103,14 @@ func (client WatchersClient) SetFlowLogConfiguration(ctx context.Context, resour
{Target: "parameters.FlowLogProperties", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.FlowLogProperties.StorageID", Name: validation.Null, Rule: true, Chain: nil},
{Target: "parameters.FlowLogProperties.Enabled", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "parameters.FlowAnalyticsConfiguration", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.Enabled", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.WorkspaceID", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.WorkspaceRegion", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.WorkspaceResourceID", Name: validation.Null, Rule: true, Chain: nil},
+ }},
}}}}}); err != nil {
return result, validation.NewError("network.WatchersClient", "SetFlowLogConfiguration", err.Error())
}
@@ -1130,15 +1156,17 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1282,15 +1310,17 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/applicationgateways.go
new file mode 100644
index 000000000..9a27f3644
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/applicationgateways.go
@@ -0,0 +1,1019 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// ApplicationGatewaysClient is the network Client
+type ApplicationGatewaysClient struct {
+ BaseClient
+}
+
+// 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.
+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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// applicationGatewayName - the name of the application gateway.
+// expand - expands BackendAddressPool and BackendHttpSettings referenced in backend health.
+func (client ApplicationGatewaysClient) BackendHealth(ctx context.Context, resourceGroupName string, applicationGatewayName string, expand string) (result ApplicationGatewaysBackendHealthFuture, err error) {
+ req, err := client.BackendHealthPreparer(ctx, resourceGroupName, applicationGatewayName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.BackendHealthSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// BackendHealthPreparer prepares the BackendHealth request.
+func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationGatewayName": autorest.Encode("path", applicationGatewayName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// BackendHealthSender sends the BackendHealth request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// BackendHealthResponder handles the response to the BackendHealth request. The method always
+// closes the http.Response Body.
+func (client ApplicationGatewaysClient) BackendHealthResponder(resp *http.Response) (result ApplicationGatewayBackendHealth, 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 the specified application gateway.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// applicationGatewayName - the name of the application gateway.
+// parameters - parameters supplied to the create or update application gateway operation.
+func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway) (result ApplicationGatewaysCreateOrUpdateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.Enabled", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetType", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: 128, Chain: nil},
+ {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil},
+ }},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, applicationGatewayName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationGatewayName": autorest.Encode("path", applicationGatewayName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ApplicationGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result ApplicationGateway, 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 the specified application gateway.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// applicationGatewayName - the name of the application gateway.
+func (client ApplicationGatewaysClient) Delete(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, applicationGatewayName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationGatewayName": autorest.Encode("path", applicationGatewayName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/applicationGateways/{applicationGatewayName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ApplicationGatewaysClient) 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 specified application gateway.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// applicationGatewayName - the name of the application gateway.
+func (client ApplicationGatewaysClient) Get(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGateway, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, applicationGatewayName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "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.ApplicationGatewaysClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ApplicationGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationGatewayName": autorest.Encode("path", applicationGatewayName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/applicationGateways/{applicationGatewayName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationGatewaysClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ApplicationGatewaysClient) GetResponder(resp *http.Response) (result ApplicationGateway, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetSslPredefinedPolicy gets Ssl predefined policy with the specified policy name.
+// Parameters:
+// predefinedPolicyName - name of Ssl predefined policy.
+func (client ApplicationGatewaysClient) GetSslPredefinedPolicy(ctx context.Context, predefinedPolicyName string) (result ApplicationGatewaySslPredefinedPolicy, err error) {
+ req, err := client.GetSslPredefinedPolicyPreparer(ctx, 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(ctx context.Context, predefinedPolicyName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "predefinedPolicyName": autorest.Encode("path", predefinedPolicyName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ApplicationGatewaysClient) List(ctx context.Context, resourceGroupName string) (result ApplicationGatewayListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.aglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.aglr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ApplicationGatewaysClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/applicationGateways", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationGatewaysClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ApplicationGatewaysClient) ListResponder(resp *http.Response) (result ApplicationGatewayListResult, 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 ApplicationGatewaysClient) listNextResults(lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) {
+ req, err := lastResults.applicationGatewayListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listNextResults", 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.ApplicationGatewaysClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ApplicationGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result ApplicationGatewayListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll gets all the application gateways in a subscription.
+func (client ApplicationGatewaysClient) ListAll(ctx context.Context) (result ApplicationGatewayListResultPage, err error) {
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.aglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.aglr, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAll", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client ApplicationGatewaysClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationGatewaysClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client ApplicationGatewaysClient) ListAllResponder(resp *http.Response) (result ApplicationGatewayListResult, 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 ApplicationGatewaysClient) listAllNextResults(lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) {
+ req, err := lastResults.applicationGatewayListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAllNextResults", 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.ApplicationGatewaysClient", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ApplicationGatewaysClient) ListAllComplete(ctx context.Context) (result ApplicationGatewayListResultIterator, err error) {
+ result.page, err = client.ListAll(ctx)
+ return
+}
+
+// ListAvailableSslOptions lists available Ssl options for configuring Ssl policy.
+func (client ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Context) (result ApplicationGatewayAvailableSslOptions, err error) {
+ req, err := client.ListAvailableSslOptionsPreparer(ctx)
+ 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(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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(ctx context.Context) (result ApplicationGatewayAvailableSslPredefinedPoliciesPage, err error) {
+ result.fn = client.listAvailableSslPredefinedPoliciesNextResults
+ req, err := client.ListAvailableSslPredefinedPoliciesPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAvailableSslPredefinedPoliciesSender(req)
+ if err != nil {
+ result.agaspp.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", resp, "Failure sending request")
+ return
+ }
+
+ result.agaspp, 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(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listAvailableSslPredefinedPoliciesNextResults", 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", "listAvailableSslPredefinedPoliciesNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAvailableSslPredefinedPoliciesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAvailableSslPredefinedPoliciesNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAvailableSslPredefinedPoliciesComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesComplete(ctx context.Context) (result ApplicationGatewayAvailableSslPredefinedPoliciesIterator, err error) {
+ result.page, err = client.ListAvailableSslPredefinedPolicies(ctx)
+ return
+}
+
+// ListAvailableWafRuleSets lists all available web application firewall rule sets.
+func (client ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context) (result ApplicationGatewayAvailableWafRuleSetsResult, err error) {
+ req, err := client.ListAvailableWafRuleSetsPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableWafRuleSets", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAvailableWafRuleSetsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableWafRuleSets", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListAvailableWafRuleSetsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableWafRuleSets", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAvailableWafRuleSetsPreparer prepares the ListAvailableWafRuleSets request.
+func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAvailableWafRuleSetsSender sends the ListAvailableWafRuleSets request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAvailableWafRuleSetsResponder handles the response to the ListAvailableWafRuleSets request. The method always
+// closes the http.Response Body.
+func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsResponder(resp *http.Response) (result ApplicationGatewayAvailableWafRuleSetsResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Start starts the specified application gateway.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// applicationGatewayName - the name of the application gateway.
+func (client ApplicationGatewaysClient) Start(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysStartFuture, err error) {
+ req, err := client.StartPreparer(ctx, resourceGroupName, applicationGatewayName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StartSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartPreparer prepares the Start request.
+func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationGatewayName": autorest.Encode("path", applicationGatewayName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/applicationGateways/{applicationGatewayName}/start", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StartSender sends the Start request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// StartResponder handles the response to the Start request. The method always
+// closes the http.Response Body.
+func (client ApplicationGatewaysClient) StartResponder(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
+}
+
+// Stop stops the specified application gateway in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// applicationGatewayName - the name of the application gateway.
+func (client ApplicationGatewaysClient) Stop(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysStopFuture, err error) {
+ req, err := client.StopPreparer(ctx, resourceGroupName, applicationGatewayName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StopSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StopPreparer prepares the Stop request.
+func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationGatewayName": autorest.Encode("path", applicationGatewayName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/applicationGateways/{applicationGatewayName}/stop", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StopSender sends the Stop request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// StopResponder handles the response to the Stop request. The method always
+// closes the http.Response Body.
+func (client ApplicationGatewaysClient) StopResponder(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
+}
+
+// UpdateTags updates the specified application gateway tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// applicationGatewayName - the name of the application gateway.
+// parameters - parameters supplied to update application gateway tags.
+func (client ApplicationGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters TagsObject) (result ApplicationGatewaysUpdateTagsFuture, err error) {
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, applicationGatewayName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters TagsObject) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationGatewayName": autorest.Encode("path", applicationGatewayName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (future ApplicationGatewaysUpdateTagsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client ApplicationGatewaysClient) UpdateTagsResponder(resp *http.Response) (result ApplicationGateway, 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/services/network/mgmt/2018-05-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/applicationsecuritygroups.go
new file mode 100644
index 000000000..d16a4d553
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/applicationsecuritygroups.go
@@ -0,0 +1,434 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ApplicationSecurityGroupsClient is the network Client
+type ApplicationSecurityGroupsClient struct {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// applicationSecurityGroupName - the name of the application security group.
+// parameters - parameters supplied to the create or update ApplicationSecurityGroup operation.
+func (client ApplicationSecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup) (result ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, applicationSecurityGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ 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{}).WithContext(ctx))
+}
+
+// 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) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the specified application security group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// applicationSecurityGroupName - the name of the application security group.
+func (client ApplicationSecurityGroupsClient) Delete(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (result ApplicationSecurityGroupsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, applicationSecurityGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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) (future ApplicationSecurityGroupsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets information about the specified application security group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// applicationSecurityGroupName - the name of the application security group.
+func (client ApplicationSecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (result ApplicationSecurityGroup, err error) {
+ req, err := client.GetPreparer(ctx, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ApplicationSecurityGroupsClient) List(ctx context.Context, resourceGroupName string) (result ApplicationSecurityGroupListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, 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.asglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.asglr, 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(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listNextResults", 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", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ApplicationSecurityGroupsClient) ListComplete(ctx context.Context, resourceGroupName string) (result ApplicationSecurityGroupListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll gets all application security groups in a subscription.
+func (client ApplicationSecurityGroupsClient) ListAll(ctx context.Context) (result ApplicationSecurityGroupListResultPage, err error) {
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.asglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.asglr, 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(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listAllNextResults", 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", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ApplicationSecurityGroupsClient) ListAllComplete(ctx context.Context) (result ApplicationSecurityGroupListResultIterator, err error) {
+ result.page, err = client.ListAll(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/availableendpointservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/availableendpointservices.go
new file mode 100644
index 000000000..d9702bdb3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/availableendpointservices.go
@@ -0,0 +1,133 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// AvailableEndpointServicesClient is the network Client
+type AvailableEndpointServicesClient struct {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// location - the location to check available endpoint services.
+func (client AvailableEndpointServicesClient) List(ctx context.Context, location string) (result EndpointServicesListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, 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.eslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.eslr, 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(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listNextResults", 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", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AvailableEndpointServicesClient) ListComplete(ctx context.Context, location string) (result EndpointServicesListResultIterator, err error) {
+ result.page, err = client.List(ctx, location)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/bgpservicecommunities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/bgpservicecommunities.go
new file mode 100644
index 000000000..4ad1bfa83
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/bgpservicecommunities.go
@@ -0,0 +1,130 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// BgpServiceCommunitiesClient is the network Client
+type BgpServiceCommunitiesClient struct {
+ BaseClient
+}
+
+// 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.
+func NewBgpServiceCommunitiesClientWithBaseURI(baseURI string, subscriptionID string) BgpServiceCommunitiesClient {
+ return BgpServiceCommunitiesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List gets all the available bgp service communities.
+func (client BgpServiceCommunitiesClient) List(ctx context.Context) (result BgpServiceCommunityListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.bsclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.bsclr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client BgpServiceCommunitiesClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client BgpServiceCommunitiesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client BgpServiceCommunitiesClient) ListResponder(resp *http.Response) (result BgpServiceCommunityListResult, 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 BgpServiceCommunitiesClient) listNextResults(lastResults BgpServiceCommunityListResult) (result BgpServiceCommunityListResult, err error) {
+ req, err := lastResults.bgpServiceCommunityListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "listNextResults", 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.BgpServiceCommunitiesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client BgpServiceCommunitiesClient) ListComplete(ctx context.Context) (result BgpServiceCommunityListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/client.go
new file mode 100644
index 000000000..64cb1daed
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/client.go
@@ -0,0 +1,122 @@
+// Package network implements the Azure ARM Network service API version .
+//
+// Network Client
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Network
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Network.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
+
+// CheckDNSNameAvailability checks whether a domain name in the cloudapp.azure.com zone is available for use.
+// Parameters:
+// location - the location of the domain name.
+// domainNameLabel - 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 BaseClient) CheckDNSNameAvailability(ctx context.Context, location string, domainNameLabel string) (result DNSNameAvailabilityResult, err error) {
+ req, err := client.CheckDNSNameAvailabilityPreparer(ctx, location, domainNameLabel)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckDNSNameAvailabilitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckDNSNameAvailabilityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckDNSNameAvailabilityPreparer prepares the CheckDNSNameAvailability request.
+func (client BaseClient) CheckDNSNameAvailabilityPreparer(ctx context.Context, location string, domainNameLabel string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "domainNameLabel": autorest.Encode("query", domainNameLabel),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CheckDNSNameAvailabilitySender sends the CheckDNSNameAvailability request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) CheckDNSNameAvailabilitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CheckDNSNameAvailabilityResponder handles the response to the CheckDNSNameAvailability request. The method always
+// closes the http.Response Body.
+func (client BaseClient) CheckDNSNameAvailabilityResponder(resp *http.Response) (result DNSNameAvailabilityResult, 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/services/network/mgmt/2018-05-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/connectionmonitors.go
new file mode 100644
index 000000000..d7d2e9416
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/connectionmonitors.go
@@ -0,0 +1,552 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// ConnectionMonitorsClient is the network Client
+type ConnectionMonitorsClient struct {
+ BaseClient
+}
+
+// NewConnectionMonitorsClient creates an instance of the ConnectionMonitorsClient client.
+func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient {
+ return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client.
+func NewConnectionMonitorsClientWithBaseURI(baseURI string, subscriptionID string) ConnectionMonitorsClient {
+ return ConnectionMonitorsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a connection monitor.
+// Parameters:
+// resourceGroupName - the name of the resource group containing Network Watcher.
+// networkWatcherName - the name of the Network Watcher resource.
+// connectionMonitorName - the name of the connection monitor.
+// parameters - parameters that define the operation to create a connection monitor.
+func (client ConnectionMonitorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor) (result ConnectionMonitorsCreateOrUpdateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters.Source", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters.Source.ResourceID", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.ConnectionMonitorParameters.Destination", Name: validation.Null, Rule: true, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("network.ConnectionMonitorsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "connectionMonitorName": autorest.Encode("path", connectionMonitorName),
+ "networkWatcherName": autorest.Encode("path", networkWatcherName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ConnectionMonitorsClient) CreateOrUpdateResponder(resp *http.Response) (result ConnectionMonitorResult, 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 the specified connection monitor.
+// Parameters:
+// resourceGroupName - the name of the resource group containing Network Watcher.
+// networkWatcherName - the name of the Network Watcher resource.
+// connectionMonitorName - the name of the connection monitor.
+func (client ConnectionMonitorsClient) Delete(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "connectionMonitorName": autorest.Encode("path", connectionMonitorName),
+ "networkWatcherName": autorest.Encode("path", networkWatcherName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ConnectionMonitorsClient) 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 connection monitor by name.
+// Parameters:
+// resourceGroupName - the name of the resource group containing Network Watcher.
+// networkWatcherName - the name of the Network Watcher resource.
+// connectionMonitorName - the name of the connection monitor.
+func (client ConnectionMonitorsClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorResult, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "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.ConnectionMonitorsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ConnectionMonitorsClient) GetPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "connectionMonitorName": autorest.Encode("path", connectionMonitorName),
+ "networkWatcherName": autorest.Encode("path", networkWatcherName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ConnectionMonitorsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ConnectionMonitorsClient) GetResponder(resp *http.Response) (result ConnectionMonitorResult, 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 connection monitors for the specified Network Watcher.
+// Parameters:
+// resourceGroupName - the name of the resource group containing Network Watcher.
+// networkWatcherName - the name of the Network Watcher resource.
+func (client ConnectionMonitorsClient) List(ctx context.Context, resourceGroupName string, networkWatcherName string) (result ConnectionMonitorListResult, err error) {
+ req, err := client.ListPreparer(ctx, resourceGroupName, networkWatcherName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "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.ConnectionMonitorsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ConnectionMonitorsClient) ListPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string) (*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 = "2018-05-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/networkWatchers/{networkWatcherName}/connectionMonitors", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ConnectionMonitorsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ConnectionMonitorsClient) ListResponder(resp *http.Response) (result ConnectionMonitorListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Query query a snapshot of the most recent connection states.
+// Parameters:
+// resourceGroupName - the name of the resource group containing Network Watcher.
+// networkWatcherName - the name of the Network Watcher resource.
+// connectionMonitorName - the name given to the connection monitor.
+func (client ConnectionMonitorsClient) Query(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsQueryFuture, err error) {
+ req, err := client.QueryPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.QuerySender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// QueryPreparer prepares the Query request.
+func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "connectionMonitorName": autorest.Encode("path", connectionMonitorName),
+ "networkWatcherName": autorest.Encode("path", networkWatcherName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// QuerySender sends the Query request. The method will close the
+// http.Response Body if it receives an error.
+func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// QueryResponder handles the response to the Query request. The method always
+// closes the http.Response Body.
+func (client ConnectionMonitorsClient) QueryResponder(resp *http.Response) (result ConnectionMonitorQueryResult, 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 starts the specified connection monitor.
+// Parameters:
+// resourceGroupName - the name of the resource group containing Network Watcher.
+// networkWatcherName - the name of the Network Watcher resource.
+// connectionMonitorName - the name of the connection monitor.
+func (client ConnectionMonitorsClient) Start(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsStartFuture, err error) {
+ req, err := client.StartPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StartSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartPreparer prepares the Start request.
+func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "connectionMonitorName": autorest.Encode("path", connectionMonitorName),
+ "networkWatcherName": autorest.Encode("path", networkWatcherName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StartSender sends the Start request. The method will close the
+// http.Response Body if it receives an error.
+func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// StartResponder handles the response to the Start request. The method always
+// closes the http.Response Body.
+func (client ConnectionMonitorsClient) StartResponder(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
+}
+
+// Stop stops the specified connection monitor.
+// Parameters:
+// resourceGroupName - the name of the resource group containing Network Watcher.
+// networkWatcherName - the name of the Network Watcher resource.
+// connectionMonitorName - the name of the connection monitor.
+func (client ConnectionMonitorsClient) Stop(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsStopFuture, err error) {
+ req, err := client.StopPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StopSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StopPreparer prepares the Stop request.
+func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "connectionMonitorName": autorest.Encode("path", connectionMonitorName),
+ "networkWatcherName": autorest.Encode("path", networkWatcherName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StopSender sends the Stop request. The method will close the
+// http.Response Body if it receives an error.
+func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// StopResponder handles the response to the Stop request. The method always
+// closes the http.Response Body.
+func (client ConnectionMonitorsClient) StopResponder(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/services/network/mgmt/2018-05-01/network/ddosprotectionplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/ddosprotectionplans.go
new file mode 100644
index 000000000..e8b12ed1d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/ddosprotectionplans.go
@@ -0,0 +1,434 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// DdosProtectionPlansClient is the network Client
+type DdosProtectionPlansClient struct {
+ BaseClient
+}
+
+// NewDdosProtectionPlansClient creates an instance of the DdosProtectionPlansClient client.
+func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClient {
+ return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client.
+func NewDdosProtectionPlansClientWithBaseURI(baseURI string, subscriptionID string) DdosProtectionPlansClient {
+ return DdosProtectionPlansClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a DDoS protection plan.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// ddosProtectionPlanName - the name of the DDoS protection plan.
+// parameters - parameters supplied to the create or update operation.
+func (client DdosProtectionPlansClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan) (result DdosProtectionPlansCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, ddosProtectionPlanName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DdosProtectionPlansClient) CreateOrUpdateSender(req *http.Request) (future DdosProtectionPlansCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client DdosProtectionPlansClient) CreateOrUpdateResponder(resp *http.Response) (result DdosProtectionPlan, 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 the specified DDoS protection plan.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// ddosProtectionPlanName - the name of the DDoS protection plan.
+func (client DdosProtectionPlansClient) Delete(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (result DdosProtectionPlansDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, ddosProtectionPlanName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/ddosProtectionPlans/{ddosProtectionPlanName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DdosProtectionPlansClient) DeleteSender(req *http.Request) (future DdosProtectionPlansDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client DdosProtectionPlansClient) 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 information about the specified DDoS protection plan.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// ddosProtectionPlanName - the name of the DDoS protection plan.
+func (client DdosProtectionPlansClient) Get(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (result DdosProtectionPlan, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, ddosProtectionPlanName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "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.DdosProtectionPlansClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DdosProtectionPlansClient) GetPreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/ddosProtectionPlans/{ddosProtectionPlanName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DdosProtectionPlansClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DdosProtectionPlansClient) GetResponder(resp *http.Response) (result DdosProtectionPlan, 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 DDoS protection plans in a subscription.
+func (client DdosProtectionPlansClient) List(ctx context.Context) (result DdosProtectionPlanListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.dpplr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.dpplr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client DdosProtectionPlansClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client DdosProtectionPlansClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client DdosProtectionPlansClient) ListResponder(resp *http.Response) (result DdosProtectionPlanListResult, 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 DdosProtectionPlansClient) listNextResults(lastResults DdosProtectionPlanListResult) (result DdosProtectionPlanListResult, err error) {
+ req, err := lastResults.ddosProtectionPlanListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listNextResults", 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.DdosProtectionPlansClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DdosProtectionPlansClient) ListComplete(ctx context.Context) (result DdosProtectionPlanListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup gets all the DDoS protection plans in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client DdosProtectionPlansClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DdosProtectionPlanListResultPage, err error) {
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.dpplr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.dpplr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client DdosProtectionPlansClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/ddosProtectionPlans", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DdosProtectionPlansClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client DdosProtectionPlansClient) ListByResourceGroupResponder(resp *http.Response) (result DdosProtectionPlanListResult, 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 DdosProtectionPlansClient) listByResourceGroupNextResults(lastResults DdosProtectionPlanListResult) (result DdosProtectionPlanListResult, err error) {
+ req, err := lastResults.ddosProtectionPlanListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listByResourceGroupNextResults", 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, "network.DdosProtectionPlansClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DdosProtectionPlansClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DdosProtectionPlanListResultIterator, err error) {
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/defaultsecurityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/defaultsecurityrules.go
new file mode 100644
index 000000000..9abdee678
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/defaultsecurityrules.go
@@ -0,0 +1,204 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// DefaultSecurityRulesClient is the network Client
+type DefaultSecurityRulesClient struct {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkSecurityGroupName - the name of the network security group.
+// defaultSecurityRuleName - the name of the default security rule.
+func (client DefaultSecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string) (result SecurityRule, err error) {
+ req, err := client.GetPreparer(ctx, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkSecurityGroupName - the name of the network security group.
+func (client DefaultSecurityRulesClient) List(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, 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.srlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.srlr, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listNextResults", 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", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DefaultSecurityRulesClient) ListComplete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, networkSecurityGroupName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecircuitauthorizations.go
new file mode 100644
index 000000000..11ff3567d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecircuitauthorizations.go
@@ -0,0 +1,355 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ExpressRouteCircuitAuthorizationsClient is the network Client
+type ExpressRouteCircuitAuthorizationsClient struct {
+ BaseClient
+}
+
+// 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.
+func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitAuthorizationsClient {
+ return ExpressRouteCircuitAuthorizationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates an authorization in the specified express route circuit.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+// authorizationName - the name of the authorization.
+// authorizationParameters - parameters supplied to the create or update express route circuit authorization
+// operation.
+func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization) (result ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, authorizationName, authorizationParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "authorizationName": autorest.Encode("path", authorizationName),
+ "circuitName": autorest.Encode("path", circuitName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", pathParameters),
+ autorest.WithJSON(authorizationParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuitAuthorization, 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 the specified authorization from the specified express route circuit.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+// authorizationName - the name of the authorization.
+func (client ExpressRouteCircuitAuthorizationsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (result ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, authorizationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "authorizationName": autorest.Encode("path", authorizationName),
+ "circuitName": autorest.Encode("path", circuitName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitAuthorizationsClient) 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 specified authorization from the specified express route circuit.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+// authorizationName - the name of the authorization.
+func (client ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (result ExpressRouteCircuitAuthorization, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, circuitName, authorizationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "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.ExpressRouteCircuitAuthorizationsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ExpressRouteCircuitAuthorizationsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "authorizationName": autorest.Encode("path", authorizationName),
+ "circuitName": autorest.Encode("path", circuitName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitAuthorizationsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitAuthorizationsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuitAuthorization, 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 authorizations in an express route circuit.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the circuit.
+func (client ExpressRouteCircuitAuthorizationsClient) List(ctx context.Context, resourceGroupName string, circuitName string) (result AuthorizationListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, circuitName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.alr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.alr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ExpressRouteCircuitAuthorizationsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}/authorizations", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitAuthorizationsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitAuthorizationsClient) ListResponder(resp *http.Response) (result AuthorizationListResult, 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 ExpressRouteCircuitAuthorizationsClient) listNextResults(lastResults AuthorizationListResult) (result AuthorizationListResult, err error) {
+ req, err := lastResults.authorizationListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "listNextResults", 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.ExpressRouteCircuitAuthorizationsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ExpressRouteCircuitAuthorizationsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string) (result AuthorizationListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, circuitName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecircuitconnections.go
new file mode 100644
index 000000000..34fe7616c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecircuitconnections.go
@@ -0,0 +1,265 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ExpressRouteCircuitConnectionsClient is the network Client
+type ExpressRouteCircuitConnectionsClient struct {
+ BaseClient
+}
+
+// NewExpressRouteCircuitConnectionsClient creates an instance of the ExpressRouteCircuitConnectionsClient client.
+func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRouteCircuitConnectionsClient {
+ return NewExpressRouteCircuitConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient
+// client.
+func NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient {
+ return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a Express Route Circuit Connection in the specified express route circuits.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+// peeringName - the name of the peering.
+// connectionName - the name of the express route circuit connection.
+// expressRouteCircuitConnectionParameters - parameters supplied to the create or update express route circuit
+// circuit connection operation.
+func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection) (result ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "connectionName": autorest.Encode("path", connectionName),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", pathParameters),
+ autorest.WithJSON(expressRouteCircuitConnectionParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuitConnection, 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 the specified Express Route Circuit Connection from the specified express route circuit.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+// peeringName - the name of the peering.
+// connectionName - the name of the express route circuit connection.
+func (client ExpressRouteCircuitConnectionsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result ExpressRouteCircuitConnectionsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, peeringName, connectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "connectionName": autorest.Encode("path", connectionName),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitConnectionsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitConnectionsClient) 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 specified Express Route Circuit Connection from the specified express route circuit.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+// peeringName - the name of the peering.
+// connectionName - the name of the express route circuit connection.
+func (client ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result ExpressRouteCircuitConnection, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, circuitName, peeringName, connectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "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.ExpressRouteCircuitConnectionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "connectionName": autorest.Encode("path", connectionName),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitConnectionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuitConnection, 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/services/network/mgmt/2018-05-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecircuitpeerings.go
new file mode 100644
index 000000000..c373161e0
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecircuitpeerings.go
@@ -0,0 +1,364 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// ExpressRouteCircuitPeeringsClient is the network Client
+type ExpressRouteCircuitPeeringsClient struct {
+ BaseClient
+}
+
+// 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.
+func NewExpressRouteCircuitPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitPeeringsClient {
+ return ExpressRouteCircuitPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a peering in the specified express route circuits.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+// peeringName - the name of the peering.
+// peeringParameters - parameters supplied to the create or update express route circuit peering operation.
+func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering) (result ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: peeringParameters,
+ Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: 4294967295, Chain: nil},
+ {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, peeringName, peeringParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}", pathParameters),
+ autorest.WithJSON(peeringParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuitPeering, 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 the specified peering from the specified express route circuit.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+// peeringName - the name of the peering.
+func (client ExpressRouteCircuitPeeringsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitPeeringsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, peeringName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitPeeringsClient) 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 specified authorization from the specified express route circuit.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+// peeringName - the name of the peering.
+func (client ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitPeering, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, circuitName, peeringName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "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.ExpressRouteCircuitPeeringsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ExpressRouteCircuitPeeringsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitPeeringsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitPeeringsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuitPeering, 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 peerings in a specified express route circuit.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+func (client ExpressRouteCircuitPeeringsClient) List(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitPeeringListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, circuitName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.ercplr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.ercplr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ExpressRouteCircuitPeeringsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}/peerings", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitPeeringsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitPeeringsClient) ListResponder(resp *http.Response) (result ExpressRouteCircuitPeeringListResult, 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 ExpressRouteCircuitPeeringsClient) listNextResults(lastResults ExpressRouteCircuitPeeringListResult) (result ExpressRouteCircuitPeeringListResult, err error) {
+ req, err := lastResults.expressRouteCircuitPeeringListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "listNextResults", 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.ExpressRouteCircuitPeeringsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ExpressRouteCircuitPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitPeeringListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, circuitName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecircuits.go
new file mode 100644
index 000000000..82bca0486
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecircuits.go
@@ -0,0 +1,871 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ExpressRouteCircuitsClient is the network Client
+type ExpressRouteCircuitsClient struct {
+ BaseClient
+}
+
+// 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.
+func NewExpressRouteCircuitsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitsClient {
+ return ExpressRouteCircuitsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates an express route circuit.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the circuit.
+// parameters - parameters supplied to the create or update express route circuit operation.
+func (client ExpressRouteCircuitsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit) (result ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuit, 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 the specified express route circuit.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+func (client ExpressRouteCircuitsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitsClient) 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 information about the specified express route circuit.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of express route circuit.
+func (client ExpressRouteCircuitsClient) Get(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuit, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, circuitName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "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.ExpressRouteCircuitsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ExpressRouteCircuitsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuit, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetPeeringStats gets all stats from an express route circuit in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+// peeringName - the name of the peering.
+func (client ExpressRouteCircuitsClient) GetPeeringStats(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitStats, err error) {
+ req, err := client.GetPeeringStatsPreparer(ctx, resourceGroupName, circuitName, peeringName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetPeeringStats", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPeeringStatsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetPeeringStats", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPeeringStatsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetPeeringStats", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPeeringStatsPreparer prepares the GetPeeringStats request.
+func (client ExpressRouteCircuitsClient) GetPeeringStatsPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPeeringStatsSender sends the GetPeeringStats request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitsClient) GetPeeringStatsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetPeeringStatsResponder handles the response to the GetPeeringStats request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitsClient) GetPeeringStatsResponder(resp *http.Response) (result ExpressRouteCircuitStats, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetStats gets all the stats from an express route circuit in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+func (client ExpressRouteCircuitsClient) GetStats(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitStats, err error) {
+ req, err := client.GetStatsPreparer(ctx, resourceGroupName, circuitName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetStats", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetStatsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetStats", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetStatsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetStats", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetStatsPreparer prepares the GetStats request.
+func (client ExpressRouteCircuitsClient) GetStatsPreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}/stats", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetStatsSender sends the GetStats request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitsClient) GetStatsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetStatsResponder handles the response to the GetStats request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitsClient) GetStatsResponder(resp *http.Response) (result ExpressRouteCircuitStats, 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 express route circuits in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ExpressRouteCircuitsClient) List(ctx context.Context, resourceGroupName string) (result ExpressRouteCircuitListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.erclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.erclr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ExpressRouteCircuitsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitsClient) ListResponder(resp *http.Response) (result ExpressRouteCircuitListResult, 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 ExpressRouteCircuitsClient) listNextResults(lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) {
+ req, err := lastResults.expressRouteCircuitListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listNextResults", 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.ExpressRouteCircuitsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ExpressRouteCircuitsClient) ListComplete(ctx context.Context, resourceGroupName string) (result ExpressRouteCircuitListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll gets all the express route circuits in a subscription.
+func (client ExpressRouteCircuitsClient) ListAll(ctx context.Context) (result ExpressRouteCircuitListResultPage, err error) {
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.erclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.erclr, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListAll", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client ExpressRouteCircuitsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitsClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitsClient) ListAllResponder(resp *http.Response) (result ExpressRouteCircuitListResult, 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 ExpressRouteCircuitsClient) listAllNextResults(lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) {
+ req, err := lastResults.expressRouteCircuitListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listAllNextResults", 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.ExpressRouteCircuitsClient", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ExpressRouteCircuitsClient) ListAllComplete(ctx context.Context) (result ExpressRouteCircuitListResultIterator, err error) {
+ result.page, err = client.ListAll(ctx)
+ return
+}
+
+// ListArpTable gets the currently advertised ARP table associated with the express route circuit in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+// peeringName - the name of the peering.
+// devicePath - the path of the device.
+func (client ExpressRouteCircuitsClient) ListArpTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result ExpressRouteCircuitsListArpTableFuture, err error) {
+ req, err := client.ListArpTablePreparer(ctx, resourceGroupName, circuitName, peeringName, devicePath)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ListArpTableSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ListArpTablePreparer prepares the ListArpTable request.
+func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "devicePath": autorest.Encode("path", devicePath),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListArpTableSender sends the ListArpTable request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ListArpTableResponder handles the response to the ListArpTable request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitsClient) ListArpTableResponder(resp *http.Response) (result ExpressRouteCircuitsArpTableListResult, 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
+}
+
+// ListRoutesTable gets the currently advertised routes table associated with the express route circuit in a resource
+// group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+// peeringName - the name of the peering.
+// devicePath - the path of the device.
+func (client ExpressRouteCircuitsClient) ListRoutesTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result ExpressRouteCircuitsListRoutesTableFuture, err error) {
+ req, err := client.ListRoutesTablePreparer(ctx, resourceGroupName, circuitName, peeringName, devicePath)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ListRoutesTableSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ListRoutesTablePreparer prepares the ListRoutesTable request.
+func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "devicePath": autorest.Encode("path", devicePath),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ListRoutesTableResponder handles the response to the ListRoutesTable request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitsClient) ListRoutesTableResponder(resp *http.Response) (result ExpressRouteCircuitsRoutesTableListResult, 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
+}
+
+// ListRoutesTableSummary gets the currently advertised routes table summary associated with the express route circuit
+// in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the express route circuit.
+// peeringName - the name of the peering.
+// devicePath - the path of the device.
+func (client ExpressRouteCircuitsClient) ListRoutesTableSummary(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
+ req, err := client.ListRoutesTableSummaryPreparer(ctx, resourceGroupName, circuitName, peeringName, devicePath)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ListRoutesTableSummarySender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ListRoutesTableSummaryPreparer prepares the ListRoutesTableSummary request.
+func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "devicePath": autorest.Encode("path", devicePath),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ListRoutesTableSummaryResponder handles the response to the ListRoutesTableSummary request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryResponder(resp *http.Response) (result ExpressRouteCircuitsRoutesTableSummaryListResult, 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
+}
+
+// UpdateTags updates an express route circuit tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// circuitName - the name of the circuit.
+// parameters - parameters supplied to update express route circuit tags.
+func (client ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, resourceGroupName string, circuitName string, parameters TagsObject) (result ExpressRouteCircuitsUpdateTagsFuture, err error) {
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, circuitName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, circuitName string, parameters TagsObject) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "circuitName": autorest.Encode("path", circuitName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCircuitsUpdateTagsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCircuitsClient) UpdateTagsResponder(resp *http.Response) (result ExpressRouteCircuit, 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/services/network/mgmt/2018-05-01/network/expressroutecrossconnectionpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecrossconnectionpeerings.go
new file mode 100644
index 000000000..822da3e66
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecrossconnectionpeerings.go
@@ -0,0 +1,367 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// ExpressRouteCrossConnectionPeeringsClient is the network Client
+type ExpressRouteCrossConnectionPeeringsClient struct {
+ BaseClient
+}
+
+// NewExpressRouteCrossConnectionPeeringsClient creates an instance of the ExpressRouteCrossConnectionPeeringsClient
+// client.
+func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) ExpressRouteCrossConnectionPeeringsClient {
+ return NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the
+// ExpressRouteCrossConnectionPeeringsClient client.
+func NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionPeeringsClient {
+ return ExpressRouteCrossConnectionPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a peering in the specified ExpressRouteCrossConnection.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// crossConnectionName - the name of the ExpressRouteCrossConnection.
+// peeringName - the name of the peering.
+// peeringParameters - parameters supplied to the create or update ExpressRouteCrossConnection peering
+// operation.
+func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering) (result ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: peeringParameters,
+ Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: 4294967295, Chain: nil},
+ {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, peeringParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "crossConnectionName": autorest.Encode("path", crossConnectionName),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", pathParameters),
+ autorest.WithJSON(peeringParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeering, 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 the specified peering from the ExpressRouteCrossConnection.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// crossConnectionName - the name of the ExpressRouteCrossConnection.
+// peeringName - the name of the peering.
+func (client ExpressRouteCrossConnectionPeeringsClient) Delete(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (result ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, crossConnectionName, peeringName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ExpressRouteCrossConnectionPeeringsClient) DeletePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "crossConnectionName": autorest.Encode("path", crossConnectionName),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCrossConnectionPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCrossConnectionPeeringsClient) 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 specified peering for the ExpressRouteCrossConnection.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// crossConnectionName - the name of the ExpressRouteCrossConnection.
+// peeringName - the name of the peering.
+func (client ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (result ExpressRouteCrossConnectionPeering, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, crossConnectionName, peeringName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "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.ExpressRouteCrossConnectionPeeringsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ExpressRouteCrossConnectionPeeringsClient) GetPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "crossConnectionName": autorest.Encode("path", crossConnectionName),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCrossConnectionPeeringsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCrossConnectionPeeringsClient) GetResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeering, 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 peerings in a specified ExpressRouteCrossConnection.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// crossConnectionName - the name of the ExpressRouteCrossConnection.
+func (client ExpressRouteCrossConnectionPeeringsClient) List(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnectionPeeringListPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, crossConnectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.erccpl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.erccpl, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ExpressRouteCrossConnectionPeeringsClient) ListPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "crossConnectionName": autorest.Encode("path", crossConnectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCrossConnections/{crossConnectionName}/peerings", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCrossConnectionPeeringsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCrossConnectionPeeringsClient) ListResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeeringList, 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 ExpressRouteCrossConnectionPeeringsClient) listNextResults(lastResults ExpressRouteCrossConnectionPeeringList) (result ExpressRouteCrossConnectionPeeringList, err error) {
+ req, err := lastResults.expressRouteCrossConnectionPeeringListPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "listNextResults", 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.ExpressRouteCrossConnectionPeeringsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ExpressRouteCrossConnectionPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnectionPeeringListIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, crossConnectionName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecrossconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecrossconnections.go
new file mode 100644
index 000000000..e48688012
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressroutecrossconnections.go
@@ -0,0 +1,667 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ExpressRouteCrossConnectionsClient is the network Client
+type ExpressRouteCrossConnectionsClient struct {
+ BaseClient
+}
+
+// NewExpressRouteCrossConnectionsClient creates an instance of the ExpressRouteCrossConnectionsClient client.
+func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCrossConnectionsClient {
+ return NewExpressRouteCrossConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient
+// client.
+func NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient {
+ return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate update the specified ExpressRouteCrossConnection.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// crossConnectionName - the name of the ExpressRouteCrossConnection.
+// parameters - parameters supplied to the update express route crossConnection operation.
+func (client ExpressRouteCrossConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection) (result ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, crossConnectionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ExpressRouteCrossConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "crossConnectionName": autorest.Encode("path", crossConnectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCrossConnection, 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 details about the specified ExpressRouteCrossConnection.
+// Parameters:
+// resourceGroupName - the name of the resource group (peering location of the circuit).
+// crossConnectionName - the name of the ExpressRouteCrossConnection (service key of the circuit).
+func (client ExpressRouteCrossConnectionsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnection, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, crossConnectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "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.ExpressRouteCrossConnectionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ExpressRouteCrossConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "crossConnectionName": autorest.Encode("path", crossConnectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCrossConnections/{crossConnectionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCrossConnectionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCrossConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteCrossConnection, 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 retrieves all the ExpressRouteCrossConnections in a subscription.
+func (client ExpressRouteCrossConnectionsClient) List(ctx context.Context) (result ExpressRouteCrossConnectionListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.ercclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.ercclr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ExpressRouteCrossConnectionsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCrossConnectionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCrossConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteCrossConnectionListResult, 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 ExpressRouteCrossConnectionsClient) listNextResults(lastResults ExpressRouteCrossConnectionListResult) (result ExpressRouteCrossConnectionListResult, err error) {
+ req, err := lastResults.expressRouteCrossConnectionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listNextResults", 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.ExpressRouteCrossConnectionsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ExpressRouteCrossConnectionsClient) ListComplete(ctx context.Context) (result ExpressRouteCrossConnectionListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListArpTable gets the currently advertised ARP table associated with the express route cross connection in a
+// resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// crossConnectionName - the name of the ExpressRouteCrossConnection.
+// peeringName - the name of the peering.
+// devicePath - the path of the device
+func (client ExpressRouteCrossConnectionsClient) ListArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListArpTableFuture, err error) {
+ req, err := client.ListArpTablePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ListArpTableSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ListArpTablePreparer prepares the ListArpTable request.
+func (client ExpressRouteCrossConnectionsClient) ListArpTablePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "crossConnectionName": autorest.Encode("path", crossConnectionName),
+ "devicePath": autorest.Encode("path", devicePath),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListArpTableSender sends the ListArpTable request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCrossConnectionsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListArpTableFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ListArpTableResponder handles the response to the ListArpTable request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCrossConnectionsClient) ListArpTableResponder(resp *http.Response) (result ExpressRouteCircuitsArpTableListResult, 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 retrieves all the ExpressRouteCrossConnections in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ExpressRouteCrossConnectionsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRouteCrossConnectionListResultPage, err error) {
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.ercclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.ercclr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCrossConnections", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRouteCrossConnectionListResult, 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 ExpressRouteCrossConnectionsClient) listByResourceGroupNextResults(lastResults ExpressRouteCrossConnectionListResult) (result ExpressRouteCrossConnectionListResult, err error) {
+ req, err := lastResults.expressRouteCrossConnectionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listByResourceGroupNextResults", 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, "network.ExpressRouteCrossConnectionsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ExpressRouteCrossConnectionListResultIterator, err error) {
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListRoutesTable gets the currently advertised routes table associated with the express route cross connection in a
+// resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// crossConnectionName - the name of the ExpressRouteCrossConnection.
+// peeringName - the name of the peering.
+// devicePath - the path of the device.
+func (client ExpressRouteCrossConnectionsClient) ListRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListRoutesTableFuture, err error) {
+ req, err := client.ListRoutesTablePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ListRoutesTableSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ListRoutesTablePreparer prepares the ListRoutesTable request.
+func (client ExpressRouteCrossConnectionsClient) ListRoutesTablePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "crossConnectionName": autorest.Encode("path", crossConnectionName),
+ "devicePath": autorest.Encode("path", devicePath),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ListRoutesTableResponder handles the response to the ListRoutesTable request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCrossConnectionsClient) ListRoutesTableResponder(resp *http.Response) (result ExpressRouteCircuitsRoutesTableListResult, 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
+}
+
+// ListRoutesTableSummary gets the route table summary associated with the express route cross connection in a resource
+// group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// crossConnectionName - the name of the ExpressRouteCrossConnection.
+// peeringName - the name of the peering.
+// devicePath - the path of the device.
+func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) {
+ req, err := client.ListRoutesTableSummaryPreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ListRoutesTableSummarySender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ListRoutesTableSummaryPreparer prepares the ListRoutesTableSummary request.
+func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "crossConnectionName": autorest.Encode("path", crossConnectionName),
+ "devicePath": autorest.Encode("path", devicePath),
+ "peeringName": autorest.Encode("path", peeringName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ListRoutesTableSummaryResponder handles the response to the ListRoutesTableSummary request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryResponder(resp *http.Response) (result ExpressRouteCrossConnectionsRoutesTableSummaryListResult, 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
+}
+
+// UpdateTags updates an express route cross connection tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// crossConnectionName - the name of the cross connection.
+// crossConnectionParameters - parameters supplied to update express route cross connection tags.
+func (client ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject) (result ExpressRouteCrossConnectionsUpdateTagsFuture, err error) {
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, crossConnectionName, crossConnectionParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client ExpressRouteCrossConnectionsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "crossConnectionName": autorest.Encode("path", crossConnectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}", pathParameters),
+ autorest.WithJSON(crossConnectionParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteCrossConnectionsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCrossConnectionsUpdateTagsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteCrossConnectionsClient) UpdateTagsResponder(resp *http.Response) (result ExpressRouteCrossConnection, 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/services/network/mgmt/2018-05-01/network/expressrouteserviceproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressrouteserviceproviders.go
new file mode 100644
index 000000000..888702878
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/expressrouteserviceproviders.go
@@ -0,0 +1,131 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ExpressRouteServiceProvidersClient is the network Client
+type ExpressRouteServiceProvidersClient struct {
+ BaseClient
+}
+
+// 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.
+func NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient {
+ return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List gets all the available express route service providers.
+func (client ExpressRouteServiceProvidersClient) List(ctx context.Context) (result ExpressRouteServiceProviderListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.ersplr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.ersplr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ExpressRouteServiceProvidersClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteServiceProvidersClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteServiceProvidersClient) ListResponder(resp *http.Response) (result ExpressRouteServiceProviderListResult, 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 ExpressRouteServiceProvidersClient) listNextResults(lastResults ExpressRouteServiceProviderListResult) (result ExpressRouteServiceProviderListResult, err error) {
+ req, err := lastResults.expressRouteServiceProviderListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "listNextResults", 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.ExpressRouteServiceProvidersClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ExpressRouteServiceProvidersClient) ListComplete(ctx context.Context) (result ExpressRouteServiceProviderListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/inboundnatrules.go
new file mode 100644
index 000000000..7c648b009
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/inboundnatrules.go
@@ -0,0 +1,376 @@
+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 (
+ "context"
+ "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 {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+// inboundNatRuleName - the name of the inbound nat rule.
+// inboundNatRuleParameters - parameters supplied to the create or update inbound nat rule operation.
+func (client InboundNatRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule) (result InboundNatRulesCreateOrUpdateFuture, err error) {
+ 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 {
+ return result, validation.NewError("network.InboundNatRulesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ 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{}).WithContext(ctx))
+}
+
+// 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) (future InboundNatRulesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the specified load balancer inbound nat rule.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+// inboundNatRuleName - the name of the inbound nat rule.
+func (client InboundNatRulesClient) Delete(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string) (result InboundNatRulesDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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) (future InboundNatRulesDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets the specified load balancer inbound nat rule.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+// inboundNatRuleName - the name of the inbound nat rule.
+// expand - expands referenced resources.
+func (client InboundNatRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, expand string) (result InboundNatRule, err error) {
+ req, err := client.GetPreparer(ctx, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+func (client InboundNatRulesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InboundNatRuleListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, 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.inrlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.inrlr, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listNextResults", 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", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client InboundNatRulesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InboundNatRuleListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, loadBalancerName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/interfaceipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/interfaceipconfigurations.go
new file mode 100644
index 000000000..f61917403
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/interfaceipconfigurations.go
@@ -0,0 +1,204 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// InterfaceIPConfigurationsClient is the network Client
+type InterfaceIPConfigurationsClient struct {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkInterfaceName - the name of the network interface.
+// IPConfigurationName - the name of the ip configuration name.
+func (client InterfaceIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, IPConfigurationName string) (result InterfaceIPConfiguration, err error) {
+ req, err := client.GetPreparer(ctx, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkInterfaceName - the name of the network interface.
+func (client InterfaceIPConfigurationsClient) List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceIPConfigurationListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, 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.iiclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.iiclr, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listNextResults", 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", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client InterfaceIPConfigurationsClient) ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceIPConfigurationListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, networkInterfaceName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/interfaceloadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/interfaceloadbalancers.go
new file mode 100644
index 000000000..4ff767c42
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/interfaceloadbalancers.go
@@ -0,0 +1,135 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// InterfaceLoadBalancersClient is the network Client
+type InterfaceLoadBalancersClient struct {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkInterfaceName - the name of the network interface.
+func (client InterfaceLoadBalancersClient) List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceLoadBalancerListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, 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.ilblr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.ilblr, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listNextResults", 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", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client InterfaceLoadBalancersClient) ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceLoadBalancerListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, networkInterfaceName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/interfaces.go
new file mode 100644
index 000000000..744b37970
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/interfaces.go
@@ -0,0 +1,1104 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// InterfacesClient is the network Client
+type InterfacesClient struct {
+ BaseClient
+}
+
+// NewInterfacesClient creates an instance of the InterfacesClient client.
+func NewInterfacesClient(subscriptionID string) InterfacesClient {
+ return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkInterfaceName - the name of the network interface.
+// parameters - parameters supplied to the create or update network interface operation.
+func (client InterfacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface) (result InterfacesCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkInterfaceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client InterfacesClient) CreateOrUpdateResponder(resp *http.Response) (result Interface, 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 the specified network interface.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkInterfaceName - the name of the network interface.
+func (client InterfacesClient) Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfacesDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, networkInterfaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client InterfacesClient) DeletePreparer(ctx context.Context, 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 = "2018-05-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/networkInterfaces/{networkInterfaceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client InterfacesClient) 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 information about the specified network interface.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkInterfaceName - the name of the network interface.
+// expand - expands referenced resources.
+func (client InterfacesClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand string) (result Interface, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, networkInterfaceName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "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.InterfacesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client InterfacesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand 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 = "2018-05-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/networkInterfaces/{networkInterfaceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client InterfacesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client InterfacesClient) GetResponder(resp *http.Response) (result Interface, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetEffectiveRouteTable gets all route tables applied to a network interface.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkInterfaceName - the name of the network interface.
+func (client InterfacesClient) GetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfacesGetEffectiveRouteTableFuture, err error) {
+ req, err := client.GetEffectiveRouteTablePreparer(ctx, resourceGroupName, networkInterfaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GetEffectiveRouteTableSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GetEffectiveRouteTablePreparer prepares the GetEffectiveRouteTable request.
+func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Context, 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 = "2018-05-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/networkInterfaces/{networkInterfaceName}/effectiveRouteTable", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
+// http.Response Body if it receives an error.
+func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// GetEffectiveRouteTableResponder handles the response to the GetEffectiveRouteTable request. The method always
+// closes the http.Response Body.
+func (client InterfacesClient) GetEffectiveRouteTableResponder(resp *http.Response) (result EffectiveRouteListResult, 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
+}
+
+// GetVirtualMachineScaleSetIPConfiguration get the specified network interface ip configuration in a virtual machine
+// scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualMachineScaleSetName - the name of the virtual machine scale set.
+// virtualmachineIndex - the virtual machine index.
+// networkInterfaceName - the name of the network interface.
+// IPConfigurationName - the name of the ip configuration.
+// expand - expands referenced resources.
+func (client InterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, expand string) (result InterfaceIPConfiguration, err error) {
+ req, err := client.GetVirtualMachineScaleSetIPConfigurationPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetIPConfiguration", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetVirtualMachineScaleSetIPConfigurationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetIPConfiguration", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetVirtualMachineScaleSetIPConfigurationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetIPConfiguration", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetVirtualMachineScaleSetIPConfigurationPreparer prepares the GetVirtualMachineScaleSetIPConfiguration request.
+func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, expand 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,
+ }
+ 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}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetVirtualMachineScaleSetIPConfigurationSender sends the GetVirtualMachineScaleSetIPConfiguration request. The method will close the
+// http.Response Body if it receives an error.
+func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetVirtualMachineScaleSetIPConfigurationResponder handles the response to the GetVirtualMachineScaleSetIPConfiguration request. The method always
+// closes the http.Response Body.
+func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationResponder(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
+}
+
+// GetVirtualMachineScaleSetNetworkInterface get the specified network interface in a virtual machine scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualMachineScaleSetName - the name of the virtual machine scale set.
+// virtualmachineIndex - the virtual machine index.
+// networkInterfaceName - the name of the network interface.
+// expand - expands referenced resources.
+func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result Interface, err error) {
+ req, err := client.GetVirtualMachineScaleSetNetworkInterfacePreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetVirtualMachineScaleSetNetworkInterfaceSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetVirtualMachineScaleSetNetworkInterfaceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetVirtualMachineScaleSetNetworkInterfacePreparer prepares the GetVirtualMachineScaleSetNetworkInterface request.
+func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfacePreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "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,
+ }
+ 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}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetVirtualMachineScaleSetNetworkInterfaceSender sends the GetVirtualMachineScaleSetNetworkInterface request. The method will close the
+// http.Response Body if it receives an error.
+func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetVirtualMachineScaleSetNetworkInterfaceResponder handles the response to the GetVirtualMachineScaleSetNetworkInterface request. The method always
+// closes the http.Response Body.
+func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceResponder(resp *http.Response) (result Interface, 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 network interfaces in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client InterfacesClient) List(ctx context.Context, resourceGroupName string) (result InterfaceListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.ilr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.ilr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client InterfacesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client InterfacesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client InterfacesClient) 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 InterfacesClient) listNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) {
+ req, err := lastResults.interfaceListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listNextResults", 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.InterfacesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client InterfacesClient) ListComplete(ctx context.Context, resourceGroupName string) (result InterfaceListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll gets all network interfaces in a subscription.
+func (client InterfacesClient) ListAll(ctx context.Context) (result InterfaceListResultPage, err error) {
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.ilr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.ilr, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListAll", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client InterfacesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client InterfacesClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client InterfacesClient) ListAllResponder(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
+}
+
+// listAllNextResults retrieves the next set of results, if any.
+func (client InterfacesClient) listAllNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) {
+ req, err := lastResults.interfaceListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listAllNextResults", 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.InterfacesClient", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client InterfacesClient) ListAllComplete(ctx context.Context) (result InterfaceListResultIterator, err error) {
+ result.page, err = client.ListAll(ctx)
+ return
+}
+
+// ListEffectiveNetworkSecurityGroups gets all network security groups applied to a network interface.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkInterfaceName - the name of the network interface.
+func (client InterfacesClient) ListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
+ req, err := client.ListEffectiveNetworkSecurityGroupsPreparer(ctx, resourceGroupName, networkInterfaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ListEffectiveNetworkSecurityGroupsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ListEffectiveNetworkSecurityGroupsPreparer prepares the ListEffectiveNetworkSecurityGroups request.
+func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx context.Context, 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 = "2018-05-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/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
+// http.Response Body if it receives an error.
+func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ListEffectiveNetworkSecurityGroupsResponder handles the response to the ListEffectiveNetworkSecurityGroups request. The method always
+// closes the http.Response Body.
+func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsResponder(resp *http.Response) (result EffectiveNetworkSecurityGroupListResult, 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
+}
+
+// ListVirtualMachineScaleSetIPConfigurations get the specified network interface ip configuration in a virtual machine
+// scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualMachineScaleSetName - the name of the virtual machine scale set.
+// virtualmachineIndex - the virtual machine index.
+// networkInterfaceName - the name of the network interface.
+// expand - expands referenced resources.
+func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurations(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result InterfaceIPConfigurationListResultPage, err error) {
+ result.fn = client.listVirtualMachineScaleSetIPConfigurationsNextResults
+ req, err := client.ListVirtualMachineScaleSetIPConfigurationsPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetIPConfigurations", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListVirtualMachineScaleSetIPConfigurationsSender(req)
+ if err != nil {
+ result.iiclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetIPConfigurations", resp, "Failure sending request")
+ return
+ }
+
+ result.iiclr, err = client.ListVirtualMachineScaleSetIPConfigurationsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetIPConfigurations", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListVirtualMachineScaleSetIPConfigurationsPreparer prepares the ListVirtualMachineScaleSetIPConfigurations request.
+func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "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,
+ }
+ 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", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListVirtualMachineScaleSetIPConfigurationsSender sends the ListVirtualMachineScaleSetIPConfigurations request. The method will close the
+// http.Response Body if it receives an error.
+func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListVirtualMachineScaleSetIPConfigurationsResponder handles the response to the ListVirtualMachineScaleSetIPConfigurations request. The method always
+// closes the http.Response Body.
+func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsResponder(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
+}
+
+// listVirtualMachineScaleSetIPConfigurationsNextResults retrieves the next set of results, if any.
+func (client InterfacesClient) listVirtualMachineScaleSetIPConfigurationsNextResults(lastResults InterfaceIPConfigurationListResult) (result InterfaceIPConfigurationListResult, err error) {
+ req, err := lastResults.interfaceIPConfigurationListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetIPConfigurationsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListVirtualMachineScaleSetIPConfigurationsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetIPConfigurationsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListVirtualMachineScaleSetIPConfigurationsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetIPConfigurationsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListVirtualMachineScaleSetIPConfigurationsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result InterfaceIPConfigurationListResultIterator, err error) {
+ result.page, err = client.ListVirtualMachineScaleSetIPConfigurations(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand)
+ return
+}
+
+// ListVirtualMachineScaleSetNetworkInterfaces gets all network interfaces in a virtual machine scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualMachineScaleSetName - the name of the virtual machine scale set.
+func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfaces(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result InterfaceListResultPage, err error) {
+ result.fn = client.listVirtualMachineScaleSetNetworkInterfacesNextResults
+ req, err := client.ListVirtualMachineScaleSetNetworkInterfacesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListVirtualMachineScaleSetNetworkInterfacesSender(req)
+ if err != nil {
+ result.ilr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", resp, "Failure sending request")
+ return
+ }
+
+ result.ilr, err = client.ListVirtualMachineScaleSetNetworkInterfacesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListVirtualMachineScaleSetNetworkInterfacesPreparer prepares the ListVirtualMachineScaleSetNetworkInterfaces request.
+func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesPreparer(ctx context.Context, 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}/networkInterfaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListVirtualMachineScaleSetNetworkInterfacesSender sends the ListVirtualMachineScaleSetNetworkInterfaces request. The method will close the
+// http.Response Body if it receives an error.
+func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListVirtualMachineScaleSetNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetNetworkInterfaces request. The method always
+// closes the http.Response Body.
+func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesResponder(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
+}
+
+// listVirtualMachineScaleSetNetworkInterfacesNextResults retrieves the next set of results, if any.
+func (client InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) {
+ req, err := lastResults.interfaceListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetNetworkInterfacesNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListVirtualMachineScaleSetNetworkInterfacesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetNetworkInterfacesNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListVirtualMachineScaleSetNetworkInterfacesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetNetworkInterfacesNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListVirtualMachineScaleSetNetworkInterfacesComplete enumerates all values, automatically crossing page boundaries as required.
+func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result InterfaceListResultIterator, err error) {
+ result.page, err = client.ListVirtualMachineScaleSetNetworkInterfaces(ctx, resourceGroupName, virtualMachineScaleSetName)
+ return
+}
+
+// ListVirtualMachineScaleSetVMNetworkInterfaces gets information about all network interfaces in a virtual machine in
+// a virtual machine scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualMachineScaleSetName - the name of the virtual machine scale set.
+// virtualmachineIndex - the virtual machine index.
+func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfaces(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result InterfaceListResultPage, err error) {
+ result.fn = client.listVirtualMachineScaleSetVMNetworkInterfacesNextResults
+ req, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesSender(req)
+ if err != nil {
+ result.ilr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", resp, "Failure sending request")
+ return
+ }
+
+ result.ilr, err = client.ListVirtualMachineScaleSetVMNetworkInterfacesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListVirtualMachineScaleSetVMNetworkInterfacesPreparer prepares the ListVirtualMachineScaleSetVMNetworkInterfaces request.
+func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "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", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListVirtualMachineScaleSetVMNetworkInterfacesSender sends the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method will close the
+// http.Response Body if it receives an error.
+func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListVirtualMachineScaleSetVMNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method always
+// closes the http.Response Body.
+func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesResponder(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
+}
+
+// listVirtualMachineScaleSetVMNetworkInterfacesNextResults retrieves the next set of results, if any.
+func (client InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) {
+ req, err := lastResults.interfaceListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetVMNetworkInterfacesNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetVMNetworkInterfacesNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListVirtualMachineScaleSetVMNetworkInterfacesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetVMNetworkInterfacesNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListVirtualMachineScaleSetVMNetworkInterfacesComplete enumerates all values, automatically crossing page boundaries as required.
+func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result InterfaceListResultIterator, err error) {
+ result.page, err = client.ListVirtualMachineScaleSetVMNetworkInterfaces(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex)
+ return
+}
+
+// UpdateTags updates a network interface tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkInterfaceName - the name of the network interface.
+// parameters - parameters supplied to update network interface tags.
+func (client InterfacesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters TagsObject) (result InterfacesUpdateTagsFuture, err error) {
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkInterfaceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters TagsObject) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future InterfacesUpdateTagsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client InterfacesClient) UpdateTagsResponder(resp *http.Response) (result Interface, 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/services/network/mgmt/2018-05-01/network/loadbalancerbackendaddresspools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancerbackendaddresspools.go
new file mode 100644
index 000000000..304256c81
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancerbackendaddresspools.go
@@ -0,0 +1,205 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// LoadBalancerBackendAddressPoolsClient is the network Client
+type LoadBalancerBackendAddressPoolsClient struct {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+// backendAddressPoolName - the name of the backend address pool.
+func (client LoadBalancerBackendAddressPoolsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) (result BackendAddressPool, err error) {
+ req, err := client.GetPreparer(ctx, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+func (client LoadBalancerBackendAddressPoolsClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerBackendAddressPoolListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, 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.lbbaplr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lbbaplr, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listNextResults", 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", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client LoadBalancerBackendAddressPoolsClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerBackendAddressPoolListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, loadBalancerName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancerfrontendipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancerfrontendipconfigurations.go
new file mode 100644
index 000000000..9f1223308
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancerfrontendipconfigurations.go
@@ -0,0 +1,206 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// LoadBalancerFrontendIPConfigurationsClient is the network Client
+type LoadBalancerFrontendIPConfigurationsClient struct {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+// frontendIPConfigurationName - the name of the frontend IP configuration.
+func (client LoadBalancerFrontendIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string) (result FrontendIPConfiguration, err error) {
+ req, err := client.GetPreparer(ctx, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+func (client LoadBalancerFrontendIPConfigurationsClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerFrontendIPConfigurationListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, 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.lbficlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lbficlr, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listNextResults", 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", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client LoadBalancerFrontendIPConfigurationsClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerFrontendIPConfigurationListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, loadBalancerName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancerloadbalancingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancerloadbalancingrules.go
new file mode 100644
index 000000000..5b1a47017
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancerloadbalancingrules.go
@@ -0,0 +1,205 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// LoadBalancerLoadBalancingRulesClient is the network Client
+type LoadBalancerLoadBalancingRulesClient struct {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+// loadBalancingRuleName - the name of the load balancing rule.
+func (client LoadBalancerLoadBalancingRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string) (result LoadBalancingRule, err error) {
+ req, err := client.GetPreparer(ctx, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+func (client LoadBalancerLoadBalancingRulesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerLoadBalancingRuleListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, 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.lblbrlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lblbrlr, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listNextResults", 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", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client LoadBalancerLoadBalancingRulesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerLoadBalancingRuleListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, loadBalancerName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancernetworkinterfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancernetworkinterfaces.go
new file mode 100644
index 000000000..366f1b085
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancernetworkinterfaces.go
@@ -0,0 +1,136 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// LoadBalancerNetworkInterfacesClient is the network Client
+type LoadBalancerNetworkInterfacesClient struct {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+func (client LoadBalancerNetworkInterfacesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InterfaceListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, 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.ilr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.ilr, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listNextResults", 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", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client LoadBalancerNetworkInterfacesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InterfaceListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, loadBalancerName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancerprobes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancerprobes.go
new file mode 100644
index 000000000..ce62762aa
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancerprobes.go
@@ -0,0 +1,204 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// LoadBalancerProbesClient is the network Client
+type LoadBalancerProbesClient struct {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+// probeName - the name of the probe.
+func (client LoadBalancerProbesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, probeName string) (result Probe, err error) {
+ req, err := client.GetPreparer(ctx, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+func (client LoadBalancerProbesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerProbeListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, 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.lbplr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lbplr, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listNextResults", 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", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client LoadBalancerProbesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerProbeListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, loadBalancerName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancers.go
new file mode 100644
index 000000000..2d4704a84
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/loadbalancers.go
@@ -0,0 +1,512 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// LoadBalancersClient is the network Client
+type LoadBalancersClient struct {
+ BaseClient
+}
+
+// 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.
+func NewLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancersClient {
+ return LoadBalancersClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a load balancer.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+// parameters - parameters supplied to the create or update load balancer operation.
+func (client LoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer) (result LoadBalancersCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, loadBalancerName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client LoadBalancersClient) CreateOrUpdateResponder(resp *http.Response) (result LoadBalancer, 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 the specified load balancer.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+func (client LoadBalancersClient) Delete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancersDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, loadBalancerName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client LoadBalancersClient) DeletePreparer(ctx context.Context, 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 = "2018-05-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}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client LoadBalancersClient) 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 specified load balancer.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+// expand - expands referenced resources.
+func (client LoadBalancersClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, expand string) (result LoadBalancer, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, loadBalancerName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "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.LoadBalancersClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client LoadBalancersClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, expand 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 = "2018-05-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}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client LoadBalancersClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client LoadBalancersClient) GetResponder(resp *http.Response) (result LoadBalancer, 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 balancers in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client LoadBalancersClient) List(ctx context.Context, resourceGroupName string) (result LoadBalancerListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lblr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lblr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client LoadBalancersClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client LoadBalancersClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client LoadBalancersClient) ListResponder(resp *http.Response) (result LoadBalancerListResult, 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 LoadBalancersClient) listNextResults(lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) {
+ req, err := lastResults.loadBalancerListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listNextResults", 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.LoadBalancersClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client LoadBalancersClient) ListComplete(ctx context.Context, resourceGroupName string) (result LoadBalancerListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll gets all the load balancers in a subscription.
+func (client LoadBalancersClient) ListAll(ctx context.Context) (result LoadBalancerListResultPage, err error) {
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.lblr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.lblr, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "ListAll", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client LoadBalancersClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client LoadBalancersClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client LoadBalancersClient) ListAllResponder(resp *http.Response) (result LoadBalancerListResult, 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 LoadBalancersClient) listAllNextResults(lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) {
+ req, err := lastResults.loadBalancerListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listAllNextResults", 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.LoadBalancersClient", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client LoadBalancersClient) ListAllComplete(ctx context.Context) (result LoadBalancerListResultIterator, err error) {
+ result.page, err = client.ListAll(ctx)
+ return
+}
+
+// UpdateTags updates a load balancer tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+// parameters - parameters supplied to update load balancer tags.
+func (client LoadBalancersClient) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject) (result LoadBalancersUpdateTagsFuture, err error) {
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, loadBalancerName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future LoadBalancersUpdateTagsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client LoadBalancersClient) UpdateTagsResponder(resp *http.Response) (result LoadBalancer, 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/services/network/mgmt/2018-05-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/localnetworkgateways.go
new file mode 100644
index 000000000..8888916a3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/localnetworkgateways.go
@@ -0,0 +1,445 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// LocalNetworkGatewaysClient is the network Client
+type LocalNetworkGatewaysClient struct {
+ BaseClient
+}
+
+// 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.
+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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// localNetworkGatewayName - the name of the local network gateway.
+// parameters - parameters supplied to the create or update local network gateway operation.
+func (client LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway) (result LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: localNetworkGatewayName,
+ Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.LocalNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("network.LocalNetworkGatewaysClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, localNetworkGatewayName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "localNetworkGatewayName": autorest.Encode("path", localNetworkGatewayName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client LocalNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result LocalNetworkGateway, 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 the specified local network gateway.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// localNetworkGatewayName - the name of the local network gateway.
+func (client LocalNetworkGatewaysClient) Delete(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (result LocalNetworkGatewaysDeleteFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: localNetworkGatewayName,
+ Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("network.LocalNetworkGatewaysClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, localNetworkGatewayName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "localNetworkGatewayName": autorest.Encode("path", localNetworkGatewayName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/localNetworkGateways/{localNetworkGatewayName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client LocalNetworkGatewaysClient) 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 specified local network gateway in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// localNetworkGatewayName - the name of the local network gateway.
+func (client LocalNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (result LocalNetworkGateway, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: localNetworkGatewayName,
+ Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("network.LocalNetworkGatewaysClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, localNetworkGatewayName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "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.LocalNetworkGatewaysClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client LocalNetworkGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "localNetworkGatewayName": autorest.Encode("path", localNetworkGatewayName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/localNetworkGateways/{localNetworkGatewayName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client LocalNetworkGatewaysClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client LocalNetworkGatewaysClient) GetResponder(resp *http.Response) (result LocalNetworkGateway, 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 local network gateways in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client LocalNetworkGatewaysClient) List(ctx context.Context, resourceGroupName string) (result LocalNetworkGatewayListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lnglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lnglr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client LocalNetworkGatewaysClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/localNetworkGateways", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client LocalNetworkGatewaysClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client LocalNetworkGatewaysClient) ListResponder(resp *http.Response) (result LocalNetworkGatewayListResult, 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 LocalNetworkGatewaysClient) listNextResults(lastResults LocalNetworkGatewayListResult) (result LocalNetworkGatewayListResult, err error) {
+ req, err := lastResults.localNetworkGatewayListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "listNextResults", 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.LocalNetworkGatewaysClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client LocalNetworkGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result LocalNetworkGatewayListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// UpdateTags updates a local network gateway tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// localNetworkGatewayName - the name of the local network gateway.
+// parameters - parameters supplied to update local network gateway tags.
+func (client LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject) (result LocalNetworkGatewaysUpdateTagsFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: localNetworkGatewayName,
+ Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("network.LocalNetworkGatewaysClient", "UpdateTags", err.Error())
+ }
+
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, localNetworkGatewayName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "localNetworkGatewayName": autorest.Encode("path", localNetworkGatewayName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future LocalNetworkGatewaysUpdateTagsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client LocalNetworkGatewaysClient) UpdateTagsResponder(resp *http.Response) (result LocalNetworkGateway, 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/services/network/mgmt/2018-05-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/models.go
new file mode 100644
index 000000000..5af210af2
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/models.go
@@ -0,0 +1,17000 @@
+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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "net/http"
+)
+
+// Access enumerates the values for access.
+type Access string
+
+const (
+ // Allow ...
+ Allow Access = "Allow"
+ // Deny ...
+ Deny Access = "Deny"
+)
+
+// PossibleAccessValues returns an array of possible values for the Access const type.
+func PossibleAccessValues() []Access {
+ return []Access{Allow, Deny}
+}
+
+// ApplicationGatewayBackendHealthServerHealth enumerates the values for application gateway backend health
+// server health.
+type ApplicationGatewayBackendHealthServerHealth string
+
+const (
+ // Down ...
+ Down ApplicationGatewayBackendHealthServerHealth = "Down"
+ // Draining ...
+ Draining ApplicationGatewayBackendHealthServerHealth = "Draining"
+ // Partial ...
+ Partial ApplicationGatewayBackendHealthServerHealth = "Partial"
+ // Unknown ...
+ Unknown ApplicationGatewayBackendHealthServerHealth = "Unknown"
+ // Up ...
+ Up ApplicationGatewayBackendHealthServerHealth = "Up"
+)
+
+// PossibleApplicationGatewayBackendHealthServerHealthValues returns an array of possible values for the ApplicationGatewayBackendHealthServerHealth const type.
+func PossibleApplicationGatewayBackendHealthServerHealthValues() []ApplicationGatewayBackendHealthServerHealth {
+ return []ApplicationGatewayBackendHealthServerHealth{Down, Draining, Partial, Unknown, Up}
+}
+
+// ApplicationGatewayCookieBasedAffinity enumerates the values for application gateway cookie based affinity.
+type ApplicationGatewayCookieBasedAffinity string
+
+const (
+ // Disabled ...
+ Disabled ApplicationGatewayCookieBasedAffinity = "Disabled"
+ // Enabled ...
+ Enabled ApplicationGatewayCookieBasedAffinity = "Enabled"
+)
+
+// PossibleApplicationGatewayCookieBasedAffinityValues returns an array of possible values for the ApplicationGatewayCookieBasedAffinity const type.
+func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayCookieBasedAffinity {
+ return []ApplicationGatewayCookieBasedAffinity{Disabled, Enabled}
+}
+
+// ApplicationGatewayFirewallMode enumerates the values for application gateway firewall mode.
+type ApplicationGatewayFirewallMode string
+
+const (
+ // Detection ...
+ Detection ApplicationGatewayFirewallMode = "Detection"
+ // Prevention ...
+ Prevention ApplicationGatewayFirewallMode = "Prevention"
+)
+
+// PossibleApplicationGatewayFirewallModeValues returns an array of possible values for the ApplicationGatewayFirewallMode const type.
+func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewallMode {
+ return []ApplicationGatewayFirewallMode{Detection, Prevention}
+}
+
+// ApplicationGatewayOperationalState enumerates the values for application gateway operational state.
+type ApplicationGatewayOperationalState string
+
+const (
+ // Running ...
+ Running ApplicationGatewayOperationalState = "Running"
+ // Starting ...
+ Starting ApplicationGatewayOperationalState = "Starting"
+ // Stopped ...
+ Stopped ApplicationGatewayOperationalState = "Stopped"
+ // Stopping ...
+ Stopping ApplicationGatewayOperationalState = "Stopping"
+)
+
+// PossibleApplicationGatewayOperationalStateValues returns an array of possible values for the ApplicationGatewayOperationalState const type.
+func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState {
+ return []ApplicationGatewayOperationalState{Running, Starting, Stopped, Stopping}
+}
+
+// ApplicationGatewayProtocol enumerates the values for application gateway protocol.
+type ApplicationGatewayProtocol string
+
+const (
+ // HTTP ...
+ HTTP ApplicationGatewayProtocol = "Http"
+ // HTTPS ...
+ HTTPS ApplicationGatewayProtocol = "Https"
+)
+
+// PossibleApplicationGatewayProtocolValues returns an array of possible values for the ApplicationGatewayProtocol const type.
+func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol {
+ return []ApplicationGatewayProtocol{HTTP, HTTPS}
+}
+
+// ApplicationGatewayRedirectType enumerates the values for application gateway redirect type.
+type ApplicationGatewayRedirectType string
+
+const (
+ // Found ...
+ Found ApplicationGatewayRedirectType = "Found"
+ // Permanent ...
+ Permanent ApplicationGatewayRedirectType = "Permanent"
+ // SeeOther ...
+ SeeOther ApplicationGatewayRedirectType = "SeeOther"
+ // Temporary ...
+ Temporary ApplicationGatewayRedirectType = "Temporary"
+)
+
+// PossibleApplicationGatewayRedirectTypeValues returns an array of possible values for the ApplicationGatewayRedirectType const type.
+func PossibleApplicationGatewayRedirectTypeValues() []ApplicationGatewayRedirectType {
+ return []ApplicationGatewayRedirectType{Found, Permanent, SeeOther, Temporary}
+}
+
+// ApplicationGatewayRequestRoutingRuleType enumerates the values for application gateway request routing rule
+// type.
+type ApplicationGatewayRequestRoutingRuleType string
+
+const (
+ // Basic ...
+ Basic ApplicationGatewayRequestRoutingRuleType = "Basic"
+ // PathBasedRouting ...
+ PathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting"
+)
+
+// PossibleApplicationGatewayRequestRoutingRuleTypeValues returns an array of possible values for the ApplicationGatewayRequestRoutingRuleType const type.
+func PossibleApplicationGatewayRequestRoutingRuleTypeValues() []ApplicationGatewayRequestRoutingRuleType {
+ return []ApplicationGatewayRequestRoutingRuleType{Basic, PathBasedRouting}
+}
+
+// ApplicationGatewaySkuName enumerates the values for application gateway sku name.
+type ApplicationGatewaySkuName string
+
+const (
+ // StandardLarge ...
+ StandardLarge ApplicationGatewaySkuName = "Standard_Large"
+ // StandardMedium ...
+ StandardMedium ApplicationGatewaySkuName = "Standard_Medium"
+ // StandardSmall ...
+ StandardSmall ApplicationGatewaySkuName = "Standard_Small"
+ // WAFLarge ...
+ WAFLarge ApplicationGatewaySkuName = "WAF_Large"
+ // WAFMedium ...
+ WAFMedium ApplicationGatewaySkuName = "WAF_Medium"
+)
+
+// PossibleApplicationGatewaySkuNameValues returns an array of possible values for the ApplicationGatewaySkuName const type.
+func PossibleApplicationGatewaySkuNameValues() []ApplicationGatewaySkuName {
+ return []ApplicationGatewaySkuName{StandardLarge, StandardMedium, StandardSmall, WAFLarge, WAFMedium}
+}
+
+// ApplicationGatewaySslCipherSuite enumerates the values for application gateway ssl cipher suite.
+type ApplicationGatewaySslCipherSuite string
+
+const (
+ // TLSDHEDSSWITHAES128CBCSHA ...
+ TLSDHEDSSWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA"
+ // TLSDHEDSSWITHAES128CBCSHA256 ...
+ TLSDHEDSSWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"
+ // TLSDHEDSSWITHAES256CBCSHA ...
+ TLSDHEDSSWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA"
+ // TLSDHEDSSWITHAES256CBCSHA256 ...
+ TLSDHEDSSWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"
+ // TLSDHERSAWITHAES128CBCSHA ...
+ TLSDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA"
+ // TLSDHERSAWITHAES128GCMSHA256 ...
+ TLSDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"
+ // TLSDHERSAWITHAES256CBCSHA ...
+ TLSDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA"
+ // TLSDHERSAWITHAES256GCMSHA384 ...
+ TLSDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"
+ // TLSECDHEECDSAWITHAES128CBCSHA ...
+ TLSECDHEECDSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"
+ // TLSECDHEECDSAWITHAES128CBCSHA256 ...
+ TLSECDHEECDSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"
+ // TLSECDHEECDSAWITHAES128GCMSHA256 ...
+ TLSECDHEECDSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
+ // TLSECDHEECDSAWITHAES256CBCSHA ...
+ TLSECDHEECDSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"
+ // TLSECDHEECDSAWITHAES256CBCSHA384 ...
+ TLSECDHEECDSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"
+ // TLSECDHEECDSAWITHAES256GCMSHA384 ...
+ TLSECDHEECDSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
+ // TLSECDHERSAWITHAES128CBCSHA ...
+ TLSECDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"
+ // TLSECDHERSAWITHAES128CBCSHA256 ...
+ TLSECDHERSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
+ // TLSECDHERSAWITHAES256CBCSHA ...
+ TLSECDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"
+ // TLSECDHERSAWITHAES256CBCSHA384 ...
+ TLSECDHERSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"
+ // TLSRSAWITH3DESEDECBCSHA ...
+ TLSRSAWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
+ // TLSRSAWITHAES128CBCSHA ...
+ TLSRSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA"
+ // TLSRSAWITHAES128CBCSHA256 ...
+ TLSRSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256"
+ // TLSRSAWITHAES128GCMSHA256 ...
+ TLSRSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256"
+ // TLSRSAWITHAES256CBCSHA ...
+ TLSRSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA"
+ // TLSRSAWITHAES256CBCSHA256 ...
+ TLSRSAWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256"
+ // TLSRSAWITHAES256GCMSHA384 ...
+ TLSRSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384"
+)
+
+// PossibleApplicationGatewaySslCipherSuiteValues returns an array of possible values for the ApplicationGatewaySslCipherSuite const type.
+func PossibleApplicationGatewaySslCipherSuiteValues() []ApplicationGatewaySslCipherSuite {
+ return []ApplicationGatewaySslCipherSuite{TLSDHEDSSWITHAES128CBCSHA, TLSDHEDSSWITHAES128CBCSHA256, TLSDHEDSSWITHAES256CBCSHA, TLSDHEDSSWITHAES256CBCSHA256, TLSDHERSAWITHAES128CBCSHA, TLSDHERSAWITHAES128GCMSHA256, TLSDHERSAWITHAES256CBCSHA, TLSDHERSAWITHAES256GCMSHA384, TLSECDHEECDSAWITHAES128CBCSHA, TLSECDHEECDSAWITHAES128CBCSHA256, TLSECDHEECDSAWITHAES128GCMSHA256, TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES256CBCSHA384, TLSECDHEECDSAWITHAES256GCMSHA384, TLSECDHERSAWITHAES128CBCSHA, TLSECDHERSAWITHAES128CBCSHA256, TLSECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES256CBCSHA384, TLSRSAWITH3DESEDECBCSHA, TLSRSAWITHAES128CBCSHA, TLSRSAWITHAES128CBCSHA256, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES256GCMSHA384}
+}
+
+// ApplicationGatewaySslPolicyName enumerates the values for application gateway ssl policy name.
+type ApplicationGatewaySslPolicyName string
+
+const (
+ // AppGwSslPolicy20150501 ...
+ AppGwSslPolicy20150501 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501"
+ // AppGwSslPolicy20170401 ...
+ AppGwSslPolicy20170401 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401"
+ // AppGwSslPolicy20170401S ...
+ AppGwSslPolicy20170401S ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S"
+)
+
+// PossibleApplicationGatewaySslPolicyNameValues returns an array of possible values for the ApplicationGatewaySslPolicyName const type.
+func PossibleApplicationGatewaySslPolicyNameValues() []ApplicationGatewaySslPolicyName {
+ return []ApplicationGatewaySslPolicyName{AppGwSslPolicy20150501, AppGwSslPolicy20170401, AppGwSslPolicy20170401S}
+}
+
+// ApplicationGatewaySslPolicyType enumerates the values for application gateway ssl policy type.
+type ApplicationGatewaySslPolicyType string
+
+const (
+ // Custom ...
+ Custom ApplicationGatewaySslPolicyType = "Custom"
+ // Predefined ...
+ Predefined ApplicationGatewaySslPolicyType = "Predefined"
+)
+
+// PossibleApplicationGatewaySslPolicyTypeValues returns an array of possible values for the ApplicationGatewaySslPolicyType const type.
+func PossibleApplicationGatewaySslPolicyTypeValues() []ApplicationGatewaySslPolicyType {
+ return []ApplicationGatewaySslPolicyType{Custom, Predefined}
+}
+
+// ApplicationGatewaySslProtocol enumerates the values for application gateway ssl protocol.
+type ApplicationGatewaySslProtocol string
+
+const (
+ // TLSv10 ...
+ TLSv10 ApplicationGatewaySslProtocol = "TLSv1_0"
+ // TLSv11 ...
+ TLSv11 ApplicationGatewaySslProtocol = "TLSv1_1"
+ // TLSv12 ...
+ TLSv12 ApplicationGatewaySslProtocol = "TLSv1_2"
+)
+
+// PossibleApplicationGatewaySslProtocolValues returns an array of possible values for the ApplicationGatewaySslProtocol const type.
+func PossibleApplicationGatewaySslProtocolValues() []ApplicationGatewaySslProtocol {
+ return []ApplicationGatewaySslProtocol{TLSv10, TLSv11, TLSv12}
+}
+
+// ApplicationGatewayTier enumerates the values for application gateway tier.
+type ApplicationGatewayTier string
+
+const (
+ // Standard ...
+ Standard ApplicationGatewayTier = "Standard"
+ // WAF ...
+ WAF ApplicationGatewayTier = "WAF"
+)
+
+// PossibleApplicationGatewayTierValues returns an array of possible values for the ApplicationGatewayTier const type.
+func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier {
+ return []ApplicationGatewayTier{Standard, WAF}
+}
+
+// AssociationType enumerates the values for association type.
+type AssociationType string
+
+const (
+ // Associated ...
+ Associated AssociationType = "Associated"
+ // Contains ...
+ Contains AssociationType = "Contains"
+)
+
+// PossibleAssociationTypeValues returns an array of possible values for the AssociationType const type.
+func PossibleAssociationTypeValues() []AssociationType {
+ return []AssociationType{Associated, Contains}
+}
+
+// AuthenticationMethod enumerates the values for authentication method.
+type AuthenticationMethod string
+
+const (
+ // EAPMSCHAPv2 ...
+ EAPMSCHAPv2 AuthenticationMethod = "EAPMSCHAPv2"
+ // EAPTLS ...
+ EAPTLS AuthenticationMethod = "EAPTLS"
+)
+
+// PossibleAuthenticationMethodValues returns an array of possible values for the AuthenticationMethod const type.
+func PossibleAuthenticationMethodValues() []AuthenticationMethod {
+ return []AuthenticationMethod{EAPMSCHAPv2, EAPTLS}
+}
+
+// AuthorizationUseStatus enumerates the values for authorization use status.
+type AuthorizationUseStatus string
+
+const (
+ // Available ...
+ Available AuthorizationUseStatus = "Available"
+ // InUse ...
+ InUse AuthorizationUseStatus = "InUse"
+)
+
+// PossibleAuthorizationUseStatusValues returns an array of possible values for the AuthorizationUseStatus const type.
+func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus {
+ return []AuthorizationUseStatus{Available, InUse}
+}
+
+// BgpPeerState enumerates the values for bgp peer state.
+type BgpPeerState string
+
+const (
+ // BgpPeerStateConnected ...
+ BgpPeerStateConnected BgpPeerState = "Connected"
+ // BgpPeerStateConnecting ...
+ BgpPeerStateConnecting BgpPeerState = "Connecting"
+ // BgpPeerStateIdle ...
+ BgpPeerStateIdle BgpPeerState = "Idle"
+ // BgpPeerStateStopped ...
+ BgpPeerStateStopped BgpPeerState = "Stopped"
+ // BgpPeerStateUnknown ...
+ BgpPeerStateUnknown BgpPeerState = "Unknown"
+)
+
+// PossibleBgpPeerStateValues returns an array of possible values for the BgpPeerState const type.
+func PossibleBgpPeerStateValues() []BgpPeerState {
+ return []BgpPeerState{BgpPeerStateConnected, BgpPeerStateConnecting, BgpPeerStateIdle, BgpPeerStateStopped, BgpPeerStateUnknown}
+}
+
+// CircuitConnectionStatus enumerates the values for circuit connection status.
+type CircuitConnectionStatus string
+
+const (
+ // Connected ...
+ Connected CircuitConnectionStatus = "Connected"
+ // Connecting ...
+ Connecting CircuitConnectionStatus = "Connecting"
+ // Disconnected ...
+ Disconnected CircuitConnectionStatus = "Disconnected"
+)
+
+// PossibleCircuitConnectionStatusValues returns an array of possible values for the CircuitConnectionStatus const type.
+func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus {
+ return []CircuitConnectionStatus{Connected, Connecting, Disconnected}
+}
+
+// ConnectionMonitorSourceStatus enumerates the values for connection monitor source status.
+type ConnectionMonitorSourceStatus string
+
+const (
+ // Active ...
+ Active ConnectionMonitorSourceStatus = "Active"
+ // Inactive ...
+ Inactive ConnectionMonitorSourceStatus = "Inactive"
+ // Uknown ...
+ Uknown ConnectionMonitorSourceStatus = "Uknown"
+)
+
+// PossibleConnectionMonitorSourceStatusValues returns an array of possible values for the ConnectionMonitorSourceStatus const type.
+func PossibleConnectionMonitorSourceStatusValues() []ConnectionMonitorSourceStatus {
+ return []ConnectionMonitorSourceStatus{Active, Inactive, Uknown}
+}
+
+// ConnectionState enumerates the values for connection state.
+type ConnectionState string
+
+const (
+ // ConnectionStateReachable ...
+ ConnectionStateReachable ConnectionState = "Reachable"
+ // ConnectionStateUnknown ...
+ ConnectionStateUnknown ConnectionState = "Unknown"
+ // ConnectionStateUnreachable ...
+ ConnectionStateUnreachable ConnectionState = "Unreachable"
+)
+
+// PossibleConnectionStateValues returns an array of possible values for the ConnectionState const type.
+func PossibleConnectionStateValues() []ConnectionState {
+ return []ConnectionState{ConnectionStateReachable, ConnectionStateUnknown, ConnectionStateUnreachable}
+}
+
+// ConnectionStatus enumerates the values for connection status.
+type ConnectionStatus string
+
+const (
+ // ConnectionStatusConnected ...
+ ConnectionStatusConnected ConnectionStatus = "Connected"
+ // ConnectionStatusDegraded ...
+ ConnectionStatusDegraded ConnectionStatus = "Degraded"
+ // ConnectionStatusDisconnected ...
+ ConnectionStatusDisconnected ConnectionStatus = "Disconnected"
+ // ConnectionStatusUnknown ...
+ ConnectionStatusUnknown ConnectionStatus = "Unknown"
+)
+
+// PossibleConnectionStatusValues returns an array of possible values for the ConnectionStatus const type.
+func PossibleConnectionStatusValues() []ConnectionStatus {
+ return []ConnectionStatus{ConnectionStatusConnected, ConnectionStatusDegraded, ConnectionStatusDisconnected, ConnectionStatusUnknown}
+}
+
+// DhGroup enumerates the values for dh group.
+type DhGroup string
+
+const (
+ // DHGroup1 ...
+ DHGroup1 DhGroup = "DHGroup1"
+ // DHGroup14 ...
+ DHGroup14 DhGroup = "DHGroup14"
+ // DHGroup2 ...
+ DHGroup2 DhGroup = "DHGroup2"
+ // DHGroup2048 ...
+ DHGroup2048 DhGroup = "DHGroup2048"
+ // DHGroup24 ...
+ DHGroup24 DhGroup = "DHGroup24"
+ // ECP256 ...
+ ECP256 DhGroup = "ECP256"
+ // ECP384 ...
+ ECP384 DhGroup = "ECP384"
+ // None ...
+ None DhGroup = "None"
+)
+
+// PossibleDhGroupValues returns an array of possible values for the DhGroup const type.
+func PossibleDhGroupValues() []DhGroup {
+ return []DhGroup{DHGroup1, DHGroup14, DHGroup2, DHGroup2048, DHGroup24, ECP256, ECP384, None}
+}
+
+// Direction enumerates the values for direction.
+type Direction string
+
+const (
+ // Inbound ...
+ Inbound Direction = "Inbound"
+ // Outbound ...
+ Outbound Direction = "Outbound"
+)
+
+// PossibleDirectionValues returns an array of possible values for the Direction const type.
+func PossibleDirectionValues() []Direction {
+ return []Direction{Inbound, Outbound}
+}
+
+// EffectiveRouteSource enumerates the values for effective route source.
+type EffectiveRouteSource string
+
+const (
+ // EffectiveRouteSourceDefault ...
+ EffectiveRouteSourceDefault EffectiveRouteSource = "Default"
+ // EffectiveRouteSourceUnknown ...
+ EffectiveRouteSourceUnknown EffectiveRouteSource = "Unknown"
+ // EffectiveRouteSourceUser ...
+ EffectiveRouteSourceUser EffectiveRouteSource = "User"
+ // EffectiveRouteSourceVirtualNetworkGateway ...
+ EffectiveRouteSourceVirtualNetworkGateway EffectiveRouteSource = "VirtualNetworkGateway"
+)
+
+// PossibleEffectiveRouteSourceValues returns an array of possible values for the EffectiveRouteSource const type.
+func PossibleEffectiveRouteSourceValues() []EffectiveRouteSource {
+ return []EffectiveRouteSource{EffectiveRouteSourceDefault, EffectiveRouteSourceUnknown, EffectiveRouteSourceUser, EffectiveRouteSourceVirtualNetworkGateway}
+}
+
+// EffectiveRouteState enumerates the values for effective route state.
+type EffectiveRouteState string
+
+const (
+ // EffectiveRouteStateActive ...
+ EffectiveRouteStateActive EffectiveRouteState = "Active"
+ // EffectiveRouteStateInvalid ...
+ EffectiveRouteStateInvalid EffectiveRouteState = "Invalid"
+)
+
+// PossibleEffectiveRouteStateValues returns an array of possible values for the EffectiveRouteState const type.
+func PossibleEffectiveRouteStateValues() []EffectiveRouteState {
+ return []EffectiveRouteState{EffectiveRouteStateActive, EffectiveRouteStateInvalid}
+}
+
+// EffectiveSecurityRuleProtocol enumerates the values for effective security rule protocol.
+type EffectiveSecurityRuleProtocol string
+
+const (
+ // All ...
+ All EffectiveSecurityRuleProtocol = "All"
+ // TCP ...
+ TCP EffectiveSecurityRuleProtocol = "Tcp"
+ // UDP ...
+ UDP EffectiveSecurityRuleProtocol = "Udp"
+)
+
+// PossibleEffectiveSecurityRuleProtocolValues returns an array of possible values for the EffectiveSecurityRuleProtocol const type.
+func PossibleEffectiveSecurityRuleProtocolValues() []EffectiveSecurityRuleProtocol {
+ return []EffectiveSecurityRuleProtocol{All, TCP, UDP}
+}
+
+// EvaluationState enumerates the values for evaluation state.
+type EvaluationState string
+
+const (
+ // Completed ...
+ Completed EvaluationState = "Completed"
+ // InProgress ...
+ InProgress EvaluationState = "InProgress"
+ // NotStarted ...
+ NotStarted EvaluationState = "NotStarted"
+)
+
+// PossibleEvaluationStateValues returns an array of possible values for the EvaluationState const type.
+func PossibleEvaluationStateValues() []EvaluationState {
+ return []EvaluationState{Completed, InProgress, NotStarted}
+}
+
+// ExpressRouteCircuitPeeringAdvertisedPublicPrefixState enumerates the values for express route circuit
+// peering advertised public prefix state.
+type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string
+
+const (
+ // Configured ...
+ Configured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured"
+ // Configuring ...
+ Configuring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring"
+ // NotConfigured ...
+ NotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured"
+ // ValidationNeeded ...
+ ValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded"
+)
+
+// PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues returns an array of possible values for the ExpressRouteCircuitPeeringAdvertisedPublicPrefixState const type.
+func PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues() []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState {
+ return []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{Configured, Configuring, NotConfigured, ValidationNeeded}
+}
+
+// ExpressRouteCircuitPeeringState enumerates the values for express route circuit peering state.
+type ExpressRouteCircuitPeeringState string
+
+const (
+ // ExpressRouteCircuitPeeringStateDisabled ...
+ ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled"
+ // ExpressRouteCircuitPeeringStateEnabled ...
+ ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled"
+)
+
+// PossibleExpressRouteCircuitPeeringStateValues returns an array of possible values for the ExpressRouteCircuitPeeringState const type.
+func PossibleExpressRouteCircuitPeeringStateValues() []ExpressRouteCircuitPeeringState {
+ return []ExpressRouteCircuitPeeringState{ExpressRouteCircuitPeeringStateDisabled, ExpressRouteCircuitPeeringStateEnabled}
+}
+
+// ExpressRouteCircuitSkuFamily enumerates the values for express route circuit sku family.
+type ExpressRouteCircuitSkuFamily string
+
+const (
+ // MeteredData ...
+ MeteredData ExpressRouteCircuitSkuFamily = "MeteredData"
+ // UnlimitedData ...
+ UnlimitedData ExpressRouteCircuitSkuFamily = "UnlimitedData"
+)
+
+// PossibleExpressRouteCircuitSkuFamilyValues returns an array of possible values for the ExpressRouteCircuitSkuFamily const type.
+func PossibleExpressRouteCircuitSkuFamilyValues() []ExpressRouteCircuitSkuFamily {
+ return []ExpressRouteCircuitSkuFamily{MeteredData, UnlimitedData}
+}
+
+// ExpressRouteCircuitSkuTier enumerates the values for express route circuit sku tier.
+type ExpressRouteCircuitSkuTier string
+
+const (
+ // ExpressRouteCircuitSkuTierPremium ...
+ ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium"
+ // ExpressRouteCircuitSkuTierStandard ...
+ ExpressRouteCircuitSkuTierStandard ExpressRouteCircuitSkuTier = "Standard"
+)
+
+// PossibleExpressRouteCircuitSkuTierValues returns an array of possible values for the ExpressRouteCircuitSkuTier const type.
+func PossibleExpressRouteCircuitSkuTierValues() []ExpressRouteCircuitSkuTier {
+ return []ExpressRouteCircuitSkuTier{ExpressRouteCircuitSkuTierPremium, ExpressRouteCircuitSkuTierStandard}
+}
+
+// ExpressRoutePeeringState enumerates the values for express route peering state.
+type ExpressRoutePeeringState string
+
+const (
+ // ExpressRoutePeeringStateDisabled ...
+ ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled"
+ // ExpressRoutePeeringStateEnabled ...
+ ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled"
+)
+
+// PossibleExpressRoutePeeringStateValues returns an array of possible values for the ExpressRoutePeeringState const type.
+func PossibleExpressRoutePeeringStateValues() []ExpressRoutePeeringState {
+ return []ExpressRoutePeeringState{ExpressRoutePeeringStateDisabled, ExpressRoutePeeringStateEnabled}
+}
+
+// ExpressRoutePeeringType enumerates the values for express route peering type.
+type ExpressRoutePeeringType string
+
+const (
+ // AzurePrivatePeering ...
+ AzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering"
+ // AzurePublicPeering ...
+ AzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering"
+ // MicrosoftPeering ...
+ MicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering"
+)
+
+// PossibleExpressRoutePeeringTypeValues returns an array of possible values for the ExpressRoutePeeringType const type.
+func PossibleExpressRoutePeeringTypeValues() []ExpressRoutePeeringType {
+ return []ExpressRoutePeeringType{AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering}
+}
+
+// HTTPMethod enumerates the values for http method.
+type HTTPMethod string
+
+const (
+ // Get ...
+ Get HTTPMethod = "Get"
+)
+
+// PossibleHTTPMethodValues returns an array of possible values for the HTTPMethod const type.
+func PossibleHTTPMethodValues() []HTTPMethod {
+ return []HTTPMethod{Get}
+}
+
+// IkeEncryption enumerates the values for ike encryption.
+type IkeEncryption string
+
+const (
+ // AES128 ...
+ AES128 IkeEncryption = "AES128"
+ // AES192 ...
+ AES192 IkeEncryption = "AES192"
+ // AES256 ...
+ AES256 IkeEncryption = "AES256"
+ // DES ...
+ DES IkeEncryption = "DES"
+ // DES3 ...
+ DES3 IkeEncryption = "DES3"
+ // GCMAES128 ...
+ GCMAES128 IkeEncryption = "GCMAES128"
+ // GCMAES256 ...
+ GCMAES256 IkeEncryption = "GCMAES256"
+)
+
+// PossibleIkeEncryptionValues returns an array of possible values for the IkeEncryption const type.
+func PossibleIkeEncryptionValues() []IkeEncryption {
+ return []IkeEncryption{AES128, AES192, AES256, DES, DES3, GCMAES128, GCMAES256}
+}
+
+// IkeIntegrity enumerates the values for ike integrity.
+type IkeIntegrity string
+
+const (
+ // IkeIntegrityGCMAES128 ...
+ IkeIntegrityGCMAES128 IkeIntegrity = "GCMAES128"
+ // IkeIntegrityGCMAES256 ...
+ IkeIntegrityGCMAES256 IkeIntegrity = "GCMAES256"
+ // IkeIntegrityMD5 ...
+ IkeIntegrityMD5 IkeIntegrity = "MD5"
+ // IkeIntegritySHA1 ...
+ IkeIntegritySHA1 IkeIntegrity = "SHA1"
+ // IkeIntegritySHA256 ...
+ IkeIntegritySHA256 IkeIntegrity = "SHA256"
+ // IkeIntegritySHA384 ...
+ IkeIntegritySHA384 IkeIntegrity = "SHA384"
+)
+
+// PossibleIkeIntegrityValues returns an array of possible values for the IkeIntegrity const type.
+func PossibleIkeIntegrityValues() []IkeIntegrity {
+ return []IkeIntegrity{IkeIntegrityGCMAES128, IkeIntegrityGCMAES256, IkeIntegrityMD5, IkeIntegritySHA1, IkeIntegritySHA256, IkeIntegritySHA384}
+}
+
+// IPAllocationMethod enumerates the values for ip allocation method.
+type IPAllocationMethod string
+
+const (
+ // Dynamic ...
+ Dynamic IPAllocationMethod = "Dynamic"
+ // Static ...
+ Static IPAllocationMethod = "Static"
+)
+
+// PossibleIPAllocationMethodValues returns an array of possible values for the IPAllocationMethod const type.
+func PossibleIPAllocationMethodValues() []IPAllocationMethod {
+ return []IPAllocationMethod{Dynamic, Static}
+}
+
+// IPFlowProtocol enumerates the values for ip flow protocol.
+type IPFlowProtocol string
+
+const (
+ // IPFlowProtocolTCP ...
+ IPFlowProtocolTCP IPFlowProtocol = "TCP"
+ // IPFlowProtocolUDP ...
+ IPFlowProtocolUDP IPFlowProtocol = "UDP"
+)
+
+// PossibleIPFlowProtocolValues returns an array of possible values for the IPFlowProtocol const type.
+func PossibleIPFlowProtocolValues() []IPFlowProtocol {
+ return []IPFlowProtocol{IPFlowProtocolTCP, IPFlowProtocolUDP}
+}
+
+// IpsecEncryption enumerates the values for ipsec encryption.
+type IpsecEncryption string
+
+const (
+ // IpsecEncryptionAES128 ...
+ IpsecEncryptionAES128 IpsecEncryption = "AES128"
+ // IpsecEncryptionAES192 ...
+ IpsecEncryptionAES192 IpsecEncryption = "AES192"
+ // IpsecEncryptionAES256 ...
+ IpsecEncryptionAES256 IpsecEncryption = "AES256"
+ // IpsecEncryptionDES ...
+ IpsecEncryptionDES IpsecEncryption = "DES"
+ // IpsecEncryptionDES3 ...
+ IpsecEncryptionDES3 IpsecEncryption = "DES3"
+ // IpsecEncryptionGCMAES128 ...
+ IpsecEncryptionGCMAES128 IpsecEncryption = "GCMAES128"
+ // IpsecEncryptionGCMAES192 ...
+ IpsecEncryptionGCMAES192 IpsecEncryption = "GCMAES192"
+ // IpsecEncryptionGCMAES256 ...
+ IpsecEncryptionGCMAES256 IpsecEncryption = "GCMAES256"
+ // IpsecEncryptionNone ...
+ IpsecEncryptionNone IpsecEncryption = "None"
+)
+
+// PossibleIpsecEncryptionValues returns an array of possible values for the IpsecEncryption const type.
+func PossibleIpsecEncryptionValues() []IpsecEncryption {
+ return []IpsecEncryption{IpsecEncryptionAES128, IpsecEncryptionAES192, IpsecEncryptionAES256, IpsecEncryptionDES, IpsecEncryptionDES3, IpsecEncryptionGCMAES128, IpsecEncryptionGCMAES192, IpsecEncryptionGCMAES256, IpsecEncryptionNone}
+}
+
+// IpsecIntegrity enumerates the values for ipsec integrity.
+type IpsecIntegrity string
+
+const (
+ // IpsecIntegrityGCMAES128 ...
+ IpsecIntegrityGCMAES128 IpsecIntegrity = "GCMAES128"
+ // IpsecIntegrityGCMAES192 ...
+ IpsecIntegrityGCMAES192 IpsecIntegrity = "GCMAES192"
+ // IpsecIntegrityGCMAES256 ...
+ IpsecIntegrityGCMAES256 IpsecIntegrity = "GCMAES256"
+ // IpsecIntegrityMD5 ...
+ IpsecIntegrityMD5 IpsecIntegrity = "MD5"
+ // IpsecIntegritySHA1 ...
+ IpsecIntegritySHA1 IpsecIntegrity = "SHA1"
+ // IpsecIntegritySHA256 ...
+ IpsecIntegritySHA256 IpsecIntegrity = "SHA256"
+)
+
+// PossibleIpsecIntegrityValues returns an array of possible values for the IpsecIntegrity const type.
+func PossibleIpsecIntegrityValues() []IpsecIntegrity {
+ return []IpsecIntegrity{IpsecIntegrityGCMAES128, IpsecIntegrityGCMAES192, IpsecIntegrityGCMAES256, IpsecIntegrityMD5, IpsecIntegritySHA1, IpsecIntegritySHA256}
+}
+
+// IPVersion enumerates the values for ip version.
+type IPVersion string
+
+const (
+ // IPv4 ...
+ IPv4 IPVersion = "IPv4"
+ // IPv6 ...
+ IPv6 IPVersion = "IPv6"
+)
+
+// PossibleIPVersionValues returns an array of possible values for the IPVersion const type.
+func PossibleIPVersionValues() []IPVersion {
+ return []IPVersion{IPv4, IPv6}
+}
+
+// IssueType enumerates the values for issue type.
+type IssueType string
+
+const (
+ // IssueTypeAgentStopped ...
+ IssueTypeAgentStopped IssueType = "AgentStopped"
+ // IssueTypeDNSResolution ...
+ IssueTypeDNSResolution IssueType = "DnsResolution"
+ // IssueTypeGuestFirewall ...
+ IssueTypeGuestFirewall IssueType = "GuestFirewall"
+ // IssueTypeNetworkSecurityRule ...
+ IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule"
+ // IssueTypePlatform ...
+ IssueTypePlatform IssueType = "Platform"
+ // IssueTypePortThrottled ...
+ IssueTypePortThrottled IssueType = "PortThrottled"
+ // IssueTypeSocketBind ...
+ IssueTypeSocketBind IssueType = "SocketBind"
+ // IssueTypeUnknown ...
+ IssueTypeUnknown IssueType = "Unknown"
+ // IssueTypeUserDefinedRoute ...
+ IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute"
+)
+
+// PossibleIssueTypeValues returns an array of possible values for the IssueType const type.
+func PossibleIssueTypeValues() []IssueType {
+ return []IssueType{IssueTypeAgentStopped, IssueTypeDNSResolution, IssueTypeGuestFirewall, IssueTypeNetworkSecurityRule, IssueTypePlatform, IssueTypePortThrottled, IssueTypeSocketBind, IssueTypeUnknown, IssueTypeUserDefinedRoute}
+}
+
+// LoadBalancerSkuName enumerates the values for load balancer sku name.
+type LoadBalancerSkuName string
+
+const (
+ // LoadBalancerSkuNameBasic ...
+ LoadBalancerSkuNameBasic LoadBalancerSkuName = "Basic"
+ // LoadBalancerSkuNameStandard ...
+ LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard"
+)
+
+// PossibleLoadBalancerSkuNameValues returns an array of possible values for the LoadBalancerSkuName const type.
+func PossibleLoadBalancerSkuNameValues() []LoadBalancerSkuName {
+ return []LoadBalancerSkuName{LoadBalancerSkuNameBasic, LoadBalancerSkuNameStandard}
+}
+
+// LoadDistribution enumerates the values for load distribution.
+type LoadDistribution string
+
+const (
+ // Default ...
+ Default LoadDistribution = "Default"
+ // SourceIP ...
+ SourceIP LoadDistribution = "SourceIP"
+ // SourceIPProtocol ...
+ SourceIPProtocol LoadDistribution = "SourceIPProtocol"
+)
+
+// PossibleLoadDistributionValues returns an array of possible values for the LoadDistribution const type.
+func PossibleLoadDistributionValues() []LoadDistribution {
+ return []LoadDistribution{Default, SourceIP, SourceIPProtocol}
+}
+
+// NextHopType enumerates the values for next hop type.
+type NextHopType string
+
+const (
+ // NextHopTypeHyperNetGateway ...
+ NextHopTypeHyperNetGateway NextHopType = "HyperNetGateway"
+ // NextHopTypeInternet ...
+ NextHopTypeInternet NextHopType = "Internet"
+ // NextHopTypeNone ...
+ NextHopTypeNone NextHopType = "None"
+ // NextHopTypeVirtualAppliance ...
+ NextHopTypeVirtualAppliance NextHopType = "VirtualAppliance"
+ // NextHopTypeVirtualNetworkGateway ...
+ NextHopTypeVirtualNetworkGateway NextHopType = "VirtualNetworkGateway"
+ // NextHopTypeVnetLocal ...
+ NextHopTypeVnetLocal NextHopType = "VnetLocal"
+)
+
+// PossibleNextHopTypeValues returns an array of possible values for the NextHopType const type.
+func PossibleNextHopTypeValues() []NextHopType {
+ return []NextHopType{NextHopTypeHyperNetGateway, NextHopTypeInternet, NextHopTypeNone, NextHopTypeVirtualAppliance, NextHopTypeVirtualNetworkGateway, NextHopTypeVnetLocal}
+}
+
+// OperationStatus enumerates the values for operation status.
+type OperationStatus string
+
+const (
+ // OperationStatusFailed ...
+ OperationStatusFailed OperationStatus = "Failed"
+ // OperationStatusInProgress ...
+ OperationStatusInProgress OperationStatus = "InProgress"
+ // OperationStatusSucceeded ...
+ OperationStatusSucceeded OperationStatus = "Succeeded"
+)
+
+// PossibleOperationStatusValues returns an array of possible values for the OperationStatus const type.
+func PossibleOperationStatusValues() []OperationStatus {
+ return []OperationStatus{OperationStatusFailed, OperationStatusInProgress, OperationStatusSucceeded}
+}
+
+// Origin enumerates the values for origin.
+type Origin string
+
+const (
+ // OriginInbound ...
+ OriginInbound Origin = "Inbound"
+ // OriginLocal ...
+ OriginLocal Origin = "Local"
+ // OriginOutbound ...
+ OriginOutbound Origin = "Outbound"
+)
+
+// PossibleOriginValues returns an array of possible values for the Origin const type.
+func PossibleOriginValues() []Origin {
+ return []Origin{OriginInbound, OriginLocal, OriginOutbound}
+}
+
+// PcError enumerates the values for pc error.
+type PcError string
+
+const (
+ // AgentStopped ...
+ AgentStopped PcError = "AgentStopped"
+ // CaptureFailed ...
+ CaptureFailed PcError = "CaptureFailed"
+ // InternalError ...
+ InternalError PcError = "InternalError"
+ // LocalFileFailed ...
+ LocalFileFailed PcError = "LocalFileFailed"
+ // StorageFailed ...
+ StorageFailed PcError = "StorageFailed"
+)
+
+// PossiblePcErrorValues returns an array of possible values for the PcError const type.
+func PossiblePcErrorValues() []PcError {
+ return []PcError{AgentStopped, CaptureFailed, InternalError, LocalFileFailed, StorageFailed}
+}
+
+// PcProtocol enumerates the values for pc protocol.
+type PcProtocol string
+
+const (
+ // PcProtocolAny ...
+ PcProtocolAny PcProtocol = "Any"
+ // PcProtocolTCP ...
+ PcProtocolTCP PcProtocol = "TCP"
+ // PcProtocolUDP ...
+ PcProtocolUDP PcProtocol = "UDP"
+)
+
+// PossiblePcProtocolValues returns an array of possible values for the PcProtocol const type.
+func PossiblePcProtocolValues() []PcProtocol {
+ return []PcProtocol{PcProtocolAny, PcProtocolTCP, PcProtocolUDP}
+}
+
+// PcStatus enumerates the values for pc status.
+type PcStatus string
+
+const (
+ // PcStatusError ...
+ PcStatusError PcStatus = "Error"
+ // PcStatusNotStarted ...
+ PcStatusNotStarted PcStatus = "NotStarted"
+ // PcStatusRunning ...
+ PcStatusRunning PcStatus = "Running"
+ // PcStatusStopped ...
+ PcStatusStopped PcStatus = "Stopped"
+ // PcStatusUnknown ...
+ PcStatusUnknown PcStatus = "Unknown"
+)
+
+// PossiblePcStatusValues returns an array of possible values for the PcStatus const type.
+func PossiblePcStatusValues() []PcStatus {
+ return []PcStatus{PcStatusError, PcStatusNotStarted, PcStatusRunning, PcStatusStopped, PcStatusUnknown}
+}
+
+// PfsGroup enumerates the values for pfs group.
+type PfsGroup string
+
+const (
+ // PfsGroupECP256 ...
+ PfsGroupECP256 PfsGroup = "ECP256"
+ // PfsGroupECP384 ...
+ PfsGroupECP384 PfsGroup = "ECP384"
+ // PfsGroupNone ...
+ PfsGroupNone PfsGroup = "None"
+ // PfsGroupPFS1 ...
+ PfsGroupPFS1 PfsGroup = "PFS1"
+ // PfsGroupPFS14 ...
+ PfsGroupPFS14 PfsGroup = "PFS14"
+ // PfsGroupPFS2 ...
+ PfsGroupPFS2 PfsGroup = "PFS2"
+ // PfsGroupPFS2048 ...
+ PfsGroupPFS2048 PfsGroup = "PFS2048"
+ // PfsGroupPFS24 ...
+ PfsGroupPFS24 PfsGroup = "PFS24"
+ // PfsGroupPFSMM ...
+ PfsGroupPFSMM PfsGroup = "PFSMM"
+)
+
+// PossiblePfsGroupValues returns an array of possible values for the PfsGroup const type.
+func PossiblePfsGroupValues() []PfsGroup {
+ return []PfsGroup{PfsGroupECP256, PfsGroupECP384, PfsGroupNone, PfsGroupPFS1, PfsGroupPFS14, PfsGroupPFS2, PfsGroupPFS2048, PfsGroupPFS24, PfsGroupPFSMM}
+}
+
+// ProbeProtocol enumerates the values for probe protocol.
+type ProbeProtocol string
+
+const (
+ // ProbeProtocolHTTP ...
+ ProbeProtocolHTTP ProbeProtocol = "Http"
+ // ProbeProtocolTCP ...
+ ProbeProtocolTCP ProbeProtocol = "Tcp"
+)
+
+// PossibleProbeProtocolValues returns an array of possible values for the ProbeProtocol const type.
+func PossibleProbeProtocolValues() []ProbeProtocol {
+ return []ProbeProtocol{ProbeProtocolHTTP, ProbeProtocolTCP}
+}
+
+// ProcessorArchitecture enumerates the values for processor architecture.
+type ProcessorArchitecture string
+
+const (
+ // Amd64 ...
+ Amd64 ProcessorArchitecture = "Amd64"
+ // X86 ...
+ X86 ProcessorArchitecture = "X86"
+)
+
+// PossibleProcessorArchitectureValues returns an array of possible values for the ProcessorArchitecture const type.
+func PossibleProcessorArchitectureValues() []ProcessorArchitecture {
+ return []ProcessorArchitecture{Amd64, X86}
+}
+
+// Protocol enumerates the values for protocol.
+type Protocol string
+
+const (
+ // ProtocolHTTP ...
+ ProtocolHTTP Protocol = "Http"
+ // ProtocolHTTPS ...
+ ProtocolHTTPS Protocol = "Https"
+ // ProtocolIcmp ...
+ ProtocolIcmp Protocol = "Icmp"
+ // ProtocolTCP ...
+ ProtocolTCP Protocol = "Tcp"
+)
+
+// PossibleProtocolValues returns an array of possible values for the Protocol const type.
+func PossibleProtocolValues() []Protocol {
+ return []Protocol{ProtocolHTTP, ProtocolHTTPS, ProtocolIcmp, ProtocolTCP}
+}
+
+// ProvisioningState enumerates the values for provisioning state.
+type ProvisioningState string
+
+const (
+ // Deleting ...
+ Deleting ProvisioningState = "Deleting"
+ // Failed ...
+ Failed ProvisioningState = "Failed"
+ // Succeeded ...
+ Succeeded ProvisioningState = "Succeeded"
+ // Updating ...
+ Updating ProvisioningState = "Updating"
+)
+
+// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
+func PossibleProvisioningStateValues() []ProvisioningState {
+ return []ProvisioningState{Deleting, Failed, Succeeded, Updating}
+}
+
+// PublicIPAddressSkuName enumerates the values for public ip address sku name.
+type PublicIPAddressSkuName string
+
+const (
+ // PublicIPAddressSkuNameBasic ...
+ PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic"
+ // PublicIPAddressSkuNameStandard ...
+ PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard"
+)
+
+// PossiblePublicIPAddressSkuNameValues returns an array of possible values for the PublicIPAddressSkuName const type.
+func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName {
+ return []PublicIPAddressSkuName{PublicIPAddressSkuNameBasic, PublicIPAddressSkuNameStandard}
+}
+
+// RouteNextHopType enumerates the values for route next hop type.
+type RouteNextHopType string
+
+const (
+ // RouteNextHopTypeInternet ...
+ RouteNextHopTypeInternet RouteNextHopType = "Internet"
+ // RouteNextHopTypeNone ...
+ RouteNextHopTypeNone RouteNextHopType = "None"
+ // RouteNextHopTypeVirtualAppliance ...
+ RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance"
+ // RouteNextHopTypeVirtualNetworkGateway ...
+ RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway"
+ // RouteNextHopTypeVnetLocal ...
+ RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal"
+)
+
+// PossibleRouteNextHopTypeValues returns an array of possible values for the RouteNextHopType const type.
+func PossibleRouteNextHopTypeValues() []RouteNextHopType {
+ return []RouteNextHopType{RouteNextHopTypeInternet, RouteNextHopTypeNone, RouteNextHopTypeVirtualAppliance, RouteNextHopTypeVirtualNetworkGateway, RouteNextHopTypeVnetLocal}
+}
+
+// SecurityRuleAccess enumerates the values for security rule access.
+type SecurityRuleAccess string
+
+const (
+ // SecurityRuleAccessAllow ...
+ SecurityRuleAccessAllow SecurityRuleAccess = "Allow"
+ // SecurityRuleAccessDeny ...
+ SecurityRuleAccessDeny SecurityRuleAccess = "Deny"
+)
+
+// PossibleSecurityRuleAccessValues returns an array of possible values for the SecurityRuleAccess const type.
+func PossibleSecurityRuleAccessValues() []SecurityRuleAccess {
+ return []SecurityRuleAccess{SecurityRuleAccessAllow, SecurityRuleAccessDeny}
+}
+
+// SecurityRuleDirection enumerates the values for security rule direction.
+type SecurityRuleDirection string
+
+const (
+ // SecurityRuleDirectionInbound ...
+ SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound"
+ // SecurityRuleDirectionOutbound ...
+ SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound"
+)
+
+// PossibleSecurityRuleDirectionValues returns an array of possible values for the SecurityRuleDirection const type.
+func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection {
+ return []SecurityRuleDirection{SecurityRuleDirectionInbound, SecurityRuleDirectionOutbound}
+}
+
+// SecurityRuleProtocol enumerates the values for security rule protocol.
+type SecurityRuleProtocol string
+
+const (
+ // SecurityRuleProtocolAsterisk ...
+ SecurityRuleProtocolAsterisk SecurityRuleProtocol = "*"
+ // SecurityRuleProtocolTCP ...
+ SecurityRuleProtocolTCP SecurityRuleProtocol = "Tcp"
+ // SecurityRuleProtocolUDP ...
+ SecurityRuleProtocolUDP SecurityRuleProtocol = "Udp"
+)
+
+// PossibleSecurityRuleProtocolValues returns an array of possible values for the SecurityRuleProtocol const type.
+func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol {
+ return []SecurityRuleProtocol{SecurityRuleProtocolAsterisk, SecurityRuleProtocolTCP, SecurityRuleProtocolUDP}
+}
+
+// ServiceProviderProvisioningState enumerates the values for service provider provisioning state.
+type ServiceProviderProvisioningState string
+
+const (
+ // Deprovisioning ...
+ Deprovisioning ServiceProviderProvisioningState = "Deprovisioning"
+ // NotProvisioned ...
+ NotProvisioned ServiceProviderProvisioningState = "NotProvisioned"
+ // Provisioned ...
+ Provisioned ServiceProviderProvisioningState = "Provisioned"
+ // Provisioning ...
+ Provisioning ServiceProviderProvisioningState = "Provisioning"
+)
+
+// PossibleServiceProviderProvisioningStateValues returns an array of possible values for the ServiceProviderProvisioningState const type.
+func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvisioningState {
+ return []ServiceProviderProvisioningState{Deprovisioning, NotProvisioned, Provisioned, Provisioning}
+}
+
+// Severity enumerates the values for severity.
+type Severity string
+
+const (
+ // SeverityError ...
+ SeverityError Severity = "Error"
+ // SeverityWarning ...
+ SeverityWarning Severity = "Warning"
+)
+
+// PossibleSeverityValues returns an array of possible values for the Severity const type.
+func PossibleSeverityValues() []Severity {
+ return []Severity{SeverityError, SeverityWarning}
+}
+
+// TransportProtocol enumerates the values for transport protocol.
+type TransportProtocol string
+
+const (
+ // TransportProtocolAll ...
+ TransportProtocolAll TransportProtocol = "All"
+ // TransportProtocolTCP ...
+ TransportProtocolTCP TransportProtocol = "Tcp"
+ // TransportProtocolUDP ...
+ TransportProtocolUDP TransportProtocol = "Udp"
+)
+
+// PossibleTransportProtocolValues returns an array of possible values for the TransportProtocol const type.
+func PossibleTransportProtocolValues() []TransportProtocol {
+ return []TransportProtocol{TransportProtocolAll, TransportProtocolTCP, TransportProtocolUDP}
+}
+
+// VirtualNetworkGatewayConnectionStatus enumerates the values for virtual network gateway connection status.
+type VirtualNetworkGatewayConnectionStatus string
+
+const (
+ // VirtualNetworkGatewayConnectionStatusConnected ...
+ VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected"
+ // VirtualNetworkGatewayConnectionStatusConnecting ...
+ VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting"
+ // VirtualNetworkGatewayConnectionStatusNotConnected ...
+ VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected"
+ // VirtualNetworkGatewayConnectionStatusUnknown ...
+ VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown"
+)
+
+// PossibleVirtualNetworkGatewayConnectionStatusValues returns an array of possible values for the VirtualNetworkGatewayConnectionStatus const type.
+func PossibleVirtualNetworkGatewayConnectionStatusValues() []VirtualNetworkGatewayConnectionStatus {
+ return []VirtualNetworkGatewayConnectionStatus{VirtualNetworkGatewayConnectionStatusConnected, VirtualNetworkGatewayConnectionStatusConnecting, VirtualNetworkGatewayConnectionStatusNotConnected, VirtualNetworkGatewayConnectionStatusUnknown}
+}
+
+// VirtualNetworkGatewayConnectionType enumerates the values for virtual network gateway connection type.
+type VirtualNetworkGatewayConnectionType string
+
+const (
+ // ExpressRoute ...
+ ExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute"
+ // IPsec ...
+ IPsec VirtualNetworkGatewayConnectionType = "IPsec"
+ // Vnet2Vnet ...
+ Vnet2Vnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet"
+ // VPNClient ...
+ VPNClient VirtualNetworkGatewayConnectionType = "VPNClient"
+)
+
+// PossibleVirtualNetworkGatewayConnectionTypeValues returns an array of possible values for the VirtualNetworkGatewayConnectionType const type.
+func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGatewayConnectionType {
+ return []VirtualNetworkGatewayConnectionType{ExpressRoute, IPsec, Vnet2Vnet, VPNClient}
+}
+
+// VirtualNetworkGatewaySkuName enumerates the values for virtual network gateway sku name.
+type VirtualNetworkGatewaySkuName string
+
+const (
+ // VirtualNetworkGatewaySkuNameBasic ...
+ VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic"
+ // VirtualNetworkGatewaySkuNameErGw1AZ ...
+ VirtualNetworkGatewaySkuNameErGw1AZ VirtualNetworkGatewaySkuName = "ErGw1AZ"
+ // VirtualNetworkGatewaySkuNameErGw2AZ ...
+ VirtualNetworkGatewaySkuNameErGw2AZ VirtualNetworkGatewaySkuName = "ErGw2AZ"
+ // VirtualNetworkGatewaySkuNameErGw3AZ ...
+ VirtualNetworkGatewaySkuNameErGw3AZ VirtualNetworkGatewaySkuName = "ErGw3AZ"
+ // VirtualNetworkGatewaySkuNameHighPerformance ...
+ VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance"
+ // VirtualNetworkGatewaySkuNameStandard ...
+ VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard"
+ // VirtualNetworkGatewaySkuNameUltraPerformance ...
+ VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance"
+ // VirtualNetworkGatewaySkuNameVpnGw1 ...
+ VirtualNetworkGatewaySkuNameVpnGw1 VirtualNetworkGatewaySkuName = "VpnGw1"
+ // VirtualNetworkGatewaySkuNameVpnGw1AZ ...
+ VirtualNetworkGatewaySkuNameVpnGw1AZ VirtualNetworkGatewaySkuName = "VpnGw1AZ"
+ // VirtualNetworkGatewaySkuNameVpnGw2 ...
+ VirtualNetworkGatewaySkuNameVpnGw2 VirtualNetworkGatewaySkuName = "VpnGw2"
+ // VirtualNetworkGatewaySkuNameVpnGw2AZ ...
+ VirtualNetworkGatewaySkuNameVpnGw2AZ VirtualNetworkGatewaySkuName = "VpnGw2AZ"
+ // VirtualNetworkGatewaySkuNameVpnGw3 ...
+ VirtualNetworkGatewaySkuNameVpnGw3 VirtualNetworkGatewaySkuName = "VpnGw3"
+ // VirtualNetworkGatewaySkuNameVpnGw3AZ ...
+ VirtualNetworkGatewaySkuNameVpnGw3AZ VirtualNetworkGatewaySkuName = "VpnGw3AZ"
+)
+
+// PossibleVirtualNetworkGatewaySkuNameValues returns an array of possible values for the VirtualNetworkGatewaySkuName const type.
+func PossibleVirtualNetworkGatewaySkuNameValues() []VirtualNetworkGatewaySkuName {
+ return []VirtualNetworkGatewaySkuName{VirtualNetworkGatewaySkuNameBasic, VirtualNetworkGatewaySkuNameErGw1AZ, VirtualNetworkGatewaySkuNameErGw2AZ, VirtualNetworkGatewaySkuNameErGw3AZ, VirtualNetworkGatewaySkuNameHighPerformance, VirtualNetworkGatewaySkuNameStandard, VirtualNetworkGatewaySkuNameUltraPerformance, VirtualNetworkGatewaySkuNameVpnGw1, VirtualNetworkGatewaySkuNameVpnGw1AZ, VirtualNetworkGatewaySkuNameVpnGw2, VirtualNetworkGatewaySkuNameVpnGw2AZ, VirtualNetworkGatewaySkuNameVpnGw3, VirtualNetworkGatewaySkuNameVpnGw3AZ}
+}
+
+// VirtualNetworkGatewaySkuTier enumerates the values for virtual network gateway sku tier.
+type VirtualNetworkGatewaySkuTier string
+
+const (
+ // VirtualNetworkGatewaySkuTierBasic ...
+ VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic"
+ // VirtualNetworkGatewaySkuTierErGw1AZ ...
+ VirtualNetworkGatewaySkuTierErGw1AZ VirtualNetworkGatewaySkuTier = "ErGw1AZ"
+ // VirtualNetworkGatewaySkuTierErGw2AZ ...
+ VirtualNetworkGatewaySkuTierErGw2AZ VirtualNetworkGatewaySkuTier = "ErGw2AZ"
+ // VirtualNetworkGatewaySkuTierErGw3AZ ...
+ VirtualNetworkGatewaySkuTierErGw3AZ VirtualNetworkGatewaySkuTier = "ErGw3AZ"
+ // VirtualNetworkGatewaySkuTierHighPerformance ...
+ VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance"
+ // VirtualNetworkGatewaySkuTierStandard ...
+ VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard"
+ // VirtualNetworkGatewaySkuTierUltraPerformance ...
+ VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance"
+ // VirtualNetworkGatewaySkuTierVpnGw1 ...
+ VirtualNetworkGatewaySkuTierVpnGw1 VirtualNetworkGatewaySkuTier = "VpnGw1"
+ // VirtualNetworkGatewaySkuTierVpnGw1AZ ...
+ VirtualNetworkGatewaySkuTierVpnGw1AZ VirtualNetworkGatewaySkuTier = "VpnGw1AZ"
+ // VirtualNetworkGatewaySkuTierVpnGw2 ...
+ VirtualNetworkGatewaySkuTierVpnGw2 VirtualNetworkGatewaySkuTier = "VpnGw2"
+ // VirtualNetworkGatewaySkuTierVpnGw2AZ ...
+ VirtualNetworkGatewaySkuTierVpnGw2AZ VirtualNetworkGatewaySkuTier = "VpnGw2AZ"
+ // VirtualNetworkGatewaySkuTierVpnGw3 ...
+ VirtualNetworkGatewaySkuTierVpnGw3 VirtualNetworkGatewaySkuTier = "VpnGw3"
+ // VirtualNetworkGatewaySkuTierVpnGw3AZ ...
+ VirtualNetworkGatewaySkuTierVpnGw3AZ VirtualNetworkGatewaySkuTier = "VpnGw3AZ"
+)
+
+// PossibleVirtualNetworkGatewaySkuTierValues returns an array of possible values for the VirtualNetworkGatewaySkuTier const type.
+func PossibleVirtualNetworkGatewaySkuTierValues() []VirtualNetworkGatewaySkuTier {
+ return []VirtualNetworkGatewaySkuTier{VirtualNetworkGatewaySkuTierBasic, VirtualNetworkGatewaySkuTierErGw1AZ, VirtualNetworkGatewaySkuTierErGw2AZ, VirtualNetworkGatewaySkuTierErGw3AZ, VirtualNetworkGatewaySkuTierHighPerformance, VirtualNetworkGatewaySkuTierStandard, VirtualNetworkGatewaySkuTierUltraPerformance, VirtualNetworkGatewaySkuTierVpnGw1, VirtualNetworkGatewaySkuTierVpnGw1AZ, VirtualNetworkGatewaySkuTierVpnGw2, VirtualNetworkGatewaySkuTierVpnGw2AZ, VirtualNetworkGatewaySkuTierVpnGw3, VirtualNetworkGatewaySkuTierVpnGw3AZ}
+}
+
+// VirtualNetworkGatewayType enumerates the values for virtual network gateway type.
+type VirtualNetworkGatewayType string
+
+const (
+ // VirtualNetworkGatewayTypeExpressRoute ...
+ VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute"
+ // VirtualNetworkGatewayTypeVpn ...
+ VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn"
+)
+
+// PossibleVirtualNetworkGatewayTypeValues returns an array of possible values for the VirtualNetworkGatewayType const type.
+func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType {
+ return []VirtualNetworkGatewayType{VirtualNetworkGatewayTypeExpressRoute, VirtualNetworkGatewayTypeVpn}
+}
+
+// VirtualNetworkPeeringState enumerates the values for virtual network peering state.
+type VirtualNetworkPeeringState string
+
+const (
+ // VirtualNetworkPeeringStateConnected ...
+ VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected"
+ // VirtualNetworkPeeringStateDisconnected ...
+ VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected"
+ // VirtualNetworkPeeringStateInitiated ...
+ VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated"
+)
+
+// PossibleVirtualNetworkPeeringStateValues returns an array of possible values for the VirtualNetworkPeeringState const type.
+func PossibleVirtualNetworkPeeringStateValues() []VirtualNetworkPeeringState {
+ return []VirtualNetworkPeeringState{VirtualNetworkPeeringStateConnected, VirtualNetworkPeeringStateDisconnected, VirtualNetworkPeeringStateInitiated}
+}
+
+// VpnClientProtocol enumerates the values for vpn client protocol.
+type VpnClientProtocol string
+
+const (
+ // IkeV2 ...
+ IkeV2 VpnClientProtocol = "IkeV2"
+ // SSTP ...
+ SSTP VpnClientProtocol = "SSTP"
+)
+
+// PossibleVpnClientProtocolValues returns an array of possible values for the VpnClientProtocol const type.
+func PossibleVpnClientProtocolValues() []VpnClientProtocol {
+ return []VpnClientProtocol{IkeV2, SSTP}
+}
+
+// VpnType enumerates the values for vpn type.
+type VpnType string
+
+const (
+ // PolicyBased ...
+ PolicyBased VpnType = "PolicyBased"
+ // RouteBased ...
+ RouteBased VpnType = "RouteBased"
+)
+
+// PossibleVpnTypeValues returns an array of possible values for the VpnType const type.
+func PossibleVpnTypeValues() []VpnType {
+ return []VpnType{PolicyBased, RouteBased}
+}
+
+// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the virtual
+// network.
+type AddressSpace struct {
+ // AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
+ AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
+}
+
+// ApplicationGateway application gateway resource
+type ApplicationGateway struct {
+ autorest.Response `json:"-"`
+ *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGateway.
+func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ag.ApplicationGatewayPropertiesFormat != nil {
+ objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
+ }
+ if ag.Etag != nil {
+ objectMap["etag"] = ag.Etag
+ }
+ if ag.ID != nil {
+ objectMap["id"] = ag.ID
+ }
+ if ag.Name != nil {
+ objectMap["name"] = ag.Name
+ }
+ if ag.Type != nil {
+ objectMap["type"] = ag.Type
+ }
+ if ag.Location != nil {
+ objectMap["location"] = ag.Location
+ }
+ if ag.Tags != nil {
+ objectMap["tags"] = ag.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
+func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ ag.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ag.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ag.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ag.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ ag.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ag.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
+type ApplicationGatewayAuthenticationCertificate struct {
+ *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of the authentication certificate that is unique within an Application Gateway.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
+func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
+ objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
+ }
+ if agac.Name != nil {
+ objectMap["name"] = agac.Name
+ }
+ if agac.Etag != nil {
+ objectMap["etag"] = agac.Etag
+ }
+ if agac.Type != nil {
+ objectMap["type"] = agac.Type
+ }
+ if agac.ID != nil {
+ objectMap["id"] = agac.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
+func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agac.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agac.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agac.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agac.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
+// application gateway.
+type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
+ // Data - Certificate public data.
+ Data *string `json:"data,omitempty"`
+ // ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service call.
+type ApplicationGatewayAvailableSslOptions struct {
+ autorest.Response `json:"-"`
+ *ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
+func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
+ objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
+ }
+ if agaso.ID != nil {
+ objectMap["id"] = agaso.ID
+ }
+ if agaso.Name != nil {
+ objectMap["name"] = agaso.Name
+ }
+ if agaso.Type != nil {
+ objectMap["type"] = agaso.Type
+ }
+ if agaso.Location != nil {
+ objectMap["location"] = agaso.Location
+ }
+ if agaso.Tags != nil {
+ objectMap["tags"] = agaso.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
+func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agaso.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agaso.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agaso.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ agaso.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ agaso.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of ApplicationGatewayAvailableSslOptions
+type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
+ // PredefinedPolicies - List of available Ssl predefined policy.
+ PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
+ // DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
+ DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
+ // AvailableCipherSuites - List of available Ssl cipher suites.
+ AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
+ // AvailableProtocols - List of available Ssl protocols.
+ AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
+}
+
+// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API service
+// call.
+type ApplicationGatewayAvailableSslPredefinedPolicies struct {
+ autorest.Response `json:"-"`
+ // Value - List of available Ssl predefined policy.
+ Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
+ // NextLink - URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
+// ApplicationGatewaySslPredefinedPolicy values.
+type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
+ i int
+ page ApplicationGatewayAvailableSslPredefinedPoliciesPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
+ if !iter.page.NotDone() {
+ return ApplicationGatewaySslPredefinedPolicy{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
+ return agaspp.Value == nil || len(*agaspp.Value) == 0
+}
+
+// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer() (*http.Request, error) {
+ if agaspp.NextLink == nil || len(to.String(agaspp.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(agaspp.NextLink)))
+}
+
+// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of ApplicationGatewaySslPredefinedPolicy
+// values.
+type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
+ fn func(ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
+ agaspp ApplicationGatewayAvailableSslPredefinedPolicies
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
+ next, err := page.fn(page.agaspp)
+ if err != nil {
+ return err
+ }
+ page.agaspp = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
+ return !page.agaspp.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
+ return page.agaspp
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
+ if page.agaspp.IsEmpty() {
+ return nil
+ }
+ return *page.agaspp.Value
+}
+
+// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API service
+// call.
+type ApplicationGatewayAvailableWafRuleSetsResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of application gateway rule sets.
+ Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
+}
+
+// ApplicationGatewayBackendAddress backend address of an application gateway.
+type ApplicationGatewayBackendAddress struct {
+ // Fqdn - Fully qualified domain name (FQDN).
+ Fqdn *string `json:"fqdn,omitempty"`
+ // IPAddress - IP address
+ IPAddress *string `json:"ipAddress,omitempty"`
+}
+
+// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
+type ApplicationGatewayBackendAddressPool struct {
+ *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of the backend address pool that is unique within an Application Gateway.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
+func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
+ objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
+ }
+ if agbap.Name != nil {
+ objectMap["name"] = agbap.Name
+ }
+ if agbap.Etag != nil {
+ objectMap["etag"] = agbap.Etag
+ }
+ if agbap.Type != nil {
+ objectMap["type"] = agbap.Type
+ }
+ if agbap.ID != nil {
+ objectMap["id"] = agbap.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
+func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agbap.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agbap.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agbap.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agbap.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an application
+// gateway.
+type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
+ // BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
+ BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
+ // BackendAddresses - Backend addresses
+ BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
+ // ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
+type ApplicationGatewayBackendHealth struct {
+ autorest.Response `json:"-"`
+ BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
+}
+
+// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
+type ApplicationGatewayBackendHealthHTTPSettings struct {
+ // BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
+ BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
+ // Servers - List of ApplicationGatewayBackendHealthServer resources.
+ Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
+}
+
+// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
+type ApplicationGatewayBackendHealthPool struct {
+ // BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
+ BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
+ // BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
+ BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
+}
+
+// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
+type ApplicationGatewayBackendHealthServer struct {
+ // Address - IP address or FQDN of backend server.
+ Address *string `json:"address,omitempty"`
+ // IPConfiguration - Reference of IP configuration of backend server.
+ IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
+ // Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
+ Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
+}
+
+// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
+type ApplicationGatewayBackendHTTPSettings struct {
+ *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of the backend http settings that is unique within an Application Gateway.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
+func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
+ objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
+ }
+ if agbhs.Name != nil {
+ objectMap["name"] = agbhs.Name
+ }
+ if agbhs.Etag != nil {
+ objectMap["etag"] = agbhs.Etag
+ }
+ if agbhs.Type != nil {
+ objectMap["type"] = agbhs.Type
+ }
+ if agbhs.ID != nil {
+ objectMap["id"] = agbhs.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
+func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agbhs.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agbhs.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agbhs.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agbhs.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
+// application gateway.
+type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
+ // Port - The destination port on the backend.
+ Port *int32 `json:"port,omitempty"`
+ // Protocol - The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
+ Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
+ // CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
+ CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
+ // RequestTimeout - Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds.
+ RequestTimeout *int32 `json:"requestTimeout,omitempty"`
+ // Probe - Probe resource of an application gateway.
+ Probe *SubResource `json:"probe,omitempty"`
+ // AuthenticationCertificates - Array of references to application gateway authentication certificates.
+ AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
+ // ConnectionDraining - Connection draining of the backend http settings resource.
+ ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
+ // HostName - Host header to be sent to the backend servers.
+ HostName *string `json:"hostName,omitempty"`
+ // PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
+ PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
+ // AffinityCookieName - Cookie name to use for the affinity cookie.
+ AffinityCookieName *string `json:"affinityCookieName,omitempty"`
+ // ProbeEnabled - Whether the probe is enabled. Default value is false.
+ ProbeEnabled *bool `json:"probeEnabled,omitempty"`
+ // Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
+ Path *string `json:"path,omitempty"`
+ // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayConnectionDraining 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 - Whether connection draining is enabled or not.
+ Enabled *bool `json:"enabled,omitempty"`
+ // DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
+ DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
+}
+
+// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire rule group.
+type ApplicationGatewayFirewallDisabledRuleGroup struct {
+ // RuleGroupName - The name of the rule group that will be disabled.
+ RuleGroupName *string `json:"ruleGroupName,omitempty"`
+ // Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
+ Rules *[]int32 `json:"rules,omitempty"`
+}
+
+// ApplicationGatewayFirewallRule a web application firewall rule.
+type ApplicationGatewayFirewallRule struct {
+ // RuleID - The identifier of the web application firewall rule.
+ RuleID *int32 `json:"ruleId,omitempty"`
+ // Description - The description of the web application firewall rule.
+ Description *string `json:"description,omitempty"`
+}
+
+// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
+type ApplicationGatewayFirewallRuleGroup struct {
+ // RuleGroupName - The name of the web application firewall rule group.
+ RuleGroupName *string `json:"ruleGroupName,omitempty"`
+ // Description - The description of the web application firewall rule group.
+ Description *string `json:"description,omitempty"`
+ // Rules - The rules of the web application firewall rule group.
+ Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
+}
+
+// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
+type ApplicationGatewayFirewallRuleSet struct {
+ *ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
+func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
+ objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
+ }
+ if agfrs.ID != nil {
+ objectMap["id"] = agfrs.ID
+ }
+ if agfrs.Name != nil {
+ objectMap["name"] = agfrs.Name
+ }
+ if agfrs.Type != nil {
+ objectMap["type"] = agfrs.Type
+ }
+ if agfrs.Location != nil {
+ objectMap["location"] = agfrs.Location
+ }
+ if agfrs.Tags != nil {
+ objectMap["tags"] = agfrs.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
+func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agfrs.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agfrs.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agfrs.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ agfrs.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ agfrs.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
+type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
+ // ProvisioningState - The provisioning state of the web application firewall rule set.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // RuleSetType - The type of the web application firewall rule set.
+ RuleSetType *string `json:"ruleSetType,omitempty"`
+ // RuleSetVersion - The version of the web application firewall rule set type.
+ RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
+ // RuleGroups - The rule groups of the web application firewall rule set.
+ RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
+}
+
+// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
+type ApplicationGatewayFrontendIPConfiguration struct {
+ *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of the frontend IP configuration that is unique within an Application Gateway.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
+func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
+ }
+ if agfic.Name != nil {
+ objectMap["name"] = agfic.Name
+ }
+ if agfic.Etag != nil {
+ objectMap["etag"] = agfic.Etag
+ }
+ if agfic.Type != nil {
+ objectMap["type"] = agfic.Type
+ }
+ if agfic.ID != nil {
+ objectMap["id"] = agfic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
+func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agfic.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agfic.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agfic.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agfic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
+// application gateway.
+type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
+ // PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
+ PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
+ // PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
+ PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
+ // Subnet - Reference of the subnet resource.
+ Subnet *SubResource `json:"subnet,omitempty"`
+ // PublicIPAddress - Reference of the PublicIP resource.
+ PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
+ // ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayFrontendPort frontend port of an application gateway.
+type ApplicationGatewayFrontendPort struct {
+ *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of the frontend port that is unique within an Application Gateway
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
+func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
+ objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
+ }
+ if agfp.Name != nil {
+ objectMap["name"] = agfp.Name
+ }
+ if agfp.Etag != nil {
+ objectMap["etag"] = agfp.Etag
+ }
+ if agfp.Type != nil {
+ objectMap["type"] = agfp.Type
+ }
+ if agfp.ID != nil {
+ objectMap["id"] = agfp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
+func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agfp.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agfp.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agfp.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agfp.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
+type ApplicationGatewayFrontendPortPropertiesFormat struct {
+ // Port - Frontend port
+ Port *int32 `json:"port,omitempty"`
+ // ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayHTTPListener http listener of an application gateway.
+type ApplicationGatewayHTTPListener struct {
+ *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of the HTTP listener that is unique within an Application Gateway.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
+func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
+ objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
+ }
+ if aghl.Name != nil {
+ objectMap["name"] = aghl.Name
+ }
+ if aghl.Etag != nil {
+ objectMap["etag"] = aghl.Etag
+ }
+ if aghl.Type != nil {
+ objectMap["type"] = aghl.Type
+ }
+ if aghl.ID != nil {
+ objectMap["id"] = aghl.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
+func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ aghl.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ aghl.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ aghl.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ aghl.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
+type ApplicationGatewayHTTPListenerPropertiesFormat struct {
+ // FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
+ FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
+ // FrontendPort - Frontend port resource of an application gateway.
+ FrontendPort *SubResource `json:"frontendPort,omitempty"`
+ // Protocol - Protocol of the HTTP listener. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
+ Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
+ // HostName - Host name of HTTP listener.
+ HostName *string `json:"hostName,omitempty"`
+ // SslCertificate - SSL certificate resource of an application gateway.
+ SslCertificate *SubResource `json:"sslCertificate,omitempty"`
+ // RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
+ RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
+ // ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1 private
+// IP configuration is allowed.
+type ApplicationGatewayIPConfiguration struct {
+ *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of the IP configuration that is unique within an Application Gateway.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
+func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
+ }
+ if agic.Name != nil {
+ objectMap["name"] = agic.Name
+ }
+ if agic.Etag != nil {
+ objectMap["etag"] = agic.Etag
+ }
+ if agic.Type != nil {
+ objectMap["type"] = agic.Type
+ }
+ if agic.ID != nil {
+ objectMap["id"] = agic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
+func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agic.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agic.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agic.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application gateway.
+type ApplicationGatewayIPConfigurationPropertiesFormat struct {
+ // Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
+ Subnet *SubResource `json:"subnet,omitempty"`
+ // ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayListResult response for ListApplicationGateways API service call.
+type ApplicationGatewayListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of an application gateways in a resource group.
+ Value *[]ApplicationGateway `json:"value,omitempty"`
+ // NextLink - URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
+type ApplicationGatewayListResultIterator struct {
+ i int
+ page ApplicationGatewayListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ApplicationGatewayListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ApplicationGatewayListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
+ if !iter.page.NotDone() {
+ return ApplicationGateway{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (aglr ApplicationGatewayListResult) IsEmpty() bool {
+ return aglr.Value == nil || len(*aglr.Value) == 0
+}
+
+// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer() (*http.Request, error) {
+ if aglr.NextLink == nil || len(to.String(aglr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(aglr.NextLink)))
+}
+
+// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
+type ApplicationGatewayListResultPage struct {
+ fn func(ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
+ aglr ApplicationGatewayListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ApplicationGatewayListResultPage) Next() error {
+ next, err := page.fn(page.aglr)
+ if err != nil {
+ return err
+ }
+ page.aglr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ApplicationGatewayListResultPage) NotDone() bool {
+ return !page.aglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
+ return page.aglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
+ if page.aglr.IsEmpty() {
+ return nil
+ }
+ return *page.aglr.Value
+}
+
+// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
+type ApplicationGatewayPathRule struct {
+ *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of the path rule that is unique within an Application Gateway.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
+func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
+ objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
+ }
+ if agpr.Name != nil {
+ objectMap["name"] = agpr.Name
+ }
+ if agpr.Etag != nil {
+ objectMap["etag"] = agpr.Etag
+ }
+ if agpr.Type != nil {
+ objectMap["type"] = agpr.Type
+ }
+ if agpr.ID != nil {
+ objectMap["id"] = agpr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
+func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agpr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agpr.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agpr.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agpr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
+type ApplicationGatewayPathRulePropertiesFormat struct {
+ // Paths - Path rules of URL path map.
+ Paths *[]string `json:"paths,omitempty"`
+ // BackendAddressPool - Backend address pool resource of URL path map path rule.
+ BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
+ // BackendHTTPSettings - Backend http settings resource of URL path map path rule.
+ BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
+ // RedirectConfiguration - Redirect configuration resource of URL path map path rule.
+ RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
+ // ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayProbe probe of the application gateway.
+type ApplicationGatewayProbe struct {
+ *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of the probe that is unique within an Application Gateway.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
+func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agp.ApplicationGatewayProbePropertiesFormat != nil {
+ objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
+ }
+ if agp.Name != nil {
+ objectMap["name"] = agp.Name
+ }
+ if agp.Etag != nil {
+ objectMap["etag"] = agp.Etag
+ }
+ if agp.Type != nil {
+ objectMap["type"] = agp.Type
+ }
+ if agp.ID != nil {
+ objectMap["id"] = agp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
+func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agp.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agp.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agp.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agp.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
+type ApplicationGatewayProbeHealthResponseMatch struct {
+ // Body - Body that must be contained in the health response. Default value is empty.
+ Body *string `json:"body,omitempty"`
+ // StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
+ StatusCodes *[]string `json:"statusCodes,omitempty"`
+}
+
+// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
+type ApplicationGatewayProbePropertiesFormat struct {
+ // Protocol - The protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
+ Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
+ // Host - Host name to send the probe to.
+ Host *string `json:"host,omitempty"`
+ // Path - Relative path of probe. Valid path starts from '/'. Probe is sent to ://:
+ Path *string `json:"path,omitempty"`
+ // Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
+ Interval *int32 `json:"interval,omitempty"`
+ // Timeout - the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds.
+ Timeout *int32 `json:"timeout,omitempty"`
+ // UnhealthyThreshold - The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20.
+ UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
+ // PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
+ PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
+ // MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
+ MinServers *int32 `json:"minServers,omitempty"`
+ // Match - Criterion for classifying a healthy probe response.
+ Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
+ // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayPropertiesFormat properties of the application gateway.
+type ApplicationGatewayPropertiesFormat struct {
+ // Sku - SKU of the application gateway resource.
+ Sku *ApplicationGatewaySku `json:"sku,omitempty"`
+ // SslPolicy - SSL policy of the application gateway resource.
+ SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
+ // OperationalState - Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
+ OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
+ // GatewayIPConfigurations - Subnets of application the gateway resource.
+ GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
+ // AuthenticationCertificates - Authentication certificates of the application gateway resource.
+ AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
+ // SslCertificates - SSL certificates of the application gateway resource.
+ SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
+ // FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
+ FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
+ // FrontendPorts - Frontend ports of the application gateway resource.
+ FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
+ // Probes - Probes of the application gateway resource.
+ Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
+ // BackendAddressPools - Backend address pool of the application gateway resource.
+ BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
+ // BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
+ BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
+ // HTTPListeners - Http listeners of the application gateway resource.
+ HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
+ // URLPathMaps - URL path map of the application gateway resource.
+ URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
+ // RequestRoutingRules - Request routing rules of the application gateway resource.
+ RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
+ // RedirectConfigurations - Redirect configurations of the application gateway resource.
+ RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
+ // WebApplicationFirewallConfiguration - Web application firewall configuration.
+ WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
+ // EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
+ EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
+ // ResourceGUID - Resource GUID property of the application gateway resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
+type ApplicationGatewayRedirectConfiguration struct {
+ *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of the redirect configuration that is unique within an Application Gateway.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
+func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
+ }
+ if agrc.Name != nil {
+ objectMap["name"] = agrc.Name
+ }
+ if agrc.Etag != nil {
+ objectMap["etag"] = agrc.Etag
+ }
+ if agrc.Type != nil {
+ objectMap["type"] = agrc.Type
+ }
+ if agrc.ID != nil {
+ objectMap["id"] = agrc.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
+func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agrc.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agrc.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agrc.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agrc.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the application
+// gateway.
+type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
+ // RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
+ RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
+ // TargetListener - Reference to a listener to redirect the request to.
+ TargetListener *SubResource `json:"targetListener,omitempty"`
+ // TargetURL - Url to redirect the request to.
+ TargetURL *string `json:"targetUrl,omitempty"`
+ // IncludePath - Include path in the redirected url.
+ IncludePath *bool `json:"includePath,omitempty"`
+ // IncludeQueryString - Include query string in the redirected url.
+ IncludeQueryString *bool `json:"includeQueryString,omitempty"`
+ // RequestRoutingRules - Request routing specifying redirect configuration.
+ RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
+ // URLPathMaps - Url path maps specifying default redirect configuration.
+ URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
+ // PathRules - Path rules specifying redirect configuration.
+ PathRules *[]SubResource `json:"pathRules,omitempty"`
+}
+
+// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
+type ApplicationGatewayRequestRoutingRule struct {
+ *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of the request routing rule that is unique within an Application Gateway.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
+func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
+ objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
+ }
+ if agrrr.Name != nil {
+ objectMap["name"] = agrrr.Name
+ }
+ if agrrr.Etag != nil {
+ objectMap["etag"] = agrrr.Etag
+ }
+ if agrrr.Type != nil {
+ objectMap["type"] = agrrr.Type
+ }
+ if agrrr.ID != nil {
+ objectMap["id"] = agrrr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
+func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agrrr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agrrr.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agrrr.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agrrr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the application
+// gateway.
+type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
+ // RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
+ RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
+ // BackendAddressPool - Backend address pool resource of the application gateway.
+ BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
+ // BackendHTTPSettings - Backend http settings resource of the application gateway.
+ BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
+ // HTTPListener - Http listener resource of the application gateway.
+ HTTPListener *SubResource `json:"httpListener,omitempty"`
+ // URLPathMap - URL path map resource of the application gateway.
+ URLPathMap *SubResource `json:"urlPathMap,omitempty"`
+ // RedirectConfiguration - Redirect configuration resource of the application gateway.
+ RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
+ // ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ApplicationGatewaysBackendHealthFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ApplicationGatewaysCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ApplicationGatewaysDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ApplicationGatewaySku SKU of an application gateway
+type ApplicationGatewaySku struct {
+ // Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge'
+ Name ApplicationGatewaySkuName `json:"name,omitempty"`
+ // Tier - Tier of an application gateway. Possible values include: 'Standard', 'WAF'
+ Tier ApplicationGatewayTier `json:"tier,omitempty"`
+ // Capacity - Capacity (instance count) of an application gateway.
+ Capacity *int32 `json:"capacity,omitempty"`
+}
+
+// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
+type ApplicationGatewaySslCertificate struct {
+ *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of the SSL certificate that is unique within an Application Gateway.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
+func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
+ objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
+ }
+ if agsc.Name != nil {
+ objectMap["name"] = agsc.Name
+ }
+ if agsc.Etag != nil {
+ objectMap["etag"] = agsc.Etag
+ }
+ if agsc.Type != nil {
+ objectMap["type"] = agsc.Type
+ }
+ if agsc.ID != nil {
+ objectMap["id"] = agsc.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
+func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agsc.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agsc.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agsc.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agsc.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application gateway.
+type ApplicationGatewaySslCertificatePropertiesFormat struct {
+ // Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
+ Data *string `json:"data,omitempty"`
+ // Password - Password for the pfx file specified in data. Only applicable in PUT request.
+ Password *string `json:"password,omitempty"`
+ // PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
+ PublicCertData *string `json:"publicCertData,omitempty"`
+ // ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewaySslPolicy application Gateway Ssl policy.
+type ApplicationGatewaySslPolicy struct {
+ // DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
+ DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
+ // PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
+ PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
+ // PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
+ PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
+ // CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
+ CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
+ // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
+ MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
+}
+
+// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
+type ApplicationGatewaySslPredefinedPolicy struct {
+ autorest.Response `json:"-"`
+ // Name - Name of the Ssl predefined policy.
+ Name *string `json:"name,omitempty"`
+ *ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
+func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agspp.Name != nil {
+ objectMap["name"] = agspp.Name
+ }
+ if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
+ objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
+ }
+ if agspp.ID != nil {
+ objectMap["id"] = agspp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
+func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agspp.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agspp.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of ApplicationGatewaySslPredefinedPolicy
+type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
+ // CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
+ CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
+ // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
+ MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
+}
+
+// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ApplicationGatewaysStartFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ApplicationGatewaysStopFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ApplicationGatewaysUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.UpdateTagsResponder(ag.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
+// PathBasedRouting.
+type ApplicationGatewayURLPathMap struct {
+ *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of the URL path map that is unique within an Application Gateway.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
+func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
+ objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
+ }
+ if agupm.Name != nil {
+ objectMap["name"] = agupm.Name
+ }
+ if agupm.Etag != nil {
+ objectMap["etag"] = agupm.Etag
+ }
+ if agupm.Type != nil {
+ objectMap["type"] = agupm.Type
+ }
+ if agupm.ID != nil {
+ objectMap["id"] = agupm.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
+func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agupm.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agupm.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agupm.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agupm.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
+type ApplicationGatewayURLPathMapPropertiesFormat struct {
+ // DefaultBackendAddressPool - Default backend address pool resource of URL path map.
+ DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
+ // DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
+ DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
+ // DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
+ DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
+ // PathRules - Path rule of URL path map resource.
+ PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
+ // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
+// configuration.
+type ApplicationGatewayWebApplicationFirewallConfiguration struct {
+ // Enabled - Whether the web application firewall is enabled or not.
+ Enabled *bool `json:"enabled,omitempty"`
+ // FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
+ FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
+ // RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
+ RuleSetType *string `json:"ruleSetType,omitempty"`
+ // RuleSetVersion - The version of the rule set type.
+ RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
+ // DisabledRuleGroups - The disabled rule groups.
+ DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
+ // RequestBodyCheck - Whether allow WAF to check request Body.
+ RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
+ // MaxRequestBodySize - Maxium request body size for WAF.
+ MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
+}
+
+// ApplicationSecurityGroup an application security group in a resource group.
+type ApplicationSecurityGroup struct {
+ autorest.Response `json:"-"`
+ // ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
+ *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
+func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if asg.ApplicationSecurityGroupPropertiesFormat != nil {
+ objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
+ }
+ if asg.Etag != nil {
+ objectMap["etag"] = asg.Etag
+ }
+ if asg.ID != nil {
+ objectMap["id"] = asg.ID
+ }
+ if asg.Name != nil {
+ objectMap["name"] = asg.Name
+ }
+ if asg.Type != nil {
+ objectMap["type"] = asg.Type
+ }
+ if asg.Location != nil {
+ objectMap["location"] = asg.Location
+ }
+ if asg.Tags != nil {
+ objectMap["tags"] = asg.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
+func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
+ err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ asg.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ asg.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ asg.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ asg.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ asg.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ asg.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationSecurityGroupListResult a list of application security groups.
+type ApplicationSecurityGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of application security groups.
+ Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ApplicationSecurityGroupListResultIterator provides access to a complete listing of ApplicationSecurityGroup
+// values.
+type ApplicationSecurityGroupListResultIterator struct {
+ i int
+ page ApplicationSecurityGroupListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
+ if !iter.page.NotDone() {
+ return ApplicationSecurityGroup{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
+ return asglr.Value == nil || len(*asglr.Value) == 0
+}
+
+// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer() (*http.Request, error) {
+ if asglr.NextLink == nil || len(to.String(asglr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(asglr.NextLink)))
+}
+
+// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
+type ApplicationSecurityGroupListResultPage struct {
+ fn func(ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
+ asglr ApplicationSecurityGroupListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ApplicationSecurityGroupListResultPage) Next() error {
+ next, err := page.fn(page.asglr)
+ if err != nil {
+ return err
+ }
+ page.asglr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
+ return !page.asglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
+ return page.asglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
+ if page.asglr.IsEmpty() {
+ return nil
+ }
+ return *page.asglr.Value
+}
+
+// ApplicationSecurityGroupPropertiesFormat application security group properties.
+type ApplicationSecurityGroupPropertiesFormat struct {
+ // ResourceGUID - The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
+ asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ApplicationSecurityGroupsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations that
+// belongs to an ExpressRouteCircuit.
+type AuthorizationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The authorizations in an ExpressRoute Circuit.
+ Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// AuthorizationListResultIterator provides access to a complete listing of ExpressRouteCircuitAuthorization
+// values.
+type AuthorizationListResultIterator struct {
+ i int
+ page AuthorizationListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *AuthorizationListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter AuthorizationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
+ if !iter.page.NotDone() {
+ return ExpressRouteCircuitAuthorization{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (alr AuthorizationListResult) IsEmpty() bool {
+ return alr.Value == nil || len(*alr.Value) == 0
+}
+
+// authorizationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (alr AuthorizationListResult) authorizationListResultPreparer() (*http.Request, error) {
+ if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(alr.NextLink)))
+}
+
+// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
+type AuthorizationListResultPage struct {
+ fn func(AuthorizationListResult) (AuthorizationListResult, error)
+ alr AuthorizationListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *AuthorizationListResultPage) Next() error {
+ next, err := page.fn(page.alr)
+ if err != nil {
+ return err
+ }
+ page.alr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page AuthorizationListResultPage) NotDone() bool {
+ return !page.alr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page AuthorizationListResultPage) Response() AuthorizationListResult {
+ return page.alr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
+ if page.alr.IsEmpty() {
+ return nil
+ }
+ return *page.alr.Value
+}
+
+// AuthorizationPropertiesFormat ...
+type AuthorizationPropertiesFormat struct {
+ // AuthorizationKey - The authorization key.
+ AuthorizationKey *string `json:"authorizationKey,omitempty"`
+ // AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
+ AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// Availability availability of the metric.
+type Availability struct {
+ // TimeGrain - The time grain of the availability.
+ TimeGrain *string `json:"timeGrain,omitempty"`
+ // Retention - The retention of the availability.
+ Retention *string `json:"retention,omitempty"`
+ // BlobDuration - Duration of the availability blob.
+ BlobDuration *string `json:"blobDuration,omitempty"`
+}
+
+// AvailableProvidersList list of available countries with details.
+type AvailableProvidersList struct {
+ autorest.Response `json:"-"`
+ // Countries - List of available countries.
+ Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
+}
+
+// AvailableProvidersListCity city or town details.
+type AvailableProvidersListCity struct {
+ // CityName - The city or town name.
+ CityName *string `json:"cityName,omitempty"`
+ // Providers - A list of Internet service providers.
+ Providers *[]string `json:"providers,omitempty"`
+}
+
+// AvailableProvidersListCountry country details.
+type AvailableProvidersListCountry struct {
+ // CountryName - The country name.
+ CountryName *string `json:"countryName,omitempty"`
+ // Providers - A list of Internet service providers.
+ Providers *[]string `json:"providers,omitempty"`
+ // States - List of available states in the country.
+ States *[]AvailableProvidersListState `json:"states,omitempty"`
+}
+
+// AvailableProvidersListParameters constraints that determine the list of available Internet service providers.
+type AvailableProvidersListParameters struct {
+ // AzureLocations - A list of Azure regions.
+ AzureLocations *[]string `json:"azureLocations,omitempty"`
+ // Country - The country for available providers list.
+ Country *string `json:"country,omitempty"`
+ // State - The state for available providers list.
+ State *string `json:"state,omitempty"`
+ // City - The city or town for available providers list.
+ City *string `json:"city,omitempty"`
+}
+
+// AvailableProvidersListState state details.
+type AvailableProvidersListState struct {
+ // StateName - The state name.
+ StateName *string `json:"stateName,omitempty"`
+ // Providers - A list of Internet service providers.
+ Providers *[]string `json:"providers,omitempty"`
+ // Cities - List of available cities or towns in the state.
+ Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
+}
+
+// AzureAsyncOperationResult 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 - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
+ Status OperationStatus `json:"status,omitempty"`
+ Error *Error `json:"error,omitempty"`
+}
+
+// AzureReachabilityReport azure reachability report details.
+type AzureReachabilityReport struct {
+ autorest.Response `json:"-"`
+ // AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
+ AggregationLevel *string `json:"aggregationLevel,omitempty"`
+ ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
+ // ReachabilityReport - List of Azure reachability report items.
+ ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
+}
+
+// AzureReachabilityReportItem azure reachability report details for a given provider location.
+type AzureReachabilityReportItem struct {
+ // Provider - The Internet service provider.
+ Provider *string `json:"provider,omitempty"`
+ // AzureLocation - The Azure region.
+ AzureLocation *string `json:"azureLocation,omitempty"`
+ // Latencies - List of latency details for each of the time series.
+ Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
+}
+
+// AzureReachabilityReportLatencyInfo details on latency for a time series.
+type AzureReachabilityReportLatencyInfo struct {
+ // TimeStamp - The time stamp.
+ TimeStamp *date.Time `json:"timeStamp,omitempty"`
+ // Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
+ Score *int32 `json:"score,omitempty"`
+}
+
+// AzureReachabilityReportLocation parameters that define a geographic location.
+type AzureReachabilityReportLocation struct {
+ // Country - The name of the country.
+ Country *string `json:"country,omitempty"`
+ // State - The name of the state.
+ State *string `json:"state,omitempty"`
+ // City - The name of the city or town.
+ City *string `json:"city,omitempty"`
+}
+
+// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
+type AzureReachabilityReportParameters struct {
+ ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
+ // Providers - List of Internet service providers.
+ Providers *[]string `json:"providers,omitempty"`
+ // AzureLocations - Optional Azure regions to scope the query to.
+ AzureLocations *[]string `json:"azureLocations,omitempty"`
+ // StartTime - The start time for the Azure reachability report.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - The end time for the Azure reachability report.
+ EndTime *date.Time `json:"endTime,omitempty"`
+}
+
+// BackendAddressPool pool of backend IP addresses.
+type BackendAddressPool struct {
+ autorest.Response `json:"-"`
+ // BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
+ *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
+ // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for BackendAddressPool.
+func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if bap.BackendAddressPoolPropertiesFormat != nil {
+ objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
+ }
+ if bap.Name != nil {
+ objectMap["name"] = bap.Name
+ }
+ if bap.Etag != nil {
+ objectMap["etag"] = bap.Etag
+ }
+ if bap.ID != nil {
+ objectMap["id"] = bap.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
+func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
+ err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ bap.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ bap.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ bap.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// BackendAddressPoolPropertiesFormat properties of the backend address pool.
+type BackendAddressPoolPropertiesFormat struct {
+ // BackendIPConfigurations - Gets collection of references to IP addresses defined in network interfaces.
+ BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
+ // LoadBalancingRules - Gets load balancing rules that use this backend address pool.
+ LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
+ // OutboundNatRule - Gets outbound rules that use this backend address pool.
+ OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"`
+ // ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// BGPCommunity contains bgp community information offered in Service Community resources.
+type BGPCommunity struct {
+ // ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
+ ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
+ // CommunityName - The name of the bgp community. e.g. Skype.
+ CommunityName *string `json:"communityName,omitempty"`
+ // CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
+ CommunityValue *string `json:"communityValue,omitempty"`
+ // CommunityPrefixes - The prefixes that the bgp community contains.
+ CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
+ // IsAuthorizedToUse - Customer is authorized to use bgp community or not.
+ IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
+ // ServiceGroup - The service group of the bgp community contains.
+ ServiceGroup *string `json:"serviceGroup,omitempty"`
+}
+
+// BgpPeerStatus BGP peer status details
+type BgpPeerStatus struct {
+ // LocalAddress - The virtual network gateway's local address
+ LocalAddress *string `json:"localAddress,omitempty"`
+ // Neighbor - The remote BGP peer
+ Neighbor *string `json:"neighbor,omitempty"`
+ // Asn - The autonomous system number of the remote BGP peer
+ Asn *int32 `json:"asn,omitempty"`
+ // State - The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
+ State BgpPeerState `json:"state,omitempty"`
+ // ConnectedDuration - For how long the peering has been up
+ ConnectedDuration *string `json:"connectedDuration,omitempty"`
+ // RoutesReceived - The number of routes learned from this peer
+ RoutesReceived *int64 `json:"routesReceived,omitempty"`
+ // MessagesSent - The number of BGP messages sent
+ MessagesSent *int64 `json:"messagesSent,omitempty"`
+ // MessagesReceived - The number of BGP messages received
+ MessagesReceived *int64 `json:"messagesReceived,omitempty"`
+}
+
+// BgpPeerStatusListResult response for list BGP peer status API service call
+type BgpPeerStatusListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of BGP peers
+ Value *[]BgpPeerStatus `json:"value,omitempty"`
+}
+
+// BgpServiceCommunity service Community Properties.
+type BgpServiceCommunity struct {
+ *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for BgpServiceCommunity.
+func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if bsc.BgpServiceCommunityPropertiesFormat != nil {
+ objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
+ }
+ if bsc.ID != nil {
+ objectMap["id"] = bsc.ID
+ }
+ if bsc.Name != nil {
+ objectMap["name"] = bsc.Name
+ }
+ if bsc.Type != nil {
+ objectMap["type"] = bsc.Type
+ }
+ if bsc.Location != nil {
+ objectMap["location"] = bsc.Location
+ }
+ if bsc.Tags != nil {
+ objectMap["tags"] = bsc.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
+func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
+ err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ bsc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ bsc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ bsc.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ bsc.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ bsc.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
+type BgpServiceCommunityListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of service community resources.
+ Value *[]BgpServiceCommunity `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity values.
+type BgpServiceCommunityListResultIterator struct {
+ i int
+ page BgpServiceCommunityListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *BgpServiceCommunityListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
+ if !iter.page.NotDone() {
+ return BgpServiceCommunity{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
+ return bsclr.Value == nil || len(*bsclr.Value) == 0
+}
+
+// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer() (*http.Request, error) {
+ if bsclr.NextLink == nil || len(to.String(bsclr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(bsclr.NextLink)))
+}
+
+// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
+type BgpServiceCommunityListResultPage struct {
+ fn func(BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
+ bsclr BgpServiceCommunityListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *BgpServiceCommunityListResultPage) Next() error {
+ next, err := page.fn(page.bsclr)
+ if err != nil {
+ return err
+ }
+ page.bsclr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page BgpServiceCommunityListResultPage) NotDone() bool {
+ return !page.bsclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
+ return page.bsclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
+ if page.bsclr.IsEmpty() {
+ return nil
+ }
+ return *page.bsclr.Value
+}
+
+// BgpServiceCommunityPropertiesFormat properties of Service Community.
+type BgpServiceCommunityPropertiesFormat struct {
+ // ServiceName - The name of the bgp community. e.g. Skype.
+ ServiceName *string `json:"serviceName,omitempty"`
+ // BgpCommunities - Get a list of bgp communities.
+ BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
+}
+
+// BgpSettings BGP settings details
+type BgpSettings struct {
+ // Asn - The BGP speaker's ASN.
+ Asn *int64 `json:"asn,omitempty"`
+ // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
+ BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
+ // PeerWeight - The weight added to routes learned from this BGP speaker.
+ PeerWeight *int32 `json:"peerWeight,omitempty"`
+}
+
+// ConnectionMonitor parameters that define the operation to create a connection monitor.
+type ConnectionMonitor struct {
+ // Location - Connection monitor location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Connection monitor tags.
+ Tags map[string]*string `json:"tags"`
+ *ConnectionMonitorParameters `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ConnectionMonitor.
+func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cm.Location != nil {
+ objectMap["location"] = cm.Location
+ }
+ if cm.Tags != nil {
+ objectMap["tags"] = cm.Tags
+ }
+ if cm.ConnectionMonitorParameters != nil {
+ objectMap["properties"] = cm.ConnectionMonitorParameters
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
+func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ cm.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ cm.Tags = tags
+ }
+ case "properties":
+ if v != nil {
+ var connectionMonitorParameters ConnectionMonitorParameters
+ err = json.Unmarshal(*v, &connectionMonitorParameters)
+ if err != nil {
+ return err
+ }
+ cm.ConnectionMonitorParameters = &connectionMonitorParameters
+ }
+ }
+ }
+
+ return nil
+}
+
+// ConnectionMonitorDestination describes the destination of connection monitor.
+type ConnectionMonitorDestination struct {
+ // ResourceID - The ID of the resource used as the destination by connection monitor.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // Address - Address of the connection monitor destination (IP or domain name).
+ Address *string `json:"address,omitempty"`
+ // Port - The destination port used by connection monitor.
+ Port *int32 `json:"port,omitempty"`
+}
+
+// ConnectionMonitorListResult list of connection monitors.
+type ConnectionMonitorListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Information about connection monitors.
+ Value *[]ConnectionMonitorResult `json:"value,omitempty"`
+}
+
+// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
+type ConnectionMonitorParameters struct {
+ Source *ConnectionMonitorSource `json:"source,omitempty"`
+ Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
+ // AutoStart - Determines if the connection monitor will start automatically once created.
+ AutoStart *bool `json:"autoStart,omitempty"`
+ // MonitoringIntervalInSeconds - Monitoring interval in seconds.
+ MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
+}
+
+// ConnectionMonitorQueryResult list of connection states snaphots.
+type ConnectionMonitorQueryResult struct {
+ autorest.Response `json:"-"`
+ // SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive'
+ SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
+ // States - Information about connection states.
+ States *[]ConnectionStateSnapshot `json:"states,omitempty"`
+}
+
+// ConnectionMonitorResult information about the connection monitor.
+type ConnectionMonitorResult struct {
+ autorest.Response `json:"-"`
+ // Name - Name of the connection monitor.
+ Name *string `json:"name,omitempty"`
+ // ID - ID of the connection monitor.
+ ID *string `json:"id,omitempty"`
+ Etag *string `json:"etag,omitempty"`
+ // Type - Connection monitor type.
+ Type *string `json:"type,omitempty"`
+ // Location - Connection monitor location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Connection monitor tags.
+ Tags map[string]*string `json:"tags"`
+ *ConnectionMonitorResultProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
+func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cmr.Name != nil {
+ objectMap["name"] = cmr.Name
+ }
+ if cmr.ID != nil {
+ objectMap["id"] = cmr.ID
+ }
+ if cmr.Etag != nil {
+ objectMap["etag"] = cmr.Etag
+ }
+ if cmr.Type != nil {
+ objectMap["type"] = cmr.Type
+ }
+ if cmr.Location != nil {
+ objectMap["location"] = cmr.Location
+ }
+ if cmr.Tags != nil {
+ objectMap["tags"] = cmr.Tags
+ }
+ if cmr.ConnectionMonitorResultProperties != nil {
+ objectMap["properties"] = cmr.ConnectionMonitorResultProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
+func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cmr.Name = &name
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ cmr.ID = &ID
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ cmr.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cmr.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ cmr.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ cmr.Tags = tags
+ }
+ case "properties":
+ if v != nil {
+ var connectionMonitorResultProperties ConnectionMonitorResultProperties
+ err = json.Unmarshal(*v, &connectionMonitorResultProperties)
+ if err != nil {
+ return err
+ }
+ cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// ConnectionMonitorResultProperties describes the properties of a connection monitor.
+type ConnectionMonitorResultProperties struct {
+ // ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // StartTime - The date and time when the connection monitor was started.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // MonitoringStatus - The monitoring status of the connection monitor.
+ MonitoringStatus *string `json:"monitoringStatus,omitempty"`
+ Source *ConnectionMonitorSource `json:"source,omitempty"`
+ Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
+ // AutoStart - Determines if the connection monitor will start automatically once created.
+ AutoStart *bool `json:"autoStart,omitempty"`
+ // MonitoringIntervalInSeconds - Monitoring interval in seconds.
+ MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
+}
+
+// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ConnectionMonitorsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
+ cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ConnectionMonitorsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ConnectionMonitorSource describes the source of connection monitor.
+type ConnectionMonitorSource struct {
+ // ResourceID - The ID of the resource used as the source by connection monitor.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // Port - The source port used by connection monitor.
+ Port *int32 `json:"port,omitempty"`
+}
+
+// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ConnectionMonitorsQueryFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
+ cmqr, err = client.QueryResponder(cmqr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ConnectionMonitorsStartFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ConnectionMonitorsStopFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ConnectionResetSharedKey the virtual network connection reset shared key
+type ConnectionResetSharedKey struct {
+ autorest.Response `json:"-"`
+ // KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
+ KeyLength *int32 `json:"keyLength,omitempty"`
+}
+
+// ConnectionSharedKey response for GetConnectionSharedKey API service call
+type ConnectionSharedKey struct {
+ autorest.Response `json:"-"`
+ // Value - The virtual network connection shared key value.
+ Value *string `json:"value,omitempty"`
+}
+
+// ConnectionStateSnapshot connection state snapshot.
+type ConnectionStateSnapshot struct {
+ // ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
+ ConnectionState ConnectionState `json:"connectionState,omitempty"`
+ // StartTime - The start time of the connection snapshot.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - The end time of the connection snapshot.
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
+ EvaluationState EvaluationState `json:"evaluationState,omitempty"`
+ // Hops - List of hops between the source and the destination.
+ Hops *[]ConnectivityHop `json:"hops,omitempty"`
+}
+
+// ConnectivityDestination parameters that define destination of connection.
+type ConnectivityDestination struct {
+ // ResourceID - The ID of the resource to which a connection attempt will be made.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // Address - The IP address or URI the resource to which a connection attempt will be made.
+ Address *string `json:"address,omitempty"`
+ // Port - Port on which check connectivity will be performed.
+ Port *int32 `json:"port,omitempty"`
+}
+
+// ConnectivityHop information about a hop between the source and the destination.
+type ConnectivityHop struct {
+ // Type - The type of the hop.
+ Type *string `json:"type,omitempty"`
+ // ID - The ID of the hop.
+ ID *string `json:"id,omitempty"`
+ // Address - The IP address of the hop.
+ Address *string `json:"address,omitempty"`
+ // ResourceID - The ID of the resource corresponding to this hop.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // NextHopIds - List of next hop identifiers.
+ NextHopIds *[]string `json:"nextHopIds,omitempty"`
+ // Issues - List of issues.
+ Issues *[]ConnectivityIssue `json:"issues,omitempty"`
+}
+
+// ConnectivityInformation information on the connectivity status.
+type ConnectivityInformation struct {
+ autorest.Response `json:"-"`
+ // Hops - List of hops between the source and the destination.
+ Hops *[]ConnectivityHop `json:"hops,omitempty"`
+ // ConnectionStatus - The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
+ ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
+ // AvgLatencyInMs - Average latency in milliseconds.
+ AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
+ // MinLatencyInMs - Minimum latency in milliseconds.
+ MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
+ // MaxLatencyInMs - Maximum latency in milliseconds.
+ MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
+ // ProbesSent - Total number of probes sent.
+ ProbesSent *int32 `json:"probesSent,omitempty"`
+ // ProbesFailed - Number of failed probes.
+ ProbesFailed *int32 `json:"probesFailed,omitempty"`
+}
+
+// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
+type ConnectivityIssue struct {
+ // Origin - The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
+ Origin Origin `json:"origin,omitempty"`
+ // Severity - The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
+ Severity Severity `json:"severity,omitempty"`
+ // Type - The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
+ Type IssueType `json:"type,omitempty"`
+ // Context - Provides additional context on the issue.
+ Context *[]map[string]*string `json:"context,omitempty"`
+}
+
+// ConnectivityParameters parameters that determine how the connectivity check will be performed.
+type ConnectivityParameters struct {
+ Source *ConnectivitySource `json:"source,omitempty"`
+ Destination *ConnectivityDestination `json:"destination,omitempty"`
+ // Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
+ Protocol Protocol `json:"protocol,omitempty"`
+ ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
+}
+
+// ConnectivitySource parameters that define the source of the connection.
+type ConnectivitySource struct {
+ // ResourceID - The ID of the resource from which a connectivity check will be initiated.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // Port - The source port from which a connectivity check will be performed.
+ Port *int32 `json:"port,omitempty"`
+}
+
+// DdosProtectionPlan a DDoS protection plan in a resource group.
+type DdosProtectionPlan struct {
+ autorest.Response `json:"-"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+ // DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
+ *DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DdosProtectionPlan.
+func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dpp.ID != nil {
+ objectMap["id"] = dpp.ID
+ }
+ if dpp.Name != nil {
+ objectMap["name"] = dpp.Name
+ }
+ if dpp.Type != nil {
+ objectMap["type"] = dpp.Type
+ }
+ if dpp.Location != nil {
+ objectMap["location"] = dpp.Location
+ }
+ if dpp.Tags != nil {
+ objectMap["tags"] = dpp.Tags
+ }
+ if dpp.DdosProtectionPlanPropertiesFormat != nil {
+ objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
+ }
+ if dpp.Etag != nil {
+ objectMap["etag"] = dpp.Etag
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
+func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ dpp.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ dpp.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ dpp.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ dpp.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ dpp.Tags = tags
+ }
+ case "properties":
+ if v != nil {
+ var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
+ err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ dpp.Etag = &etag
+ }
+ }
+ }
+
+ return nil
+}
+
+// DdosProtectionPlanListResult a list of DDoS protection plans.
+type DdosProtectionPlanListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of DDoS protection plans.
+ Value *[]DdosProtectionPlan `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
+type DdosProtectionPlanListResultIterator struct {
+ i int
+ page DdosProtectionPlanListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DdosProtectionPlanListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
+ if !iter.page.NotDone() {
+ return DdosProtectionPlan{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
+ return dpplr.Value == nil || len(*dpplr.Value) == 0
+}
+
+// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer() (*http.Request, error) {
+ if dpplr.NextLink == nil || len(to.String(dpplr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dpplr.NextLink)))
+}
+
+// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
+type DdosProtectionPlanListResultPage struct {
+ fn func(DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
+ dpplr DdosProtectionPlanListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DdosProtectionPlanListResultPage) Next() error {
+ next, err := page.fn(page.dpplr)
+ if err != nil {
+ return err
+ }
+ page.dpplr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DdosProtectionPlanListResultPage) NotDone() bool {
+ return !page.dpplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
+ return page.dpplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
+ if page.dpplr.IsEmpty() {
+ return nil
+ }
+ return *page.dpplr.Value
+}
+
+// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
+type DdosProtectionPlanPropertiesFormat struct {
+ // ResourceGUID - The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // VirtualNetworks - The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
+ VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
+}
+
+// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type DdosProtectionPlansCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
+ dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type DdosProtectionPlansDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// DhcpOptions 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 - The list of DNS servers IP addresses.
+ DNSServers *[]string `json:"dnsServers,omitempty"`
+}
+
+// Dimension dimension of the metric.
+type Dimension struct {
+ // Name - The name of the dimension.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The display name of the dimension.
+ DisplayName *string `json:"displayName,omitempty"`
+ // InternalName - The internal name of the dimension.
+ InternalName *string `json:"internalName,omitempty"`
+}
+
+// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
+type DNSNameAvailabilityResult struct {
+ autorest.Response `json:"-"`
+ // Available - Domain availability (True/False).
+ Available *bool `json:"available,omitempty"`
+}
+
+// EffectiveNetworkSecurityGroup effective network security group.
+type EffectiveNetworkSecurityGroup struct {
+ // NetworkSecurityGroup - The ID of network security group that is applied.
+ NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
+ // Association - Associated resources.
+ Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
+ // EffectiveSecurityRules - A collection of effective security rules.
+ EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
+ // TagMap - Mapping of tags to list of IP Addresses included within the tag.
+ TagMap map[string][]string `json:"tagMap"`
+}
+
+// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
+func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ensg.NetworkSecurityGroup != nil {
+ objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
+ }
+ if ensg.Association != nil {
+ objectMap["association"] = ensg.Association
+ }
+ if ensg.EffectiveSecurityRules != nil {
+ objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
+ }
+ if ensg.TagMap != nil {
+ objectMap["tagMap"] = ensg.TagMap
+ }
+ return json.Marshal(objectMap)
+}
+
+// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
+type EffectiveNetworkSecurityGroupAssociation struct {
+ // Subnet - The ID of the subnet if assigned.
+ Subnet *SubResource `json:"subnet,omitempty"`
+ // NetworkInterface - The ID of the network interface if assigned.
+ NetworkInterface *SubResource `json:"networkInterface,omitempty"`
+}
+
+// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service call.
+type EffectiveNetworkSecurityGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of effective network security groups.
+ Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// EffectiveNetworkSecurityRule effective network security rules.
+type EffectiveNetworkSecurityRule struct {
+ // Name - The name of the security rule specified by the user (if created by the user).
+ Name *string `json:"name,omitempty"`
+ // Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'TCP', 'UDP', 'All'
+ Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
+ // SourcePortRange - The source port or range.
+ SourcePortRange *string `json:"sourcePortRange,omitempty"`
+ // DestinationPortRange - The destination port or range.
+ DestinationPortRange *string `json:"destinationPortRange,omitempty"`
+ // SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as seperator (e.g. 100-400), or an asterix (*)
+ SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
+ // DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as seperator (e.g. 100-400), or an asterix (*)
+ DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
+ // SourceAddressPrefix - The source address prefix.
+ SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
+ // DestinationAddressPrefix - The destination address prefix.
+ DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
+ // SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*).
+ SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
+ // DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*).
+ DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
+ // ExpandedSourceAddressPrefix - The expanded source address prefix.
+ ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
+ // ExpandedDestinationAddressPrefix - Expanded destination address prefix.
+ ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
+ // Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
+ Access SecurityRuleAccess `json:"access,omitempty"`
+ // Priority - The priority of the rule.
+ Priority *int32 `json:"priority,omitempty"`
+ // Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
+ Direction SecurityRuleDirection `json:"direction,omitempty"`
+}
+
+// EffectiveRoute effective Route
+type EffectiveRoute struct {
+ // Name - The name of the user defined route. This is optional.
+ Name *string `json:"name,omitempty"`
+ // Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
+ Source EffectiveRouteSource `json:"source,omitempty"`
+ // State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid'
+ State EffectiveRouteState `json:"state,omitempty"`
+ // AddressPrefix - The address prefixes of the effective routes in CIDR notation.
+ AddressPrefix *[]string `json:"addressPrefix,omitempty"`
+ // NextHopIPAddress - The IP address of the next hop of the effective route.
+ NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
+ // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
+ NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
+}
+
+// EffectiveRouteListResult response for list effective route API service call.
+type EffectiveRouteListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of effective routes.
+ Value *[]EffectiveRoute `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// EndpointServiceResult endpoint service.
+type EndpointServiceResult struct {
+ // Name - Name of the endpoint service.
+ Name *string `json:"name,omitempty"`
+ // Type - Type of the endpoint service.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
+type EndpointServicesListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of available endpoint services in a region.
+ Value *[]EndpointServiceResult `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult values.
+type EndpointServicesListResultIterator struct {
+ i int
+ page EndpointServicesListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *EndpointServicesListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter EndpointServicesListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
+ if !iter.page.NotDone() {
+ return EndpointServiceResult{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (eslr EndpointServicesListResult) IsEmpty() bool {
+ return eslr.Value == nil || len(*eslr.Value) == 0
+}
+
+// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (eslr EndpointServicesListResult) endpointServicesListResultPreparer() (*http.Request, error) {
+ if eslr.NextLink == nil || len(to.String(eslr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(eslr.NextLink)))
+}
+
+// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
+type EndpointServicesListResultPage struct {
+ fn func(EndpointServicesListResult) (EndpointServicesListResult, error)
+ eslr EndpointServicesListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *EndpointServicesListResultPage) Next() error {
+ next, err := page.fn(page.eslr)
+ if err != nil {
+ return err
+ }
+ page.eslr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page EndpointServicesListResultPage) NotDone() bool {
+ return !page.eslr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
+ return page.eslr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
+ if page.eslr.IsEmpty() {
+ return nil
+ }
+ return *page.eslr.Value
+}
+
+// Error ...
+type Error struct {
+ Code *string `json:"code,omitempty"`
+ Message *string `json:"message,omitempty"`
+ Target *string `json:"target,omitempty"`
+ Details *[]ErrorDetails `json:"details,omitempty"`
+ InnerError *string `json:"innerError,omitempty"`
+}
+
+// ErrorDetails ...
+type ErrorDetails struct {
+ Code *string `json:"code,omitempty"`
+ Target *string `json:"target,omitempty"`
+ Message *string `json:"message,omitempty"`
+}
+
+// ExpressRouteCircuit expressRouteCircuit resource
+type ExpressRouteCircuit struct {
+ autorest.Response `json:"-"`
+ // Sku - The SKU.
+ Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
+ *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
+ // Etag - Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
+func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if erc.Sku != nil {
+ objectMap["sku"] = erc.Sku
+ }
+ if erc.ExpressRouteCircuitPropertiesFormat != nil {
+ objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
+ }
+ if erc.Etag != nil {
+ objectMap["etag"] = erc.Etag
+ }
+ if erc.ID != nil {
+ objectMap["id"] = erc.ID
+ }
+ if erc.Name != nil {
+ objectMap["name"] = erc.Name
+ }
+ if erc.Type != nil {
+ objectMap["type"] = erc.Type
+ }
+ if erc.Location != nil {
+ objectMap["location"] = erc.Location
+ }
+ if erc.Tags != nil {
+ objectMap["tags"] = erc.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
+func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "sku":
+ if v != nil {
+ var sku ExpressRouteCircuitSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ erc.Sku = &sku
+ }
+ case "properties":
+ if v != nil {
+ var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
+ err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ erc.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ erc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ erc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ erc.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ erc.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ erc.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
+type ExpressRouteCircuitArpTable struct {
+ // Age - Entry age in minutes
+ Age *int32 `json:"age,omitempty"`
+ // Interface - Interface address
+ Interface *string `json:"interface,omitempty"`
+ // IPAddress - The IP address.
+ IPAddress *string `json:"ipAddress,omitempty"`
+ // MacAddress - The MAC address.
+ MacAddress *string `json:"macAddress,omitempty"`
+}
+
+// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
+type ExpressRouteCircuitAuthorization struct {
+ autorest.Response `json:"-"`
+ *AuthorizationPropertiesFormat `json:"properties,omitempty"`
+ // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
+func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if erca.AuthorizationPropertiesFormat != nil {
+ objectMap["properties"] = erca.AuthorizationPropertiesFormat
+ }
+ if erca.Name != nil {
+ objectMap["name"] = erca.Name
+ }
+ if erca.Etag != nil {
+ objectMap["etag"] = erca.Etag
+ }
+ if erca.ID != nil {
+ objectMap["id"] = erca.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
+func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var authorizationPropertiesFormat AuthorizationPropertiesFormat
+ err = json.Unmarshal(*v, &authorizationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ erca.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ erca.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ erca.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering resource.
+type ExpressRouteCircuitConnection struct {
+ autorest.Response `json:"-"`
+ *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
+ // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
+func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
+ objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
+ }
+ if ercc.Name != nil {
+ objectMap["name"] = ercc.Name
+ }
+ if ercc.Etag != nil {
+ objectMap["etag"] = ercc.Etag
+ }
+ if ercc.ID != nil {
+ objectMap["id"] = ercc.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
+func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
+ err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ercc.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ ercc.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ercc.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRouteCircuitConnectionPropertiesFormat ...
+type ExpressRouteCircuitConnectionPropertiesFormat struct {
+ // ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
+ ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
+ // PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
+ PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
+ // AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
+ AddressPrefix *string `json:"addressPrefix,omitempty"`
+ // AuthorizationKey - The authorization key.
+ AuthorizationKey *string `json:"authorizationKey,omitempty"`
+ // CircuitConnectionStatus - Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
+ CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
+ // ProvisioningState - Provisioning state of the circuit connection resource. Possible values are: 'Succeded', 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
+ ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitConnectionsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
+type ExpressRouteCircuitListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of ExpressRouteCircuits in a resource group.
+ Value *[]ExpressRouteCircuit `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit values.
+type ExpressRouteCircuitListResultIterator struct {
+ i int
+ page ExpressRouteCircuitListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ExpressRouteCircuitListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
+ if !iter.page.NotDone() {
+ return ExpressRouteCircuit{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
+ return erclr.Value == nil || len(*erclr.Value) == 0
+}
+
+// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer() (*http.Request, error) {
+ if erclr.NextLink == nil || len(to.String(erclr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(erclr.NextLink)))
+}
+
+// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
+type ExpressRouteCircuitListResultPage struct {
+ fn func(ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
+ erclr ExpressRouteCircuitListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ExpressRouteCircuitListResultPage) Next() error {
+ next, err := page.fn(page.erclr)
+ if err != nil {
+ return err
+ }
+ page.erclr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ExpressRouteCircuitListResultPage) NotDone() bool {
+ return !page.erclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
+ return page.erclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
+ if page.erclr.IsEmpty() {
+ return nil
+ }
+ return *page.erclr.Value
+}
+
+// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
+type ExpressRouteCircuitPeering struct {
+ autorest.Response `json:"-"`
+ *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
+ // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
+func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
+ objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
+ }
+ if ercp.Name != nil {
+ objectMap["name"] = ercp.Name
+ }
+ if ercp.Etag != nil {
+ objectMap["etag"] = ercp.Etag
+ }
+ if ercp.ID != nil {
+ objectMap["id"] = ercp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
+func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
+ err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ercp.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ ercp.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ercp.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
+type ExpressRouteCircuitPeeringConfig struct {
+ // AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
+ AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
+ // AdvertisedCommunities - The communities of bgp peering. Spepcified for microsoft peering
+ AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
+ // AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
+ AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
+ // LegacyMode - The legacy mode of the peering.
+ LegacyMode *int32 `json:"legacyMode,omitempty"`
+ // CustomerASN - The CustomerASN of the peering.
+ CustomerASN *int32 `json:"customerASN,omitempty"`
+ // RoutingRegistryName - The RoutingRegistryName of the configuration.
+ RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
+}
+
+// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings that
+// belong to an ExpressRouteCircuit.
+type ExpressRouteCircuitPeeringListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The peerings in an express route circuit.
+ Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of ExpressRouteCircuitPeering
+// values.
+type ExpressRouteCircuitPeeringListResultIterator struct {
+ i int
+ page ExpressRouteCircuitPeeringListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
+ if !iter.page.NotDone() {
+ return ExpressRouteCircuitPeering{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
+ return ercplr.Value == nil || len(*ercplr.Value) == 0
+}
+
+// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer() (*http.Request, error) {
+ if ercplr.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ercplr.NextLink)))
+}
+
+// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
+type ExpressRouteCircuitPeeringListResultPage struct {
+ fn func(ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
+ ercplr ExpressRouteCircuitPeeringListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
+ next, err := page.fn(page.ercplr)
+ if err != nil {
+ return err
+ }
+ page.ercplr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
+ return !page.ercplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
+ return page.ercplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
+ if page.ercplr.IsEmpty() {
+ return nil
+ }
+ return *page.ercplr.Value
+}
+
+// ExpressRouteCircuitPeeringPropertiesFormat ...
+type ExpressRouteCircuitPeeringPropertiesFormat struct {
+ // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
+ PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
+ // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
+ State ExpressRoutePeeringState `json:"state,omitempty"`
+ // AzureASN - The Azure ASN.
+ AzureASN *int32 `json:"azureASN,omitempty"`
+ // PeerASN - The peer ASN.
+ PeerASN *int64 `json:"peerASN,omitempty"`
+ // PrimaryPeerAddressPrefix - The primary address prefix.
+ PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
+ // SecondaryPeerAddressPrefix - The secondary address prefix.
+ SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
+ // PrimaryAzurePort - The primary port.
+ PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
+ // SecondaryAzurePort - The secondary port.
+ SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
+ // SharedKey - The shared key.
+ SharedKey *string `json:"sharedKey,omitempty"`
+ // VlanID - The VLAN ID.
+ VlanID *int32 `json:"vlanId,omitempty"`
+ // MicrosoftPeeringConfig - The Microsoft peering configuration.
+ MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
+ // Stats - Gets peering stats.
+ Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // GatewayManagerEtag - The GatewayManager Etag.
+ GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
+ // LastModifiedBy - Gets whether the provider or the customer last modified the peering.
+ LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
+ // RouteFilter - The reference of the RouteFilter resource.
+ RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
+ // Ipv6PeeringConfig - The IPv6 peering configuration.
+ Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
+ // Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
+ Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
+}
+
+// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitPeeringsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
+type ExpressRouteCircuitPropertiesFormat struct {
+ // AllowClassicOperations - Allow classic operations
+ AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
+ // CircuitProvisioningState - The CircuitProvisioningState state of the resource.
+ CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
+ // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
+ ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
+ // Authorizations - The list of authorizations.
+ Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
+ // Peerings - The list of peerings.
+ Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
+ // ServiceKey - The ServiceKey.
+ ServiceKey *string `json:"serviceKey,omitempty"`
+ // ServiceProviderNotes - The ServiceProviderNotes.
+ ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
+ // ServiceProviderProperties - The ServiceProviderProperties.
+ ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // GatewayManagerEtag - The GatewayManager Etag.
+ GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
+}
+
+// ExpressRouteCircuitReference ...
+type ExpressRouteCircuitReference struct {
+ // ID - Corresponding Express Route Circuit Id.
+ ID *string `json:"id,omitempty"`
+}
+
+// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
+type ExpressRouteCircuitRoutesTable struct {
+ // NetworkProperty - IP address of a network entity
+ NetworkProperty *string `json:"network,omitempty"`
+ // NextHop - NextHop address
+ NextHop *string `json:"nextHop,omitempty"`
+ // LocPrf - Local preference value as set with the set local-preference route-map configuration command
+ LocPrf *string `json:"locPrf,omitempty"`
+ // Weight - Route Weight.
+ Weight *int32 `json:"weight,omitempty"`
+ // Path - Autonomous system paths to the destination network.
+ Path *string `json:"path,omitempty"`
+}
+
+// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
+type ExpressRouteCircuitRoutesTableSummary struct {
+ // Neighbor - IP address of the neighbor.
+ Neighbor *string `json:"neighbor,omitempty"`
+ // V - BGP version number spoken to the neighbor.
+ V *int32 `json:"v,omitempty"`
+ // As - Autonomous system number.
+ As *int32 `json:"as,omitempty"`
+ // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state.
+ UpDown *string `json:"upDown,omitempty"`
+ // StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
+ StatePfxRcd *string `json:"statePfxRcd,omitempty"`
+}
+
+// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route Circuits API.
+type ExpressRouteCircuitsArpTableListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets list of the ARP table.
+ Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ExpressRouteCircuitsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an ExpressRouteCircuit.
+type ExpressRouteCircuitServiceProviderProperties struct {
+ // ServiceProviderName - The serviceProviderName.
+ ServiceProviderName *string `json:"serviceProviderName,omitempty"`
+ // PeeringLocation - The peering location.
+ PeeringLocation *string `json:"peeringLocation,omitempty"`
+ // BandwidthInMbps - The BandwidthInMbps.
+ BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
+}
+
+// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
+type ExpressRouteCircuitSku struct {
+ // Name - The name of the SKU.
+ Name *string `json:"name,omitempty"`
+ // Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium'
+ Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
+ // Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
+ Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
+}
+
+// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitsListArpTableFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitsListRoutesTableFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
+// Circuits API.
+type ExpressRouteCircuitsRoutesTableListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of routes table.
+ Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the Express Route
+// Circuits API.
+type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of the routes table.
+ Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteCircuitStats contains stats associated with the peering.
+type ExpressRouteCircuitStats struct {
+ autorest.Response `json:"-"`
+ // PrimarybytesIn - Gets BytesIn of the peering.
+ PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
+ // PrimarybytesOut - Gets BytesOut of the peering.
+ PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
+ // SecondarybytesIn - Gets BytesIn of the peering.
+ SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
+ // SecondarybytesOut - Gets BytesOut of the peering.
+ SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
+}
+
+// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ExpressRouteCircuitsUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.UpdateTagsResponder(erc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteCrossConnection expressRouteCrossConnection resource
+type ExpressRouteCrossConnection struct {
+ autorest.Response `json:"-"`
+ *ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
+ // Etag - Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
+func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ercc.ExpressRouteCrossConnectionProperties != nil {
+ objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
+ }
+ if ercc.Etag != nil {
+ objectMap["etag"] = ercc.Etag
+ }
+ if ercc.ID != nil {
+ objectMap["id"] = ercc.ID
+ }
+ if ercc.Name != nil {
+ objectMap["name"] = ercc.Name
+ }
+ if ercc.Type != nil {
+ objectMap["type"] = ercc.Type
+ }
+ if ercc.Location != nil {
+ objectMap["location"] = ercc.Location
+ }
+ if ercc.Tags != nil {
+ objectMap["tags"] = ercc.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
+func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
+ err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
+ if err != nil {
+ return err
+ }
+ ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ ercc.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ercc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ercc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ercc.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ ercc.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ercc.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
+type ExpressRouteCrossConnectionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of ExpressRouteCrossConnection resources.
+ Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
+// ExpressRouteCrossConnection values.
+type ExpressRouteCrossConnectionListResultIterator struct {
+ i int
+ page ExpressRouteCrossConnectionListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
+ if !iter.page.NotDone() {
+ return ExpressRouteCrossConnection{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
+ return ercclr.Value == nil || len(*ercclr.Value) == 0
+}
+
+// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer() (*http.Request, error) {
+ if ercclr.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ercclr.NextLink)))
+}
+
+// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
+type ExpressRouteCrossConnectionListResultPage struct {
+ fn func(ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
+ ercclr ExpressRouteCrossConnectionListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
+ next, err := page.fn(page.ercclr)
+ if err != nil {
+ return err
+ }
+ page.ercclr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
+ return !page.ercclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
+ return page.ercclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
+ if page.ercclr.IsEmpty() {
+ return nil
+ }
+ return *page.ercclr.Value
+}
+
+// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
+type ExpressRouteCrossConnectionPeering struct {
+ autorest.Response `json:"-"`
+ *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
+ // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
+func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
+ objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
+ }
+ if erccp.Name != nil {
+ objectMap["name"] = erccp.Name
+ }
+ if erccp.Etag != nil {
+ objectMap["etag"] = erccp.Etag
+ }
+ if erccp.ID != nil {
+ objectMap["id"] = erccp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
+func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
+ err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
+ if err != nil {
+ return err
+ }
+ erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ erccp.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ erccp.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ erccp.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings that
+// belong to an ExpressRouteCrossConnection.
+type ExpressRouteCrossConnectionPeeringList struct {
+ autorest.Response `json:"-"`
+ // Value - The peerings in an express route cross connection.
+ Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
+// ExpressRouteCrossConnectionPeering values.
+type ExpressRouteCrossConnectionPeeringListIterator struct {
+ i int
+ page ExpressRouteCrossConnectionPeeringListPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
+ if !iter.page.NotDone() {
+ return ExpressRouteCrossConnectionPeering{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
+ return erccpl.Value == nil || len(*erccpl.Value) == 0
+}
+
+// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer() (*http.Request, error) {
+ if erccpl.NextLink == nil || len(to.String(erccpl.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(erccpl.NextLink)))
+}
+
+// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
+type ExpressRouteCrossConnectionPeeringListPage struct {
+ fn func(ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
+ erccpl ExpressRouteCrossConnectionPeeringList
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
+ next, err := page.fn(page.erccpl)
+ if err != nil {
+ return err
+ }
+ page.erccpl = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
+ return !page.erccpl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
+ return page.erccpl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
+ if page.erccpl.IsEmpty() {
+ return nil
+ }
+ return *page.erccpl.Value
+}
+
+// ExpressRouteCrossConnectionPeeringProperties ...
+type ExpressRouteCrossConnectionPeeringProperties struct {
+ // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
+ PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
+ // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
+ State ExpressRoutePeeringState `json:"state,omitempty"`
+ // AzureASN - The Azure ASN.
+ AzureASN *int32 `json:"azureASN,omitempty"`
+ // PeerASN - The peer ASN.
+ PeerASN *int64 `json:"peerASN,omitempty"`
+ // PrimaryPeerAddressPrefix - The primary address prefix.
+ PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
+ // SecondaryPeerAddressPrefix - The secondary address prefix.
+ SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
+ // PrimaryAzurePort - The primary port.
+ PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
+ // SecondaryAzurePort - The secondary port.
+ SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
+ // SharedKey - The shared key.
+ SharedKey *string `json:"sharedKey,omitempty"`
+ // VlanID - The VLAN ID.
+ VlanID *int32 `json:"vlanId,omitempty"`
+ // MicrosoftPeeringConfig - The Microsoft peering configuration.
+ MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // GatewayManagerEtag - The GatewayManager Etag.
+ GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
+ // LastModifiedBy - Gets whether the provider or the customer last modified the peering.
+ LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
+ // Ipv6PeeringConfig - The IPv6 peering configuration.
+ Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
+}
+
+// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
+ erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
+type ExpressRouteCrossConnectionProperties struct {
+ // PrimaryAzurePort - The name of the primary port.
+ PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
+ // SecondaryAzurePort - The name of the secondary port.
+ SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
+ // STag - The identifier of the circuit traffic.
+ STag *int32 `json:"sTag,omitempty"`
+ // PeeringLocation - The peering location of the ExpressRoute circuit.
+ PeeringLocation *string `json:"peeringLocation,omitempty"`
+ // BandwidthInMbps - The circuit bandwidth In Mbps.
+ BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
+ // ExpressRouteCircuit - The ExpressRouteCircuit
+ ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
+ // ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
+ ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
+ // ServiceProviderNotes - Additional read only notes set by the connectivity provider.
+ ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // Peerings - The list of peerings.
+ Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
+}
+
+// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
+type ExpressRouteCrossConnectionRoutesTableSummary struct {
+ // Neighbor - IP address of Neighbor router
+ Neighbor *string `json:"neighbor,omitempty"`
+ // Asn - Autonomous system number.
+ Asn *int32 `json:"asn,omitempty"`
+ // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state.
+ UpDown *string `json:"upDown,omitempty"`
+ // StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
+ StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
+}
+
+// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
+ ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCrossConnectionsListArpTableFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCrossConnectionsListArpTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with the
+// Express Route Cross Connections.
+type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of the routes table.
+ Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
+ ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
+type ExpressRouteServiceProvider struct {
+ *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
+func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
+ objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
+ }
+ if ersp.ID != nil {
+ objectMap["id"] = ersp.ID
+ }
+ if ersp.Name != nil {
+ objectMap["name"] = ersp.Name
+ }
+ if ersp.Type != nil {
+ objectMap["type"] = ersp.Type
+ }
+ if ersp.Location != nil {
+ objectMap["location"] = ersp.Location
+ }
+ if ersp.Tags != nil {
+ objectMap["tags"] = ersp.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
+func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
+ err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ersp.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ersp.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ersp.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ ersp.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ersp.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
+// resources.
+type ExpressRouteServiceProviderBandwidthsOffered struct {
+ // OfferName - The OfferName.
+ OfferName *string `json:"offerName,omitempty"`
+ // ValueInMbps - The ValueInMbps.
+ ValueInMbps *int32 `json:"valueInMbps,omitempty"`
+}
+
+// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
+type ExpressRouteServiceProviderListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of ExpressRouteResourceProvider resources.
+ Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
+// ExpressRouteServiceProvider values.
+type ExpressRouteServiceProviderListResultIterator struct {
+ i int
+ page ExpressRouteServiceProviderListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
+ if !iter.page.NotDone() {
+ return ExpressRouteServiceProvider{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
+ return ersplr.Value == nil || len(*ersplr.Value) == 0
+}
+
+// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer() (*http.Request, error) {
+ if ersplr.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ersplr.NextLink)))
+}
+
+// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
+type ExpressRouteServiceProviderListResultPage struct {
+ fn func(ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
+ ersplr ExpressRouteServiceProviderListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ExpressRouteServiceProviderListResultPage) Next() error {
+ next, err := page.fn(page.ersplr)
+ if err != nil {
+ return err
+ }
+ page.ersplr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
+ return !page.ersplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
+ return page.ersplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
+ if page.ersplr.IsEmpty() {
+ return nil
+ }
+ return *page.ersplr.Value
+}
+
+// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
+type ExpressRouteServiceProviderPropertiesFormat struct {
+ // PeeringLocations - Get a list of peering locations.
+ PeeringLocations *[]string `json:"peeringLocations,omitempty"`
+ // BandwidthsOffered - Gets bandwidths offered.
+ BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the resource.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
+type FlowLogInformation struct {
+ autorest.Response `json:"-"`
+ // TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+ *FlowLogProperties `json:"properties,omitempty"`
+ FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for FlowLogInformation.
+func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if fli.TargetResourceID != nil {
+ objectMap["targetResourceId"] = fli.TargetResourceID
+ }
+ if fli.FlowLogProperties != nil {
+ objectMap["properties"] = fli.FlowLogProperties
+ }
+ if fli.FlowAnalyticsConfiguration != nil {
+ objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
+func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "targetResourceId":
+ if v != nil {
+ var targetResourceID string
+ err = json.Unmarshal(*v, &targetResourceID)
+ if err != nil {
+ return err
+ }
+ fli.TargetResourceID = &targetResourceID
+ }
+ case "properties":
+ if v != nil {
+ var flowLogProperties FlowLogProperties
+ err = json.Unmarshal(*v, &flowLogProperties)
+ if err != nil {
+ return err
+ }
+ fli.FlowLogProperties = &flowLogProperties
+ }
+ case "flowAnalyticsConfiguration":
+ if v != nil {
+ var flowAnalyticsConfiguration TrafficAnalyticsProperties
+ err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
+ if err != nil {
+ return err
+ }
+ fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
+ }
+ }
+ }
+
+ return nil
+}
+
+// FlowLogProperties parameters that define the configuration of flow log.
+type FlowLogProperties struct {
+ // StorageID - ID of the storage account which is used to store the flow log.
+ StorageID *string `json:"storageId,omitempty"`
+ // Enabled - Flag to enable/disable flow logging.
+ Enabled *bool `json:"enabled,omitempty"`
+ RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
+}
+
+// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics (optional)
+// status.
+type FlowLogStatusParameters struct {
+ // TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+}
+
+// FrontendIPConfiguration frontend IP address of the load balancer.
+type FrontendIPConfiguration struct {
+ autorest.Response `json:"-"`
+ // FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
+ *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
+ Zones *[]string `json:"zones,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
+func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if fic.FrontendIPConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
+ }
+ if fic.Name != nil {
+ objectMap["name"] = fic.Name
+ }
+ if fic.Etag != nil {
+ objectMap["etag"] = fic.Etag
+ }
+ if fic.Zones != nil {
+ objectMap["zones"] = fic.Zones
+ }
+ if fic.ID != nil {
+ objectMap["id"] = fic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
+func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ fic.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ fic.Etag = &etag
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ fic.Zones = &zones
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ fic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
+type FrontendIPConfigurationPropertiesFormat struct {
+ // InboundNatRules - Read only. Inbound rules URIs that use this frontend IP.
+ InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
+ // InboundNatPools - Read only. Inbound pools URIs that use this frontend IP.
+ InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
+ // OutboundNatRules - Read only. Outbound rules URIs that use this frontend IP.
+ OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"`
+ // LoadBalancingRules - Gets load balancing rules URIs that use this frontend IP.
+ LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
+ // PrivateIPAddress - The private IP address of the IP configuration.
+ PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
+ // PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
+ PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
+ // Subnet - The reference of the subnet resource.
+ Subnet *Subnet `json:"subnet,omitempty"`
+ // PublicIPAddress - The reference of the Public IP resource.
+ PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// GatewayRoute gateway routing details
+type GatewayRoute struct {
+ // LocalAddress - The gateway's local address
+ LocalAddress *string `json:"localAddress,omitempty"`
+ // NetworkProperty - The route's network prefix
+ NetworkProperty *string `json:"network,omitempty"`
+ // NextHop - The route's next hop
+ NextHop *string `json:"nextHop,omitempty"`
+ // SourcePeer - The peer this route was learned from
+ SourcePeer *string `json:"sourcePeer,omitempty"`
+ // Origin - The source this route was learned from
+ Origin *string `json:"origin,omitempty"`
+ // AsPath - The route's AS path sequence
+ AsPath *string `json:"asPath,omitempty"`
+ // Weight - The route's weight
+ Weight *int32 `json:"weight,omitempty"`
+}
+
+// GatewayRouteListResult list of virtual network gateway routes
+type GatewayRouteListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of gateway routes
+ Value *[]GatewayRoute `json:"value,omitempty"`
+}
+
+// HTTPConfiguration HTTP configuration of the connectivity check.
+type HTTPConfiguration struct {
+ // Method - HTTP method. Possible values include: 'Get'
+ Method HTTPMethod `json:"method,omitempty"`
+ // Headers - List of HTTP headers.
+ Headers *[]HTTPHeader `json:"headers,omitempty"`
+ // ValidStatusCodes - Valid status codes.
+ ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
+}
+
+// HTTPHeader describes the HTTP header.
+type HTTPHeader struct {
+ // Name - The name in HTTP header.
+ Name *string `json:"name,omitempty"`
+ // Value - The value in HTTP header.
+ Value *string `json:"value,omitempty"`
+}
+
+// InboundNatPool inbound NAT pool of the load balancer.
+type InboundNatPool struct {
+ // InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
+ *InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InboundNatPool.
+func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if inp.InboundNatPoolPropertiesFormat != nil {
+ objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
+ }
+ if inp.Name != nil {
+ objectMap["name"] = inp.Name
+ }
+ if inp.Etag != nil {
+ objectMap["etag"] = inp.Etag
+ }
+ if inp.ID != nil {
+ objectMap["id"] = inp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
+func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
+ err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ inp.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ inp.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ inp.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
+type InboundNatPoolPropertiesFormat struct {
+ // FrontendIPConfiguration - A reference to frontend IP addresses.
+ FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
+ // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
+ Protocol TransportProtocol `json:"protocol,omitempty"`
+ // FrontendPortRangeStart - The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534.
+ FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
+ // FrontendPortRangeEnd - The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535.
+ FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
+ // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
+ BackendPort *int32 `json:"backendPort,omitempty"`
+ // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+ // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
+ EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// InboundNatRule inbound NAT rule of the load balancer.
+type InboundNatRule struct {
+ autorest.Response `json:"-"`
+ // InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
+ *InboundNatRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InboundNatRule.
+func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if inr.InboundNatRulePropertiesFormat != nil {
+ objectMap["properties"] = inr.InboundNatRulePropertiesFormat
+ }
+ if inr.Name != nil {
+ objectMap["name"] = inr.Name
+ }
+ if inr.Etag != nil {
+ objectMap["etag"] = inr.Etag
+ }
+ if inr.ID != nil {
+ objectMap["id"] = inr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
+func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
+ err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ inr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ inr.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ inr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// InboundNatRuleListResult response for ListInboundNatRule API service call.
+type InboundNatRuleListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of inbound nat rules in a load balancer.
+ Value *[]InboundNatRule `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
+type InboundNatRuleListResultIterator struct {
+ i int
+ page InboundNatRuleListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *InboundNatRuleListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter InboundNatRuleListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
+ if !iter.page.NotDone() {
+ return InboundNatRule{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (inrlr InboundNatRuleListResult) IsEmpty() bool {
+ return inrlr.Value == nil || len(*inrlr.Value) == 0
+}
+
+// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer() (*http.Request, error) {
+ if inrlr.NextLink == nil || len(to.String(inrlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(inrlr.NextLink)))
+}
+
+// InboundNatRuleListResultPage contains a page of InboundNatRule values.
+type InboundNatRuleListResultPage struct {
+ fn func(InboundNatRuleListResult) (InboundNatRuleListResult, error)
+ inrlr InboundNatRuleListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *InboundNatRuleListResultPage) Next() error {
+ next, err := page.fn(page.inrlr)
+ if err != nil {
+ return err
+ }
+ page.inrlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page InboundNatRuleListResultPage) NotDone() bool {
+ return !page.inrlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
+ return page.inrlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
+ if page.inrlr.IsEmpty() {
+ return nil
+ }
+ return *page.inrlr.Value
+}
+
+// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
+type InboundNatRulePropertiesFormat struct {
+ // FrontendIPConfiguration - A reference to frontend IP addresses.
+ FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
+ // BackendIPConfiguration - A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP.
+ BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
+ // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
+ Protocol TransportProtocol `json:"protocol,omitempty"`
+ // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534.
+ FrontendPort *int32 `json:"frontendPort,omitempty"`
+ // BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
+ BackendPort *int32 `json:"backendPort,omitempty"`
+ // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+ // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
+ EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type InboundNatRulesCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
+ inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type InboundNatRulesDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// Interface a network interface in a resource group.
+type Interface struct {
+ autorest.Response `json:"-"`
+ // InterfacePropertiesFormat - Properties of the network interface.
+ *InterfacePropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Interface.
+func (i Interface) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if i.InterfacePropertiesFormat != nil {
+ objectMap["properties"] = i.InterfacePropertiesFormat
+ }
+ if i.Etag != nil {
+ objectMap["etag"] = i.Etag
+ }
+ if i.ID != nil {
+ objectMap["id"] = i.ID
+ }
+ if i.Name != nil {
+ objectMap["name"] = i.Name
+ }
+ if i.Type != nil {
+ objectMap["type"] = i.Type
+ }
+ if i.Location != nil {
+ objectMap["location"] = i.Location
+ }
+ if i.Tags != nil {
+ objectMap["tags"] = i.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Interface struct.
+func (i *Interface) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var interfacePropertiesFormat InterfacePropertiesFormat
+ err = json.Unmarshal(*v, &interfacePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ i.InterfacePropertiesFormat = &interfacePropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ i.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ i.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ i.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ i.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ i.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ i.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// InterfaceAssociation network interface and its custom security rules.
+type InterfaceAssociation struct {
+ // ID - Network interface ID.
+ ID *string `json:"id,omitempty"`
+ // SecurityRules - Collection of custom security rules.
+ SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
+}
+
+// InterfaceDNSSettings DNS settings of a network interface.
+type InterfaceDNSSettings struct {
+ // DNSServers - List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection.
+ DNSServers *[]string `json:"dnsServers,omitempty"`
+ // AppliedDNSServers - If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs.
+ AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
+ // InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
+ InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
+ // InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
+ InternalFqdn *string `json:"internalFqdn,omitempty"`
+ // InternalDomainNameSuffix - Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix.
+ InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
+}
+
+// InterfaceIPConfiguration iPConfiguration in a network interface.
+type InterfaceIPConfiguration struct {
+ autorest.Response `json:"-"`
+ // InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
+ *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
+func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if iic.InterfaceIPConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
+ }
+ if iic.Name != nil {
+ objectMap["name"] = iic.Name
+ }
+ if iic.Etag != nil {
+ objectMap["etag"] = iic.Etag
+ }
+ if iic.ID != nil {
+ objectMap["id"] = iic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
+func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ iic.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ iic.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ iic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// InterfaceIPConfigurationListResult response for list ip configurations API service call.
+type InterfaceIPConfigurationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of ip configurations.
+ Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// InterfaceIPConfigurationListResultIterator provides access to a complete listing of InterfaceIPConfiguration
+// values.
+type InterfaceIPConfigurationListResultIterator struct {
+ i int
+ page InterfaceIPConfigurationListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
+ if !iter.page.NotDone() {
+ return InterfaceIPConfiguration{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
+ return iiclr.Value == nil || len(*iiclr.Value) == 0
+}
+
+// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer() (*http.Request, error) {
+ if iiclr.NextLink == nil || len(to.String(iiclr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(iiclr.NextLink)))
+}
+
+// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
+type InterfaceIPConfigurationListResultPage struct {
+ fn func(InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
+ iiclr InterfaceIPConfigurationListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *InterfaceIPConfigurationListResultPage) Next() error {
+ next, err := page.fn(page.iiclr)
+ if err != nil {
+ return err
+ }
+ page.iiclr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
+ return !page.iiclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
+ return page.iiclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
+ if page.iiclr.IsEmpty() {
+ return nil
+ }
+ return *page.iiclr.Value
+}
+
+// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
+type InterfaceIPConfigurationPropertiesFormat struct {
+ // ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
+ ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
+ // LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
+ LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
+ // LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
+ LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
+ // PrivateIPAddress - Private IP address of the IP configuration.
+ PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
+ // PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
+ PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
+ // PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
+ PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
+ // Subnet - Subnet bound to the IP configuration.
+ Subnet *Subnet `json:"subnet,omitempty"`
+ // Primary - Gets whether this is a primary customer address on the network interface.
+ Primary *bool `json:"primary,omitempty"`
+ // PublicIPAddress - Public IP address bound to the IP configuration.
+ PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
+ // ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
+ ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
+ // ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// InterfaceListResult response for the ListNetworkInterface API service call.
+type InterfaceListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of network interfaces in a resource group.
+ Value *[]Interface `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// InterfaceListResultIterator provides access to a complete listing of Interface values.
+type InterfaceListResultIterator struct {
+ i int
+ page InterfaceListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *InterfaceListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter InterfaceListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter InterfaceListResultIterator) Response() InterfaceListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter InterfaceListResultIterator) Value() Interface {
+ if !iter.page.NotDone() {
+ return Interface{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ilr InterfaceListResult) IsEmpty() bool {
+ return ilr.Value == nil || len(*ilr.Value) == 0
+}
+
+// interfaceListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ilr InterfaceListResult) interfaceListResultPreparer() (*http.Request, error) {
+ if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ilr.NextLink)))
+}
+
+// InterfaceListResultPage contains a page of Interface values.
+type InterfaceListResultPage struct {
+ fn func(InterfaceListResult) (InterfaceListResult, error)
+ ilr InterfaceListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *InterfaceListResultPage) Next() error {
+ next, err := page.fn(page.ilr)
+ if err != nil {
+ return err
+ }
+ page.ilr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page InterfaceListResultPage) NotDone() bool {
+ return !page.ilr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page InterfaceListResultPage) Response() InterfaceListResult {
+ return page.ilr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page InterfaceListResultPage) Values() []Interface {
+ if page.ilr.IsEmpty() {
+ return nil
+ }
+ return *page.ilr.Value
+}
+
+// InterfaceLoadBalancerListResult response for list ip configurations API service call.
+type InterfaceLoadBalancerListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of load balancers.
+ Value *[]LoadBalancer `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
+type InterfaceLoadBalancerListResultIterator struct {
+ i int
+ page InterfaceLoadBalancerListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
+ if !iter.page.NotDone() {
+ return LoadBalancer{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
+ return ilblr.Value == nil || len(*ilblr.Value) == 0
+}
+
+// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer() (*http.Request, error) {
+ if ilblr.NextLink == nil || len(to.String(ilblr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ilblr.NextLink)))
+}
+
+// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
+type InterfaceLoadBalancerListResultPage struct {
+ fn func(InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
+ ilblr InterfaceLoadBalancerListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *InterfaceLoadBalancerListResultPage) Next() error {
+ next, err := page.fn(page.ilblr)
+ if err != nil {
+ return err
+ }
+ page.ilblr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
+ return !page.ilblr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
+ return page.ilblr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
+ if page.ilblr.IsEmpty() {
+ return nil
+ }
+ return *page.ilblr.Value
+}
+
+// InterfacePropertiesFormat networkInterface properties.
+type InterfacePropertiesFormat struct {
+ // VirtualMachine - The reference of a virtual machine.
+ VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
+ // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
+ NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
+ // IPConfigurations - A list of IPConfigurations of the network interface.
+ IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
+ // DNSSettings - The DNS settings in network interface.
+ DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
+ // MacAddress - The MAC address of the network interface.
+ MacAddress *string `json:"macAddress,omitempty"`
+ // Primary - Gets whether this is a primary network interface on a virtual machine.
+ Primary *bool `json:"primary,omitempty"`
+ // EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
+ EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
+ // EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
+ EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
+ // ResourceGUID - The resource GUID property of the network interface resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type InterfacesCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type InterfacesDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type InterfacesGetEffectiveRouteTableFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type InterfacesUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.UpdateTagsResponder(i.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
+type IPAddressAvailabilityResult struct {
+ autorest.Response `json:"-"`
+ // Available - Private IP address availability.
+ Available *bool `json:"available,omitempty"`
+ // AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
+ AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
+}
+
+// IPConfiguration IP configuration
+type IPConfiguration struct {
+ // IPConfigurationPropertiesFormat - Properties of the IP configuration
+ *IPConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for IPConfiguration.
+func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ic.IPConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = ic.IPConfigurationPropertiesFormat
+ }
+ if ic.Name != nil {
+ objectMap["name"] = ic.Name
+ }
+ if ic.Etag != nil {
+ objectMap["etag"] = ic.Etag
+ }
+ if ic.ID != nil {
+ objectMap["id"] = ic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
+func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ic.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ ic.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// IPConfigurationPropertiesFormat properties of IP configuration.
+type IPConfigurationPropertiesFormat struct {
+ // PrivateIPAddress - The private IP address of the IP configuration.
+ PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
+ // PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
+ PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
+ // Subnet - The reference of the subnet resource.
+ Subnet *Subnet `json:"subnet,omitempty"`
+ // PublicIPAddress - The reference of the public IP resource.
+ PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
+type IpsecPolicy struct {
+ // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
+ SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
+ // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
+ SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
+ // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
+ IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
+ // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
+ IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
+ // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
+ IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
+ // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
+ IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
+ // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
+ DhGroup DhGroup `json:"dhGroup,omitempty"`
+ // PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
+ PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
+}
+
+// IPTag contains the IpTag associated with the public IP address
+type IPTag struct {
+ // IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
+ IPTagType *string `json:"ipTagType,omitempty"`
+ // Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
+ Tag *string `json:"tag,omitempty"`
+}
+
+// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
+type Ipv6ExpressRouteCircuitPeeringConfig struct {
+ // PrimaryPeerAddressPrefix - The primary address prefix.
+ PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
+ // SecondaryPeerAddressPrefix - The secondary address prefix.
+ SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
+ // MicrosoftPeeringConfig - The Microsoft peering configuration.
+ MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
+ // RouteFilter - The reference of the RouteFilter resource.
+ RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
+ // State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
+ State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
+}
+
+// LoadBalancer loadBalancer resource
+type LoadBalancer struct {
+ autorest.Response `json:"-"`
+ // Sku - The load balancer SKU.
+ Sku *LoadBalancerSku `json:"sku,omitempty"`
+ // LoadBalancerPropertiesFormat - Properties of load balancer.
+ *LoadBalancerPropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for LoadBalancer.
+func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lb.Sku != nil {
+ objectMap["sku"] = lb.Sku
+ }
+ if lb.LoadBalancerPropertiesFormat != nil {
+ objectMap["properties"] = lb.LoadBalancerPropertiesFormat
+ }
+ if lb.Etag != nil {
+ objectMap["etag"] = lb.Etag
+ }
+ if lb.ID != nil {
+ objectMap["id"] = lb.ID
+ }
+ if lb.Name != nil {
+ objectMap["name"] = lb.Name
+ }
+ if lb.Type != nil {
+ objectMap["type"] = lb.Type
+ }
+ if lb.Location != nil {
+ objectMap["location"] = lb.Location
+ }
+ if lb.Tags != nil {
+ objectMap["tags"] = lb.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
+func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "sku":
+ if v != nil {
+ var sku LoadBalancerSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ lb.Sku = &sku
+ }
+ case "properties":
+ if v != nil {
+ var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
+ err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ lb.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ lb.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ lb.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ lb.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ lb.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ lb.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
+type LoadBalancerBackendAddressPoolListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of backend address pools in a load balancer.
+ Value *[]BackendAddressPool `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of BackendAddressPool
+// values.
+type LoadBalancerBackendAddressPoolListResultIterator struct {
+ i int
+ page LoadBalancerBackendAddressPoolListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
+ if !iter.page.NotDone() {
+ return BackendAddressPool{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
+ return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
+}
+
+// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer() (*http.Request, error) {
+ if lbbaplr.NextLink == nil || len(to.String(lbbaplr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
+}
+
+// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
+type LoadBalancerBackendAddressPoolListResultPage struct {
+ fn func(LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
+ lbbaplr LoadBalancerBackendAddressPoolListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
+ next, err := page.fn(page.lbbaplr)
+ if err != nil {
+ return err
+ }
+ page.lbbaplr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
+ return !page.lbbaplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
+ return page.lbbaplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
+ if page.lbbaplr.IsEmpty() {
+ return nil
+ }
+ return *page.lbbaplr.Value
+}
+
+// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
+type LoadBalancerFrontendIPConfigurationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of frontend IP configurations in a load balancer.
+ Value *[]FrontendIPConfiguration `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
+// FrontendIPConfiguration values.
+type LoadBalancerFrontendIPConfigurationListResultIterator struct {
+ i int
+ page LoadBalancerFrontendIPConfigurationListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
+ if !iter.page.NotDone() {
+ return FrontendIPConfiguration{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
+ return lbficlr.Value == nil || len(*lbficlr.Value) == 0
+}
+
+// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer() (*http.Request, error) {
+ if lbficlr.NextLink == nil || len(to.String(lbficlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lbficlr.NextLink)))
+}
+
+// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
+type LoadBalancerFrontendIPConfigurationListResultPage struct {
+ fn func(LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
+ lbficlr LoadBalancerFrontendIPConfigurationListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
+ next, err := page.fn(page.lbficlr)
+ if err != nil {
+ return err
+ }
+ page.lbficlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
+ return !page.lbficlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
+ return page.lbficlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
+ if page.lbficlr.IsEmpty() {
+ return nil
+ }
+ return *page.lbficlr.Value
+}
+
+// LoadBalancerListResult response for ListLoadBalancers API service call.
+type LoadBalancerListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of load balancers in a resource group.
+ Value *[]LoadBalancer `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
+type LoadBalancerListResultIterator struct {
+ i int
+ page LoadBalancerListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *LoadBalancerListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter LoadBalancerListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
+ if !iter.page.NotDone() {
+ return LoadBalancer{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lblr LoadBalancerListResult) IsEmpty() bool {
+ return lblr.Value == nil || len(*lblr.Value) == 0
+}
+
+// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lblr LoadBalancerListResult) loadBalancerListResultPreparer() (*http.Request, error) {
+ if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lblr.NextLink)))
+}
+
+// LoadBalancerListResultPage contains a page of LoadBalancer values.
+type LoadBalancerListResultPage struct {
+ fn func(LoadBalancerListResult) (LoadBalancerListResult, error)
+ lblr LoadBalancerListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *LoadBalancerListResultPage) Next() error {
+ next, err := page.fn(page.lblr)
+ if err != nil {
+ return err
+ }
+ page.lblr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page LoadBalancerListResultPage) NotDone() bool {
+ return !page.lblr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
+ return page.lblr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page LoadBalancerListResultPage) Values() []LoadBalancer {
+ if page.lblr.IsEmpty() {
+ return nil
+ }
+ return *page.lblr.Value
+}
+
+// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
+type LoadBalancerLoadBalancingRuleListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of load balancing rules in a load balancer.
+ Value *[]LoadBalancingRule `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of LoadBalancingRule
+// values.
+type LoadBalancerLoadBalancingRuleListResultIterator struct {
+ i int
+ page LoadBalancerLoadBalancingRuleListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
+ if !iter.page.NotDone() {
+ return LoadBalancingRule{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
+ return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
+}
+
+// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer() (*http.Request, error) {
+ if lblbrlr.NextLink == nil || len(to.String(lblbrlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
+}
+
+// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
+type LoadBalancerLoadBalancingRuleListResultPage struct {
+ fn func(LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
+ lblbrlr LoadBalancerLoadBalancingRuleListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
+ next, err := page.fn(page.lblbrlr)
+ if err != nil {
+ return err
+ }
+ page.lblbrlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
+ return !page.lblbrlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
+ return page.lblbrlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
+ if page.lblbrlr.IsEmpty() {
+ return nil
+ }
+ return *page.lblbrlr.Value
+}
+
+// LoadBalancerProbeListResult response for ListProbe API service call.
+type LoadBalancerProbeListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of probes in a load balancer.
+ Value *[]Probe `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
+type LoadBalancerProbeListResultIterator struct {
+ i int
+ page LoadBalancerProbeListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *LoadBalancerProbeListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter LoadBalancerProbeListResultIterator) Value() Probe {
+ if !iter.page.NotDone() {
+ return Probe{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
+ return lbplr.Value == nil || len(*lbplr.Value) == 0
+}
+
+// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer() (*http.Request, error) {
+ if lbplr.NextLink == nil || len(to.String(lbplr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lbplr.NextLink)))
+}
+
+// LoadBalancerProbeListResultPage contains a page of Probe values.
+type LoadBalancerProbeListResultPage struct {
+ fn func(LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
+ lbplr LoadBalancerProbeListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *LoadBalancerProbeListResultPage) Next() error {
+ next, err := page.fn(page.lbplr)
+ if err != nil {
+ return err
+ }
+ page.lbplr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page LoadBalancerProbeListResultPage) NotDone() bool {
+ return !page.lbplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
+ return page.lbplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page LoadBalancerProbeListResultPage) Values() []Probe {
+ if page.lbplr.IsEmpty() {
+ return nil
+ }
+ return *page.lbplr.Value
+}
+
+// LoadBalancerPropertiesFormat properties of the load balancer.
+type LoadBalancerPropertiesFormat struct {
+ // FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
+ FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
+ // BackendAddressPools - Collection of backend address pools used by a load balancer
+ BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
+ // LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
+ LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
+ // Probes - Collection of probe objects used in the load balancer
+ Probes *[]Probe `json:"probes,omitempty"`
+ // InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules.
+ InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
+ // InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules.
+ InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
+ // OutboundNatRules - The outbound NAT rules.
+ OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"`
+ // ResourceGUID - The resource GUID property of the load balancer resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type LoadBalancersCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type LoadBalancersDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// LoadBalancerSku SKU of a load balancer
+type LoadBalancerSku struct {
+ // Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
+ Name LoadBalancerSkuName `json:"name,omitempty"`
+}
+
+// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type LoadBalancersUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.UpdateTagsResponder(lb.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// LoadBalancingRule a load balancing rule for a load balancer.
+type LoadBalancingRule struct {
+ autorest.Response `json:"-"`
+ // LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
+ *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LoadBalancingRule.
+func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lbr.LoadBalancingRulePropertiesFormat != nil {
+ objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
+ }
+ if lbr.Name != nil {
+ objectMap["name"] = lbr.Name
+ }
+ if lbr.Etag != nil {
+ objectMap["etag"] = lbr.Etag
+ }
+ if lbr.ID != nil {
+ objectMap["id"] = lbr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
+func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
+ err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ lbr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ lbr.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ lbr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// LoadBalancingRulePropertiesFormat properties of the load balancer.
+type LoadBalancingRulePropertiesFormat struct {
+ // FrontendIPConfiguration - A reference to frontend IP addresses.
+ FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
+ // BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
+ BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
+ // Probe - The reference of the load balancer probe used by the load balancing rule.
+ Probe *SubResource `json:"probe,omitempty"`
+ // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
+ Protocol TransportProtocol `json:"protocol,omitempty"`
+ // LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
+ LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
+ // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port"
+ FrontendPort *int32 `json:"frontendPort,omitempty"`
+ // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
+ BackendPort *int32 `json:"backendPort,omitempty"`
+ // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+ // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
+ EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
+ // DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
+ DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// LocalNetworkGateway a common class for general resource information
+type LocalNetworkGateway struct {
+ autorest.Response `json:"-"`
+ // LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
+ *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for LocalNetworkGateway.
+func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lng.LocalNetworkGatewayPropertiesFormat != nil {
+ objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
+ }
+ if lng.Etag != nil {
+ objectMap["etag"] = lng.Etag
+ }
+ if lng.ID != nil {
+ objectMap["id"] = lng.ID
+ }
+ if lng.Name != nil {
+ objectMap["name"] = lng.Name
+ }
+ if lng.Type != nil {
+ objectMap["type"] = lng.Type
+ }
+ if lng.Location != nil {
+ objectMap["location"] = lng.Location
+ }
+ if lng.Tags != nil {
+ objectMap["tags"] = lng.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
+func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
+ err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ lng.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ lng.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ lng.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ lng.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ lng.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ lng.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
+type LocalNetworkGatewayListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of local network gateways that exists in a resource group.
+ Value *[]LocalNetworkGateway `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway values.
+type LocalNetworkGatewayListResultIterator struct {
+ i int
+ page LocalNetworkGatewayListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *LocalNetworkGatewayListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
+ if !iter.page.NotDone() {
+ return LocalNetworkGateway{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
+ return lnglr.Value == nil || len(*lnglr.Value) == 0
+}
+
+// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer() (*http.Request, error) {
+ if lnglr.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lnglr.NextLink)))
+}
+
+// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
+type LocalNetworkGatewayListResultPage struct {
+ fn func(LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
+ lnglr LocalNetworkGatewayListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *LocalNetworkGatewayListResultPage) Next() error {
+ next, err := page.fn(page.lnglr)
+ if err != nil {
+ return err
+ }
+ page.lnglr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page LocalNetworkGatewayListResultPage) NotDone() bool {
+ return !page.lnglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
+ return page.lnglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
+ if page.lnglr.IsEmpty() {
+ return nil
+ }
+ return *page.lnglr.Value
+}
+
+// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
+type LocalNetworkGatewayPropertiesFormat struct {
+ // LocalNetworkAddressSpace - Local network site address space.
+ LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
+ // GatewayIPAddress - IP address of local network gateway.
+ GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
+ // BgpSettings - Local network gateway's BGP speaker settings.
+ BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
+ // ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type LocalNetworkGatewaysCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type LocalNetworkGatewaysDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type LocalNetworkGatewaysUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.UpdateTagsResponder(lng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// LogSpecification description of logging specification.
+type LogSpecification struct {
+ // Name - The name of the specification.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The display name of the specification.
+ DisplayName *string `json:"displayName,omitempty"`
+ // BlobDuration - Duration of the blob.
+ BlobDuration *string `json:"blobDuration,omitempty"`
+}
+
+// MetricSpecification description of metrics specification.
+type MetricSpecification struct {
+ // Name - The name of the metric.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The display name of the metric.
+ DisplayName *string `json:"displayName,omitempty"`
+ // DisplayDescription - The description of the metric.
+ DisplayDescription *string `json:"displayDescription,omitempty"`
+ // Unit - Units the metric to be displayed in.
+ Unit *string `json:"unit,omitempty"`
+ // AggregationType - The aggregation type.
+ AggregationType *string `json:"aggregationType,omitempty"`
+ // Availabilities - List of availability.
+ Availabilities *[]Availability `json:"availabilities,omitempty"`
+ // EnableRegionalMdmAccount - Whether regional MDM account enabled.
+ EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
+ // FillGapWithZero - Whether gaps would be filled with zeros.
+ FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
+ // MetricFilterPattern - Pattern for the filter of the metric.
+ MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
+ // Dimensions - List of dimensions.
+ Dimensions *[]Dimension `json:"dimensions,omitempty"`
+ // IsInternal - Whether the metric is internal.
+ IsInternal *bool `json:"isInternal,omitempty"`
+ // SourceMdmAccount - The source MDM account.
+ SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
+ // SourceMdmNamespace - The source MDM namespace.
+ SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
+ // ResourceIDDimensionNameOverride - The resource Id dimension name override.
+ ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
+}
+
+// NextHopParameters parameters that define the source and destination endpoint.
+type NextHopParameters struct {
+ // TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+ // SourceIPAddress - The source IP address.
+ SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
+ // DestinationIPAddress - The destination IP address.
+ DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
+ // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional).
+ TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
+}
+
+// NextHopResult the information about next hop from the specified VM.
+type NextHopResult struct {
+ autorest.Response `json:"-"`
+ // NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
+ NextHopType NextHopType `json:"nextHopType,omitempty"`
+ // NextHopIPAddress - Next hop IP Address
+ NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
+ // RouteTableID - The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'.
+ RouteTableID *string `json:"routeTableId,omitempty"`
+}
+
+// Operation network REST API operation definition.
+type Operation struct {
+ // Name - Operation name: {provider}/{resource}/{operation}
+ Name *string `json:"name,omitempty"`
+ // Display - Display metadata associated with the operation.
+ Display *OperationDisplay `json:"display,omitempty"`
+ // Origin - Origin of the operation.
+ Origin *string `json:"origin,omitempty"`
+ // OperationPropertiesFormat - Operation properties format.
+ *OperationPropertiesFormat `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Operation.
+func (o Operation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if o.Name != nil {
+ objectMap["name"] = o.Name
+ }
+ if o.Display != nil {
+ objectMap["display"] = o.Display
+ }
+ if o.Origin != nil {
+ objectMap["origin"] = o.Origin
+ }
+ if o.OperationPropertiesFormat != nil {
+ objectMap["properties"] = o.OperationPropertiesFormat
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Operation struct.
+func (o *Operation) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ o.Name = &name
+ }
+ case "display":
+ if v != nil {
+ var display OperationDisplay
+ err = json.Unmarshal(*v, &display)
+ if err != nil {
+ return err
+ }
+ o.Display = &display
+ }
+ case "origin":
+ if v != nil {
+ var origin string
+ err = json.Unmarshal(*v, &origin)
+ if err != nil {
+ return err
+ }
+ o.Origin = &origin
+ }
+ case "properties":
+ if v != nil {
+ var operationPropertiesFormat OperationPropertiesFormat
+ err = json.Unmarshal(*v, &operationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ o.OperationPropertiesFormat = &operationPropertiesFormat
+ }
+ }
+ }
+
+ return nil
+}
+
+// OperationDisplay display metadata associated with the operation.
+type OperationDisplay struct {
+ // Provider - Service provider: Microsoft Network.
+ Provider *string `json:"provider,omitempty"`
+ // Resource - Resource on which the operation is performed.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - Type of the operation: get, read, delete, etc.
+ Operation *string `json:"operation,omitempty"`
+ // Description - Description of the operation.
+ Description *string `json:"description,omitempty"`
+}
+
+// OperationListResult result of the request to list Network 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 - List of Network operations supported by the Network resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+ // NextLink - URL to get the next set of operation list results if there are any.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// OperationListResultIterator provides access to a complete listing of Operation values.
+type OperationListResultIterator struct {
+ i int
+ page OperationListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OperationListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OperationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OperationListResultIterator) Response() OperationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OperationListResultIterator) Value() Operation {
+ if !iter.page.NotDone() {
+ return Operation{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (olr OperationListResult) IsEmpty() bool {
+ return olr.Value == nil || len(*olr.Value) == 0
+}
+
+// operationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+ if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(olr.NextLink)))
+}
+
+// OperationListResultPage contains a page of Operation values.
+type OperationListResultPage struct {
+ fn func(OperationListResult) (OperationListResult, error)
+ olr OperationListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OperationListResultPage) Next() error {
+ next, err := page.fn(page.olr)
+ if err != nil {
+ return err
+ }
+ page.olr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OperationListResultPage) NotDone() bool {
+ return !page.olr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OperationListResultPage) Response() OperationListResult {
+ return page.olr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OperationListResultPage) Values() []Operation {
+ if page.olr.IsEmpty() {
+ return nil
+ }
+ return *page.olr.Value
+}
+
+// OperationPropertiesFormat description of operation properties format.
+type OperationPropertiesFormat struct {
+ // ServiceSpecification - Specification of the service.
+ ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
+}
+
+// OperationPropertiesFormatServiceSpecification specification of the service.
+type OperationPropertiesFormatServiceSpecification struct {
+ // MetricSpecifications - Operation service specification.
+ MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
+ // LogSpecifications - Operation log specification.
+ LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
+}
+
+// OutboundNatRule outbound NAT pool of the load balancer.
+type OutboundNatRule struct {
+ // OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule.
+ *OutboundNatRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OutboundNatRule.
+func (onr OutboundNatRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if onr.OutboundNatRulePropertiesFormat != nil {
+ objectMap["properties"] = onr.OutboundNatRulePropertiesFormat
+ }
+ if onr.Name != nil {
+ objectMap["name"] = onr.Name
+ }
+ if onr.Etag != nil {
+ objectMap["etag"] = onr.Etag
+ }
+ if onr.ID != nil {
+ objectMap["id"] = onr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct.
+func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat
+ err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ onr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ onr.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ onr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer.
+type OutboundNatRulePropertiesFormat struct {
+ // AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
+ AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
+ // FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
+ FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
+ // BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
+ BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// PacketCapture parameters that define the create packet capture operation.
+type PacketCapture struct {
+ *PacketCaptureParameters `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PacketCapture.
+func (pc PacketCapture) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if pc.PacketCaptureParameters != nil {
+ objectMap["properties"] = pc.PacketCaptureParameters
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
+func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var packetCaptureParameters PacketCaptureParameters
+ err = json.Unmarshal(*v, &packetCaptureParameters)
+ if err != nil {
+ return err
+ }
+ pc.PacketCaptureParameters = &packetCaptureParameters
+ }
+ }
+ }
+
+ return nil
+}
+
+// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
+type PacketCaptureFilter struct {
+ // Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
+ Protocol PcProtocol `json:"protocol,omitempty"`
+ // LocalIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
+ LocalIPAddress *string `json:"localIPAddress,omitempty"`
+ // RemoteIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
+ RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
+ // LocalPort - Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
+ LocalPort *string `json:"localPort,omitempty"`
+ // RemotePort - Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
+ RemotePort *string `json:"remotePort,omitempty"`
+}
+
+// PacketCaptureListResult list of packet capture sessions.
+type PacketCaptureListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Information about packet capture sessions.
+ Value *[]PacketCaptureResult `json:"value,omitempty"`
+}
+
+// PacketCaptureParameters parameters that define the create packet capture operation.
+type PacketCaptureParameters struct {
+ // Target - The ID of the targeted resource, only VM is currently supported.
+ Target *string `json:"target,omitempty"`
+ // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
+ BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
+ // TotalBytesPerSession - Maximum size of the capture output.
+ TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
+ // TimeLimitInSeconds - Maximum duration of the capture session in seconds.
+ TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
+ StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
+ Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
+}
+
+// PacketCaptureQueryStatusResult status of packet capture session.
+type PacketCaptureQueryStatusResult struct {
+ autorest.Response `json:"-"`
+ // Name - The name of the packet capture resource.
+ Name *string `json:"name,omitempty"`
+ // ID - The ID of the packet capture resource.
+ ID *string `json:"id,omitempty"`
+ // CaptureStartTime - The start time of the packet capture session.
+ CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
+ // PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
+ PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
+ // StopReason - The reason the current packet capture session was stopped.
+ StopReason *string `json:"stopReason,omitempty"`
+ // PacketCaptureError - List of errors of packet capture session.
+ PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
+}
+
+// PacketCaptureResult information about packet capture session.
+type PacketCaptureResult struct {
+ autorest.Response `json:"-"`
+ // Name - Name of the packet capture session.
+ Name *string `json:"name,omitempty"`
+ // ID - ID of the packet capture operation.
+ ID *string `json:"id,omitempty"`
+ Etag *string `json:"etag,omitempty"`
+ *PacketCaptureResultProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PacketCaptureResult.
+func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if pcr.Name != nil {
+ objectMap["name"] = pcr.Name
+ }
+ if pcr.ID != nil {
+ objectMap["id"] = pcr.ID
+ }
+ if pcr.Etag != nil {
+ objectMap["etag"] = pcr.Etag
+ }
+ if pcr.PacketCaptureResultProperties != nil {
+ objectMap["properties"] = pcr.PacketCaptureResultProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
+func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ pcr.Name = &name
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ pcr.ID = &ID
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ pcr.Etag = &etag
+ }
+ case "properties":
+ if v != nil {
+ var packetCaptureResultProperties PacketCaptureResultProperties
+ err = json.Unmarshal(*v, &packetCaptureResultProperties)
+ if err != nil {
+ return err
+ }
+ pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// PacketCaptureResultProperties describes the properties of a packet capture session.
+type PacketCaptureResultProperties struct {
+ // ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Target - The ID of the targeted resource, only VM is currently supported.
+ Target *string `json:"target,omitempty"`
+ // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
+ BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
+ // TotalBytesPerSession - Maximum size of the capture output.
+ TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
+ // TimeLimitInSeconds - Maximum duration of the capture session in seconds.
+ TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
+ StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
+ Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
+}
+
+// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type PacketCapturesCreateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type PacketCapturesDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type PacketCapturesGetStatusFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type PacketCapturesStopFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// PacketCaptureStorageLocation describes the storage location for a packet capture session.
+type PacketCaptureStorageLocation struct {
+ // StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
+ StorageID *string `json:"storageId,omitempty"`
+ // StoragePath - The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture.
+ StoragePath *string `json:"storagePath,omitempty"`
+ // FilePath - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional.
+ FilePath *string `json:"filePath,omitempty"`
+}
+
+// PatchRouteFilter route Filter Resource.
+type PatchRouteFilter struct {
+ *RouteFilterPropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PatchRouteFilter.
+func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if prf.RouteFilterPropertiesFormat != nil {
+ objectMap["properties"] = prf.RouteFilterPropertiesFormat
+ }
+ if prf.Name != nil {
+ objectMap["name"] = prf.Name
+ }
+ if prf.Etag != nil {
+ objectMap["etag"] = prf.Etag
+ }
+ if prf.Type != nil {
+ objectMap["type"] = prf.Type
+ }
+ if prf.Tags != nil {
+ objectMap["tags"] = prf.Tags
+ }
+ if prf.ID != nil {
+ objectMap["id"] = prf.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
+func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var routeFilterPropertiesFormat RouteFilterPropertiesFormat
+ err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ prf.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ prf.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ prf.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ prf.Tags = tags
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ prf.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// PatchRouteFilterRule route Filter Rule Resource
+type PatchRouteFilterRule struct {
+ *RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
+func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if prfr.RouteFilterRulePropertiesFormat != nil {
+ objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
+ }
+ if prfr.Name != nil {
+ objectMap["name"] = prfr.Name
+ }
+ if prfr.Etag != nil {
+ objectMap["etag"] = prfr.Etag
+ }
+ if prfr.ID != nil {
+ objectMap["id"] = prfr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
+func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
+ err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ prfr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ prfr.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ prfr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// Probe a load balancer probe.
+type Probe struct {
+ autorest.Response `json:"-"`
+ // ProbePropertiesFormat - Properties of load balancer probe.
+ *ProbePropertiesFormat `json:"properties,omitempty"`
+ // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Probe.
+func (p Probe) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if p.ProbePropertiesFormat != nil {
+ objectMap["properties"] = p.ProbePropertiesFormat
+ }
+ if p.Name != nil {
+ objectMap["name"] = p.Name
+ }
+ if p.Etag != nil {
+ objectMap["etag"] = p.Etag
+ }
+ if p.ID != nil {
+ objectMap["id"] = p.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Probe struct.
+func (p *Probe) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var probePropertiesFormat ProbePropertiesFormat
+ err = json.Unmarshal(*v, &probePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ p.ProbePropertiesFormat = &probePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ p.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ p.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ p.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ProbePropertiesFormat load balancer probe resource.
+type ProbePropertiesFormat struct {
+ // LoadBalancingRules - The load balancer rules that use this probe.
+ LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
+ // Protocol - The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP'
+ Protocol ProbeProtocol `json:"protocol,omitempty"`
+ // Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
+ Port *int32 `json:"port,omitempty"`
+ // IntervalInSeconds - The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5.
+ IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
+ // NumberOfProbes - The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure.
+ NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
+ // RequestPath - The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value.
+ RequestPath *string `json:"requestPath,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ProtocolConfiguration configuration of the protocol.
+type ProtocolConfiguration struct {
+ HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
+}
+
+// PublicIPAddress public IP address resource.
+type PublicIPAddress struct {
+ autorest.Response `json:"-"`
+ // Sku - The public IP address SKU.
+ Sku *PublicIPAddressSku `json:"sku,omitempty"`
+ // PublicIPAddressPropertiesFormat - Public IP address properties.
+ *PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
+ Zones *[]string `json:"zones,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for PublicIPAddress.
+func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if pia.Sku != nil {
+ objectMap["sku"] = pia.Sku
+ }
+ if pia.PublicIPAddressPropertiesFormat != nil {
+ objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
+ }
+ if pia.Etag != nil {
+ objectMap["etag"] = pia.Etag
+ }
+ if pia.Zones != nil {
+ objectMap["zones"] = pia.Zones
+ }
+ if pia.ID != nil {
+ objectMap["id"] = pia.ID
+ }
+ if pia.Name != nil {
+ objectMap["name"] = pia.Name
+ }
+ if pia.Type != nil {
+ objectMap["type"] = pia.Type
+ }
+ if pia.Location != nil {
+ objectMap["location"] = pia.Location
+ }
+ if pia.Tags != nil {
+ objectMap["tags"] = pia.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
+func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "sku":
+ if v != nil {
+ var sku PublicIPAddressSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ pia.Sku = &sku
+ }
+ case "properties":
+ if v != nil {
+ var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
+ err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ pia.Etag = &etag
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ pia.Zones = &zones
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ pia.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ pia.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ pia.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ pia.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ pia.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
+type PublicIPAddressDNSSettings struct {
+ // DomainNameLabel - Gets or sets the Domain name label.The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system.
+ DomainNameLabel *string `json:"domainNameLabel,omitempty"`
+ // Fqdn - Gets the FQDN, Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.
+ Fqdn *string `json:"fqdn,omitempty"`
+ // ReverseFqdn - Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN.
+ ReverseFqdn *string `json:"reverseFqdn,omitempty"`
+}
+
+// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type PublicIPAddressesCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type PublicIPAddressesDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type PublicIPAddressesUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.UpdateTagsResponder(pia.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
+type PublicIPAddressListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of public IP addresses that exists in a resource group.
+ Value *[]PublicIPAddress `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
+type PublicIPAddressListResultIterator struct {
+ i int
+ page PublicIPAddressListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *PublicIPAddressListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter PublicIPAddressListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
+ if !iter.page.NotDone() {
+ return PublicIPAddress{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (pialr PublicIPAddressListResult) IsEmpty() bool {
+ return pialr.Value == nil || len(*pialr.Value) == 0
+}
+
+// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer() (*http.Request, error) {
+ if pialr.NextLink == nil || len(to.String(pialr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(pialr.NextLink)))
+}
+
+// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
+type PublicIPAddressListResultPage struct {
+ fn func(PublicIPAddressListResult) (PublicIPAddressListResult, error)
+ pialr PublicIPAddressListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *PublicIPAddressListResultPage) Next() error {
+ next, err := page.fn(page.pialr)
+ if err != nil {
+ return err
+ }
+ page.pialr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page PublicIPAddressListResultPage) NotDone() bool {
+ return !page.pialr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
+ return page.pialr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
+ if page.pialr.IsEmpty() {
+ return nil
+ }
+ return *page.pialr.Value
+}
+
+// PublicIPAddressPropertiesFormat public IP address properties.
+type PublicIPAddressPropertiesFormat struct {
+ // PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
+ PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
+ // PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
+ PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
+ // IPConfiguration - The IP configuration associated with the public IP address.
+ IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
+ // DNSSettings - The FQDN of the DNS record associated with the public IP address.
+ DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
+ // IPTags - The list of tags associated with the public IP address.
+ IPTags *[]IPTag `json:"ipTags,omitempty"`
+ // IPAddress - The IP address associated with the public IP address resource.
+ IPAddress *string `json:"ipAddress,omitempty"`
+ // IdleTimeoutInMinutes - The idle timeout of the public IP address.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+ // ResourceGUID - The resource GUID property of the public IP resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// PublicIPAddressSku SKU of a public IP address
+type PublicIPAddressSku struct {
+ // Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
+ Name PublicIPAddressSkuName `json:"name,omitempty"`
+}
+
+// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
+type QueryTroubleshootingParameters struct {
+ // TargetResourceID - The target resource ID to query the troubleshooting result.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+}
+
+// Resource common resource representation.
+type Resource struct {
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.ID != nil {
+ objectMap["id"] = r.ID
+ }
+ if r.Name != nil {
+ objectMap["name"] = r.Name
+ }
+ if r.Type != nil {
+ objectMap["type"] = r.Type
+ }
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// ResourceNavigationLink resourceNavigationLink resource.
+type ResourceNavigationLink struct {
+ // ResourceNavigationLinkFormat - Resource navigation link properties format.
+ *ResourceNavigationLinkFormat `json:"properties,omitempty"`
+ // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ResourceNavigationLink.
+func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rnl.ResourceNavigationLinkFormat != nil {
+ objectMap["properties"] = rnl.ResourceNavigationLinkFormat
+ }
+ if rnl.Name != nil {
+ objectMap["name"] = rnl.Name
+ }
+ if rnl.Etag != nil {
+ objectMap["etag"] = rnl.Etag
+ }
+ if rnl.ID != nil {
+ objectMap["id"] = rnl.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
+func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var resourceNavigationLinkFormat ResourceNavigationLinkFormat
+ err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
+ if err != nil {
+ return err
+ }
+ rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ rnl.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ rnl.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ rnl.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
+type ResourceNavigationLinkFormat struct {
+ // LinkedResourceType - Resource type of the linked resource.
+ LinkedResourceType *string `json:"linkedResourceType,omitempty"`
+ // Link - Link to the external resource
+ Link *string `json:"link,omitempty"`
+ // ProvisioningState - Provisioning state of the ResourceNavigationLink resource.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// RetentionPolicyParameters parameters that define the retention policy for flow log.
+type RetentionPolicyParameters struct {
+ // Days - Number of days to retain flow log records.
+ Days *int32 `json:"days,omitempty"`
+ // Enabled - Flag to enable/disable retention.
+ Enabled *bool `json:"enabled,omitempty"`
+}
+
+// Route route resource
+type Route struct {
+ autorest.Response `json:"-"`
+ // RoutePropertiesFormat - Properties of the route.
+ *RoutePropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Route.
+func (r Route) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.RoutePropertiesFormat != nil {
+ objectMap["properties"] = r.RoutePropertiesFormat
+ }
+ if r.Name != nil {
+ objectMap["name"] = r.Name
+ }
+ if r.Etag != nil {
+ objectMap["etag"] = r.Etag
+ }
+ if r.ID != nil {
+ objectMap["id"] = r.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Route struct.
+func (r *Route) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var routePropertiesFormat RoutePropertiesFormat
+ err = json.Unmarshal(*v, &routePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ r.RoutePropertiesFormat = &routePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ r.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ r.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ r.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// RouteFilter route Filter Resource.
+type RouteFilter struct {
+ autorest.Response `json:"-"`
+ *RouteFilterPropertiesFormat `json:"properties,omitempty"`
+ // Etag - Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for RouteFilter.
+func (rf RouteFilter) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rf.RouteFilterPropertiesFormat != nil {
+ objectMap["properties"] = rf.RouteFilterPropertiesFormat
+ }
+ if rf.Etag != nil {
+ objectMap["etag"] = rf.Etag
+ }
+ if rf.ID != nil {
+ objectMap["id"] = rf.ID
+ }
+ if rf.Name != nil {
+ objectMap["name"] = rf.Name
+ }
+ if rf.Type != nil {
+ objectMap["type"] = rf.Type
+ }
+ if rf.Location != nil {
+ objectMap["location"] = rf.Location
+ }
+ if rf.Tags != nil {
+ objectMap["tags"] = rf.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
+func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var routeFilterPropertiesFormat RouteFilterPropertiesFormat
+ err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ rf.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ rf.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ rf.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ rf.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ rf.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ rf.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// RouteFilterListResult response for the ListRouteFilters API service call.
+type RouteFilterListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of route filters in a resource group.
+ Value *[]RouteFilter `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
+type RouteFilterListResultIterator struct {
+ i int
+ page RouteFilterListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *RouteFilterListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter RouteFilterListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter RouteFilterListResultIterator) Value() RouteFilter {
+ if !iter.page.NotDone() {
+ return RouteFilter{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rflr RouteFilterListResult) IsEmpty() bool {
+ return rflr.Value == nil || len(*rflr.Value) == 0
+}
+
+// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rflr RouteFilterListResult) routeFilterListResultPreparer() (*http.Request, error) {
+ if rflr.NextLink == nil || len(to.String(rflr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rflr.NextLink)))
+}
+
+// RouteFilterListResultPage contains a page of RouteFilter values.
+type RouteFilterListResultPage struct {
+ fn func(RouteFilterListResult) (RouteFilterListResult, error)
+ rflr RouteFilterListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *RouteFilterListResultPage) Next() error {
+ next, err := page.fn(page.rflr)
+ if err != nil {
+ return err
+ }
+ page.rflr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page RouteFilterListResultPage) NotDone() bool {
+ return !page.rflr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page RouteFilterListResultPage) Response() RouteFilterListResult {
+ return page.rflr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page RouteFilterListResultPage) Values() []RouteFilter {
+ if page.rflr.IsEmpty() {
+ return nil
+ }
+ return *page.rflr.Value
+}
+
+// RouteFilterPropertiesFormat route Filter Resource
+type RouteFilterPropertiesFormat struct {
+ // Rules - Collection of RouteFilterRules contained within a route filter.
+ Rules *[]RouteFilterRule `json:"rules,omitempty"`
+ // Peerings - A collection of references to express route circuit peerings.
+ Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
+ // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// RouteFilterRule route Filter Rule Resource
+type RouteFilterRule struct {
+ autorest.Response `json:"-"`
+ *RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RouteFilterRule.
+func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rfr.RouteFilterRulePropertiesFormat != nil {
+ objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
+ }
+ if rfr.Name != nil {
+ objectMap["name"] = rfr.Name
+ }
+ if rfr.Location != nil {
+ objectMap["location"] = rfr.Location
+ }
+ if rfr.Etag != nil {
+ objectMap["etag"] = rfr.Etag
+ }
+ if rfr.ID != nil {
+ objectMap["id"] = rfr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
+func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
+ err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ rfr.Name = &name
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ rfr.Location = &location
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ rfr.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ rfr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
+type RouteFilterRuleListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of RouteFilterRules in a resource group.
+ Value *[]RouteFilterRule `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
+type RouteFilterRuleListResultIterator struct {
+ i int
+ page RouteFilterRuleListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *RouteFilterRuleListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter RouteFilterRuleListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
+ if !iter.page.NotDone() {
+ return RouteFilterRule{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
+ return rfrlr.Value == nil || len(*rfrlr.Value) == 0
+}
+
+// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer() (*http.Request, error) {
+ if rfrlr.NextLink == nil || len(to.String(rfrlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rfrlr.NextLink)))
+}
+
+// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
+type RouteFilterRuleListResultPage struct {
+ fn func(RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
+ rfrlr RouteFilterRuleListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *RouteFilterRuleListResultPage) Next() error {
+ next, err := page.fn(page.rfrlr)
+ if err != nil {
+ return err
+ }
+ page.rfrlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page RouteFilterRuleListResultPage) NotDone() bool {
+ return !page.rfrlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
+ return page.rfrlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
+ if page.rfrlr.IsEmpty() {
+ return nil
+ }
+ return *page.rfrlr.Value
+}
+
+// RouteFilterRulePropertiesFormat route Filter Rule Resource
+type RouteFilterRulePropertiesFormat struct {
+ // Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
+ Access Access `json:"access,omitempty"`
+ // RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
+ RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
+ // Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
+ Communities *[]string `json:"communities,omitempty"`
+ // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RouteFilterRulesCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RouteFilterRulesDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RouteFilterRulesUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.UpdateResponder(rfr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RouteFiltersCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type RouteFiltersDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type RouteFiltersUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.UpdateResponder(rf.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// RouteListResult response for the ListRoute API service call
+type RouteListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of routes in a resource group.
+ Value *[]Route `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// RouteListResultIterator provides access to a complete listing of Route values.
+type RouteListResultIterator struct {
+ i int
+ page RouteListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *RouteListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter RouteListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter RouteListResultIterator) Response() RouteListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter RouteListResultIterator) Value() Route {
+ if !iter.page.NotDone() {
+ return Route{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rlr RouteListResult) IsEmpty() bool {
+ return rlr.Value == nil || len(*rlr.Value) == 0
+}
+
+// routeListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rlr RouteListResult) routeListResultPreparer() (*http.Request, error) {
+ if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rlr.NextLink)))
+}
+
+// RouteListResultPage contains a page of Route values.
+type RouteListResultPage struct {
+ fn func(RouteListResult) (RouteListResult, error)
+ rlr RouteListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *RouteListResultPage) Next() error {
+ next, err := page.fn(page.rlr)
+ if err != nil {
+ return err
+ }
+ page.rlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page RouteListResultPage) NotDone() bool {
+ return !page.rlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page RouteListResultPage) Response() RouteListResult {
+ return page.rlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page RouteListResultPage) Values() []Route {
+ if page.rlr.IsEmpty() {
+ return nil
+ }
+ return *page.rlr.Value
+}
+
+// RoutePropertiesFormat route resource
+type RoutePropertiesFormat struct {
+ // AddressPrefix - The destination CIDR to which the route applies.
+ AddressPrefix *string `json:"addressPrefix,omitempty"`
+ // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
+ NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
+ // NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
+ NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
+ // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type RoutesCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type RoutesDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// RouteTable route table resource.
+type RouteTable struct {
+ autorest.Response `json:"-"`
+ // RouteTablePropertiesFormat - Properties of the route table.
+ *RouteTablePropertiesFormat `json:"properties,omitempty"`
+ // Etag - Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for RouteTable.
+func (rt RouteTable) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rt.RouteTablePropertiesFormat != nil {
+ objectMap["properties"] = rt.RouteTablePropertiesFormat
+ }
+ if rt.Etag != nil {
+ objectMap["etag"] = rt.Etag
+ }
+ if rt.ID != nil {
+ objectMap["id"] = rt.ID
+ }
+ if rt.Name != nil {
+ objectMap["name"] = rt.Name
+ }
+ if rt.Type != nil {
+ objectMap["type"] = rt.Type
+ }
+ if rt.Location != nil {
+ objectMap["location"] = rt.Location
+ }
+ if rt.Tags != nil {
+ objectMap["tags"] = rt.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
+func (rt *RouteTable) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var routeTablePropertiesFormat RouteTablePropertiesFormat
+ err = json.Unmarshal(*v, &routeTablePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ rt.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ rt.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ rt.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ rt.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ rt.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ rt.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// RouteTableListResult response for the ListRouteTable API service call.
+type RouteTableListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of route tables in a resource group.
+ Value *[]RouteTable `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
+type RouteTableListResultIterator struct {
+ i int
+ page RouteTableListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *RouteTableListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter RouteTableListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter RouteTableListResultIterator) Response() RouteTableListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter RouteTableListResultIterator) Value() RouteTable {
+ if !iter.page.NotDone() {
+ return RouteTable{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rtlr RouteTableListResult) IsEmpty() bool {
+ return rtlr.Value == nil || len(*rtlr.Value) == 0
+}
+
+// routeTableListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rtlr RouteTableListResult) routeTableListResultPreparer() (*http.Request, error) {
+ if rtlr.NextLink == nil || len(to.String(rtlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rtlr.NextLink)))
+}
+
+// RouteTableListResultPage contains a page of RouteTable values.
+type RouteTableListResultPage struct {
+ fn func(RouteTableListResult) (RouteTableListResult, error)
+ rtlr RouteTableListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *RouteTableListResultPage) Next() error {
+ next, err := page.fn(page.rtlr)
+ if err != nil {
+ return err
+ }
+ page.rtlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page RouteTableListResultPage) NotDone() bool {
+ return !page.rtlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page RouteTableListResultPage) Response() RouteTableListResult {
+ return page.rtlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page RouteTableListResultPage) Values() []RouteTable {
+ if page.rtlr.IsEmpty() {
+ return nil
+ }
+ return *page.rtlr.Value
+}
+
+// RouteTablePropertiesFormat route Table resource
+type RouteTablePropertiesFormat struct {
+ // Routes - Collection of routes contained within a route table.
+ Routes *[]Route `json:"routes,omitempty"`
+ // Subnets - A collection of references to subnets.
+ Subnets *[]Subnet `json:"subnets,omitempty"`
+ // DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
+ DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
+ // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RouteTablesCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type RouteTablesDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RouteTablesUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.UpdateTagsResponder(rt.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// SecurityGroup networkSecurityGroup resource.
+type SecurityGroup struct {
+ autorest.Response `json:"-"`
+ // SecurityGroupPropertiesFormat - Properties of the network security group
+ *SecurityGroupPropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for SecurityGroup.
+func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sg.SecurityGroupPropertiesFormat != nil {
+ objectMap["properties"] = sg.SecurityGroupPropertiesFormat
+ }
+ if sg.Etag != nil {
+ objectMap["etag"] = sg.Etag
+ }
+ if sg.ID != nil {
+ objectMap["id"] = sg.ID
+ }
+ if sg.Name != nil {
+ objectMap["name"] = sg.Name
+ }
+ if sg.Type != nil {
+ objectMap["type"] = sg.Type
+ }
+ if sg.Location != nil {
+ objectMap["location"] = sg.Location
+ }
+ if sg.Tags != nil {
+ objectMap["tags"] = sg.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
+func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
+ err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ sg.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ sg.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ sg.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ sg.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ sg.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ sg.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
+type SecurityGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of NetworkSecurityGroup resources.
+ Value *[]SecurityGroup `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
+type SecurityGroupListResultIterator struct {
+ i int
+ page SecurityGroupListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SecurityGroupListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SecurityGroupListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
+ if !iter.page.NotDone() {
+ return SecurityGroup{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (sglr SecurityGroupListResult) IsEmpty() bool {
+ return sglr.Value == nil || len(*sglr.Value) == 0
+}
+
+// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (sglr SecurityGroupListResult) securityGroupListResultPreparer() (*http.Request, error) {
+ if sglr.NextLink == nil || len(to.String(sglr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(sglr.NextLink)))
+}
+
+// SecurityGroupListResultPage contains a page of SecurityGroup values.
+type SecurityGroupListResultPage struct {
+ fn func(SecurityGroupListResult) (SecurityGroupListResult, error)
+ sglr SecurityGroupListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *SecurityGroupListResultPage) Next() error {
+ next, err := page.fn(page.sglr)
+ if err != nil {
+ return err
+ }
+ page.sglr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SecurityGroupListResultPage) NotDone() bool {
+ return !page.sglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
+ return page.sglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SecurityGroupListResultPage) Values() []SecurityGroup {
+ if page.sglr.IsEmpty() {
+ return nil
+ }
+ return *page.sglr.Value
+}
+
+// SecurityGroupNetworkInterface network interface and all its associated security rules.
+type SecurityGroupNetworkInterface struct {
+ // ID - ID of the network interface.
+ ID *string `json:"id,omitempty"`
+ SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
+}
+
+// SecurityGroupPropertiesFormat network Security Group resource.
+type SecurityGroupPropertiesFormat struct {
+ // SecurityRules - A collection of security rules of the network security group.
+ SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
+ // DefaultSecurityRules - The default security rules of network security group.
+ DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
+ // NetworkInterfaces - A collection of references to network interfaces.
+ NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
+ // Subnets - A collection of references to subnets.
+ Subnets *[]Subnet `json:"subnets,omitempty"`
+ // ResourceGUID - The resource GUID property of the network security group resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SecurityGroupsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type SecurityGroupsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SecurityGroupsUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.UpdateTagsResponder(sg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// SecurityGroupViewParameters parameters that define the VM to check security groups for.
+type SecurityGroupViewParameters struct {
+ // TargetResourceID - ID of the target VM.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+}
+
+// SecurityGroupViewResult the information about security rules applied to the specified VM.
+type SecurityGroupViewResult struct {
+ autorest.Response `json:"-"`
+ // NetworkInterfaces - List of network interfaces on the specified VM.
+ NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
+}
+
+// SecurityRule network security rule.
+type SecurityRule struct {
+ autorest.Response `json:"-"`
+ // SecurityRulePropertiesFormat - Properties of the security rule
+ *SecurityRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SecurityRule.
+func (sr SecurityRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sr.SecurityRulePropertiesFormat != nil {
+ objectMap["properties"] = sr.SecurityRulePropertiesFormat
+ }
+ if sr.Name != nil {
+ objectMap["name"] = sr.Name
+ }
+ if sr.Etag != nil {
+ objectMap["etag"] = sr.Etag
+ }
+ if sr.ID != nil {
+ objectMap["id"] = sr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
+func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var securityRulePropertiesFormat SecurityRulePropertiesFormat
+ err = json.Unmarshal(*v, &securityRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ sr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ sr.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ sr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// SecurityRuleAssociations all security rules associated with the network interface.
+type SecurityRuleAssociations struct {
+ NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
+ SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
+ // DefaultSecurityRules - Collection of default security rules of the network security group.
+ DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
+ // EffectiveSecurityRules - Collection of effective security rules.
+ EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
+}
+
+// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that belongs
+// to a network security group.
+type SecurityRuleListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The security rules in a network security group.
+ Value *[]SecurityRule `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
+type SecurityRuleListResultIterator struct {
+ i int
+ page SecurityRuleListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SecurityRuleListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SecurityRuleListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SecurityRuleListResultIterator) Value() SecurityRule {
+ if !iter.page.NotDone() {
+ return SecurityRule{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (srlr SecurityRuleListResult) IsEmpty() bool {
+ return srlr.Value == nil || len(*srlr.Value) == 0
+}
+
+// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (srlr SecurityRuleListResult) securityRuleListResultPreparer() (*http.Request, error) {
+ if srlr.NextLink == nil || len(to.String(srlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(srlr.NextLink)))
+}
+
+// SecurityRuleListResultPage contains a page of SecurityRule values.
+type SecurityRuleListResultPage struct {
+ fn func(SecurityRuleListResult) (SecurityRuleListResult, error)
+ srlr SecurityRuleListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *SecurityRuleListResultPage) Next() error {
+ next, err := page.fn(page.srlr)
+ if err != nil {
+ return err
+ }
+ page.srlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SecurityRuleListResultPage) NotDone() bool {
+ return !page.srlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
+ return page.srlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SecurityRuleListResultPage) Values() []SecurityRule {
+ if page.srlr.IsEmpty() {
+ return nil
+ }
+ return *page.srlr.Value
+}
+
+// SecurityRulePropertiesFormat security rule resource.
+type SecurityRulePropertiesFormat struct {
+ // Description - A description for this rule. Restricted to 140 chars.
+ Description *string `json:"description,omitempty"`
+ // Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
+ Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
+ // SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports.
+ SourcePortRange *string `json:"sourcePortRange,omitempty"`
+ // DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports.
+ DestinationPortRange *string `json:"destinationPortRange,omitempty"`
+ // SourceAddressPrefix - The CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
+ SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
+ // SourceAddressPrefixes - The CIDR or source IP ranges.
+ SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
+ // SourceApplicationSecurityGroups - The application security group specified as source.
+ SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
+ // DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
+ DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
+ // DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
+ DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
+ // DestinationApplicationSecurityGroups - The application security group specified as destination.
+ DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
+ // SourcePortRanges - The source port ranges.
+ SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
+ // DestinationPortRanges - The destination port ranges.
+ DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
+ // Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
+ Access SecurityRuleAccess `json:"access,omitempty"`
+ // Priority - The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
+ Priority *int32 `json:"priority,omitempty"`
+ // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outcoming traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
+ Direction SecurityRuleDirection `json:"direction,omitempty"`
+ // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SecurityRulesCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type SecurityRulesDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ServiceEndpointPropertiesFormat the service endpoint properties.
+type ServiceEndpointPropertiesFormat struct {
+ // Service - The type of the endpoint service.
+ Service *string `json:"service,omitempty"`
+ // Locations - A list of locations.
+ Locations *[]string `json:"locations,omitempty"`
+ // ProvisioningState - The provisioning state of the resource.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// String ...
+type String struct {
+ autorest.Response `json:"-"`
+ Value *string `json:"value,omitempty"`
+}
+
+// Subnet subnet in a virtual network resource.
+type Subnet struct {
+ autorest.Response `json:"-"`
+ // SubnetPropertiesFormat - Properties of the subnet.
+ *SubnetPropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Subnet.
+func (s Subnet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if s.SubnetPropertiesFormat != nil {
+ objectMap["properties"] = s.SubnetPropertiesFormat
+ }
+ if s.Name != nil {
+ objectMap["name"] = s.Name
+ }
+ if s.Etag != nil {
+ objectMap["etag"] = s.Etag
+ }
+ if s.ID != nil {
+ objectMap["id"] = s.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Subnet struct.
+func (s *Subnet) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var subnetPropertiesFormat SubnetPropertiesFormat
+ err = json.Unmarshal(*v, &subnetPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ s.SubnetPropertiesFormat = &subnetPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ s.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ s.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ s.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// SubnetAssociation network interface and its custom security rules.
+type SubnetAssociation struct {
+ // ID - Subnet ID.
+ ID *string `json:"id,omitempty"`
+ // SecurityRules - Collection of custom security rules.
+ SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
+}
+
+// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network
+type SubnetListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The subnets in a virtual network.
+ Value *[]Subnet `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SubnetListResultIterator provides access to a complete listing of Subnet values.
+type SubnetListResultIterator struct {
+ i int
+ page SubnetListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SubnetListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SubnetListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SubnetListResultIterator) Response() SubnetListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SubnetListResultIterator) Value() Subnet {
+ if !iter.page.NotDone() {
+ return Subnet{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (slr SubnetListResult) IsEmpty() bool {
+ return slr.Value == nil || len(*slr.Value) == 0
+}
+
+// subnetListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (slr SubnetListResult) subnetListResultPreparer() (*http.Request, error) {
+ if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(slr.NextLink)))
+}
+
+// SubnetListResultPage contains a page of Subnet values.
+type SubnetListResultPage struct {
+ fn func(SubnetListResult) (SubnetListResult, error)
+ slr SubnetListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *SubnetListResultPage) Next() error {
+ next, err := page.fn(page.slr)
+ if err != nil {
+ return err
+ }
+ page.slr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SubnetListResultPage) NotDone() bool {
+ return !page.slr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SubnetListResultPage) Response() SubnetListResult {
+ return page.slr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SubnetListResultPage) Values() []Subnet {
+ if page.slr.IsEmpty() {
+ return nil
+ }
+ return *page.slr.Value
+}
+
+// SubnetPropertiesFormat properties of the subnet.
+type SubnetPropertiesFormat struct {
+ // AddressPrefix - The address prefix for the subnet.
+ AddressPrefix *string `json:"addressPrefix,omitempty"`
+ // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
+ NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
+ // RouteTable - The reference of the RouteTable resource.
+ RouteTable *RouteTable `json:"routeTable,omitempty"`
+ // ServiceEndpoints - An array of service endpoints.
+ ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
+ // IPConfigurations - Gets an array of references to the network interface IP configurations using subnet.
+ IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
+ // ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
+ ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
+ // ProvisioningState - The provisioning state of the resource.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SubnetsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type SubnetsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// SubResource reference to another subresource.
+type SubResource struct {
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// TagsObject tags object for patch operations.
+type TagsObject struct {
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for TagsObject.
+func (toVar TagsObject) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if toVar.Tags != nil {
+ objectMap["tags"] = toVar.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// Topology topology of the specified resource group.
+type Topology struct {
+ autorest.Response `json:"-"`
+ // ID - GUID representing the operation id.
+ ID *string `json:"id,omitempty"`
+ // CreatedDateTime - The datetime when the topology was initially created for the resource group.
+ CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
+ // LastModified - The datetime when the topology was last modified.
+ LastModified *date.Time `json:"lastModified,omitempty"`
+ Resources *[]TopologyResource `json:"resources,omitempty"`
+}
+
+// TopologyAssociation resources that have an association with the parent resource.
+type TopologyAssociation struct {
+ // Name - The name of the resource that is associated with the parent resource.
+ Name *string `json:"name,omitempty"`
+ // ResourceID - The ID of the resource that is associated with the parent resource.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
+ AssociationType AssociationType `json:"associationType,omitempty"`
+}
+
+// TopologyParameters parameters that define the representation of topology.
+type TopologyParameters struct {
+ // TargetResourceGroupName - The name of the target resource group to perform topology on.
+ TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
+ // TargetVirtualNetwork - The reference of the Virtual Network resource.
+ TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
+ // TargetSubnet - The reference of the Subnet resource.
+ TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
+}
+
+// TopologyResource the network resource topology information for the given resource group.
+type TopologyResource struct {
+ // Name - Name of the resource.
+ Name *string `json:"name,omitempty"`
+ // ID - ID of the resource.
+ ID *string `json:"id,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Associations - Holds the associations the resource has with other resources in the resource group.
+ Associations *[]TopologyAssociation `json:"associations,omitempty"`
+}
+
+// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
+type TrafficAnalyticsConfigurationProperties struct {
+ // Enabled - Flag to enable/disable traffic analytics.
+ Enabled *bool `json:"enabled,omitempty"`
+ // WorkspaceID - The resource guid of the attached workspace
+ WorkspaceID *string `json:"workspaceId,omitempty"`
+ // WorkspaceRegion - The location of the attached workspace
+ WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
+ // WorkspaceResourceID - Resource Id of the attached workspace
+ WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
+}
+
+// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
+type TrafficAnalyticsProperties struct {
+ NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
+}
+
+// TroubleshootingDetails information gained from troubleshooting of specified resource.
+type TroubleshootingDetails struct {
+ // ID - The id of the get troubleshoot operation.
+ ID *string `json:"id,omitempty"`
+ // ReasonType - Reason type of failure.
+ ReasonType *string `json:"reasonType,omitempty"`
+ // Summary - A summary of troubleshooting.
+ Summary *string `json:"summary,omitempty"`
+ // Detail - Details on troubleshooting results.
+ Detail *string `json:"detail,omitempty"`
+ // RecommendedActions - List of recommended actions.
+ RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
+}
+
+// TroubleshootingParameters parameters that define the resource to troubleshoot.
+type TroubleshootingParameters struct {
+ // TargetResourceID - The target resource to troubleshoot.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+ *TroubleshootingProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for TroubleshootingParameters.
+func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if tp.TargetResourceID != nil {
+ objectMap["targetResourceId"] = tp.TargetResourceID
+ }
+ if tp.TroubleshootingProperties != nil {
+ objectMap["properties"] = tp.TroubleshootingProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
+func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "targetResourceId":
+ if v != nil {
+ var targetResourceID string
+ err = json.Unmarshal(*v, &targetResourceID)
+ if err != nil {
+ return err
+ }
+ tp.TargetResourceID = &targetResourceID
+ }
+ case "properties":
+ if v != nil {
+ var troubleshootingProperties TroubleshootingProperties
+ err = json.Unmarshal(*v, &troubleshootingProperties)
+ if err != nil {
+ return err
+ }
+ tp.TroubleshootingProperties = &troubleshootingProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// TroubleshootingProperties storage location provided for troubleshoot.
+type TroubleshootingProperties struct {
+ // StorageID - The ID for the storage account to save the troubleshoot result.
+ StorageID *string `json:"storageId,omitempty"`
+ // StoragePath - The path to the blob to save the troubleshoot result in.
+ StoragePath *string `json:"storagePath,omitempty"`
+}
+
+// TroubleshootingRecommendedActions recommended actions based on discovered issues.
+type TroubleshootingRecommendedActions struct {
+ // ActionID - ID of the recommended action.
+ ActionID *string `json:"actionId,omitempty"`
+ // ActionText - Description of recommended actions.
+ ActionText *string `json:"actionText,omitempty"`
+ // ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
+ ActionURI *string `json:"actionUri,omitempty"`
+ // ActionURIText - The information from the URI for the recommended troubleshooting actions.
+ ActionURIText *string `json:"actionUriText,omitempty"`
+}
+
+// TroubleshootingResult troubleshooting information gained from specified resource.
+type TroubleshootingResult struct {
+ autorest.Response `json:"-"`
+ // StartTime - The start time of the troubleshooting.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - The end time of the troubleshooting.
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // Code - The result code of the troubleshooting.
+ Code *string `json:"code,omitempty"`
+ // Results - Information from troubleshooting.
+ Results *[]TroubleshootingDetails `json:"results,omitempty"`
+}
+
+// TunnelConnectionHealth virtualNetworkGatewayConnection properties
+type TunnelConnectionHealth struct {
+ // Tunnel - Tunnel name.
+ Tunnel *string `json:"tunnel,omitempty"`
+ // ConnectionStatus - Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
+ ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
+ // IngressBytesTransferred - The Ingress Bytes Transferred in this connection
+ IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
+ // EgressBytesTransferred - The Egress Bytes Transferred in this connection
+ EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
+ // LastConnectionEstablishedUtcTime - The time at which connection was established in Utc format.
+ LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
+}
+
+// Usage describes network resource usage.
+type Usage struct {
+ // ID - Resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Unit - An enum describing the unit of measurement.
+ Unit *string `json:"unit,omitempty"`
+ // CurrentValue - The current value of the usage.
+ CurrentValue *int64 `json:"currentValue,omitempty"`
+ // Limit - The limit of usage.
+ Limit *int64 `json:"limit,omitempty"`
+ // Name - The name of the type of usage.
+ Name *UsageName `json:"name,omitempty"`
+}
+
+// UsageName the usage names.
+type UsageName struct {
+ // Value - A string describing the resource name.
+ Value *string `json:"value,omitempty"`
+ // LocalizedValue - A localized string describing the resource name.
+ LocalizedValue *string `json:"localizedValue,omitempty"`
+}
+
+// UsagesListResult the list usages operation response.
+type UsagesListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list network resource usages.
+ Value *[]Usage `json:"value,omitempty"`
+ // NextLink - URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// UsagesListResultIterator provides access to a complete listing of Usage values.
+type UsagesListResultIterator struct {
+ i int
+ page UsagesListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *UsagesListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter UsagesListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter UsagesListResultIterator) Response() UsagesListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter UsagesListResultIterator) Value() Usage {
+ if !iter.page.NotDone() {
+ return Usage{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ulr UsagesListResult) IsEmpty() bool {
+ return ulr.Value == nil || len(*ulr.Value) == 0
+}
+
+// usagesListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ulr UsagesListResult) usagesListResultPreparer() (*http.Request, error) {
+ if ulr.NextLink == nil || len(to.String(ulr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ulr.NextLink)))
+}
+
+// UsagesListResultPage contains a page of Usage values.
+type UsagesListResultPage struct {
+ fn func(UsagesListResult) (UsagesListResult, error)
+ ulr UsagesListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *UsagesListResultPage) Next() error {
+ next, err := page.fn(page.ulr)
+ if err != nil {
+ return err
+ }
+ page.ulr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page UsagesListResultPage) NotDone() bool {
+ return !page.ulr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page UsagesListResultPage) Response() UsagesListResult {
+ return page.ulr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page UsagesListResultPage) Values() []Usage {
+ if page.ulr.IsEmpty() {
+ return nil
+ }
+ return *page.ulr.Value
+}
+
+// VerificationIPFlowParameters parameters that define the IP flow to be verified.
+type VerificationIPFlowParameters struct {
+ // TargetResourceID - The ID of the target resource to perform next-hop on.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+ // Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
+ Direction Direction `json:"direction,omitempty"`
+ // Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
+ Protocol IPFlowProtocol `json:"protocol,omitempty"`
+ // LocalPort - The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction.
+ LocalPort *string `json:"localPort,omitempty"`
+ // RemotePort - The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction.
+ RemotePort *string `json:"remotePort,omitempty"`
+ // LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
+ LocalIPAddress *string `json:"localIPAddress,omitempty"`
+ // RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
+ RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
+ // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional).
+ TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
+}
+
+// VerificationIPFlowResult results of IP flow verification on the target resource.
+type VerificationIPFlowResult struct {
+ autorest.Response `json:"-"`
+ // Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
+ Access Access `json:"access,omitempty"`
+ // RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
+ RuleName *string `json:"ruleName,omitempty"`
+}
+
+// VirtualNetwork virtual Network resource.
+type VirtualNetwork struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkPropertiesFormat - Properties of the virtual network.
+ *VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
+ // Etag - Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetwork.
+func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vn.VirtualNetworkPropertiesFormat != nil {
+ objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
+ }
+ if vn.Etag != nil {
+ objectMap["etag"] = vn.Etag
+ }
+ if vn.ID != nil {
+ objectMap["id"] = vn.ID
+ }
+ if vn.Name != nil {
+ objectMap["name"] = vn.Name
+ }
+ if vn.Type != nil {
+ objectMap["type"] = vn.Type
+ }
+ if vn.Location != nil {
+ objectMap["location"] = vn.Location
+ }
+ if vn.Tags != nil {
+ objectMap["tags"] = vn.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
+func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
+ err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vn.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vn.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vn.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vn.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vn.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vn.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway resource.
+type VirtualNetworkConnectionGatewayReference struct {
+ // ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
+ ID *string `json:"id,omitempty"`
+}
+
+// VirtualNetworkGateway a common class for general resource information
+type VirtualNetworkGateway struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
+ *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
+ // Etag - Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
+func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vng.VirtualNetworkGatewayPropertiesFormat != nil {
+ objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
+ }
+ if vng.Etag != nil {
+ objectMap["etag"] = vng.Etag
+ }
+ if vng.ID != nil {
+ objectMap["id"] = vng.ID
+ }
+ if vng.Name != nil {
+ objectMap["name"] = vng.Name
+ }
+ if vng.Type != nil {
+ objectMap["type"] = vng.Type
+ }
+ if vng.Location != nil {
+ objectMap["location"] = vng.Location
+ }
+ if vng.Tags != nil {
+ objectMap["tags"] = vng.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
+func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
+ err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vng.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vng.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vng.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vng.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vng.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vng.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkGatewayConnection a common class for general resource information
+type VirtualNetworkGatewayConnection struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
+ *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
+ // Etag - Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
+func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
+ objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
+ }
+ if vngc.Etag != nil {
+ objectMap["etag"] = vngc.Etag
+ }
+ if vngc.ID != nil {
+ objectMap["id"] = vngc.ID
+ }
+ if vngc.Name != nil {
+ objectMap["name"] = vngc.Name
+ }
+ if vngc.Type != nil {
+ objectMap["type"] = vngc.Type
+ }
+ if vngc.Location != nil {
+ objectMap["location"] = vngc.Location
+ }
+ if vngc.Tags != nil {
+ objectMap["tags"] = vngc.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
+func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
+ err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vngc.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vngc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vngc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vngc.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vngc.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vngc.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
+type VirtualNetworkGatewayConnectionListEntity struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
+ *VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
+ // Etag - Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
+func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
+ objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
+ }
+ if vngcle.Etag != nil {
+ objectMap["etag"] = vngcle.Etag
+ }
+ if vngcle.ID != nil {
+ objectMap["id"] = vngcle.ID
+ }
+ if vngcle.Name != nil {
+ objectMap["name"] = vngcle.Name
+ }
+ if vngcle.Type != nil {
+ objectMap["type"] = vngcle.Type
+ }
+ if vngcle.Location != nil {
+ objectMap["location"] = vngcle.Location
+ }
+ if vngcle.Tags != nil {
+ objectMap["tags"] = vngcle.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
+func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
+ err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vngcle.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vngcle.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vngcle.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vngcle.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vngcle.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vngcle.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
+type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
+ // AuthorizationKey - The authorizationKey.
+ AuthorizationKey *string `json:"authorizationKey,omitempty"`
+ // VirtualNetworkGateway1 - The reference to virtual network gateway resource.
+ VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
+ // VirtualNetworkGateway2 - The reference to virtual network gateway resource.
+ VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
+ // LocalNetworkGateway2 - The reference to local network gateway resource.
+ LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
+ // ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
+ ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
+ // RoutingWeight - The routing weight.
+ RoutingWeight *int32 `json:"routingWeight,omitempty"`
+ // SharedKey - The IPSec shared key.
+ SharedKey *string `json:"sharedKey,omitempty"`
+ // ConnectionStatus - Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
+ ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
+ // TunnelConnectionStatus - Collection of all tunnels' connection health status.
+ TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
+ // EgressBytesTransferred - The egress bytes transferred in this connection.
+ EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
+ // IngressBytesTransferred - The ingress bytes transferred in this connection.
+ IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
+ // Peer - The reference to peerings resource.
+ Peer *SubResource `json:"peer,omitempty"`
+ // EnableBgp - EnableBgp flag
+ EnableBgp *bool `json:"enableBgp,omitempty"`
+ // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
+ UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
+ // IpsecPolicies - The IPSec Policies to be considered by this connection.
+ IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
+ // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API service call
+type VirtualNetworkGatewayConnectionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
+ Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
+// VirtualNetworkGatewayConnection values.
+type VirtualNetworkGatewayConnectionListResultIterator struct {
+ i int
+ page VirtualNetworkGatewayConnectionListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
+ if !iter.page.NotDone() {
+ return VirtualNetworkGatewayConnection{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
+ return vngclr.Value == nil || len(*vngclr.Value) == 0
+}
+
+// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer() (*http.Request, error) {
+ if vngclr.NextLink == nil || len(to.String(vngclr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vngclr.NextLink)))
+}
+
+// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
+type VirtualNetworkGatewayConnectionListResultPage struct {
+ fn func(VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
+ vngclr VirtualNetworkGatewayConnectionListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
+ next, err := page.fn(page.vngclr)
+ if err != nil {
+ return err
+ }
+ page.vngclr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
+ return !page.vngclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
+ return page.vngclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
+ if page.vngclr.IsEmpty() {
+ return nil
+ }
+ return *page.vngclr.Value
+}
+
+// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
+type VirtualNetworkGatewayConnectionPropertiesFormat struct {
+ // AuthorizationKey - The authorizationKey.
+ AuthorizationKey *string `json:"authorizationKey,omitempty"`
+ // VirtualNetworkGateway1 - The reference to virtual network gateway resource.
+ VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
+ // VirtualNetworkGateway2 - The reference to virtual network gateway resource.
+ VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
+ // LocalNetworkGateway2 - The reference to local network gateway resource.
+ LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
+ // ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
+ ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
+ // RoutingWeight - The routing weight.
+ RoutingWeight *int32 `json:"routingWeight,omitempty"`
+ // SharedKey - The IPSec shared key.
+ SharedKey *string `json:"sharedKey,omitempty"`
+ // ConnectionStatus - Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
+ ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
+ // TunnelConnectionStatus - Collection of all tunnels' connection health status.
+ TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
+ // EgressBytesTransferred - The egress bytes transferred in this connection.
+ EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
+ // IngressBytesTransferred - The ingress bytes transferred in this connection.
+ IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
+ // Peer - The reference to peerings resource.
+ Peer *SubResource `json:"peer,omitempty"`
+ // EnableBgp - EnableBgp flag
+ EnableBgp *bool `json:"enableBgp,omitempty"`
+ // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
+ UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
+ // IpsecPolicies - The IPSec Policies to be considered by this connection.
+ IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
+ // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkGatewayConnectionsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngcle.Response.Response, err = future.GetResult(sender); err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent {
+ vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
+type VirtualNetworkGatewayIPConfiguration struct {
+ // VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
+ *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
+func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
+ }
+ if vngic.Name != nil {
+ objectMap["name"] = vngic.Name
+ }
+ if vngic.Etag != nil {
+ objectMap["etag"] = vngic.Etag
+ }
+ if vngic.ID != nil {
+ objectMap["id"] = vngic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
+func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vngic.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vngic.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vngic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
+type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
+ // PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
+ PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
+ // Subnet - The reference of the subnet resource.
+ Subnet *SubResource `json:"subnet,omitempty"`
+ // PublicIPAddress - The reference of the public IP resource.
+ PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
+ // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API service
+// call
+type VirtualNetworkGatewayListConnectionsResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
+ Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
+// VirtualNetworkGatewayConnectionListEntity values.
+type VirtualNetworkGatewayListConnectionsResultIterator struct {
+ i int
+ page VirtualNetworkGatewayListConnectionsResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
+ if !iter.page.NotDone() {
+ return VirtualNetworkGatewayConnectionListEntity{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
+ return vnglcr.Value == nil || len(*vnglcr.Value) == 0
+}
+
+// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer() (*http.Request, error) {
+ if vnglcr.NextLink == nil || len(to.String(vnglcr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnglcr.NextLink)))
+}
+
+// VirtualNetworkGatewayListConnectionsResultPage contains a page of VirtualNetworkGatewayConnectionListEntity
+// values.
+type VirtualNetworkGatewayListConnectionsResultPage struct {
+ fn func(VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
+ vnglcr VirtualNetworkGatewayListConnectionsResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
+ next, err := page.fn(page.vnglcr)
+ if err != nil {
+ return err
+ }
+ page.vnglcr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
+ return !page.vnglcr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
+ return page.vnglcr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
+ if page.vnglcr.IsEmpty() {
+ return nil
+ }
+ return *page.vnglcr.Value
+}
+
+// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
+type VirtualNetworkGatewayListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
+ Value *[]VirtualNetworkGateway `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway values.
+type VirtualNetworkGatewayListResultIterator struct {
+ i int
+ page VirtualNetworkGatewayListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
+ if !iter.page.NotDone() {
+ return VirtualNetworkGateway{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
+ return vnglr.Value == nil || len(*vnglr.Value) == 0
+}
+
+// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer() (*http.Request, error) {
+ if vnglr.NextLink == nil || len(to.String(vnglr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnglr.NextLink)))
+}
+
+// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
+type VirtualNetworkGatewayListResultPage struct {
+ fn func(VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
+ vnglr VirtualNetworkGatewayListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualNetworkGatewayListResultPage) Next() error {
+ next, err := page.fn(page.vnglr)
+ if err != nil {
+ return err
+ }
+ page.vnglr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
+ return !page.vnglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
+ return page.vnglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
+ if page.vnglr.IsEmpty() {
+ return nil
+ }
+ return *page.vnglr.Value
+}
+
+// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
+type VirtualNetworkGatewayPropertiesFormat struct {
+ // IPConfigurations - IP configurations for virtual network gateway.
+ IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
+ // GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
+ GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
+ // VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
+ VpnType VpnType `json:"vpnType,omitempty"`
+ // EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
+ EnableBgp *bool `json:"enableBgp,omitempty"`
+ // ActiveActive - ActiveActive flag
+ ActiveActive *bool `json:"activeActive,omitempty"`
+ // GatewayDefaultSite - The reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting.
+ GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
+ // Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
+ Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
+ // VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
+ VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
+ // BgpSettings - Virtual network gateway's BGP speaker settings.
+ BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
+ // ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualNetworkGatewaysDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GenerateVpnProfileResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
+type VirtualNetworkGatewaySku struct {
+ // Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
+ Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
+ // Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
+ Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
+ // Capacity - The capacity.
+ Capacity *int32 `json:"capacity,omitempty"`
+}
+
+// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualNetworkGatewaysResetFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkGatewaysUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.UpdateTagsResponder(vng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
+type VirtualNetworkListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of VirtualNetwork resources in a resource group.
+ Value *[]VirtualNetwork `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
+type VirtualNetworkListResultIterator struct {
+ i int
+ page VirtualNetworkListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualNetworkListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
+ if !iter.page.NotDone() {
+ return VirtualNetwork{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnlr VirtualNetworkListResult) IsEmpty() bool {
+ return vnlr.Value == nil || len(*vnlr.Value) == 0
+}
+
+// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer() (*http.Request, error) {
+ if vnlr.NextLink == nil || len(to.String(vnlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnlr.NextLink)))
+}
+
+// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
+type VirtualNetworkListResultPage struct {
+ fn func(VirtualNetworkListResult) (VirtualNetworkListResult, error)
+ vnlr VirtualNetworkListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualNetworkListResultPage) Next() error {
+ next, err := page.fn(page.vnlr)
+ if err != nil {
+ return err
+ }
+ page.vnlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkListResultPage) NotDone() bool {
+ return !page.vnlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
+ return page.vnlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
+ if page.vnlr.IsEmpty() {
+ return nil
+ }
+ return *page.vnlr.Value
+}
+
+// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
+type VirtualNetworkListUsageResult struct {
+ autorest.Response `json:"-"`
+ // Value - VirtualNetwork usage stats.
+ Value *[]VirtualNetworkUsage `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage values.
+type VirtualNetworkListUsageResultIterator struct {
+ i int
+ page VirtualNetworkListUsageResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualNetworkListUsageResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
+ if !iter.page.NotDone() {
+ return VirtualNetworkUsage{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
+ return vnlur.Value == nil || len(*vnlur.Value) == 0
+}
+
+// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer() (*http.Request, error) {
+ if vnlur.NextLink == nil || len(to.String(vnlur.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnlur.NextLink)))
+}
+
+// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
+type VirtualNetworkListUsageResultPage struct {
+ fn func(VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
+ vnlur VirtualNetworkListUsageResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualNetworkListUsageResultPage) Next() error {
+ next, err := page.fn(page.vnlur)
+ if err != nil {
+ return err
+ }
+ page.vnlur = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkListUsageResultPage) NotDone() bool {
+ return !page.vnlur.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
+ return page.vnlur
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
+ if page.vnlur.IsEmpty() {
+ return nil
+ }
+ return *page.vnlur.Value
+}
+
+// VirtualNetworkPeering peerings in a virtual network resource.
+type VirtualNetworkPeering struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
+ *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
+func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
+ objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
+ }
+ if vnp.Name != nil {
+ objectMap["name"] = vnp.Name
+ }
+ if vnp.Etag != nil {
+ objectMap["etag"] = vnp.Etag
+ }
+ if vnp.ID != nil {
+ objectMap["id"] = vnp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
+func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
+ err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vnp.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vnp.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vnp.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that belong to
+// a virtual network.
+type VirtualNetworkPeeringListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The peerings in a virtual network.
+ Value *[]VirtualNetworkPeering `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering values.
+type VirtualNetworkPeeringListResultIterator struct {
+ i int
+ page VirtualNetworkPeeringListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
+ if !iter.page.NotDone() {
+ return VirtualNetworkPeering{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
+ return vnplr.Value == nil || len(*vnplr.Value) == 0
+}
+
+// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer() (*http.Request, error) {
+ if vnplr.NextLink == nil || len(to.String(vnplr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnplr.NextLink)))
+}
+
+// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
+type VirtualNetworkPeeringListResultPage struct {
+ fn func(VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
+ vnplr VirtualNetworkPeeringListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualNetworkPeeringListResultPage) Next() error {
+ next, err := page.fn(page.vnplr)
+ if err != nil {
+ return err
+ }
+ page.vnplr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
+ return !page.vnplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
+ return page.vnplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
+ if page.vnplr.IsEmpty() {
+ return nil
+ }
+ return *page.vnplr.Value
+}
+
+// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
+type VirtualNetworkPeeringPropertiesFormat struct {
+ // AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
+ AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
+ // AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
+ AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
+ // AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
+ AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
+ // UseRemoteGateways - If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
+ UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
+ // RemoteVirtualNetwork - The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
+ RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
+ // RemoteAddressSpace - The reference of the remote virtual network address space.
+ RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
+ // PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
+ PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
+ // ProvisioningState - The provisioning state of the resource.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualNetworkPeeringsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualNetworkPropertiesFormat properties of the virtual network.
+type VirtualNetworkPropertiesFormat struct {
+ // AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
+ AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
+ // DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
+ DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
+ // Subnets - A list of subnets in a Virtual Network.
+ Subnets *[]Subnet `json:"subnets,omitempty"`
+ // VirtualNetworkPeerings - A list of peerings in a Virtual Network.
+ VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
+ // ResourceGUID - The resourceGuid property of the Virtual Network resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource.
+ EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
+ // EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
+ EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
+ // DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
+ DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
+}
+
+// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualNetworksCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualNetworksDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualNetworksUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.UpdateTagsResponder(vn.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkUsage usage details for subnet.
+type VirtualNetworkUsage struct {
+ // CurrentValue - Indicates number of IPs used from the Subnet.
+ CurrentValue *float64 `json:"currentValue,omitempty"`
+ // ID - Subnet identifier.
+ ID *string `json:"id,omitempty"`
+ // Limit - Indicates the size of the subnet.
+ Limit *float64 `json:"limit,omitempty"`
+ // Name - The name containing common and localized value for usage.
+ Name *VirtualNetworkUsageName `json:"name,omitempty"`
+ // Unit - Usage units. Returns 'Count'
+ Unit *string `json:"unit,omitempty"`
+}
+
+// VirtualNetworkUsageName usage strings container.
+type VirtualNetworkUsageName struct {
+ // LocalizedValue - Localized subnet size and usage string.
+ LocalizedValue *string `json:"localizedValue,omitempty"`
+ // Value - Subnet size and usage string.
+ Value *string `json:"value,omitempty"`
+}
+
+// VpnClientConfiguration vpnClientConfiguration for P2S client.
+type VpnClientConfiguration struct {
+ // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
+ VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
+ // VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
+ VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
+ // VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
+ VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
+ // VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
+ VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
+ // VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
+ VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
+ // RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
+ RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
+ // RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
+ RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
+}
+
+// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
+type VpnClientIPsecParameters struct {
+ // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
+ SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
+ // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
+ SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
+ // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
+ IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
+ // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
+ IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
+ // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
+ IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
+ // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
+ IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
+ // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
+ DhGroup DhGroup `json:"dhGroup,omitempty"`
+ // PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
+ PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
+}
+
+// VpnClientParameters vpn Client Parameters for package generation
+type VpnClientParameters struct {
+ // ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
+ ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
+ // AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
+ AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
+ // RadiusServerAuthCertificate - The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication.
+ RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
+ // ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
+ ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
+}
+
+// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
+type VpnClientRevokedCertificate struct {
+ // VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
+ *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
+func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
+ objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
+ }
+ if vcrc.Name != nil {
+ objectMap["name"] = vcrc.Name
+ }
+ if vcrc.Etag != nil {
+ objectMap["etag"] = vcrc.Etag
+ }
+ if vcrc.ID != nil {
+ objectMap["id"] = vcrc.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
+func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
+ err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vcrc.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vcrc.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vcrc.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual network
+// gateway.
+type VpnClientRevokedCertificatePropertiesFormat struct {
+ // Thumbprint - The revoked VPN client certificate thumbprint.
+ Thumbprint *string `json:"thumbprint,omitempty"`
+ // ProvisioningState - The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// VpnClientRootCertificate VPN client root certificate of virtual network gateway
+type VpnClientRootCertificate struct {
+ // VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
+ *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
+ // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
+func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
+ objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
+ }
+ if vcrc.Name != nil {
+ objectMap["name"] = vcrc.Name
+ }
+ if vcrc.Etag != nil {
+ objectMap["etag"] = vcrc.Etag
+ }
+ if vcrc.ID != nil {
+ objectMap["id"] = vcrc.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
+func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
+ err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vcrc.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vcrc.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vcrc.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
+type VpnClientRootCertificatePropertiesFormat struct {
+ // PublicCertData - The certificate public data.
+ PublicCertData *string `json:"publicCertData,omitempty"`
+ // ProvisioningState - The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// VpnDeviceScriptParameters vpn device configuration script generation parameters
+type VpnDeviceScriptParameters struct {
+ // Vendor - The vendor for the vpn device.
+ Vendor *string `json:"vendor,omitempty"`
+ // DeviceFamily - The device family for the vpn device.
+ DeviceFamily *string `json:"deviceFamily,omitempty"`
+ // FirmwareVersion - The firmware version for the vpn device.
+ FirmwareVersion *string `json:"firmwareVersion,omitempty"`
+}
+
+// Watcher network watcher in a resource group.
+type Watcher struct {
+ autorest.Response `json:"-"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ *WatcherPropertiesFormat `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Watcher.
+func (w Watcher) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if w.Etag != nil {
+ objectMap["etag"] = w.Etag
+ }
+ if w.WatcherPropertiesFormat != nil {
+ objectMap["properties"] = w.WatcherPropertiesFormat
+ }
+ if w.ID != nil {
+ objectMap["id"] = w.ID
+ }
+ if w.Name != nil {
+ objectMap["name"] = w.Name
+ }
+ if w.Type != nil {
+ objectMap["type"] = w.Type
+ }
+ if w.Location != nil {
+ objectMap["location"] = w.Location
+ }
+ if w.Tags != nil {
+ objectMap["tags"] = w.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Watcher struct.
+func (w *Watcher) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ w.Etag = &etag
+ }
+ case "properties":
+ if v != nil {
+ var watcherPropertiesFormat WatcherPropertiesFormat
+ err = json.Unmarshal(*v, &watcherPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ w.WatcherPropertiesFormat = &watcherPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ w.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ w.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ w.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ w.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ w.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// WatcherListResult list of network watcher resources.
+type WatcherListResult struct {
+ autorest.Response `json:"-"`
+ Value *[]Watcher `json:"value,omitempty"`
+}
+
+// WatcherPropertiesFormat the network watcher properties.
+type WatcherPropertiesFormat struct {
+ // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+}
+
+// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type WatchersCheckConnectivityFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CheckConnectivityResponder(ci.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type WatchersDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type WatchersGetAzureReachabilityReportFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
+ arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type WatchersGetFlowLogStatusFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type WatchersGetNextHopFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type WatchersGetTroubleshootingFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type WatchersGetTroubleshootingResultFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type WatchersGetVMSecurityRulesFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type WatchersListAvailableProvidersFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
+ apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type WatchersSetFlowLogConfigurationFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type WatchersVerifyIPFlowFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/operations.go
new file mode 100644
index 000000000..5ed764acd
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/operations.go
@@ -0,0 +1,126 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// OperationsClient is the network Client
+type OperationsClient struct {
+ BaseClient
+}
+
+// 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 Network Rest API operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.olr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.olr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Network/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// 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, "network.OperationsClient", "listNextResults", 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.OperationsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.OperationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/packetcaptures.go
new file mode 100644
index 000000000..6cc5a36ec
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/packetcaptures.go
@@ -0,0 +1,479 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// PacketCapturesClient is the network Client
+type PacketCapturesClient struct {
+ BaseClient
+}
+
+// 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.
+func NewPacketCapturesClientWithBaseURI(baseURI string, subscriptionID string) PacketCapturesClient {
+ return PacketCapturesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create create and start a packet capture on the specified VM.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher.
+// packetCaptureName - the name of the packet capture session.
+// parameters - parameters that define the create packet capture operation.
+func (client PacketCapturesClient) Create(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture) (result PacketCapturesCreateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.PacketCaptureParameters", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.PacketCaptureParameters.Target", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.PacketCaptureParameters.StorageLocation", Name: validation.Null, Rule: true, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("network.PacketCapturesClient", "Create", err.Error())
+ }
+
+ req, err := client.CreatePreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "networkWatcherName": autorest.Encode("path", networkWatcherName),
+ "packetCaptureName": autorest.Encode("path", packetCaptureName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client PacketCapturesClient) CreateResponder(resp *http.Response) (result PacketCaptureResult, 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 the specified packet capture session.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher.
+// packetCaptureName - the name of the packet capture session.
+func (client PacketCapturesClient) Delete(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCapturesDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "networkWatcherName": autorest.Encode("path", networkWatcherName),
+ "packetCaptureName": autorest.Encode("path", packetCaptureName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client PacketCapturesClient) 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 packet capture session by name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher.
+// packetCaptureName - the name of the packet capture session.
+func (client PacketCapturesClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCaptureResult, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "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.PacketCapturesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client PacketCapturesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "networkWatcherName": autorest.Encode("path", networkWatcherName),
+ "packetCaptureName": autorest.Encode("path", packetCaptureName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client PacketCapturesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client PacketCapturesClient) GetResponder(resp *http.Response) (result PacketCaptureResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetStatus query the status of a running packet capture session.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the Network Watcher resource.
+// packetCaptureName - the name given to the packet capture session.
+func (client PacketCapturesClient) GetStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCapturesGetStatusFuture, err error) {
+ req, err := client.GetStatusPreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GetStatusSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GetStatusPreparer prepares the GetStatus request.
+func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "networkWatcherName": autorest.Encode("path", networkWatcherName),
+ "packetCaptureName": autorest.Encode("path", packetCaptureName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetStatusSender sends the GetStatus request. The method will close the
+// http.Response Body if it receives an error.
+func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// GetStatusResponder handles the response to the GetStatus request. The method always
+// closes the http.Response Body.
+func (client PacketCapturesClient) GetStatusResponder(resp *http.Response) (result PacketCaptureQueryStatusResult, 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 packet capture sessions within the specified resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the Network Watcher resource.
+func (client PacketCapturesClient) List(ctx context.Context, resourceGroupName string, networkWatcherName string) (result PacketCaptureListResult, err error) {
+ req, err := client.ListPreparer(ctx, resourceGroupName, networkWatcherName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "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.PacketCapturesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client PacketCapturesClient) ListPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string) (*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 = "2018-05-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/networkWatchers/{networkWatcherName}/packetCaptures", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client PacketCapturesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client PacketCapturesClient) ListResponder(resp *http.Response) (result PacketCaptureListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Stop stops a specified packet capture session.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher.
+// packetCaptureName - the name of the packet capture session.
+func (client PacketCapturesClient) Stop(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCapturesStopFuture, err error) {
+ req, err := client.StopPreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StopSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StopPreparer prepares the Stop request.
+func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "networkWatcherName": autorest.Encode("path", networkWatcherName),
+ "packetCaptureName": autorest.Encode("path", packetCaptureName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StopSender sends the Stop request. The method will close the
+// http.Response Body if it receives an error.
+func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// StopResponder handles the response to the Stop request. The method always
+// closes the http.Response Body.
+func (client PacketCapturesClient) StopResponder(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/services/network/mgmt/2018-05-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/publicipaddresses.go
new file mode 100644
index 000000000..00b67f612
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/publicipaddresses.go
@@ -0,0 +1,801 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// PublicIPAddressesClient is the network Client
+type PublicIPAddressesClient struct {
+ BaseClient
+}
+
+// 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.
+func NewPublicIPAddressesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPAddressesClient {
+ return PublicIPAddressesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a static or dynamic public IP address.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// publicIPAddressName - the name of the public IP address.
+// parameters - parameters supplied to the create or update public IP address operation.
+func (client PublicIPAddressesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress) (result PublicIPAddressesCreateOrUpdateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("network.PublicIPAddressesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, publicIPAddressName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "publicIpAddressName": autorest.Encode("path", publicIPAddressName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client PublicIPAddressesClient) CreateOrUpdateResponder(resp *http.Response) (result PublicIPAddress, 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 the specified public IP address.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// publicIPAddressName - the name of the subnet.
+func (client PublicIPAddressesClient) Delete(ctx context.Context, resourceGroupName string, publicIPAddressName string) (result PublicIPAddressesDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, publicIPAddressName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resourceGroupName string, publicIPAddressName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "publicIpAddressName": autorest.Encode("path", publicIPAddressName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/publicIPAddresses/{publicIpAddressName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client PublicIPAddressesClient) 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 specified public IP address in a specified resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// publicIPAddressName - the name of the subnet.
+// expand - expands referenced resources.
+func (client PublicIPAddressesClient) Get(ctx context.Context, resourceGroupName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, publicIPAddressName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "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.PublicIPAddressesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client PublicIPAddressesClient) GetPreparer(ctx context.Context, resourceGroupName string, publicIPAddressName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "publicIpAddressName": autorest.Encode("path", publicIPAddressName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/publicIPAddresses/{publicIpAddressName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client PublicIPAddressesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client PublicIPAddressesClient) GetResponder(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
+}
+
+// GetVirtualMachineScaleSetPublicIPAddress get the specified public IP address in a virtual machine scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualMachineScaleSetName - the name of the virtual machine scale set.
+// virtualmachineIndex - the virtual machine index.
+// networkInterfaceName - the name of the network interface.
+// IPConfigurationName - the name of the IP configuration.
+// publicIPAddressName - the name of the public IP Address.
+// expand - expands referenced resources.
+func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) {
+ req, err := client.GetVirtualMachineScaleSetPublicIPAddressPreparer(ctx, 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(ctx context.Context, 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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client PublicIPAddressesClient) List(ctx context.Context, resourceGroupName string) (result PublicIPAddressListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.pialr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.pialr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client PublicIPAddressesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/publicIPAddresses", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client PublicIPAddressesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client PublicIPAddressesClient) ListResponder(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
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client PublicIPAddressesClient) listNextResults(lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) {
+ req, err := lastResults.publicIPAddressListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listNextResults", 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.PublicIPAddressesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client PublicIPAddressesClient) ListComplete(ctx context.Context, resourceGroupName string) (result PublicIPAddressListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll gets all the public IP addresses in a subscription.
+func (client PublicIPAddressesClient) ListAll(ctx context.Context) (result PublicIPAddressListResultPage, err error) {
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.pialr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.pialr, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListAll", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client PublicIPAddressesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client PublicIPAddressesClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client PublicIPAddressesClient) ListAllResponder(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
+}
+
+// listAllNextResults retrieves the next set of results, if any.
+func (client PublicIPAddressesClient) listAllNextResults(lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) {
+ req, err := lastResults.publicIPAddressListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listAllNextResults", 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.PublicIPAddressesClient", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client PublicIPAddressesClient) ListAllComplete(ctx context.Context) (result PublicIPAddressListResultIterator, err error) {
+ result.page, err = client.ListAll(ctx)
+ return
+}
+
+// ListVirtualMachineScaleSetPublicIPAddresses gets information about all public IP addresses on a virtual machine
+// scale set level.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualMachineScaleSetName - the name of the virtual machine scale set.
+func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresses(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result PublicIPAddressListResultPage, err error) {
+ result.fn = client.listVirtualMachineScaleSetPublicIPAddressesNextResults
+ req, err := client.ListVirtualMachineScaleSetPublicIPAddressesPreparer(ctx, 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.pialr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", resp, "Failure sending request")
+ return
+ }
+
+ result.pialr, 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(ctx context.Context, 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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listVirtualMachineScaleSetPublicIPAddressesNextResults", 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", "listVirtualMachineScaleSetPublicIPAddressesNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListVirtualMachineScaleSetPublicIPAddressesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetPublicIPAddressesNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListVirtualMachineScaleSetPublicIPAddressesComplete enumerates all values, automatically crossing page boundaries as required.
+func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result PublicIPAddressListResultIterator, err error) {
+ result.page, err = client.ListVirtualMachineScaleSetPublicIPAddresses(ctx, resourceGroupName, virtualMachineScaleSetName)
+ return
+}
+
+// ListVirtualMachineScaleSetVMPublicIPAddresses gets information about all public IP addresses in a virtual machine IP
+// configuration in a virtual machine scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualMachineScaleSetName - the name of the virtual machine scale set.
+// virtualmachineIndex - the virtual machine index.
+// networkInterfaceName - the network interface name.
+// IPConfigurationName - the IP configuration name.
+func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddresses(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (result PublicIPAddressListResultPage, err error) {
+ result.fn = client.listVirtualMachineScaleSetVMPublicIPAddressesNextResults
+ req, err := client.ListVirtualMachineScaleSetVMPublicIPAddressesPreparer(ctx, 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.pialr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", resp, "Failure sending request")
+ return
+ }
+
+ result.pialr, 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(ctx context.Context, 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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listVirtualMachineScaleSetVMPublicIPAddressesNextResults", 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", "listVirtualMachineScaleSetVMPublicIPAddressesNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListVirtualMachineScaleSetVMPublicIPAddressesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetVMPublicIPAddressesNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListVirtualMachineScaleSetVMPublicIPAddressesComplete enumerates all values, automatically crossing page boundaries as required.
+func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (result PublicIPAddressListResultIterator, err error) {
+ result.page, err = client.ListVirtualMachineScaleSetVMPublicIPAddresses(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName)
+ return
+}
+
+// UpdateTags updates public IP address tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// publicIPAddressName - the name of the public IP address.
+// parameters - parameters supplied to update public IP address tags.
+func (client PublicIPAddressesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject) (result PublicIPAddressesUpdateTagsFuture, err error) {
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, publicIPAddressName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "publicIpAddressName": autorest.Encode("path", publicIPAddressName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (future PublicIPAddressesUpdateTagsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client PublicIPAddressesClient) UpdateTagsResponder(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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/routefilterrules.go
new file mode 100644
index 000000000..ff20aef62
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/routefilterrules.go
@@ -0,0 +1,438 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// RouteFilterRulesClient is the network Client
+type RouteFilterRulesClient struct {
+ BaseClient
+}
+
+// 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.
+func NewRouteFilterRulesClientWithBaseURI(baseURI string, subscriptionID string) RouteFilterRulesClient {
+ return RouteFilterRulesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a route in the specified route filter.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeFilterName - the name of the route filter.
+// ruleName - the name of the route filter rule.
+// routeFilterRuleParameters - parameters supplied to the create or update route filter rule operation.
+func (client RouteFilterRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule) (result RouteFilterRulesCreateOrUpdateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: routeFilterRuleParameters,
+ Constraints: []validation.Constraint{{Target: "routeFilterRuleParameters.RouteFilterRulePropertiesFormat", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "routeFilterRuleParameters.RouteFilterRulePropertiesFormat.RouteFilterRuleType", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "routeFilterRuleParameters.RouteFilterRulePropertiesFormat.Communities", Name: validation.Null, Rule: true, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("network.RouteFilterRulesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeFilterName": autorest.Encode("path", routeFilterName),
+ "ruleName": autorest.Encode("path", ruleName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", pathParameters),
+ autorest.WithJSON(routeFilterRuleParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client RouteFilterRulesClient) CreateOrUpdateResponder(resp *http.Response) (result RouteFilterRule, 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 the specified rule from a route filter.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeFilterName - the name of the route filter.
+// ruleName - the name of the rule.
+func (client RouteFilterRulesClient) Delete(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (result RouteFilterRulesDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, routeFilterName, ruleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeFilterName": autorest.Encode("path", routeFilterName),
+ "ruleName": autorest.Encode("path", ruleName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client RouteFilterRulesClient) 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 specified rule from a route filter.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeFilterName - the name of the route filter.
+// ruleName - the name of the rule.
+func (client RouteFilterRulesClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (result RouteFilterRule, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, routeFilterName, ruleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "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.RouteFilterRulesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client RouteFilterRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeFilterName": autorest.Encode("path", routeFilterName),
+ "ruleName": autorest.Encode("path", ruleName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteFilterRulesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client RouteFilterRulesClient) GetResponder(resp *http.Response) (result RouteFilterRule, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByRouteFilter gets all RouteFilterRules in a route filter.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeFilterName - the name of the route filter.
+func (client RouteFilterRulesClient) ListByRouteFilter(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFilterRuleListResultPage, err error) {
+ result.fn = client.listByRouteFilterNextResults
+ req, err := client.ListByRouteFilterPreparer(ctx, resourceGroupName, routeFilterName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "ListByRouteFilter", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByRouteFilterSender(req)
+ if err != nil {
+ result.rfrlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "ListByRouteFilter", resp, "Failure sending request")
+ return
+ }
+
+ result.rfrlr, err = client.ListByRouteFilterResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "ListByRouteFilter", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByRouteFilterPreparer prepares the ListByRouteFilter request.
+func (client RouteFilterRulesClient) ListByRouteFilterPreparer(ctx context.Context, resourceGroupName string, routeFilterName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeFilterName": autorest.Encode("path", routeFilterName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/routeFilters/{routeFilterName}/routeFilterRules", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByRouteFilterSender sends the ListByRouteFilter request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteFilterRulesClient) ListByRouteFilterSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByRouteFilterResponder handles the response to the ListByRouteFilter request. The method always
+// closes the http.Response Body.
+func (client RouteFilterRulesClient) ListByRouteFilterResponder(resp *http.Response) (result RouteFilterRuleListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByRouteFilterNextResults retrieves the next set of results, if any.
+func (client RouteFilterRulesClient) listByRouteFilterNextResults(lastResults RouteFilterRuleListResult) (result RouteFilterRuleListResult, err error) {
+ req, err := lastResults.routeFilterRuleListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByRouteFilterSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByRouteFilterResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByRouteFilterComplete enumerates all values, automatically crossing page boundaries as required.
+func (client RouteFilterRulesClient) ListByRouteFilterComplete(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFilterRuleListResultIterator, err error) {
+ result.page, err = client.ListByRouteFilter(ctx, resourceGroupName, routeFilterName)
+ return
+}
+
+// Update updates a route in the specified route filter.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeFilterName - the name of the route filter.
+// ruleName - the name of the route filter rule.
+// routeFilterRuleParameters - parameters supplied to the update route filter rule operation.
+func (client RouteFilterRulesClient) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters PatchRouteFilterRule) (result RouteFilterRulesUpdateFuture, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters PatchRouteFilterRule) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeFilterName": autorest.Encode("path", routeFilterName),
+ "ruleName": autorest.Encode("path", ruleName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", pathParameters),
+ autorest.WithJSON(routeFilterRuleParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client RouteFilterRulesClient) UpdateResponder(resp *http.Response) (result RouteFilterRule, 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/services/network/mgmt/2018-05-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/routefilters.go
new file mode 100644
index 000000000..fe5a54952
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/routefilters.go
@@ -0,0 +1,512 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// RouteFiltersClient is the network Client
+type RouteFiltersClient struct {
+ BaseClient
+}
+
+// NewRouteFiltersClient creates an instance of the RouteFiltersClient client.
+func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient {
+ return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeFilterName - the name of the route filter.
+// routeFilterParameters - parameters supplied to the create or update route filter operation.
+func (client RouteFiltersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter) (result RouteFiltersCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeFilterName, routeFilterParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeFilterName": autorest.Encode("path", routeFilterName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}", pathParameters),
+ autorest.WithJSON(routeFilterParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client RouteFiltersClient) CreateOrUpdateResponder(resp *http.Response) (result RouteFilter, 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 the specified route filter.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeFilterName - the name of the route filter.
+func (client RouteFiltersClient) Delete(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFiltersDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, routeFilterName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGroupName string, routeFilterName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeFilterName": autorest.Encode("path", routeFilterName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/routeFilters/{routeFilterName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client RouteFiltersClient) 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 specified route filter.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeFilterName - the name of the route filter.
+// expand - expands referenced express route bgp peering resources.
+func (client RouteFiltersClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, expand string) (result RouteFilter, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, routeFilterName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "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.RouteFiltersClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client RouteFiltersClient) GetPreparer(ctx context.Context, resourceGroupName string, routeFilterName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeFilterName": autorest.Encode("path", routeFilterName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/routeFilters/{routeFilterName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteFiltersClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client RouteFiltersClient) GetResponder(resp *http.Response) (result RouteFilter, 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 route filters in a subscription.
+func (client RouteFiltersClient) List(ctx context.Context) (result RouteFilterListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.rflr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.rflr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client RouteFiltersClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteFiltersClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client RouteFiltersClient) ListResponder(resp *http.Response) (result RouteFilterListResult, 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 RouteFiltersClient) listNextResults(lastResults RouteFilterListResult) (result RouteFilterListResult, err error) {
+ req, err := lastResults.routeFilterListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listNextResults", 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.RouteFiltersClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client RouteFiltersClient) ListComplete(ctx context.Context) (result RouteFilterListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup gets all route filters in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client RouteFiltersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result RouteFilterListResultPage, err error) {
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.rflr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.rflr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client RouteFiltersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/routeFilters", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteFiltersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client RouteFiltersClient) ListByResourceGroupResponder(resp *http.Response) (result RouteFilterListResult, 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 RouteFiltersClient) listByResourceGroupNextResults(lastResults RouteFilterListResult) (result RouteFilterListResult, err error) {
+ req, err := lastResults.routeFilterListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listByResourceGroupNextResults", 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, "network.RouteFiltersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client RouteFiltersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result RouteFilterListResultIterator, err error) {
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// Update updates a route filter in a specified resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeFilterName - the name of the route filter.
+// routeFilterParameters - parameters supplied to the update route filter operation.
+func (client RouteFiltersClient) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters PatchRouteFilter) (result RouteFiltersUpdateFuture, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, routeFilterName, routeFilterParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters PatchRouteFilter) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeFilterName": autorest.Encode("path", routeFilterName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}", pathParameters),
+ autorest.WithJSON(routeFilterParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client RouteFiltersClient) UpdateResponder(resp *http.Response) (result RouteFilter, 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/services/network/mgmt/2018-05-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/routes.go
new file mode 100644
index 000000000..55f990c7b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/routes.go
@@ -0,0 +1,352 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// RoutesClient is the network Client
+type RoutesClient struct {
+ BaseClient
+}
+
+// NewRoutesClient creates an instance of the RoutesClient client.
+func NewRoutesClient(subscriptionID string) RoutesClient {
+ return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client.
+func NewRoutesClientWithBaseURI(baseURI string, subscriptionID string) RoutesClient {
+ return RoutesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a route in the specified route table.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeTableName - the name of the route table.
+// routeName - the name of the route.
+// routeParameters - parameters supplied to the create or update route operation.
+func (client RoutesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route) (result RoutesCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeTableName, routeName, routeParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeName": autorest.Encode("path", routeName),
+ "routeTableName": autorest.Encode("path", routeTableName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}", pathParameters),
+ autorest.WithJSON(routeParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client RoutesClient) CreateOrUpdateResponder(resp *http.Response) (result Route, 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 the specified route from a route table.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeTableName - the name of the route table.
+// routeName - the name of the route.
+func (client RoutesClient) Delete(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (result RoutesDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, routeTableName, routeName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeName": autorest.Encode("path", routeName),
+ "routeTableName": autorest.Encode("path", routeTableName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/routeTables/{routeTableName}/routes/{routeName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client RoutesClient) 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 specified route from a route table.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeTableName - the name of the route table.
+// routeName - the name of the route.
+func (client RoutesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (result Route, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, routeTableName, routeName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "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.RoutesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client RoutesClient) GetPreparer(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeName": autorest.Encode("path", routeName),
+ "routeTableName": autorest.Encode("path", routeTableName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/routeTables/{routeTableName}/routes/{routeName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client RoutesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client RoutesClient) GetResponder(resp *http.Response) (result Route, 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 routes in a route table.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeTableName - the name of the route table.
+func (client RoutesClient) List(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, routeTableName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.rlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.rlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client RoutesClient) ListPreparer(ctx context.Context, resourceGroupName string, routeTableName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeTableName": autorest.Encode("path", routeTableName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/routeTables/{routeTableName}/routes", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client RoutesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client RoutesClient) ListResponder(resp *http.Response) (result RouteListResult, 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 RoutesClient) listNextResults(lastResults RouteListResult) (result RouteListResult, err error) {
+ req, err := lastResults.routeListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.RoutesClient", "listNextResults", 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.RoutesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client RoutesClient) ListComplete(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, routeTableName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/routetables.go
new file mode 100644
index 000000000..b44bdbc73
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/routetables.go
@@ -0,0 +1,512 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// RouteTablesClient is the network Client
+type RouteTablesClient struct {
+ BaseClient
+}
+
+// NewRouteTablesClient creates an instance of the RouteTablesClient client.
+func NewRouteTablesClient(subscriptionID string) RouteTablesClient {
+ return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeTableName - the name of the route table.
+// parameters - parameters supplied to the create or update route table operation.
+func (client RouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable) (result RouteTablesCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeTableName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeTableName": autorest.Encode("path", routeTableName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client RouteTablesClient) CreateOrUpdateResponder(resp *http.Response) (result RouteTable, 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 the specified route table.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeTableName - the name of the route table.
+func (client RouteTablesClient) Delete(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteTablesDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, routeTableName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGroupName string, routeTableName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeTableName": autorest.Encode("path", routeTableName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/routeTables/{routeTableName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client RouteTablesClient) 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 specified route table.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeTableName - the name of the route table.
+// expand - expands referenced resources.
+func (client RouteTablesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, expand string) (result RouteTable, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, routeTableName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "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.RouteTablesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client RouteTablesClient) GetPreparer(ctx context.Context, resourceGroupName string, routeTableName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeTableName": autorest.Encode("path", routeTableName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/routeTables/{routeTableName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteTablesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client RouteTablesClient) GetResponder(resp *http.Response) (result RouteTable, 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 route tables in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client RouteTablesClient) List(ctx context.Context, resourceGroupName string) (result RouteTableListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.rtlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.rtlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client RouteTablesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/routeTables", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteTablesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client RouteTablesClient) ListResponder(resp *http.Response) (result RouteTableListResult, 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 RouteTablesClient) listNextResults(lastResults RouteTableListResult) (result RouteTableListResult, err error) {
+ req, err := lastResults.routeTableListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.RouteTablesClient", "listNextResults", 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.RouteTablesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client RouteTablesClient) ListComplete(ctx context.Context, resourceGroupName string) (result RouteTableListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll gets all route tables in a subscription.
+func (client RouteTablesClient) ListAll(ctx context.Context) (result RouteTableListResultPage, err error) {
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.rtlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.rtlr, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "ListAll", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client RouteTablesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteTablesClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client RouteTablesClient) ListAllResponder(resp *http.Response) (result RouteTableListResult, 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 RouteTablesClient) listAllNextResults(lastResults RouteTableListResult) (result RouteTableListResult, err error) {
+ req, err := lastResults.routeTableListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.RouteTablesClient", "listAllNextResults", 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.RouteTablesClient", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client RouteTablesClient) ListAllComplete(ctx context.Context) (result RouteTableListResultIterator, err error) {
+ result.page, err = client.ListAll(ctx)
+ return
+}
+
+// UpdateTags updates a route table tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// routeTableName - the name of the route table.
+// parameters - parameters supplied to update route table tags.
+func (client RouteTablesClient) UpdateTags(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject) (result RouteTablesUpdateTagsFuture, err error) {
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, routeTableName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "routeTableName": autorest.Encode("path", routeTableName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future RouteTablesUpdateTagsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client RouteTablesClient) UpdateTagsResponder(resp *http.Response) (result RouteTable, 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/services/network/mgmt/2018-05-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/securitygroups.go
new file mode 100644
index 000000000..bddd5db7e
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/securitygroups.go
@@ -0,0 +1,512 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// SecurityGroupsClient is the network Client
+type SecurityGroupsClient struct {
+ BaseClient
+}
+
+// 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.
+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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkSecurityGroupName - the name of the network security group.
+// parameters - parameters supplied to the create or update network security group operation.
+func (client SecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup) (result SecurityGroupsCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkSecurityGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client SecurityGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result SecurityGroup, 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 the specified network security group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkSecurityGroupName - the name of the network security group.
+func (client SecurityGroupsClient) Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityGroupsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, networkSecurityGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, 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 = "2018-05-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/networkSecurityGroups/{networkSecurityGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client SecurityGroupsClient) 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 specified network security group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkSecurityGroupName - the name of the network security group.
+// expand - expands referenced resources.
+func (client SecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, expand string) (result SecurityGroup, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, networkSecurityGroupName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "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.SecurityGroupsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SecurityGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, expand 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 = "2018-05-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/networkSecurityGroups/{networkSecurityGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SecurityGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SecurityGroupsClient) GetResponder(resp *http.Response) (result SecurityGroup, 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 network security groups in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client SecurityGroupsClient) List(ctx context.Context, resourceGroupName string) (result SecurityGroupListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.sglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.sglr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client SecurityGroupsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client SecurityGroupsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client SecurityGroupsClient) ListResponder(resp *http.Response) (result SecurityGroupListResult, 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 SecurityGroupsClient) listNextResults(lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) {
+ req, err := lastResults.securityGroupListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listNextResults", 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.SecurityGroupsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SecurityGroupsClient) ListComplete(ctx context.Context, resourceGroupName string) (result SecurityGroupListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll gets all network security groups in a subscription.
+func (client SecurityGroupsClient) ListAll(ctx context.Context) (result SecurityGroupListResultPage, err error) {
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.sglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.sglr, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "ListAll", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client SecurityGroupsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client SecurityGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client SecurityGroupsClient) ListAllResponder(resp *http.Response) (result SecurityGroupListResult, 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 SecurityGroupsClient) listAllNextResults(lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) {
+ req, err := lastResults.securityGroupListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listAllNextResults", 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.SecurityGroupsClient", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SecurityGroupsClient) ListAllComplete(ctx context.Context) (result SecurityGroupListResultIterator, err error) {
+ result.page, err = client.ListAll(ctx)
+ return
+}
+
+// UpdateTags updates a network security group tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkSecurityGroupName - the name of the network security group.
+// parameters - parameters supplied to update network security group tags.
+func (client SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject) (result SecurityGroupsUpdateTagsFuture, err error) {
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkSecurityGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future SecurityGroupsUpdateTagsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client SecurityGroupsClient) UpdateTagsResponder(resp *http.Response) (result SecurityGroup, 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/services/network/mgmt/2018-05-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/securityrules.go
new file mode 100644
index 000000000..4f4096ba7
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/securityrules.go
@@ -0,0 +1,352 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// SecurityRulesClient is the network Client
+type SecurityRulesClient struct {
+ BaseClient
+}
+
+// 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.
+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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkSecurityGroupName - the name of the network security group.
+// securityRuleName - the name of the security rule.
+// securityRuleParameters - parameters supplied to the create or update network security rule operation.
+func (client SecurityRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule) (result SecurityRulesCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "securityRuleName": autorest.Encode("path", securityRuleName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}", pathParameters),
+ autorest.WithJSON(securityRuleParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client SecurityRulesClient) CreateOrUpdateResponder(resp *http.Response) (result SecurityRule, 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 the specified network security rule.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkSecurityGroupName - the name of the network security group.
+// securityRuleName - the name of the security rule.
+func (client SecurityRulesClient) Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (result SecurityRulesDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "securityRuleName": autorest.Encode("path", securityRuleName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client SecurityRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get get the specified network security rule.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkSecurityGroupName - the name of the network security group.
+// securityRuleName - the name of the security rule.
+func (client SecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (result SecurityRule, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "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.SecurityRulesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SecurityRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "securityRuleName": autorest.Encode("path", securityRuleName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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}/securityRules/{securityRuleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SecurityRulesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SecurityRulesClient) 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 security rules in a network security group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkSecurityGroupName - the name of the network security group.
+func (client SecurityRulesClient) List(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, networkSecurityGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.srlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.srlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client SecurityRulesClient) ListPreparer(ctx context.Context, 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 = "2018-05-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}/securityRules", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client SecurityRulesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client SecurityRulesClient) 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 SecurityRulesClient) listNextResults(lastResults SecurityRuleListResult) (result SecurityRuleListResult, err error) {
+ req, err := lastResults.securityRuleListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.SecurityRulesClient", "listNextResults", 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.SecurityRulesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SecurityRulesClient) ListComplete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, networkSecurityGroupName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/subnets.go
new file mode 100644
index 000000000..e480780b2
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/subnets.go
@@ -0,0 +1,356 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// SubnetsClient is the network Client
+type SubnetsClient struct {
+ BaseClient
+}
+
+// NewSubnetsClient creates an instance of the SubnetsClient client.
+func NewSubnetsClient(subscriptionID string) SubnetsClient {
+ return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client.
+func NewSubnetsClientWithBaseURI(baseURI string, subscriptionID string) SubnetsClient {
+ return SubnetsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a subnet in the specified virtual network.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+// subnetName - the name of the subnet.
+// subnetParameters - parameters supplied to the create or update subnet operation.
+func (client SubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet) (result SubnetsCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subnetName": autorest.Encode("path", subnetName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualNetworkName": autorest.Encode("path", virtualNetworkName),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", pathParameters),
+ autorest.WithJSON(subnetParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client SubnetsClient) CreateOrUpdateResponder(resp *http.Response) (result Subnet, 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 the specified subnet.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+// subnetName - the name of the subnet.
+func (client SubnetsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result SubnetsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName, subnetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subnetName": autorest.Encode("path", subnetName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualNetworkName": autorest.Encode("path", virtualNetworkName),
+ }
+
+ const APIVersion = "2018-05-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/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client SubnetsClient) 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 specified subnet by virtual network and resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+// subnetName - the name of the subnet.
+// expand - expands referenced resources.
+func (client SubnetsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, expand string) (result Subnet, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "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.SubnetsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SubnetsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subnetName": autorest.Encode("path", subnetName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualNetworkName": autorest.Encode("path", virtualNetworkName),
+ }
+
+ const APIVersion = "2018-05-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/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SubnetsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SubnetsClient) GetResponder(resp *http.Response) (result Subnet, 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 subnets in a virtual network.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+func (client SubnetsClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result SubnetListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, virtualNetworkName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.slr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.slr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client SubnetsClient) ListPreparer(ctx context.Context, 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 = "2018-05-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}/subnets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client SubnetsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client SubnetsClient) ListResponder(resp *http.Response) (result SubnetListResult, 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 SubnetsClient) listNextResults(lastResults SubnetListResult) (result SubnetListResult, err error) {
+ req, err := lastResults.subnetListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.SubnetsClient", "listNextResults", 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.SubnetsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SubnetsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result SubnetListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, virtualNetworkName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/usages.go
new file mode 100644
index 000000000..38a3e83f9
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/usages.go
@@ -0,0 +1,140 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// UsagesClient is the network Client
+type UsagesClient struct {
+ BaseClient
+}
+
+// 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)}
+}
+
+// List list network usages for a subscription.
+// Parameters:
+// location - the location where resource usage is queried.
+func (client UsagesClient) List(ctx context.Context, location string) (result UsagesListResultPage, 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.NewError("network.UsagesClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.UsagesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.ulr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.UsagesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.ulr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.UsagesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client UsagesClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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}/usages", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client UsagesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client UsagesClient) ListResponder(resp *http.Response) (result UsagesListResult, 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 UsagesClient) listNextResults(lastResults UsagesListResult) (result UsagesListResult, err error) {
+ req, err := lastResults.usagesListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.UsagesClient", "listNextResults", 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.UsagesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.UsagesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client UsagesClient) ListComplete(ctx context.Context, location string) (result UsagesListResultIterator, err error) {
+ result.page, err = client.List(ctx, location)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/version.go
new file mode 100644
index 000000000..bfa4342c2
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/version.go
@@ -0,0 +1,30 @@
+package network
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " network/2018-05-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/virtualnetworkgatewayconnections.go
new file mode 100644
index 000000000..b9cebc6ef
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/virtualnetworkgatewayconnections.go
@@ -0,0 +1,671 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// VirtualNetworkGatewayConnectionsClient is the network Client
+type VirtualNetworkGatewayConnectionsClient struct {
+ BaseClient
+}
+
+// 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.
+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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection.
+// parameters - parameters supplied to the create or update virtual network gateway connection operation.
+func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection) (result VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2.LocalNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkGatewayConnection, 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 the specified virtual network Gateway connection.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection.
+func (client VirtualNetworkGatewayConnectionsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (*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 = "2018-05-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/connections/{virtualNetworkGatewayConnectionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewayConnectionsClient) 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 specified virtual network gateway connection by resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection.
+func (client VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result VirtualNetworkGatewayConnection, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "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.VirtualNetworkGatewayConnectionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualNetworkGatewayConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (*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 = "2018-05-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/connections/{virtualNetworkGatewayConnectionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewayConnectionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewayConnectionsClient) GetResponder(resp *http.Response) (result VirtualNetworkGatewayConnection, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetSharedKey the Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified
+// virtual network gateway connection shared key through Network resource provider.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayConnectionName - the virtual network gateway connection shared key name.
+func (client VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result ConnectionSharedKey, err error) {
+ req, err := client.GetSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSharedKeySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetSharedKeyResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetSharedKeyPreparer prepares the GetSharedKey request.
+func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (*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 = "2018-05-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/connections/{virtualNetworkGatewayConnectionName}/sharedkey", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSharedKeySender sends the GetSharedKey request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetSharedKeyResponder handles the response to the GetSharedKey request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyResponder(resp *http.Response) (result ConnectionSharedKey, 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 VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections
+// created.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client VirtualNetworkGatewayConnectionsClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayConnectionListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.vngclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.vngclr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualNetworkGatewayConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/connections", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewayConnectionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewayConnectionsClient) ListResponder(resp *http.Response) (result VirtualNetworkGatewayConnectionListResult, 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 VirtualNetworkGatewayConnectionsClient) listNextResults(lastResults VirtualNetworkGatewayConnectionListResult) (result VirtualNetworkGatewayConnectionListResult, err error) {
+ req, err := lastResults.virtualNetworkGatewayConnectionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "listNextResults", 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.VirtualNetworkGatewayConnectionsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualNetworkGatewayConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayConnectionListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName)
+ 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayConnectionName - the virtual network gateway connection reset shared key Name.
+// parameters - parameters supplied to the begin reset virtual network gateway connection shared key operation
+// through network resource provider.
+func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey) (result VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: 128, Chain: nil},
+ {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error())
+ }
+
+ req, err := client.ResetSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ResetSharedKeySender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ResetSharedKeyPreparer prepares the ResetSharedKey request.
+func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ResetSharedKeyResponder handles the response to the ResetSharedKey request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyResponder(resp *http.Response) (result ConnectionResetSharedKey, 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
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayConnectionName - the virtual network gateway connection name.
+// parameters - parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation
+// throughNetwork resource provider.
+func (client VirtualNetworkGatewayConnectionsClient) SetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey) (result VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Value", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", err.Error())
+ }
+
+ req, err := client.SetSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.SetSharedKeySender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// SetSharedKeyPreparer prepares the SetSharedKey request.
+func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// SetSharedKeySender sends the SetSharedKey request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// SetSharedKeyResponder handles the response to the SetSharedKey request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyResponder(resp *http.Response) (result ConnectionSharedKey, 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
+}
+
+// UpdateTags updates a virtual network gateway connection tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection.
+// parameters - parameters supplied to update virtual network gateway connection tags.
+func (client VirtualNetworkGatewayConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject) (result VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) {
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetworkGatewayConnectionListEntity, 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/services/network/mgmt/2018-05-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/virtualnetworkgateways.go
new file mode 100644
index 000000000..c2c2b4734
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/virtualnetworkgateways.go
@@ -0,0 +1,1177 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// VirtualNetworkGatewaysClient is the network Client
+type VirtualNetworkGatewaysClient struct {
+ BaseClient
+}
+
+// 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.
+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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayName - the name of the virtual network gateway.
+// parameters - parameters supplied to create or update virtual network gateway operation.
+func (client VirtualNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway) (result VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("network.VirtualNetworkGatewaysClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkGateway, 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 the specified virtual network gateway.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayName - the name of the virtual network gateway.
+func (client VirtualNetworkGatewaysClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, 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 = "2018-05-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/virtualNetworkGateways/{virtualNetworkGatewayName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewaysClient) 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
+}
+
+// Generatevpnclientpackage generates VPN client package for P2S client of the virtual network gateway in the specified
+// resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayName - the name of the virtual network gateway.
+// parameters - parameters supplied to the generate virtual network gateway VPN client package operation.
+func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (result VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
+ req, err := client.GeneratevpnclientpackagePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GeneratevpnclientpackageSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GeneratevpnclientpackagePreparer prepares the Generatevpnclientpackage request.
+func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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),
+ 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayName - the name of the virtual network gateway.
+// parameters - parameters supplied to the generate virtual network gateway VPN client package operation.
+func (client VirtualNetworkGatewaysClient) GenerateVpnProfile(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (result VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
+ req, err := client.GenerateVpnProfilePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GenerateVpnProfileSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GenerateVpnProfilePreparer prepares the GenerateVpnProfile request.
+func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ 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{}).WithContext(ctx))
+}
+
+// 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) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Get gets the specified virtual network gateway by resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayName - the name of the virtual network gateway.
+func (client VirtualNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGateway, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "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.VirtualNetworkGatewaysClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualNetworkGatewaysClient) GetPreparer(ctx context.Context, 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 = "2018-05-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}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewaysClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewaysClient) GetResponder(resp *http.Response) (result VirtualNetworkGateway, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAdvertisedRoutes this operation retrieves a list of routes the virtual network gateway is advertising to the
+// specified peer.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayName - the name of the virtual network gateway.
+// peer - the IP address of the peer
+func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (result VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
+ req, err := client.GetAdvertisedRoutesPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, peer)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GetAdvertisedRoutesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GetAdvertisedRoutesPreparer prepares the GetAdvertisedRoutes request.
+func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer 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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "peer": autorest.Encode("query", peer),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// GetAdvertisedRoutesResponder handles the response to the GetAdvertisedRoutes request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesResponder(resp *http.Response) (result GatewayRouteListResult, 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
+}
+
+// GetBgpPeerStatus the GetBgpPeerStatus operation retrieves the status of all BGP peers.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayName - the name of the virtual network gateway.
+// peer - the IP address of the peer to retrieve the status of.
+func (client VirtualNetworkGatewaysClient) GetBgpPeerStatus(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (result VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
+ req, err := client.GetBgpPeerStatusPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, peer)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GetBgpPeerStatusSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GetBgpPeerStatusPreparer prepares the GetBgpPeerStatus request.
+func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer 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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(peer) > 0 {
+ queryParameters["peer"] = autorest.Encode("query", peer)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// GetBgpPeerStatusResponder handles the response to the GetBgpPeerStatus request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusResponder(resp *http.Response) (result BgpPeerStatusListResult, 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
+}
+
+// GetLearnedRoutes this operation retrieves a list of routes the virtual network gateway has learned, including routes
+// learned from BGP peers.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayName - the name of the virtual network gateway.
+func (client VirtualNetworkGatewaysClient) GetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
+ req, err := client.GetLearnedRoutesPreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GetLearnedRoutesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GetLearnedRoutesPreparer prepares the GetLearnedRoutes request.
+func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.Context, 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 = "2018-05-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}/getLearnedRoutes", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// GetLearnedRoutesResponder handles the response to the GetLearnedRoutes request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewaysClient) GetLearnedRoutesResponder(resp *http.Response) (result GatewayRouteListResult, 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
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayName - the name of the virtual network gateway.
+func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURL(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
+ req, err := client.GetVpnProfilePackageURLPreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GetVpnProfilePackageURLSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GetVpnProfilePackageURLPreparer prepares the GetVpnProfilePackageURL request.
+func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets all virtual network gateways by resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client VirtualNetworkGatewaysClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.vnglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.vnglr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualNetworkGatewaysClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewaysClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewaysClient) ListResponder(resp *http.Response) (result VirtualNetworkGatewayListResult, 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 VirtualNetworkGatewaysClient) listNextResults(lastResults VirtualNetworkGatewayListResult) (result VirtualNetworkGatewayListResult, err error) {
+ req, err := lastResults.virtualNetworkGatewayListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listNextResults", 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.VirtualNetworkGatewaysClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualNetworkGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListConnections gets all the connections in a virtual network gateway.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayName - the name of the virtual network gateway.
+func (client VirtualNetworkGatewaysClient) ListConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewayListConnectionsResultPage, err error) {
+ result.fn = client.listConnectionsNextResults
+ req, err := client.ListConnectionsPreparer(ctx, 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.vnglcr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", resp, "Failure sending request")
+ return
+ }
+
+ result.vnglcr, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listConnectionsNextResults", 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", "listConnectionsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListConnectionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listConnectionsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListConnectionsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualNetworkGatewaysClient) ListConnectionsComplete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewayListConnectionsResultIterator, err error) {
+ result.page, err = client.ListConnections(ctx, resourceGroupName, virtualNetworkGatewayName)
+ return
+}
+
+// Reset resets the primary of the virtual network gateway in the specified resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayName - the name of the virtual network gateway.
+// gatewayVip - virtual network gateway vip address supplied to the begin reset of the active-active feature
+// enabled gateway.
+func (client VirtualNetworkGatewaysClient) Reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, gatewayVip string) (result VirtualNetworkGatewaysResetFuture, err error) {
+ req, err := client.ResetPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, gatewayVip)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ResetSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ResetPreparer prepares the Reset request.
+func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, gatewayVip 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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(gatewayVip) > 0 {
+ queryParameters["gatewayVip"] = autorest.Encode("query", gatewayVip)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ResetSender sends the Reset request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ResetResponder handles the response to the Reset request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewaysClient) ResetResponder(resp *http.Response) (result VirtualNetworkGateway, 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
+}
+
+// SupportedVpnDevices gets a xml format representation for supported vpn devices.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayName - the name of the virtual network gateway.
+func (client VirtualNetworkGatewaysClient) SupportedVpnDevices(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result String, err error) {
+ req, err := client.SupportedVpnDevicesPreparer(ctx, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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
+}
+
+// UpdateTags updates a virtual network gateway tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayName - the name of the virtual network gateway.
+// parameters - parameters supplied to update virtual network gateway tags.
+func (client VirtualNetworkGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject) (result VirtualNetworkGatewaysUpdateTagsFuture, err error) {
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkGatewaysClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetworkGateway, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// VpnDeviceConfigurationScript gets a xml format representation for vpn device configuration script.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection for which the
+// configuration script is generated.
+// parameters - parameters supplied to the generate vpn device script operation.
+func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScript(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VpnDeviceScriptParameters) (result String, err error) {
+ req, err := client.VpnDeviceConfigurationScriptPreparer(ctx, 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(ctx context.Context, 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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ 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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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/services/network/mgmt/2018-05-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/virtualnetworkpeerings.go
new file mode 100644
index 000000000..c81abeae3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/virtualnetworkpeerings.go
@@ -0,0 +1,353 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// VirtualNetworkPeeringsClient is the network Client
+type VirtualNetworkPeeringsClient struct {
+ BaseClient
+}
+
+// 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.
+func NewVirtualNetworkPeeringsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkPeeringsClient {
+ return VirtualNetworkPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a peering in the specified virtual network.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+// virtualNetworkPeeringName - the name of the peering.
+// virtualNetworkPeeringParameters - parameters supplied to the create or update virtual network peering
+// operation.
+func (client VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering) (result VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualNetworkName": autorest.Encode("path", virtualNetworkName),
+ "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}", pathParameters),
+ autorest.WithJSON(virtualNetworkPeeringParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkPeering, 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 the specified virtual network peering.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+// virtualNetworkPeeringName - the name of the virtual network peering.
+func (client VirtualNetworkPeeringsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (result VirtualNetworkPeeringsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualNetworkName": autorest.Encode("path", virtualNetworkName),
+ "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName),
+ }
+
+ const APIVersion = "2018-05-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/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkPeeringsClient) 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 specified virtual network peering.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+// virtualNetworkPeeringName - the name of the virtual network peering.
+func (client VirtualNetworkPeeringsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (result VirtualNetworkPeering, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "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.VirtualNetworkPeeringsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualNetworkPeeringsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualNetworkName": autorest.Encode("path", virtualNetworkName),
+ "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName),
+ }
+
+ const APIVersion = "2018-05-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}/virtualNetworkPeerings/{virtualNetworkPeeringName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkPeeringsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkPeeringsClient) GetResponder(resp *http.Response) (result VirtualNetworkPeering, 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 virtual network peerings in a virtual network.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+func (client VirtualNetworkPeeringsClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkPeeringListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, virtualNetworkName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.vnplr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.vnplr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualNetworkPeeringsClient) ListPreparer(ctx context.Context, 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 = "2018-05-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}/virtualNetworkPeerings", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkPeeringsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkPeeringsClient) ListResponder(resp *http.Response) (result VirtualNetworkPeeringListResult, 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 VirtualNetworkPeeringsClient) listNextResults(lastResults VirtualNetworkPeeringListResult) (result VirtualNetworkPeeringListResult, err error) {
+ req, err := lastResults.virtualNetworkPeeringListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "listNextResults", 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.VirtualNetworkPeeringsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualNetworkPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkPeeringListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, virtualNetworkName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/virtualnetworks.go
new file mode 100644
index 000000000..baf6ef3ec
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/virtualnetworks.go
@@ -0,0 +1,678 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// VirtualNetworksClient is the network Client
+type VirtualNetworksClient struct {
+ BaseClient
+}
+
+// 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.
+func NewVirtualNetworksClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworksClient {
+ return VirtualNetworksClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CheckIPAddressAvailability checks whether a private IP address is available for use.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+// IPAddress - the private IP address to be verified.
+func (client VirtualNetworksClient) CheckIPAddressAvailability(ctx context.Context, resourceGroupName string, virtualNetworkName string, IPAddress string) (result IPAddressAvailabilityResult, err error) {
+ req, err := client.CheckIPAddressAvailabilityPreparer(ctx, resourceGroupName, virtualNetworkName, IPAddress)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CheckIPAddressAvailability", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckIPAddressAvailabilitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CheckIPAddressAvailability", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckIPAddressAvailabilityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CheckIPAddressAvailability", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckIPAddressAvailabilityPreparer prepares the CheckIPAddressAvailability request.
+func (client VirtualNetworksClient) CheckIPAddressAvailabilityPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, IPAddress 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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(IPAddress) > 0 {
+ queryParameters["ipAddress"] = autorest.Encode("query", IPAddress)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CheckIPAddressAvailabilitySender sends the CheckIPAddressAvailability request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworksClient) CheckIPAddressAvailabilitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CheckIPAddressAvailabilityResponder handles the response to the CheckIPAddressAvailability request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworksClient) CheckIPAddressAvailabilityResponder(resp *http.Response) (result IPAddressAvailabilityResult, 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 virtual network in the specified resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+// parameters - parameters supplied to the create or update virtual network operation
+func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork) (result VirtualNetworksCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworksClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetwork, 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 the specified virtual network.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+func (client VirtualNetworksClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworksDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, 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 = "2018-05-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/virtualNetworks/{virtualNetworkName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworksClient) 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 specified virtual network by resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+// expand - expands referenced resources.
+func (client VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, expand string) (result VirtualNetwork, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "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.VirtualNetworksClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualNetworksClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, expand 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 = "2018-05-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/virtualNetworks/{virtualNetworkName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworksClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworksClient) GetResponder(resp *http.Response) (result VirtualNetwork, 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 virtual networks in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client VirtualNetworksClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.vnlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.vnlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualNetworksClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworksClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworksClient) ListResponder(resp *http.Response) (result VirtualNetworkListResult, 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 VirtualNetworksClient) listNextResults(lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) {
+ req, err := lastResults.virtualNetworkListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listNextResults", 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.VirtualNetworksClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualNetworksClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll gets all virtual networks in a subscription.
+func (client VirtualNetworksClient) ListAll(ctx context.Context) (result VirtualNetworkListResultPage, err error) {
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.vnlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.vnlr, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListAll", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client VirtualNetworksClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworksClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworksClient) ListAllResponder(resp *http.Response) (result VirtualNetworkListResult, 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 VirtualNetworksClient) listAllNextResults(lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) {
+ req, err := lastResults.virtualNetworkListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listAllNextResults", 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.VirtualNetworksClient", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualNetworksClient) ListAllComplete(ctx context.Context) (result VirtualNetworkListResultIterator, err error) {
+ result.page, err = client.ListAll(ctx)
+ return
+}
+
+// ListUsage lists usage stats.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+func (client VirtualNetworksClient) ListUsage(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkListUsageResultPage, err error) {
+ result.fn = client.listUsageNextResults
+ req, err := client.ListUsagePreparer(ctx, 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.vnlur.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", resp, "Failure sending request")
+ return
+ }
+
+ result.vnlur, 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(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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", "listUsageNextResults", 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", "listUsageNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListUsageResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listUsageNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListUsageComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualNetworksClient) ListUsageComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkListUsageResultIterator, err error) {
+ result.page, err = client.ListUsage(ctx, resourceGroupName, virtualNetworkName)
+ return
+}
+
+// UpdateTags updates a virtual network tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualNetworkName - the name of the virtual network.
+// parameters - parameters supplied to update virtual network tags.
+func (client VirtualNetworksClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject) (result VirtualNetworksUpdateTagsFuture, err error) {
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualNetworkName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future VirtualNetworksUpdateTagsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworksClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetwork, 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/services/network/mgmt/2018-05-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/watchers.go
new file mode 100644
index 000000000..5be46797c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-05-01/network/watchers.go
@@ -0,0 +1,1338 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// WatchersClient is the network Client
+type WatchersClient struct {
+ BaseClient
+}
+
+// NewWatchersClient creates an instance of the WatchersClient client.
+func NewWatchersClient(subscriptionID string) WatchersClient {
+ return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client.
+func NewWatchersClientWithBaseURI(baseURI string, subscriptionID string) WatchersClient {
+ return WatchersClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the network watcher resource group.
+// networkWatcherName - the name of the network watcher resource.
+// parameters - parameters that determine how the connectivity check will be performed.
+func (client WatchersClient) CheckConnectivity(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters) (result WatchersCheckConnectivityFuture, err error) {
+ 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 {
+ return result, validation.NewError("network.WatchersClient", "CheckConnectivity", err.Error())
+ }
+
+ req, err := client.CheckConnectivityPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CheckConnectivitySender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CheckConnectivityPreparer prepares the CheckConnectivity request.
+func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ 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{}).WithContext(ctx))
+}
+
+// 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) (future WatchersCheckConnectivityFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher.
+// parameters - parameters that define the network watcher resource.
+func (client WatchersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters Watcher) (result Watcher, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkWatcherName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "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.WatchersClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client WatchersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters Watcher) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) CreateOrUpdateResponder(resp *http.Response) (result Watcher, 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 the specified network watcher resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher.
+func (client WatchersClient) Delete(ctx context.Context, resourceGroupName string, networkWatcherName string) (result WatchersDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, networkWatcherName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string) (*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 = "2018-05-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/networkWatchers/{networkWatcherName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) 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 specified network watcher by resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher.
+func (client WatchersClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string) (result Watcher, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, networkWatcherName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "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.WatchersClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client WatchersClient) GetPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string) (*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 = "2018-05-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/networkWatchers/{networkWatcherName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) GetResponder(resp *http.Response) (result Watcher, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAzureReachabilityReport gets the relative latency score for internet service providers from a specified location
+// to Azure regions.
+// Parameters:
+// resourceGroupName - the name of the network watcher resource group.
+// networkWatcherName - the name of the network watcher resource.
+// parameters - parameters that determine Azure reachability report configuration.
+func (client WatchersClient) GetAzureReachabilityReport(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters) (result WatchersGetAzureReachabilityReportFuture, err error) {
+ 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 {
+ return result, validation.NewError("network.WatchersClient", "GetAzureReachabilityReport", err.Error())
+ }
+
+ req, err := client.GetAzureReachabilityReportPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GetAzureReachabilityReportSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GetAzureReachabilityReportPreparer prepares the GetAzureReachabilityReport request.
+func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ 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{}).WithContext(ctx))
+}
+
+// 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) (future WatchersGetAzureReachabilityReportFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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 and traffic analytics (optional) on a specified resource.
+// Parameters:
+// resourceGroupName - the name of the network watcher resource group.
+// networkWatcherName - the name of the network watcher resource.
+// parameters - parameters that define a resource to query flow log and traffic analytics (optional) status.
+func (client WatchersClient) GetFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters) (result WatchersGetFlowLogStatusFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("network.WatchersClient", "GetFlowLogStatus", err.Error())
+ }
+
+ req, err := client.GetFlowLogStatusPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GetFlowLogStatusSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GetFlowLogStatusPreparer prepares the GetFlowLogStatus request.
+func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// GetFlowLogStatusResponder handles the response to the GetFlowLogStatus request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) GetFlowLogStatusResponder(resp *http.Response) (result FlowLogInformation, 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
+}
+
+// GetNextHop gets the next hop from the specified VM.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher.
+// parameters - parameters that define the source and destination endpoint.
+func (client WatchersClient) GetNextHop(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters) (result WatchersGetNextHopFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.SourceIPAddress", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.DestinationIPAddress", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("network.WatchersClient", "GetNextHop", err.Error())
+ }
+
+ req, err := client.GetNextHopPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNextHop", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GetNextHopSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNextHop", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GetNextHopPreparer prepares the GetNextHop request.
+func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetNextHopSender sends the GetNextHop request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// GetNextHopResponder handles the response to the GetNextHop request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) GetNextHopResponder(resp *http.Response) (result NextHopResult, 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
+}
+
+// GetTopology gets the current network topology by resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher.
+// parameters - parameters that define the representation of topology.
+func (client WatchersClient) GetTopology(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TopologyParameters) (result Topology, err error) {
+ req, err := client.GetTopologyPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTopology", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetTopologySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTopology", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetTopologyResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTopology", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetTopologyPreparer prepares the GetTopology request.
+func (client WatchersClient) GetTopologyPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TopologyParameters) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetTopologySender sends the GetTopology request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) GetTopologySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetTopologyResponder handles the response to the GetTopology request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) GetTopologyResponder(resp *http.Response) (result Topology, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetTroubleshooting initiate troubleshooting on a specified resource
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher resource.
+// parameters - parameters that define the resource to troubleshoot.
+func (client WatchersClient) GetTroubleshooting(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters) (result WatchersGetTroubleshootingFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.TroubleshootingProperties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.TroubleshootingProperties.StorageID", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.TroubleshootingProperties.StoragePath", Name: validation.Null, Rule: true, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("network.WatchersClient", "GetTroubleshooting", err.Error())
+ }
+
+ req, err := client.GetTroubleshootingPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GetTroubleshootingSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GetTroubleshootingPreparer prepares the GetTroubleshooting request.
+func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// GetTroubleshootingResponder handles the response to the GetTroubleshooting request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) GetTroubleshootingResponder(resp *http.Response) (result TroubleshootingResult, 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
+}
+
+// GetTroubleshootingResult get the last completed troubleshooting result on a specified resource
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher resource.
+// parameters - parameters that define the resource to query the troubleshooting result.
+func (client WatchersClient) GetTroubleshootingResult(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters) (result WatchersGetTroubleshootingResultFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("network.WatchersClient", "GetTroubleshootingResult", err.Error())
+ }
+
+ req, err := client.GetTroubleshootingResultPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GetTroubleshootingResultSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GetTroubleshootingResultPreparer prepares the GetTroubleshootingResult request.
+func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// GetTroubleshootingResultResponder handles the response to the GetTroubleshootingResult request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) GetTroubleshootingResultResponder(resp *http.Response) (result TroubleshootingResult, 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
+}
+
+// GetVMSecurityRules gets the configured and effective security group rules on the specified VM.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher.
+// parameters - parameters that define the VM to check security groups for.
+func (client WatchersClient) GetVMSecurityRules(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters) (result WatchersGetVMSecurityRulesFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("network.WatchersClient", "GetVMSecurityRules", err.Error())
+ }
+
+ req, err := client.GetVMSecurityRulesPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GetVMSecurityRulesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GetVMSecurityRulesPreparer prepares the GetVMSecurityRules request.
+func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// GetVMSecurityRulesResponder handles the response to the GetVMSecurityRules request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) GetVMSecurityRulesResponder(resp *http.Response) (result SecurityGroupViewResult, 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 gets all network watchers by resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client WatchersClient) List(ctx context.Context, resourceGroupName string) (result WatcherListResult, err error) {
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "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.WatchersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client WatchersClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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/networkWatchers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) ListResponder(resp *http.Response) (result WatcherListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListAll gets all network watchers by subscription.
+func (client WatchersClient) ListAll(ctx context.Context) (result WatcherListResult, err error) {
+ req, err := client.ListAllPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "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.WatchersClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAll", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client WatchersClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) ListAllResponder(resp *http.Response) (result WatcherListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListAvailableProviders lists all available internet service providers for a specified Azure region.
+// Parameters:
+// resourceGroupName - the name of the network watcher resource group.
+// networkWatcherName - the name of the network watcher resource.
+// parameters - parameters that scope the list of available providers.
+func (client WatchersClient) ListAvailableProviders(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters) (result WatchersListAvailableProvidersFuture, err error) {
+ req, err := client.ListAvailableProvidersPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ListAvailableProvidersSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ListAvailableProvidersPreparer prepares the ListAvailableProviders request.
+func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ 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{}).WithContext(ctx))
+}
+
+// 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) (future WatchersListAvailableProvidersFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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 and traffic analytics (optional) on a specified resource.
+// Parameters:
+// resourceGroupName - the name of the network watcher resource group.
+// networkWatcherName - the name of the network watcher resource.
+// parameters - parameters that define the configuration of flow log.
+func (client WatchersClient) SetFlowLogConfiguration(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation) (result WatchersSetFlowLogConfigurationFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.FlowLogProperties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.FlowLogProperties.StorageID", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.FlowLogProperties.Enabled", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "parameters.FlowAnalyticsConfiguration", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.Enabled", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.WorkspaceID", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.WorkspaceRegion", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.WorkspaceResourceID", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("network.WatchersClient", "SetFlowLogConfiguration", err.Error())
+ }
+
+ req, err := client.SetFlowLogConfigurationPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.SetFlowLogConfigurationSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// SetFlowLogConfigurationPreparer prepares the SetFlowLogConfiguration request.
+func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// SetFlowLogConfigurationResponder handles the response to the SetFlowLogConfiguration request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) SetFlowLogConfigurationResponder(resp *http.Response) (result FlowLogInformation, 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
+}
+
+// UpdateTags updates a network watcher tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher.
+// parameters - parameters supplied to update network watcher tags.
+func (client WatchersClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TagsObject) (result Watcher, err error) {
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateTagsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "UpdateTags", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateTagsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "UpdateTags", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client WatchersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TagsObject) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) UpdateTagsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) UpdateTagsResponder(resp *http.Response) (result Watcher, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// VerifyIPFlow verify IP flow from the specified VM to a location given the currently configured NSG rules.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// networkWatcherName - the name of the network watcher.
+// parameters - parameters that define the IP flow to be verified.
+func (client WatchersClient) VerifyIPFlow(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters) (result WatchersVerifyIPFlowFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.LocalPort", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.RemotePort", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.LocalIPAddress", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.RemoteIPAddress", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("network.WatchersClient", "VerifyIPFlow", err.Error())
+ }
+
+ req, err := client.VerifyIPFlowPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.VerifyIPFlowSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// VerifyIPFlowPreparer prepares the VerifyIPFlow request.
+func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters) (*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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the
+// http.Response Body if it receives an error.
+func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// VerifyIPFlowResponder handles the response to the VerifyIPFlow request. The method always
+// closes the http.Response Body.
+func (client WatchersClient) VerifyIPFlowResponder(resp *http.Response) (result VerificationIPFlowResult, 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/services/notificationhubs/mgmt/2014-09-01/notificationhubs/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2014-09-01/notificationhubs/models.go
index 01397759d..5768dd6bf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2014-09-01/notificationhubs/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2014-09-01/notificationhubs/models.go
@@ -534,12 +534,11 @@ func (nr NamespaceResource) MarshalJSON() ([]byte, error) {
// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type NamespacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
+func (future *NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -547,35 +546,10 @@ func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("notificationhubs.NamespacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("notificationhubs.NamespacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2014-09-01/notificationhubs/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2014-09-01/notificationhubs/namespaces.go
index 971901ff1..871f9e8b8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2014-09-01/notificationhubs/namespaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2014-09-01/notificationhubs/namespaces.go
@@ -314,15 +314,17 @@ func (client NamespacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) DeleteSender(req *http.Request) (future NamespacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2016-03-01/notificationhubs/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2016-03-01/notificationhubs/models.go
index e580d7d0e..84a45a8ab 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2016-03-01/notificationhubs/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2016-03-01/notificationhubs/models.go
@@ -1035,12 +1035,11 @@ func (nr *NamespaceResource) UnmarshalJSON(body []byte) error {
// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type NamespacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
+func (future *NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1048,35 +1047,10 @@ func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("notificationhubs.NamespacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("notificationhubs.NamespacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2016-03-01/notificationhubs/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2016-03-01/notificationhubs/namespaces.go
index 74f249fe3..eb13947d3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2016-03-01/notificationhubs/namespaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2016-03-01/notificationhubs/namespaces.go
@@ -308,15 +308,17 @@ func (client NamespacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) DeleteSender(req *http.Request) (future NamespacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/hubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/hubs.go
deleted file mode 100644
index 0c1abcc4f..000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/hubs.go
+++ /dev/null
@@ -1,117 +0,0 @@
-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 (
- "context"
- "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 {
- BaseClient
-}
-
-// 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.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// namespaceName - the namespace name.
-// parameters - the notificationHub name.
-func (client HubsClient) CheckAvailability(ctx context.Context, 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.NewError("notificationhubs.HubsClient", "CheckAvailability", err.Error())
- }
-
- req, err := client.CheckAvailabilityPreparer(ctx, 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(ctx context.Context, 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.AsContentType("application/json; charset=utf-8"),
- 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{}).WithContext(ctx))
-}
-
-// 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,
- azure.DoRetryWithRegistration(client.Client))
-}
-
-// 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/services/notificationhubs/mgmt/2017-04-01/notificationhubs/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/models.go
index d591cfe91..06e9cbb75 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/models.go
@@ -324,26 +324,6 @@ func (car CheckAvailabilityResult) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// CheckNameAvailabilityRequestParameters parameters supplied to the Check Name Availability for Namespace and
-// NotificationHubs.
-type CheckNameAvailabilityRequestParameters struct {
- // Name - Resource name
- Name *string `json:"Name,omitempty"`
- // Type - Resource type
- Type *string `json:"Type,omitempty"`
-}
-
-// CheckNameAvailabilityResponse ...
-type CheckNameAvailabilityResponse struct {
- autorest.Response `json:"-"`
- // NameAvailable - Checks if the namespace name is available
- NameAvailable *bool `json:"NameAvailable,omitempty"`
- // Reason - States the reason due to which the namespace name is not available
- Reason *string `json:"Reason,omitempty"`
- // Message - The messsage returned when checking for namespace name availability
- Message *string `json:"Message,omitempty"`
-}
-
// CreateOrUpdateParameters parameters supplied to the CreateOrUpdate NotificationHub operation.
type CreateOrUpdateParameters struct {
// Properties - Properties of the NotificationHub.
@@ -467,6 +447,15 @@ func (coup *CreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
return nil
}
+// ErrorResponse error reponse indicates NotificationHubs service is not able to process the incoming request. The
+// reason is provided in the error message.
+type ErrorResponse struct {
+ // Code - Error code.
+ Code *string `json:"code,omitempty"`
+ // Message - Error message indicating why the operation failed.
+ Message *string `json:"message,omitempty"`
+}
+
// GcmCredential description of a NotificationHub GcmCredential.
type GcmCredential struct {
// GcmCredentialProperties - Properties of NotificationHub GcmCredential.
@@ -918,10 +907,14 @@ type NamespaceProperties struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
// Region - Specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia EastAustralia SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest Europe
Region *string `json:"region,omitempty"`
+ // MetricID - Identifier for Azure Insights metrics
+ MetricID *string `json:"metricId,omitempty"`
// Status - Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting
Status *string `json:"status,omitempty"`
// CreatedAt - The time the namespace was created.
CreatedAt *date.Time `json:"createdAt,omitempty"`
+ // UpdatedAt - The time the namespace was updated.
+ UpdatedAt *date.Time `json:"updatedAt,omitempty"`
// ServiceBusEndpoint - Endpoint you can use to perform NotificationHub operations.
ServiceBusEndpoint *string `json:"serviceBusEndpoint,omitempty"`
// SubscriptionID - The Id of the Azure subscription associated with the namespace.
@@ -932,6 +925,8 @@ type NamespaceProperties struct {
Enabled *bool `json:"enabled,omitempty"`
// Critical - Whether or not the namespace is set as Critical.
Critical *bool `json:"critical,omitempty"`
+ // DataCenter - Data center for the namespace
+ DataCenter *string `json:"dataCenter,omitempty"`
// NamespaceType - The namespace type. Possible values include: 'Messaging', 'NotificationHub'
NamespaceType NamespaceType `json:"namespaceType,omitempty"`
}
@@ -1063,12 +1058,11 @@ func (nr *NamespaceResource) UnmarshalJSON(body []byte) error {
// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type NamespacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
+func (future *NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1076,38 +1070,134 @@ func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("notificationhubs.NamespacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("notificationhubs.NamespacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
+// Operation a NotificationHubs REST API operation
+type Operation struct {
+ // Name - Operation name: {provider}/{resource}/{operation}
+ Name *string `json:"name,omitempty"`
+ // Display - The object that represents the operation.
+ Display *OperationDisplay `json:"display,omitempty"`
+}
+
+// OperationDisplay the object that represents the operation.
+type OperationDisplay struct {
+ // Provider - Service provider: Microsoft.NotificationHubs
+ Provider *string `json:"provider,omitempty"`
+ // Resource - Resource on which the operation is performed: Invoice, etc.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - Operation type: Read, write, delete, etc.
+ Operation *string `json:"operation,omitempty"`
+}
+
+// OperationListResult result of the request to list NotificationHubs 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 - List of NotificationHubs operations supported by the Microsoft.NotificationHubs resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+ // NextLink - URL to get the next set of operation list results if there are any.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// OperationListResultIterator provides access to a complete listing of Operation values.
+type OperationListResultIterator struct {
+ i int
+ page OperationListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OperationListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OperationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OperationListResultIterator) Response() OperationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OperationListResultIterator) Value() Operation {
+ if !iter.page.NotDone() {
+ return Operation{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (olr OperationListResult) IsEmpty() bool {
+ return olr.Value == nil || len(*olr.Value) == 0
+}
+
+// operationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+ if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(olr.NextLink)))
+}
+
+// OperationListResultPage contains a page of Operation values.
+type OperationListResultPage struct {
+ fn func(OperationListResult) (OperationListResult, error)
+ olr OperationListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OperationListResultPage) Next() error {
+ next, err := page.fn(page.olr)
+ if err != nil {
+ return err
+ }
+ page.olr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OperationListResultPage) NotDone() bool {
+ return !page.olr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OperationListResultPage) Response() OperationListResult {
+ return page.olr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OperationListResultPage) Values() []Operation {
+ if page.olr.IsEmpty() {
+ return nil
+ }
+ return *page.olr.Value
+}
+
// PnsCredentialsProperties description of a NotificationHub PNS Credentials.
type PnsCredentialsProperties struct {
// ApnsCredential - The ApnsCredential of the created NotificationHub
@@ -1460,45 +1550,6 @@ func (rt *ResourceType) UnmarshalJSON(body []byte) error {
type SharedAccessAuthorizationRuleCreateOrUpdateParameters struct {
// Properties - Properties of the Namespace AuthorizationRules.
Properties *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"`
- // ID - Resource Id
- ID *string `json:"id,omitempty"`
- // Name - Resource name
- Name *string `json:"name,omitempty"`
- // Type - Resource type
- Type *string `json:"type,omitempty"`
- // Location - Resource location
- Location *string `json:"location,omitempty"`
- // Tags - Resource tags
- Tags map[string]*string `json:"tags"`
- // Sku - The sku of the created namespace
- Sku *Sku `json:"sku,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for SharedAccessAuthorizationRuleCreateOrUpdateParameters.
-func (saarcoup SharedAccessAuthorizationRuleCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if saarcoup.Properties != nil {
- objectMap["properties"] = saarcoup.Properties
- }
- if saarcoup.ID != nil {
- objectMap["id"] = saarcoup.ID
- }
- if saarcoup.Name != nil {
- objectMap["name"] = saarcoup.Name
- }
- if saarcoup.Type != nil {
- objectMap["type"] = saarcoup.Type
- }
- if saarcoup.Location != nil {
- objectMap["location"] = saarcoup.Location
- }
- if saarcoup.Tags != nil {
- objectMap["tags"] = saarcoup.Tags
- }
- if saarcoup.Sku != nil {
- objectMap["sku"] = saarcoup.Sku
- }
- return json.Marshal(objectMap)
}
// SharedAccessAuthorizationRuleListResult the response of the List Namespace operation.
@@ -1608,6 +1659,22 @@ func (page SharedAccessAuthorizationRuleListResultPage) Values() []SharedAccessA
type SharedAccessAuthorizationRuleProperties struct {
// Rights - The rights associated with the rule.
Rights *[]AccessRights `json:"rights,omitempty"`
+ // PrimaryKey - A base64-encoded 256-bit primary key for signing and validating the SAS token.
+ PrimaryKey *string `json:"primaryKey,omitempty"`
+ // SecondaryKey - A base64-encoded 256-bit primary key for signing and validating the SAS token.
+ SecondaryKey *string `json:"secondaryKey,omitempty"`
+ // KeyName - A string that describes the authorization rule.
+ KeyName *string `json:"keyName,omitempty"`
+ // ClaimType - A string that describes the claim type
+ ClaimType *string `json:"claimType,omitempty"`
+ // ClaimValue - A string that describes the claim value
+ ClaimValue *string `json:"claimValue,omitempty"`
+ // ModifiedTime - The last modified time for this rule
+ ModifiedTime *string `json:"modifiedTime,omitempty"`
+ // CreatedTime - The created time for this rule
+ CreatedTime *string `json:"createdTime,omitempty"`
+ // Revision - The revision number for the rule
+ Revision *int32 `json:"revision,omitempty"`
}
// SharedAccessAuthorizationRuleResource description of a Namespace AuthorizationRules.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/name.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/name.go
deleted file mode 100644
index 470ffbb60..000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/name.go
+++ /dev/null
@@ -1,114 +0,0 @@
-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 (
- "context"
- "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 {
- BaseClient
-}
-
-// 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:
-// parameters - the namespace name.
-func (client NameClient) CheckAvailability(ctx context.Context, 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.NewError("notificationhubs.NameClient", "CheckAvailability", err.Error())
- }
-
- req, err := client.CheckAvailabilityPreparer(ctx, 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(ctx context.Context, 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.AsContentType("application/json; charset=utf-8"),
- 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{}).WithContext(ctx))
-}
-
-// 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,
- azure.DoRetryWithRegistration(client.Client))
-}
-
-// 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/services/notificationhubs/mgmt/2017-04-01/notificationhubs/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/namespaces.go
index 4685b7a4d..c14964081 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/namespaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/namespaces.go
@@ -308,15 +308,17 @@ func (client NamespacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) DeleteSender(req *http.Request) (future NamespacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -820,7 +822,7 @@ func (client NamespacesClient) ListAuthorizationRulesComplete(ctx context.Contex
// resourceGroupName - the name of the resource group.
// namespaceName - the namespace name.
// authorizationRuleName - the connection string of the namespace for the specified authorizationRule.
-func (client NamespacesClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result ResourceListKeys, err error) {
+func (client NamespacesClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleListResult, err error) {
req, err := client.ListKeysPreparer(ctx, resourceGroupName, namespaceName, authorizationRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesClient", "ListKeys", nil, "Failure preparing request")
@@ -873,7 +875,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 SharedAccessAuthorizationRuleListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubs.go
index 2bc5a4f03..736636e46 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubs.go
@@ -40,42 +40,42 @@ func NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
return Client{NewWithBaseURI(baseURI, subscriptionID)}
}
-// CheckAvailability checks the availability of the given notificationHub in a namespace.
+// CheckNotificationHubAvailability checks the availability of the given notificationHub in a namespace.
// Parameters:
// resourceGroupName - the name of the resource group.
// namespaceName - the namespace name.
// parameters - the notificationHub name.
-func (client Client) CheckAvailability(ctx context.Context, resourceGroupName string, namespaceName string, parameters CheckAvailabilityParameters) (result CheckAvailabilityResult, err error) {
+func (client Client) CheckNotificationHubAvailability(ctx context.Context, resourceGroupName string, namespaceName string, parameters CheckAvailabilityParameters) (result CheckAvailabilityResult, 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.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
- return result, validation.NewError("notificationhubs.Client", "CheckAvailability", err.Error())
+ return result, validation.NewError("notificationhubs.Client", "CheckNotificationHubAvailability", err.Error())
}
- req, err := client.CheckAvailabilityPreparer(ctx, resourceGroupName, namespaceName, parameters)
+ req, err := client.CheckNotificationHubAvailabilityPreparer(ctx, resourceGroupName, namespaceName, parameters)
if err != nil {
- err = autorest.NewErrorWithError(err, "notificationhubs.Client", "CheckAvailability", nil, "Failure preparing request")
+ err = autorest.NewErrorWithError(err, "notificationhubs.Client", "CheckNotificationHubAvailability", nil, "Failure preparing request")
return
}
- resp, err := client.CheckAvailabilitySender(req)
+ resp, err := client.CheckNotificationHubAvailabilitySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "notificationhubs.Client", "CheckAvailability", resp, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "notificationhubs.Client", "CheckNotificationHubAvailability", resp, "Failure sending request")
return
}
- result, err = client.CheckAvailabilityResponder(resp)
+ result, err = client.CheckNotificationHubAvailabilityResponder(resp)
if err != nil {
- err = autorest.NewErrorWithError(err, "notificationhubs.Client", "CheckAvailability", resp, "Failure responding to request")
+ err = autorest.NewErrorWithError(err, "notificationhubs.Client", "CheckNotificationHubAvailability", resp, "Failure responding to request")
}
return
}
-// CheckAvailabilityPreparer prepares the CheckAvailability request.
-func (client Client) CheckAvailabilityPreparer(ctx context.Context, resourceGroupName string, namespaceName string, parameters CheckAvailabilityParameters) (*http.Request, error) {
+// CheckNotificationHubAvailabilityPreparer prepares the CheckNotificationHubAvailability request.
+func (client Client) CheckNotificationHubAvailabilityPreparer(ctx context.Context, resourceGroupName string, namespaceName string, parameters CheckAvailabilityParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
"namespaceName": autorest.Encode("path", namespaceName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
@@ -97,16 +97,16 @@ func (client Client) CheckAvailabilityPreparer(ctx context.Context, resourceGrou
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// CheckAvailabilitySender sends the CheckAvailability request. The method will close the
+// CheckNotificationHubAvailabilitySender sends the CheckNotificationHubAvailability request. The method will close the
// http.Response Body if it receives an error.
-func (client Client) CheckAvailabilitySender(req *http.Request) (*http.Response, error) {
+func (client Client) CheckNotificationHubAvailabilitySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req,
azure.DoRetryWithRegistration(client.Client))
}
-// CheckAvailabilityResponder handles the response to the CheckAvailability request. The method always
+// CheckNotificationHubAvailabilityResponder handles the response to the CheckNotificationHubAvailability request. The method always
// closes the http.Response Body.
-func (client Client) CheckAvailabilityResponder(resp *http.Response) (result CheckAvailabilityResult, err error) {
+func (client Client) CheckNotificationHubAvailabilityResponder(resp *http.Response) (result CheckAvailabilityResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/operations.go
new file mode 100644
index 000000000..259076cc3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/operations.go
@@ -0,0 +1,126 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// OperationsClient is the azure NotificationHub client
+type OperationsClient struct {
+ BaseClient
+}
+
+// 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 NotificationHubs REST API operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "notificationhubs.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.olr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "notificationhubs.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.olr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "notificationhubs.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2017-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.NotificationHubs/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// 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, "notificationhubs.OperationsClient", "listNextResults", 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, "notificationhubs.OperationsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "notificationhubs.OperationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/mgmt/2015-03-20/operationalinsights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/mgmt/2015-03-20/operationalinsights/models.go
index afbb47907..cc5236d55 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/mgmt/2015-03-20/operationalinsights/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/mgmt/2015-03-20/operationalinsights/models.go
@@ -718,12 +718,11 @@ type WorkspacePurgeStatusResponse struct {
// operation.
type WorkspacesGetSearchResultsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WorkspacesGetSearchResultsFuture) Result(client WorkspacesClient) (srr SearchResultsResponse, err error) {
+func (future *WorkspacesGetSearchResultsFuture) Result(client WorkspacesClient) (srr SearchResultsResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -731,34 +730,15 @@ func (future WorkspacesGetSearchResultsFuture) Result(client WorkspacesClient) (
return
}
if !done {
- return srr, azure.NewAsyncOpIncompleteError("operationalinsights.WorkspacesGetSearchResultsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- srr, err = client.GetSearchResultsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesGetSearchResultsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("operationalinsights.WorkspacesGetSearchResultsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if srr.Response.Response, err = future.GetResult(sender); err == nil && srr.Response.Response.StatusCode != http.StatusNoContent {
+ srr, err = client.GetSearchResultsResponder(srr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesGetSearchResultsFuture", "Result", srr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesGetSearchResultsFuture", "Result", resp, "Failure sending request")
- return
- }
- srr, err = client.GetSearchResultsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesGetSearchResultsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -766,12 +746,11 @@ func (future WorkspacesGetSearchResultsFuture) Result(client WorkspacesClient) (
// WorkspacesPurgeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WorkspacesPurgeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WorkspacesPurgeFuture) Result(client WorkspacesClient) (so SetObject, err error) {
+func (future *WorkspacesPurgeFuture) Result(client WorkspacesClient) (so SetObject, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -779,34 +758,15 @@ func (future WorkspacesPurgeFuture) Result(client WorkspacesClient) (so SetObjec
return
}
if !done {
- return so, azure.NewAsyncOpIncompleteError("operationalinsights.WorkspacesPurgeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- so, err = client.PurgeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesPurgeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("operationalinsights.WorkspacesPurgeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.PurgeResponder(so.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesPurgeFuture", "Result", so.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesPurgeFuture", "Result", resp, "Failure sending request")
- return
- }
- so, err = client.PurgeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesPurgeFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/mgmt/2015-03-20/operationalinsights/workspaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/mgmt/2015-03-20/operationalinsights/workspaces.go
index 482913204..e0a97bde4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/mgmt/2015-03-20/operationalinsights/workspaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/mgmt/2015-03-20/operationalinsights/workspaces.go
@@ -174,15 +174,17 @@ func (client WorkspacesClient) GetSearchResultsPreparer(ctx context.Context, res
// 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) (future WorkspacesGetSearchResultsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -320,15 +322,17 @@ func (client WorkspacesClient) PurgePreparer(ctx context.Context, resourceGroupN
// PurgeSender sends the Purge request. The method will close the
// http.Response Body if it receives an error.
func (client WorkspacesClient) PurgeSender(req *http.Request) (future WorkspacesPurgeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/v1/operationalinsights/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/v1/operationalinsights/client.go
index 5043d15a6..35c4c3389 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/v1/operationalinsights/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/v1/operationalinsights/client.go
@@ -21,7 +21,11 @@ package operationalinsights
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
)
const (
@@ -49,3 +53,71 @@ func NewWithBaseURI(baseURI string, workspaceID string) BaseClient {
WorkspaceID: workspaceID,
}
}
+
+// Query executes an Analytics query for data. [Here](/documentation/2-Using-the-API/Query) is an example for using
+// POST with an Analytics query.
+// Parameters:
+// body - the Analytics query. Learn more about the [Analytics query
+// syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)
+func (client BaseClient) Query(ctx context.Context, body QueryBody) (result QueryResults, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: body,
+ Constraints: []validation.Constraint{{Target: "body.Query", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("operationalinsights.BaseClient", "Query", err.Error())
+ }
+
+ req, err := client.QueryPreparer(ctx, body)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "operationalinsights.BaseClient", "Query", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.QuerySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "operationalinsights.BaseClient", "Query", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.QueryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "operationalinsights.BaseClient", "Query", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// QueryPreparer prepares the Query request.
+func (client BaseClient) QueryPreparer(ctx context.Context, body QueryBody) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "workspaceId": autorest.Encode("path", client.WorkspaceID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/workspaces/{workspaceId}/query", pathParameters),
+ autorest.WithJSON(body))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// QuerySender sends the Query request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) QuerySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// QueryResponder handles the response to the Query request. The method always
+// closes the http.Response Body.
+func (client BaseClient) QueryResponder(resp *http.Response) (result QueryResults, 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/services/operationalinsights/v1/operationalinsights/query.go b/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/v1/operationalinsights/query.go
deleted file mode 100644
index bff70d980..000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/operationalinsights/v1/operationalinsights/query.go
+++ /dev/null
@@ -1,178 +0,0 @@
-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 (
- "context"
- "github.com/Azure/go-autorest/autorest"
- "github.com/Azure/go-autorest/autorest/azure"
- "github.com/Azure/go-autorest/autorest/validation"
- "net/http"
-)
-
-// QueryClient is the operational Insights Data Client
-type QueryClient struct {
- BaseClient
-}
-
-// NewQueryClient creates an instance of the QueryClient client.
-func NewQueryClient(workspaceID string) QueryClient {
- return NewQueryClientWithBaseURI(DefaultBaseURI, workspaceID)
-}
-
-// NewQueryClientWithBaseURI creates an instance of the QueryClient client.
-func NewQueryClientWithBaseURI(baseURI string, workspaceID string) QueryClient {
- return QueryClient{NewWithBaseURI(baseURI, workspaceID)}
-}
-
-// Get executes an Analytics query for data
-// Parameters:
-// query - the Analytics query. Learn more about the [Analytics query
-// syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)
-// timespan - optional. The timespan over which to query data. This is an ISO8601 time period value. This
-// timespan is applied in addition to any that are specified in the query expression.
-func (client QueryClient) Get(ctx context.Context, query string, timespan *string) (result QueryResults, err error) {
- req, err := client.GetPreparer(ctx, query, timespan)
- if err != nil {
- err = autorest.NewErrorWithError(err, "operationalinsights.QueryClient", "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.QueryClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "operationalinsights.QueryClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client QueryClient) GetPreparer(ctx context.Context, query string, timespan *string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "workspaceId": autorest.Encode("path", client.WorkspaceID),
- }
-
- queryParameters := map[string]interface{}{
- "query": autorest.Encode("query", query),
- }
- if timespan != nil {
- queryParameters["timespan"] = autorest.Encode("query", *timespan)
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/workspaces/{workspaceId}/query", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// GetSender sends the Get request. The method will close the
-// http.Response Body if it receives an error.
-func (client QueryClient) GetSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// GetResponder handles the response to the Get request. The method always
-// closes the http.Response Body.
-func (client QueryClient) GetResponder(resp *http.Response) (result QueryResults, err error) {
- err = autorest.Respond(
- resp,
- client.ByInspecting(),
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// Post executes an Analytics query for data. [Here](/documentation/2-Using-the-API/Query) is an example for using POST
-// with an Analytics query.
-// Parameters:
-// body - the Analytics query. Learn more about the [Analytics query
-// syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)
-func (client QueryClient) Post(ctx context.Context, body QueryBody) (result QueryResults, err error) {
- if err := validation.Validate([]validation.Validation{
- {TargetValue: body,
- Constraints: []validation.Constraint{{Target: "body.Query", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
- return result, validation.NewError("operationalinsights.QueryClient", "Post", err.Error())
- }
-
- req, err := client.PostPreparer(ctx, body)
- if err != nil {
- err = autorest.NewErrorWithError(err, "operationalinsights.QueryClient", "Post", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.PostSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "operationalinsights.QueryClient", "Post", resp, "Failure sending request")
- return
- }
-
- result, err = client.PostResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "operationalinsights.QueryClient", "Post", resp, "Failure responding to request")
- }
-
- return
-}
-
-// PostPreparer prepares the Post request.
-func (client QueryClient) PostPreparer(ctx context.Context, body QueryBody) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "workspaceId": autorest.Encode("path", client.WorkspaceID),
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsContentType("application/json; charset=utf-8"),
- autorest.AsPost(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/workspaces/{workspaceId}/query", pathParameters),
- autorest.WithJSON(body))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// PostSender sends the Post request. The method will close the
-// http.Response Body if it receives an error.
-func (client QueryClient) PostSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// PostResponder handles the response to the Post request. The method always
-// closes the http.Response Body.
-func (client QueryClient) PostResponder(resp *http.Response) (result QueryResults, 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/services/postgresql/mgmt/2017-12-01/postgresql/checknameavailability.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/checknameavailability.go
index 16b170eca..ba3edddcf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/checknameavailability.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/checknameavailability.go
@@ -26,8 +26,8 @@ import (
)
// CheckNameAvailabilityClient is the the Microsoft Azure management API provides create, read, update, and delete
-// functionality for Azure PostgreSQL resources including servers, databases, firewall rules, log files and
-// configurations with new business model.
+// functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security
+// alert policies, log files and configurations with new business model.
type CheckNameAvailabilityClient struct {
BaseClient
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/client.go
index 610ebe022..13f6e3a49 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/client.go
@@ -1,7 +1,8 @@
// Package postgresql implements the Azure ARM Postgresql service API version 2017-12-01.
//
// The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL
-// resources including servers, databases, firewall rules, log files and configurations with new business model.
+// resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and
+// configurations with new business model.
package postgresql
// Copyright (c) Microsoft and contributors. All rights reserved.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/configurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/configurations.go
index 11407a4e7..62adef66e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/configurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/configurations.go
@@ -25,8 +25,8 @@ import (
)
// ConfigurationsClient is the the Microsoft Azure management API provides create, read, update, and delete
-// functionality for Azure PostgreSQL resources including servers, databases, firewall rules, log files and
-// configurations with new business model.
+// functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security
+// alert policies, log files and configurations with new business model.
type ConfigurationsClient struct {
BaseClient
}
@@ -91,15 +91,17 @@ func (client ConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future ConfigurationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/databases.go
index 26d6cf9c7..d069e2d9e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/databases.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/databases.go
@@ -25,8 +25,8 @@ import (
)
// DatabasesClient is the the Microsoft Azure management API provides create, read, update, and delete functionality
-// for Azure PostgreSQL resources including servers, databases, firewall rules, log files and configurations with new
-// business model.
+// for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies,
+// log files and configurations with new business model.
type DatabasesClient struct {
BaseClient
}
@@ -91,15 +91,17 @@ func (client DatabasesClient) CreateOrUpdatePreparer(ctx context.Context, resour
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future DatabasesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -163,15 +165,17 @@ func (client DatabasesClient) DeletePreparer(ctx context.Context, resourceGroupN
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) DeleteSender(req *http.Request) (future DatabasesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/firewallrules.go
index 68d03021e..eacdf075f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/firewallrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/firewallrules.go
@@ -26,8 +26,8 @@ import (
)
// FirewallRulesClient is the the Microsoft Azure management API provides create, read, update, and delete
-// functionality for Azure PostgreSQL resources including servers, databases, firewall rules, log files and
-// configurations with new business model.
+// functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security
+// alert policies, log files and configurations with new business model.
type FirewallRulesClient struct {
BaseClient
}
@@ -103,15 +103,17 @@ func (client FirewallRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallRulesClient) CreateOrUpdateSender(req *http.Request) (future FirewallRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -175,15 +177,17 @@ func (client FirewallRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallRulesClient) DeleteSender(req *http.Request) (future FirewallRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/locationbasedperformancetier.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/locationbasedperformancetier.go
index e10c0dd75..e67344f71 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/locationbasedperformancetier.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/locationbasedperformancetier.go
@@ -25,8 +25,8 @@ import (
)
// LocationBasedPerformanceTierClient is the the Microsoft Azure management API provides create, read, update, and
-// delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, log files and
-// configurations with new business model.
+// delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules,
+// security alert policies, log files and configurations with new business model.
type LocationBasedPerformanceTierClient struct {
BaseClient
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/logfiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/logfiles.go
index e6213a5df..af9c90a14 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/logfiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/logfiles.go
@@ -25,8 +25,8 @@ import (
)
// LogFilesClient is the the Microsoft Azure management API provides create, read, update, and delete functionality for
-// Azure PostgreSQL resources including servers, databases, firewall rules, log files and configurations with new
-// business model.
+// Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log
+// files and configurations with new business model.
type LogFilesClient struct {
BaseClient
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/models.go
index 229fc1302..9467e3fd8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/models.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
"net/http"
)
@@ -76,6 +77,21 @@ func PossibleOperationOriginValues() []OperationOrigin {
return []OperationOrigin{NotSpecified, System, User}
}
+// ServerSecurityAlertPolicyState enumerates the values for server security alert policy state.
+type ServerSecurityAlertPolicyState string
+
+const (
+ // ServerSecurityAlertPolicyStateDisabled ...
+ ServerSecurityAlertPolicyStateDisabled ServerSecurityAlertPolicyState = "Disabled"
+ // ServerSecurityAlertPolicyStateEnabled ...
+ ServerSecurityAlertPolicyStateEnabled ServerSecurityAlertPolicyState = "Enabled"
+)
+
+// PossibleServerSecurityAlertPolicyStateValues returns an array of possible values for the ServerSecurityAlertPolicyState const type.
+func PossibleServerSecurityAlertPolicyStateValues() []ServerSecurityAlertPolicyState {
+ return []ServerSecurityAlertPolicyState{ServerSecurityAlertPolicyStateDisabled, ServerSecurityAlertPolicyStateEnabled}
+}
+
// ServerState enumerates the values for server state.
type ServerState string
@@ -140,6 +156,27 @@ func PossibleSslEnforcementEnumValues() []SslEnforcementEnum {
return []SslEnforcementEnum{SslEnforcementEnumDisabled, SslEnforcementEnumEnabled}
}
+// VirtualNetworkRuleState enumerates the values for virtual network rule state.
+type VirtualNetworkRuleState string
+
+const (
+ // Deleting ...
+ Deleting VirtualNetworkRuleState = "Deleting"
+ // Initializing ...
+ Initializing VirtualNetworkRuleState = "Initializing"
+ // InProgress ...
+ InProgress VirtualNetworkRuleState = "InProgress"
+ // Ready ...
+ Ready VirtualNetworkRuleState = "Ready"
+ // Unknown ...
+ Unknown VirtualNetworkRuleState = "Unknown"
+)
+
+// PossibleVirtualNetworkRuleStateValues returns an array of possible values for the VirtualNetworkRuleState const type.
+func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState {
+ return []VirtualNetworkRuleState{Deleting, Initializing, InProgress, Ready, Unknown}
+}
+
// Configuration represents a Configuration.
type Configuration struct {
autorest.Response `json:"-"`
@@ -249,12 +286,11 @@ type ConfigurationProperties struct {
// operation.
type ConfigurationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConfigurationsCreateOrUpdateFuture) Result(client ConfigurationsClient) (c Configuration, err error) {
+func (future *ConfigurationsCreateOrUpdateFuture) Result(client ConfigurationsClient) (c Configuration, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -262,34 +298,15 @@ func (future ConfigurationsCreateOrUpdateFuture) Result(client ConfigurationsCli
return
}
if !done {
- return c, azure.NewAsyncOpIncompleteError("postgresql.ConfigurationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- c, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.ConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("postgresql.ConfigurationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.CreateOrUpdateResponder(c.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "postgresql.ConfigurationsCreateOrUpdateFuture", "Result", c.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.ConfigurationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- c, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.ConfigurationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -395,12 +412,11 @@ type DatabaseProperties struct {
// operation.
type DatabasesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
+func (future *DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -408,34 +424,15 @@ func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Da
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("postgresql.DatabasesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.DatabasesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("postgresql.DatabasesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "postgresql.DatabasesCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.DatabasesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.DatabasesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -443,12 +440,11 @@ func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Da
// DatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesDeleteFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
+func (future *DatabasesDeleteFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -456,35 +452,10 @@ func (future DatabasesDeleteFuture) Result(client DatabasesClient) (ar autorest.
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("postgresql.DatabasesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.DatabasesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("postgresql.DatabasesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.DatabasesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.DatabasesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -589,12 +560,11 @@ type FirewallRuleProperties struct {
// operation.
type FirewallRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FirewallRulesCreateOrUpdateFuture) Result(client FirewallRulesClient) (fr FirewallRule, err error) {
+func (future *FirewallRulesCreateOrUpdateFuture) Result(client FirewallRulesClient) (fr FirewallRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -602,34 +572,15 @@ func (future FirewallRulesCreateOrUpdateFuture) Result(client FirewallRulesClien
return
}
if !done {
- return fr, azure.NewAsyncOpIncompleteError("postgresql.FirewallRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.FirewallRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("postgresql.FirewallRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fr.Response.Response, err = future.GetResult(sender); err == nil && fr.Response.Response.StatusCode != http.StatusNoContent {
+ fr, err = client.CreateOrUpdateResponder(fr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "postgresql.FirewallRulesCreateOrUpdateFuture", "Result", fr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.FirewallRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- fr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.FirewallRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -637,12 +588,11 @@ func (future FirewallRulesCreateOrUpdateFuture) Result(client FirewallRulesClien
// FirewallRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type FirewallRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FirewallRulesDeleteFuture) Result(client FirewallRulesClient) (ar autorest.Response, err error) {
+func (future *FirewallRulesDeleteFuture) Result(client FirewallRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -650,35 +600,10 @@ func (future FirewallRulesDeleteFuture) Result(client FirewallRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("postgresql.FirewallRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.FirewallRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("postgresql.FirewallRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.FirewallRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.FirewallRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -897,6 +822,24 @@ type ProxyResource struct {
Type *string `json:"type,omitempty"`
}
+// SecurityAlertPolicyProperties properties of a security alert policy.
+type SecurityAlertPolicyProperties struct {
+ // State - Specifies the state of the policy, whether it is enabled or disabled. Possible values include: 'ServerSecurityAlertPolicyStateEnabled', 'ServerSecurityAlertPolicyStateDisabled'
+ State ServerSecurityAlertPolicyState `json:"state,omitempty"`
+ // DisabledAlerts - Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly
+ DisabledAlerts *[]string `json:"disabledAlerts,omitempty"`
+ // EmailAddresses - Specifies an array of e-mail addresses to which the alert is sent.
+ EmailAddresses *[]string `json:"emailAddresses,omitempty"`
+ // EmailAccountAdmins - Specifies that the alert is sent to the account administrators.
+ EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"`
+ // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
+ StorageEndpoint *string `json:"storageEndpoint,omitempty"`
+ // StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account.
+ StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`
+ // RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs.
+ RetentionDays *int32 `json:"retentionDays,omitempty"`
+}
+
// Server represents a server.
type Server struct {
autorest.Response `json:"-"`
@@ -1430,12 +1373,11 @@ func (spfr ServerPropertiesForRestore) AsBasicServerPropertiesForCreate() (Basic
// ServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersCreateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersCreateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1443,34 +1385,15 @@ func (future ServersCreateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("postgresql.ServersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.ServersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("postgresql.ServersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "postgresql.ServersCreateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.ServersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.ServersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1478,12 +1401,11 @@ func (future ServersCreateFuture) Result(client ServersClient) (s Server, err er
// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1491,47 +1413,132 @@ func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("postgresql.ServersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.ServersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("postgresql.ServersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ ar.Response = future.Response()
+ return
+}
+
+// ServerSecurityAlertPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ServerSecurityAlertPoliciesCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ServerSecurityAlertPoliciesCreateOrUpdateFuture) Result(client ServerSecurityAlertPoliciesClient) (ssap ServerSecurityAlertPolicy, err error) {
+ var done bool
+ done, err = future.Done(client)
if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.ServersDeleteFuture", "Result", resp, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "postgresql.ServerSecurityAlertPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.ServersDeleteFuture", "Result", resp, "Failure responding to request")
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("postgresql.ServerSecurityAlertPoliciesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ssap.Response.Response, err = future.GetResult(sender); err == nil && ssap.Response.Response.StatusCode != http.StatusNoContent {
+ ssap, err = client.CreateOrUpdateResponder(ssap.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.ServerSecurityAlertPoliciesCreateOrUpdateFuture", "Result", ssap.Response.Response, "Failure responding to request")
+ }
}
return
}
+// ServerSecurityAlertPolicy a server security alert policy.
+type ServerSecurityAlertPolicy struct {
+ autorest.Response `json:"-"`
+ // SecurityAlertPolicyProperties - Resource properties.
+ *SecurityAlertPolicyProperties `json:"properties,omitempty"`
+ // ID - Resource ID
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ServerSecurityAlertPolicy.
+func (ssap ServerSecurityAlertPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ssap.SecurityAlertPolicyProperties != nil {
+ objectMap["properties"] = ssap.SecurityAlertPolicyProperties
+ }
+ if ssap.ID != nil {
+ objectMap["id"] = ssap.ID
+ }
+ if ssap.Name != nil {
+ objectMap["name"] = ssap.Name
+ }
+ if ssap.Type != nil {
+ objectMap["type"] = ssap.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ServerSecurityAlertPolicy struct.
+func (ssap *ServerSecurityAlertPolicy) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var securityAlertPolicyProperties SecurityAlertPolicyProperties
+ err = json.Unmarshal(*v, &securityAlertPolicyProperties)
+ if err != nil {
+ return err
+ }
+ ssap.SecurityAlertPolicyProperties = &securityAlertPolicyProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ssap.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ssap.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ssap.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1539,34 +1546,15 @@ func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("postgresql.ServersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.ServersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("postgresql.ServersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "postgresql.ServersUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.ServersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "postgresql.ServersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1708,3 +1696,249 @@ func (tr TrackedResource) MarshalJSON() ([]byte, error) {
}
return json.Marshal(objectMap)
}
+
+// VirtualNetworkRule a virtual network rule.
+type VirtualNetworkRule struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkRuleProperties - Resource properties.
+ *VirtualNetworkRuleProperties `json:"properties,omitempty"`
+ // ID - Resource ID
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkRule.
+func (vnr VirtualNetworkRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vnr.VirtualNetworkRuleProperties != nil {
+ objectMap["properties"] = vnr.VirtualNetworkRuleProperties
+ }
+ if vnr.ID != nil {
+ objectMap["id"] = vnr.ID
+ }
+ if vnr.Name != nil {
+ objectMap["name"] = vnr.Name
+ }
+ if vnr.Type != nil {
+ objectMap["type"] = vnr.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkRule struct.
+func (vnr *VirtualNetworkRule) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualNetworkRuleProperties VirtualNetworkRuleProperties
+ err = json.Unmarshal(*v, &virtualNetworkRuleProperties)
+ if err != nil {
+ return err
+ }
+ vnr.VirtualNetworkRuleProperties = &virtualNetworkRuleProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vnr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vnr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vnr.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkRuleListResult a list of virtual network rules.
+type VirtualNetworkRuleListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of results.
+ Value *[]VirtualNetworkRule `json:"value,omitempty"`
+ // NextLink - Link to retrieve next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualNetworkRuleListResultIterator provides access to a complete listing of VirtualNetworkRule values.
+type VirtualNetworkRuleListResultIterator struct {
+ i int
+ page VirtualNetworkRuleListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualNetworkRuleListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkRuleListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualNetworkRuleListResultIterator) Response() VirtualNetworkRuleListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualNetworkRuleListResultIterator) Value() VirtualNetworkRule {
+ if !iter.page.NotDone() {
+ return VirtualNetworkRule{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool {
+ return vnrlr.Value == nil || len(*vnrlr.Value) == 0
+}
+
+// virtualNetworkRuleListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer() (*http.Request, error) {
+ if vnrlr.NextLink == nil || len(to.String(vnrlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnrlr.NextLink)))
+}
+
+// VirtualNetworkRuleListResultPage contains a page of VirtualNetworkRule values.
+type VirtualNetworkRuleListResultPage struct {
+ fn func(VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)
+ vnrlr VirtualNetworkRuleListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualNetworkRuleListResultPage) Next() error {
+ next, err := page.fn(page.vnrlr)
+ if err != nil {
+ return err
+ }
+ page.vnrlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkRuleListResultPage) NotDone() bool {
+ return !page.vnrlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkRuleListResultPage) Response() VirtualNetworkRuleListResult {
+ return page.vnrlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkRuleListResultPage) Values() []VirtualNetworkRule {
+ if page.vnrlr.IsEmpty() {
+ return nil
+ }
+ return *page.vnrlr.Value
+}
+
+// VirtualNetworkRuleProperties properties of a virtual network rule.
+type VirtualNetworkRuleProperties struct {
+ // VirtualNetworkSubnetID - The ARM resource id of the virtual network subnet.
+ VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"`
+ // IgnoreMissingVnetServiceEndpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
+ IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"`
+ // State - Virtual Network Rule State. Possible values include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown'
+ State VirtualNetworkRuleState `json:"state,omitempty"`
+}
+
+// VirtualNetworkRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkRulesCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetworkRulesClient) (vnr VirtualNetworkRule, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("postgresql.VirtualNetworkRulesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnr.Response.Response, err = future.GetResult(sender); err == nil && vnr.Response.Response.StatusCode != http.StatusNoContent {
+ vnr, err = client.CreateOrUpdateResponder(vnr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", vnr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualNetworkRulesDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkRulesDeleteFuture) Result(client VirtualNetworkRulesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("postgresql.VirtualNetworkRulesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/operations.go
index 807f91ba9..76e4b8e7b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/operations.go
@@ -25,8 +25,8 @@ import (
)
// OperationsClient is the the Microsoft Azure management API provides create, read, update, and delete functionality
-// for Azure PostgreSQL resources including servers, databases, firewall rules, log files and configurations with new
-// business model.
+// for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies,
+// log files and configurations with new business model.
type OperationsClient struct {
BaseClient
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/servers.go
index 5dfe1291a..aaae22bbb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/servers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/servers.go
@@ -26,8 +26,8 @@ import (
)
// ServersClient is the the Microsoft Azure management API provides create, read, update, and delete functionality for
-// Azure PostgreSQL resources including servers, databases, firewall rules, log files and configurations with new
-// business model.
+// Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log
+// files and configurations with new business model.
type ServersClient struct {
BaseClient
}
@@ -101,15 +101,17 @@ func (client ServersClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) CreateSender(req *http.Request) (future ServersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -171,15 +173,17 @@ func (client ServersClient) DeletePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -440,15 +444,17 @@ func (client ServersClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/serversecurityalertpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/serversecurityalertpolicies.go
new file mode 100644
index 000000000..002c2755d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/serversecurityalertpolicies.go
@@ -0,0 +1,187 @@
+package postgresql
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ServerSecurityAlertPoliciesClient is the the Microsoft Azure management API provides create, read, update, and
+// delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules,
+// security alert policies, log files and configurations with new business model.
+type ServerSecurityAlertPoliciesClient struct {
+ BaseClient
+}
+
+// NewServerSecurityAlertPoliciesClient creates an instance of the ServerSecurityAlertPoliciesClient client.
+func NewServerSecurityAlertPoliciesClient(subscriptionID string) ServerSecurityAlertPoliciesClient {
+ return NewServerSecurityAlertPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client.
+func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerSecurityAlertPoliciesClient {
+ return ServerSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a threat detection policy.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// parameters - the server security alert policy.
+func (client ServerSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerSecurityAlertPolicy) (result ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.ServerSecurityAlertPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.ServerSecurityAlertPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ServerSecurityAlertPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ServerSecurityAlertPolicy) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "securityAlertPolicyName": autorest.Encode("path", "Default"),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServerSecurityAlertPolicy, 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 get a server's security alert policy.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+func (client ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerSecurityAlertPolicy, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.ServerSecurityAlertPoliciesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "postgresql.ServerSecurityAlertPoliciesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.ServerSecurityAlertPoliciesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ServerSecurityAlertPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "securityAlertPolicyName": autorest.Encode("path", "Default"),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-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.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServerSecurityAlertPoliciesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ServerSecurityAlertPoliciesClient) GetResponder(resp *http.Response) (result ServerSecurityAlertPolicy, 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/services/postgresql/mgmt/2017-12-01/postgresql/virtualnetworkrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/virtualnetworkrules.go
new file mode 100644
index 000000000..19aa5bde5
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/virtualnetworkrules.go
@@ -0,0 +1,366 @@
+package postgresql
+
+// 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 (
+ "context"
+ "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 Microsoft Azure management API provides create, read, update, and delete
+// functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security
+// alert policies, log files and configurations with new business model.
+type VirtualNetworkRulesClient struct {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// virtualNetworkRuleName - the name of the virtual network rule.
+// parameters - the requested virtual Network Rule Resource state.
+func (client VirtualNetworkRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule) (result VirtualNetworkRulesCreateOrUpdateFuture, err error) {
+ 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 {
+ return result, validation.NewError("postgresql.VirtualNetworkRulesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualNetworkRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule) (*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 = "2017-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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) (future VirtualNetworkRulesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the virtual network rule with the given name.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// virtualNetworkRuleName - the name of the virtual network rule.
+func (client VirtualNetworkRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRulesDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualNetworkRulesClient) DeletePreparer(ctx context.Context, 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 = "2017-12-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.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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) (future VirtualNetworkRulesDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// virtualNetworkRuleName - the name of the virtual network rule.
+func (client VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRule, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.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, "postgresql.VirtualNetworkRulesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualNetworkRulesClient) GetPreparer(ctx context.Context, 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 = "2017-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.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+func (client VirtualNetworkRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultPage, err error) {
+ result.fn = client.listByServerNextResults
+ req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesClient", "ListByServer", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByServerSender(req)
+ if err != nil {
+ result.vnrlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesClient", "ListByServer", resp, "Failure sending request")
+ return
+ }
+
+ result.vnrlr, err = client.ListByServerResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesClient", "ListByServer", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByServerPreparer prepares the ListByServer request.
+func (client VirtualNetworkRulesClient) ListByServerPreparer(ctx context.Context, 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-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.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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, "postgresql.VirtualNetworkRulesClient", "listByServerNextResults", 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, "postgresql.VirtualNetworkRulesClient", "listByServerNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByServerResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesClient", "listByServerNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByServerComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualNetworkRulesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultIterator, err error) {
+ result.page, err = client.ListByServer(ctx, resourceGroupName, serverName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/capacities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/capacities.go
index 9a927d312..b45c0b067 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/capacities.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/capacities.go
@@ -102,15 +102,17 @@ func (client CapacitiesClient) CreatePreparer(ctx context.Context, resourceGroup
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client CapacitiesClient) CreateSender(req *http.Request) (future CapacitiesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -185,15 +187,17 @@ func (client CapacitiesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client CapacitiesClient) DeleteSender(req *http.Request) (future CapacitiesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -627,15 +631,17 @@ func (client CapacitiesClient) ResumePreparer(ctx context.Context, resourceGroup
// ResumeSender sends the Resume request. The method will close the
// http.Response Body if it receives an error.
func (client CapacitiesClient) ResumeSender(req *http.Request) (future CapacitiesResumeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -709,15 +715,17 @@ func (client CapacitiesClient) SuspendPreparer(ctx context.Context, resourceGrou
// SuspendSender sends the Suspend request. The method will close the
// http.Response Body if it receives an error.
func (client CapacitiesClient) SuspendSender(req *http.Request) (future CapacitiesSuspendFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -794,15 +802,17 @@ func (client CapacitiesClient) UpdatePreparer(ctx context.Context, resourceGroup
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client CapacitiesClient) UpdateSender(req *http.Request) (future CapacitiesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/models.go
index 6200c1e2b..701bc7fe1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/models.go
@@ -111,12 +111,11 @@ func PossibleStateValues() []State {
// CapacitiesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CapacitiesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CapacitiesCreateFuture) Result(client CapacitiesClient) (dc DedicatedCapacity, err error) {
+func (future *CapacitiesCreateFuture) Result(client CapacitiesClient) (dc DedicatedCapacity, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -124,34 +123,15 @@ func (future CapacitiesCreateFuture) Result(client CapacitiesClient) (dc Dedicat
return
}
if !done {
- return dc, azure.NewAsyncOpIncompleteError("powerbidedicated.CapacitiesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- dc, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("powerbidedicated.CapacitiesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dc.Response.Response, err = future.GetResult(sender); err == nil && dc.Response.Response.StatusCode != http.StatusNoContent {
+ dc, err = client.CreateResponder(dc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesCreateFuture", "Result", dc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- dc, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -159,12 +139,11 @@ func (future CapacitiesCreateFuture) Result(client CapacitiesClient) (dc Dedicat
// CapacitiesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CapacitiesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CapacitiesDeleteFuture) Result(client CapacitiesClient) (ar autorest.Response, err error) {
+func (future *CapacitiesDeleteFuture) Result(client CapacitiesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -172,47 +151,21 @@ func (future CapacitiesDeleteFuture) Result(client CapacitiesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("powerbidedicated.CapacitiesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("powerbidedicated.CapacitiesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// CapacitiesResumeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CapacitiesResumeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CapacitiesResumeFuture) Result(client CapacitiesClient) (ar autorest.Response, err error) {
+func (future *CapacitiesResumeFuture) Result(client CapacitiesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -220,47 +173,21 @@ func (future CapacitiesResumeFuture) Result(client CapacitiesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("powerbidedicated.CapacitiesResumeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesResumeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("powerbidedicated.CapacitiesResumeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesResumeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesResumeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// CapacitiesSuspendFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CapacitiesSuspendFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CapacitiesSuspendFuture) Result(client CapacitiesClient) (ar autorest.Response, err error) {
+func (future *CapacitiesSuspendFuture) Result(client CapacitiesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -268,47 +195,21 @@ func (future CapacitiesSuspendFuture) Result(client CapacitiesClient) (ar autore
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("powerbidedicated.CapacitiesSuspendFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.SuspendResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesSuspendFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("powerbidedicated.CapacitiesSuspendFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesSuspendFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.SuspendResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesSuspendFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// CapacitiesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CapacitiesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CapacitiesUpdateFuture) Result(client CapacitiesClient) (dc DedicatedCapacity, err error) {
+func (future *CapacitiesUpdateFuture) Result(client CapacitiesClient) (dc DedicatedCapacity, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -316,34 +217,15 @@ func (future CapacitiesUpdateFuture) Result(client CapacitiesClient) (dc Dedicat
return
}
if !done {
- return dc, azure.NewAsyncOpIncompleteError("powerbidedicated.CapacitiesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- dc, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("powerbidedicated.CapacitiesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dc.Response.Response, err = future.GetResult(sender); err == nil && dc.Response.Response.StatusCode != http.StatusNoContent {
+ dc, err = client.UpdateResponder(dc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesUpdateFuture", "Result", dc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- dc, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbidedicated.CapacitiesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/models.go
index d2d7270ff..694e2909c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/models.go
@@ -21,7 +21,6 @@ import (
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
- "net/http"
)
// AccessKeyName enumerates the values for access key name.
@@ -250,12 +249,11 @@ type WorkspaceCollectionList struct {
// operation.
type WorkspaceCollectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WorkspaceCollectionsDeleteFuture) Result(client WorkspaceCollectionsClient) (ar autorest.Response, err error) {
+func (future *WorkspaceCollectionsDeleteFuture) Result(client WorkspaceCollectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -263,35 +261,10 @@ func (future WorkspaceCollectionsDeleteFuture) Result(client WorkspaceCollection
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("powerbiembedded.WorkspaceCollectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbiembedded.WorkspaceCollectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("powerbiembedded.WorkspaceCollectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbiembedded.WorkspaceCollectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "powerbiembedded.WorkspaceCollectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/workspacecollections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/workspacecollections.go
index 663abd85f..9ccc90c48 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/workspacecollections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/workspacecollections.go
@@ -233,15 +233,17 @@ func (client WorkspaceCollectionsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WorkspaceCollectionsClient) DeleteSender(req *http.Request) (future WorkspaceCollectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2017-05-15/addons/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2017-05-15/addons/models.go
index 0225f5e51..7bef21b8a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2017-05-15/addons/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2017-05-15/addons/models.go
@@ -227,12 +227,11 @@ type OperationsDisplayDefinition struct {
// operation.
type SupportPlanTypesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SupportPlanTypesCreateOrUpdateFuture) Result(client SupportPlanTypesClient) (cspre CanonicalSupportPlanResponseEnvelope, err error) {
+func (future *SupportPlanTypesCreateOrUpdateFuture) Result(client SupportPlanTypesClient) (cspre CanonicalSupportPlanResponseEnvelope, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -240,34 +239,15 @@ func (future SupportPlanTypesCreateOrUpdateFuture) Result(client SupportPlanType
return
}
if !done {
- return cspre, azure.NewAsyncOpIncompleteError("addons.SupportPlanTypesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cspre, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("addons.SupportPlanTypesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cspre.Response.Response, err = future.GetResult(sender); err == nil && cspre.Response.Response.StatusCode != http.StatusNoContent {
+ cspre, err = client.CreateOrUpdateResponder(cspre.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesCreateOrUpdateFuture", "Result", cspre.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- cspre, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -276,12 +256,11 @@ func (future SupportPlanTypesCreateOrUpdateFuture) Result(client SupportPlanType
// operation.
type SupportPlanTypesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SupportPlanTypesDeleteFuture) Result(client SupportPlanTypesClient) (cspre CanonicalSupportPlanResponseEnvelope, err error) {
+func (future *SupportPlanTypesDeleteFuture) Result(client SupportPlanTypesClient) (cspre CanonicalSupportPlanResponseEnvelope, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -289,34 +268,15 @@ func (future SupportPlanTypesDeleteFuture) Result(client SupportPlanTypesClient)
return
}
if !done {
- return cspre, azure.NewAsyncOpIncompleteError("addons.SupportPlanTypesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cspre, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("addons.SupportPlanTypesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cspre.Response.Response, err = future.GetResult(sender); err == nil && cspre.Response.Response.StatusCode != http.StatusNoContent {
+ cspre, err = client.DeleteResponder(cspre.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesDeleteFuture", "Result", cspre.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- cspre, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2017-05-15/addons/supportplantypes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2017-05-15/addons/supportplantypes.go
index 075263615..00929a7f5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2017-05-15/addons/supportplantypes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2017-05-15/addons/supportplantypes.go
@@ -83,15 +83,17 @@ func (client SupportPlanTypesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SupportPlanTypesClient) CreateOrUpdateSender(req *http.Request) (future SupportPlanTypesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -152,15 +154,17 @@ func (client SupportPlanTypesClient) DeletePreparer(ctx context.Context, provide
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SupportPlanTypesClient) DeleteSender(req *http.Request) (future SupportPlanTypesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2018-03-01/addons/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2018-03-01/addons/models.go
index daf11467b..7f66803cf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2018-03-01/addons/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2018-03-01/addons/models.go
@@ -242,12 +242,11 @@ type OperationsDisplayDefinition struct {
// operation.
type SupportPlanTypesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SupportPlanTypesCreateOrUpdateFuture) Result(client SupportPlanTypesClient) (cspre CanonicalSupportPlanResponseEnvelope, err error) {
+func (future *SupportPlanTypesCreateOrUpdateFuture) Result(client SupportPlanTypesClient) (cspre CanonicalSupportPlanResponseEnvelope, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -255,34 +254,15 @@ func (future SupportPlanTypesCreateOrUpdateFuture) Result(client SupportPlanType
return
}
if !done {
- return cspre, azure.NewAsyncOpIncompleteError("addons.SupportPlanTypesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cspre, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("addons.SupportPlanTypesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cspre.Response.Response, err = future.GetResult(sender); err == nil && cspre.Response.Response.StatusCode != http.StatusNoContent {
+ cspre, err = client.CreateOrUpdateResponder(cspre.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesCreateOrUpdateFuture", "Result", cspre.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- cspre, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -291,12 +271,11 @@ func (future SupportPlanTypesCreateOrUpdateFuture) Result(client SupportPlanType
// operation.
type SupportPlanTypesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SupportPlanTypesDeleteFuture) Result(client SupportPlanTypesClient) (cspre CanonicalSupportPlanResponseEnvelope, err error) {
+func (future *SupportPlanTypesDeleteFuture) Result(client SupportPlanTypesClient) (cspre CanonicalSupportPlanResponseEnvelope, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -304,34 +283,15 @@ func (future SupportPlanTypesDeleteFuture) Result(client SupportPlanTypesClient)
return
}
if !done {
- return cspre, azure.NewAsyncOpIncompleteError("addons.SupportPlanTypesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cspre, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("addons.SupportPlanTypesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cspre.Response.Response, err = future.GetResult(sender); err == nil && cspre.Response.Response.StatusCode != http.StatusNoContent {
+ cspre, err = client.DeleteResponder(cspre.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesDeleteFuture", "Result", cspre.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- cspre, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "addons.SupportPlanTypesDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2018-03-01/addons/supportplantypes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2018-03-01/addons/supportplantypes.go
index b58d7e4a9..1635e6256 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2018-03-01/addons/supportplantypes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/addons/mgmt/2018-03-01/addons/supportplantypes.go
@@ -83,15 +83,17 @@ func (client SupportPlanTypesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SupportPlanTypesClient) CreateOrUpdateSender(req *http.Request) (future SupportPlanTypesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -152,15 +154,17 @@ func (client SupportPlanTypesClient) DeletePreparer(ctx context.Context, provide
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SupportPlanTypesClient) DeleteSender(req *http.Request) (future SupportPlanTypesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/analysisservices/preview/mgmt/2017-08-01-beta/analysisservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/analysisservices/preview/mgmt/2017-08-01-beta/analysisservices/models.go
index 4029924cc..efb9fd6f6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/analysisservices/preview/mgmt/2017-08-01-beta/analysisservices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/analysisservices/preview/mgmt/2017-08-01-beta/analysisservices/models.go
@@ -578,12 +578,11 @@ type Servers struct {
// ServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersCreateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersCreateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -591,34 +590,15 @@ func (future ServersCreateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("analysisservices.ServersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -626,12 +606,11 @@ func (future ServersCreateFuture) Result(client ServersClient) (s Server, err er
// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -639,47 +618,21 @@ func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("analysisservices.ServersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersResumeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersResumeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersResumeFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersResumeFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -687,47 +640,21 @@ func (future ServersResumeFuture) Result(client ServersClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("analysisservices.ServersResumeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersResumeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersResumeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersResumeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersResumeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersSuspendFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersSuspendFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersSuspendFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersSuspendFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -735,47 +662,21 @@ func (future ServersSuspendFuture) Result(client ServersClient) (ar autorest.Res
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("analysisservices.ServersSuspendFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.SuspendResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersSuspendFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersSuspendFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersSuspendFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.SuspendResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersSuspendFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -783,34 +684,15 @@ func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("analysisservices.ServersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("analysisservices.ServersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "analysisservices.ServersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/analysisservices/preview/mgmt/2017-08-01-beta/analysisservices/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/analysisservices/preview/mgmt/2017-08-01-beta/analysisservices/servers.go
index e1884eba4..f0b900333 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/analysisservices/preview/mgmt/2017-08-01-beta/analysisservices/servers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/analysisservices/preview/mgmt/2017-08-01-beta/analysisservices/servers.go
@@ -180,15 +180,17 @@ func (client ServersClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) CreateSender(req *http.Request) (future ServersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -263,15 +265,17 @@ func (client ServersClient) DeletePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -998,15 +1002,17 @@ func (client ServersClient) ResumePreparer(ctx context.Context, resourceGroupNam
// ResumeSender sends the Resume request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) ResumeSender(req *http.Request) (future ServersResumeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1080,15 +1086,17 @@ func (client ServersClient) SuspendPreparer(ctx context.Context, resourceGroupNa
// SuspendSender sends the Suspend request. The method will close the
// http.Response Body if it receives an error.
func (client ServersClient) SuspendSender(req *http.Request) (future ServersSuspendFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1165,15 +1173,17 @@ func (client ServersClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/models.go
index 3052db1bf..a90a63d05 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/models.go
@@ -3469,12 +3469,11 @@ type SubscriptionUpdateParameters struct {
// operation.
type TenantConfigurationDeployFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3482,34 +3481,15 @@ func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationC
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.DeployResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.DeployResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.DeployResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3518,12 +3498,11 @@ func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationC
// operation.
type TenantConfigurationSaveFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3531,34 +3510,15 @@ func (future TenantConfigurationSaveFuture) Result(client TenantConfigurationCli
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.SaveResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.SaveResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.SaveResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3586,12 +3546,11 @@ type TenantConfigurationSyncStateContract struct {
// operation.
type TenantConfigurationValidateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3599,34 +3558,15 @@ func (future TenantConfigurationValidateFuture) Result(client TenantConfiguratio
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.ValidateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.ValidateResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.ValidateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/tenantconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/tenantconfiguration.go
index 65c06e8b0..17fd5a9b1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/tenantconfiguration.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/tenantconfiguration.go
@@ -91,15 +91,17 @@ func (client TenantConfigurationClient) DeployPreparer(ctx context.Context, apim
// DeploySender sends the Deploy request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) DeploySender(req *http.Request) (future TenantConfigurationDeployFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -242,15 +244,17 @@ func (client TenantConfigurationClient) SavePreparer(ctx context.Context, apimBa
// SaveSender sends the Save request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) SaveSender(req *http.Request) (future TenantConfigurationSaveFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -323,15 +327,17 @@ func (client TenantConfigurationClient) ValidatePreparer(ctx context.Context, ap
// ValidateSender sends the Validate request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) ValidateSender(req *http.Request) (future TenantConfigurationValidateFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-01-01/apimanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-01-01/apimanagement/models.go
index a99eb1d7f..3c554d361 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-01-01/apimanagement/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-01-01/apimanagement/models.go
@@ -3313,8 +3313,47 @@ type ErrorFieldContract struct {
Target *string `json:"target,omitempty"`
}
-// ErrorResponse error Body contract.
+// ErrorResponse error Response.
type ErrorResponse struct {
+ // ErrorResponseBody - Properties of the Error Response.
+ *ErrorResponseBody `json:"error,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ErrorResponse.
+func (er ErrorResponse) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if er.ErrorResponseBody != nil {
+ objectMap["error"] = er.ErrorResponseBody
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ErrorResponse struct.
+func (er *ErrorResponse) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "error":
+ if v != nil {
+ var errorResponseBody ErrorResponseBody
+ err = json.Unmarshal(*v, &errorResponseBody)
+ if err != nil {
+ return err
+ }
+ er.ErrorResponseBody = &errorResponseBody
+ }
+ }
+ }
+
+ return nil
+}
+
+// ErrorResponseBody error Body contract.
+type ErrorResponseBody struct {
// Code - Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
Code *string `json:"code,omitempty"`
// Message - Human-readable representation of the error.
@@ -7616,12 +7655,11 @@ type ServiceApplyNetworkConfigurationParameters struct {
// long-running operation.
type ServiceApplyNetworkConfigurationUpdatesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServiceApplyNetworkConfigurationUpdatesFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
+func (future *ServiceApplyNetworkConfigurationUpdatesFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7629,34 +7667,15 @@ func (future ServiceApplyNetworkConfigurationUpdatesFuture) Result(client Servic
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.ApplyNetworkConfigurationUpdatesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.ApplyNetworkConfigurationUpdatesResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.ApplyNetworkConfigurationUpdatesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7664,12 +7683,11 @@ func (future ServiceApplyNetworkConfigurationUpdatesFuture) Result(client Servic
// ServiceBackupFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServiceBackupFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServiceBackupFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
+func (future *ServiceBackupFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7677,34 +7695,15 @@ func (future ServiceBackupFuture) Result(client ServiceClient) (sr ServiceResour
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServiceBackupFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.BackupResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceBackupFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.BackupResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.BackupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7826,12 +7825,11 @@ type ServiceCheckNameAvailabilityParameters struct {
// operation.
type ServiceCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServiceCreateOrUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
+func (future *ServiceCreateOrUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7839,34 +7837,15 @@ func (future ServiceCreateOrUpdateFuture) Result(client ServiceClient) (sr Servi
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServiceCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8261,12 +8240,11 @@ func (sr *ServiceResource) UnmarshalJSON(body []byte) error {
// ServiceRestoreFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServiceRestoreFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServiceRestoreFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
+func (future *ServiceRestoreFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8274,34 +8252,15 @@ func (future ServiceRestoreFuture) Result(client ServiceClient) (sr ServiceResou
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServiceRestoreFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.RestoreResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceRestoreFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.RestoreResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.RestoreResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8317,12 +8276,11 @@ type ServiceSkuProperties struct {
// ServiceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServiceUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServiceUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
+func (future *ServiceUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8330,34 +8288,15 @@ func (future ServiceUpdateFuture) Result(client ServiceClient) (sr ServiceResour
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServiceUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.UpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8366,12 +8305,11 @@ func (future ServiceUpdateFuture) Result(client ServiceClient) (sr ServiceResour
// operation.
type ServiceUpdateHostnameFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServiceUpdateHostnameFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
+func (future *ServiceUpdateHostnameFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8379,34 +8317,15 @@ func (future ServiceUpdateHostnameFuture) Result(client ServiceClient) (sr Servi
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("apimanagement.ServiceUpdateHostnameFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.UpdateHostnameResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateHostnameFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceUpdateHostnameFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.UpdateHostnameResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateHostnameFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateHostnameFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.UpdateHostnameResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateHostnameFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9614,12 +9533,11 @@ type TagTagResourceContractProperties struct {
// operation.
type TenantConfigurationDeployFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9627,34 +9545,15 @@ func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationC
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.DeployResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.DeployResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.DeployResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9663,12 +9562,11 @@ func (future TenantConfigurationDeployFuture) Result(client TenantConfigurationC
// operation.
type TenantConfigurationSaveFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9676,34 +9574,15 @@ func (future TenantConfigurationSaveFuture) Result(client TenantConfigurationCli
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.SaveResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.SaveResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.SaveResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9731,12 +9610,11 @@ type TenantConfigurationSyncStateContract struct {
// operation.
type TenantConfigurationValidateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
+func (future *TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9744,34 +9622,15 @@ func (future TenantConfigurationValidateFuture) Result(client TenantConfiguratio
return
}
if !done {
- return orc, azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- orc, err = client.ValidateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
+ orc, err = client.ValidateResponder(orc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", orc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", resp, "Failure sending request")
- return
- }
- orc, err = client.ValidateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-01-01/apimanagement/service.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-01-01/apimanagement/service.go
index 066e5e184..d3ea4453e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-01-01/apimanagement/service.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-01-01/apimanagement/service.go
@@ -101,15 +101,17 @@ func (client ServiceClient) ApplyNetworkConfigurationUpdatesPreparer(ctx context
// ApplyNetworkConfigurationUpdatesSender sends the ApplyNetworkConfigurationUpdates request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) ApplyNetworkConfigurationUpdatesSender(req *http.Request) (future ServiceApplyNetworkConfigurationUpdatesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -187,15 +189,17 @@ func (client ServiceClient) BackupPreparer(ctx context.Context, resourceGroupNam
// BackupSender sends the Backup request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) BackupSender(req *http.Request) (future ServiceBackupFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -351,15 +355,17 @@ func (client ServiceClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) CreateOrUpdateSender(req *http.Request) (future ServiceCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -844,15 +850,17 @@ func (client ServiceClient) RestorePreparer(ctx context.Context, resourceGroupNa
// RestoreSender sends the Restore request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) RestoreSender(req *http.Request) (future ServiceRestoreFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -924,15 +932,17 @@ func (client ServiceClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) UpdateSender(req *http.Request) (future ServiceUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1006,15 +1016,17 @@ func (client ServiceClient) UpdateHostnamePreparer(ctx context.Context, resource
// UpdateHostnameSender sends the UpdateHostname request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) UpdateHostnameSender(req *http.Request) (future ServiceUpdateHostnameFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-01-01/apimanagement/tenantconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-01-01/apimanagement/tenantconfiguration.go
index 8d4e0cdc2..ed4bfdc82 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-01-01/apimanagement/tenantconfiguration.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-01-01/apimanagement/tenantconfiguration.go
@@ -99,15 +99,17 @@ func (client TenantConfigurationClient) DeployPreparer(ctx context.Context, reso
// DeploySender sends the Deploy request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) DeploySender(req *http.Request) (future TenantConfigurationDeployFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -260,15 +262,17 @@ func (client TenantConfigurationClient) SavePreparer(ctx context.Context, resour
// SaveSender sends the Save request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) SaveSender(req *http.Request) (future TenantConfigurationSaveFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -344,15 +348,17 @@ func (client TenantConfigurationClient) ValidatePreparer(ctx context.Context, re
// ValidateSender sends the Validate request. The method will close the
// http.Response Body if it receives an error.
func (client TenantConfigurationClient) ValidateSender(req *http.Request) (future TenantConfigurationValidateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/clusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/clusters.go
index 0bbb13c10..c5868da8e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/clusters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/clusters.go
@@ -129,15 +129,17 @@ func (client ClustersClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) CreateSender(req *http.Request) (future ClustersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -210,15 +212,17 @@ func (client ClustersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) DeleteSender(req *http.Request) (future ClustersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/fileservers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/fileservers.go
index b9a68e58f..bc5a2c8a2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/fileservers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/fileservers.go
@@ -114,15 +114,17 @@ func (client FileServersClient) CreatePreparer(ctx context.Context, resourceGrou
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client FileServersClient) CreateSender(req *http.Request) (future FileServersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -195,15 +197,17 @@ func (client FileServersClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client FileServersClient) DeleteSender(req *http.Request) (future FileServersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/jobs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/jobs.go
index a32efeb14..8e7cd2acc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/jobs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/jobs.go
@@ -130,15 +130,17 @@ func (client JobsClient) CreatePreparer(ctx context.Context, resourceGroupName s
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client JobsClient) CreateSender(req *http.Request) (future JobsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -211,15 +213,17 @@ func (client JobsClient) DeletePreparer(ctx context.Context, resourceGroupName s
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client JobsClient) DeleteSender(req *http.Request) (future JobsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -843,15 +847,17 @@ func (client JobsClient) TerminatePreparer(ctx context.Context, resourceGroupNam
// TerminateSender sends the Terminate request. The method will close the
// http.Response Body if it receives an error.
func (client JobsClient) TerminateSender(req *http.Request) (future JobsTerminateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/models.go
index d77107727..4e601ea6f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/batchai/mgmt/2017-09-preview/batchai/models.go
@@ -631,12 +631,11 @@ type ClusterProperties struct {
// ClustersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err error) {
+func (future *ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -644,34 +643,15 @@ func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err
return
}
if !done {
- return c, azure.NewAsyncOpIncompleteError("batchai.ClustersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- c, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.ClustersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.CreateResponder(c.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batchai.ClustersCreateFuture", "Result", c.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- c, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -679,12 +659,11 @@ func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err
// ClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Response, err error) {
+func (future *ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -692,35 +671,10 @@ func (future ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.ClustersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.ClustersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.ClustersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1326,12 +1280,11 @@ type FileServerReference struct {
// FileServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type FileServersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FileServersCreateFuture) Result(client FileServersClient) (fs FileServer, err error) {
+func (future *FileServersCreateFuture) Result(client FileServersClient) (fs FileServer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1339,34 +1292,15 @@ func (future FileServersCreateFuture) Result(client FileServersClient) (fs FileS
return
}
if !done {
- return fs, azure.NewAsyncOpIncompleteError("batchai.FileServersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fs, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.FileServersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fs.Response.Response, err = future.GetResult(sender); err == nil && fs.Response.Response.StatusCode != http.StatusNoContent {
+ fs, err = client.CreateResponder(fs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batchai.FileServersCreateFuture", "Result", fs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- fs, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1374,12 +1308,11 @@ func (future FileServersCreateFuture) Result(client FileServersClient) (fs FileS
// FileServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type FileServersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FileServersDeleteFuture) Result(client FileServersClient) (ar autorest.Response, err error) {
+func (future *FileServersDeleteFuture) Result(client FileServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1387,35 +1320,10 @@ func (future FileServersDeleteFuture) Result(client FileServersClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.FileServersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.FileServersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.FileServersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1823,12 +1731,11 @@ type JobPropertiesExecutionInfo struct {
// JobsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobsCreateFuture) Result(client JobsClient) (j Job, err error) {
+func (future *JobsCreateFuture) Result(client JobsClient) (j Job, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1836,34 +1743,15 @@ func (future JobsCreateFuture) Result(client JobsClient) (j Job, err error) {
return
}
if !done {
- return j, azure.NewAsyncOpIncompleteError("batchai.JobsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- j, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.JobsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
+ j, err = client.CreateResponder(j.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "batchai.JobsCreateFuture", "Result", j.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- j, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1871,12 +1759,11 @@ func (future JobsCreateFuture) Result(client JobsClient) (j Job, err error) {
// JobsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobsDeleteFuture) Result(client JobsClient) (ar autorest.Response, err error) {
+func (future *JobsDeleteFuture) Result(client JobsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1884,47 +1771,21 @@ func (future JobsDeleteFuture) Result(client JobsClient) (ar autorest.Response,
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.JobsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.JobsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// JobsTerminateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobsTerminateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobsTerminateFuture) Result(client JobsClient) (ar autorest.Response, err error) {
+func (future *JobsTerminateFuture) Result(client JobsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1932,35 +1793,10 @@ func (future JobsTerminateFuture) Result(client JobsClient) (ar autorest.Respons
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("batchai.JobsTerminateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.TerminateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsTerminateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("batchai.JobsTerminateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsTerminateFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.TerminateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "batchai.JobsTerminateFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/botconnection.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/botconnection.go
new file mode 100644
index 000000000..93f31ddd0
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/botconnection.go
@@ -0,0 +1,651 @@
+package botservice
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// BotConnectionClient is the azure Bot Service is a platform for creating smart conversational agents.
+type BotConnectionClient struct {
+ BaseClient
+}
+
+// NewBotConnectionClient creates an instance of the BotConnectionClient client.
+func NewBotConnectionClient(subscriptionID string) BotConnectionClient {
+ return NewBotConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewBotConnectionClientWithBaseURI creates an instance of the BotConnectionClient client.
+func NewBotConnectionClientWithBaseURI(baseURI string, subscriptionID string) BotConnectionClient {
+ return BotConnectionClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create register a new Auth Connection for a Bot Service
+// Parameters:
+// resourceGroupName - the name of the Bot resource group in the user subscription.
+// resourceName - the name of the Bot resource.
+// connectionName - the name of the Bot Service Connection Setting resource
+// parameters - the parameters to provide for creating the Connection Setting.
+func (client BotConnectionClient) Create(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, parameters ConnectionSetting) (result ConnectionSetting, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
+ {TargetValue: connectionName,
+ Constraints: []validation.Constraint{{Target: "connectionName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "connectionName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "connectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("botservice.BotConnectionClient", "Create", err.Error())
+ }
+
+ req, err := client.CreatePreparer(ctx, resourceGroupName, resourceName, connectionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Create", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Create", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client BotConnectionClient) CreatePreparer(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, parameters ConnectionSetting) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "connectionName": autorest.Encode("path", connectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client BotConnectionClient) CreateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client BotConnectionClient) CreateResponder(resp *http.Response) (result ConnectionSetting, 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 Connection Setting registration for a Bot Service
+// Parameters:
+// resourceGroupName - the name of the Bot resource group in the user subscription.
+// resourceName - the name of the Bot resource.
+// connectionName - the name of the Bot Service Connection Setting resource
+func (client BotConnectionClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (result autorest.Response, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
+ {TargetValue: connectionName,
+ Constraints: []validation.Constraint{{Target: "connectionName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "connectionName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "connectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("botservice.BotConnectionClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, connectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client BotConnectionClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "connectionName": autorest.Encode("path", connectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-12-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.BotService/botServices/{resourceName}/Connections/{connectionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client BotConnectionClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client BotConnectionClient) 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 get a Connection Setting registration for a Bot Service
+// Parameters:
+// resourceGroupName - the name of the Bot resource group in the user subscription.
+// resourceName - the name of the Bot resource.
+// connectionName - the name of the Bot Service Connection Setting resource
+func (client BotConnectionClient) Get(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (result ConnectionSetting, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
+ {TargetValue: connectionName,
+ Constraints: []validation.Constraint{{Target: "connectionName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "connectionName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "connectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("botservice.BotConnectionClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, connectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client BotConnectionClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "connectionName": autorest.Encode("path", connectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-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.BotService/botServices/{resourceName}/Connections/{connectionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client BotConnectionClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client BotConnectionClient) GetResponder(resp *http.Response) (result ConnectionSetting, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByBotService returns all the Connection Settings registered to a particular BotService resource
+// Parameters:
+// resourceGroupName - the name of the Bot resource group in the user subscription.
+// resourceName - the name of the Bot resource.
+func (client BotConnectionClient) ListByBotService(ctx context.Context, resourceGroupName string, resourceName string) (result ConnectionSettingResponseListPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("botservice.BotConnectionClient", "ListByBotService", err.Error())
+ }
+
+ result.fn = client.listByBotServiceNextResults
+ req, err := client.ListByBotServicePreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListByBotService", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByBotServiceSender(req)
+ if err != nil {
+ result.csrl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListByBotService", resp, "Failure sending request")
+ return
+ }
+
+ result.csrl, err = client.ListByBotServiceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListByBotService", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByBotServicePreparer prepares the ListByBotService request.
+func (client BotConnectionClient) ListByBotServicePreparer(ctx context.Context, 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 = "2017-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.BotService/botServices/{resourceName}/connections", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByBotServiceSender sends the ListByBotService request. The method will close the
+// http.Response Body if it receives an error.
+func (client BotConnectionClient) ListByBotServiceSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByBotServiceResponder handles the response to the ListByBotService request. The method always
+// closes the http.Response Body.
+func (client BotConnectionClient) ListByBotServiceResponder(resp *http.Response) (result ConnectionSettingResponseList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByBotServiceNextResults retrieves the next set of results, if any.
+func (client BotConnectionClient) listByBotServiceNextResults(lastResults ConnectionSettingResponseList) (result ConnectionSettingResponseList, err error) {
+ req, err := lastResults.connectionSettingResponseListPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "listByBotServiceNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByBotServiceSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "listByBotServiceNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByBotServiceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "listByBotServiceNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByBotServiceComplete enumerates all values, automatically crossing page boundaries as required.
+func (client BotConnectionClient) ListByBotServiceComplete(ctx context.Context, resourceGroupName string, resourceName string) (result ConnectionSettingResponseListIterator, err error) {
+ result.page, err = client.ListByBotService(ctx, resourceGroupName, resourceName)
+ return
+}
+
+// ListServiceProviders lists the available Service Providers for creating Connection Settings
+// Parameters:
+// resourceGroupName - the name of the Bot resource group in the user subscription.
+func (client BotConnectionClient) ListServiceProviders(ctx context.Context, resourceGroupName string) (result ServiceProviderResponseList, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("botservice.BotConnectionClient", "ListServiceProviders", err.Error())
+ }
+
+ req, err := client.ListServiceProvidersPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListServiceProviders", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListServiceProvidersSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListServiceProviders", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListServiceProvidersResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListServiceProviders", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListServiceProvidersPreparer prepares the ListServiceProviders request.
+func (client BotConnectionClient) ListServiceProvidersPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-12-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.BotService/BotServices/listServiceProviders", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListServiceProvidersSender sends the ListServiceProviders request. The method will close the
+// http.Response Body if it receives an error.
+func (client BotConnectionClient) ListServiceProvidersSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListServiceProvidersResponder handles the response to the ListServiceProviders request. The method always
+// closes the http.Response Body.
+func (client BotConnectionClient) ListServiceProvidersResponder(resp *http.Response) (result ServiceProviderResponseList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListWithSecrets get a Connection Setting registration for a Bot Service
+// Parameters:
+// resourceGroupName - the name of the Bot resource group in the user subscription.
+// resourceName - the name of the Bot resource.
+// connectionName - the name of the Bot Service Connection Setting resource
+func (client BotConnectionClient) ListWithSecrets(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (result ConnectionSetting, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
+ {TargetValue: connectionName,
+ Constraints: []validation.Constraint{{Target: "connectionName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "connectionName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "connectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("botservice.BotConnectionClient", "ListWithSecrets", err.Error())
+ }
+
+ req, err := client.ListWithSecretsPreparer(ctx, resourceGroupName, resourceName, connectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListWithSecrets", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListWithSecretsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListWithSecrets", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListWithSecretsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListWithSecrets", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListWithSecretsPreparer prepares the ListWithSecrets request.
+func (client BotConnectionClient) ListWithSecretsPreparer(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "connectionName": autorest.Encode("path", connectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-12-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.BotService/botServices/{resourceName}/Connections/{connectionName}/listWithSecrets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListWithSecretsSender sends the ListWithSecrets request. The method will close the
+// http.Response Body if it receives an error.
+func (client BotConnectionClient) ListWithSecretsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListWithSecretsResponder handles the response to the ListWithSecrets request. The method always
+// closes the http.Response Body.
+func (client BotConnectionClient) ListWithSecretsResponder(resp *http.Response) (result ConnectionSetting, 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 Connection Setting registration for a Bot Service
+// Parameters:
+// resourceGroupName - the name of the Bot resource group in the user subscription.
+// resourceName - the name of the Bot resource.
+// connectionName - the name of the Bot Service Connection Setting resource
+// parameters - the parameters to provide for updating the Connection Setting.
+func (client BotConnectionClient) Update(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, parameters ConnectionSetting) (result ConnectionSetting, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
+ {TargetValue: connectionName,
+ Constraints: []validation.Constraint{{Target: "connectionName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "connectionName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "connectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("botservice.BotConnectionClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, connectionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client BotConnectionClient) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, parameters ConnectionSetting) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "connectionName": autorest.Encode("path", connectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client BotConnectionClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client BotConnectionClient) UpdateResponder(resp *http.Response) (result ConnectionSetting, 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/services/preview/botservice/mgmt/2017-12-01/botservices/bots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/bots.go
index 1a4e35eba..0eb895335 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/bots.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/bots.go
@@ -42,11 +42,15 @@ func NewBotsClientWithBaseURI(baseURI string, subscriptionID string) BotsClient
// Create creates a Bot Service. Bot Service is a resource group wide resource type.
// Parameters:
-// resourceGroupName - the name of the resource group within the user's subscription.
+// resourceGroupName - the name of the Bot resource group in the user subscription.
// resourceName - the name of the Bot resource.
// parameters - the parameters to provide for the created bot.
func (client BotsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, parameters Bot) (result Bot, err error) {
if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
@@ -126,10 +130,14 @@ func (client BotsClient) CreateResponder(resp *http.Response) (result Bot, err e
// Delete deletes a Bot Service from the resource group.
// Parameters:
-// resourceGroupName - the name of the resource group within the user's subscription.
+// resourceGroupName - the name of the Bot resource group in the user subscription.
// resourceName - the name of the Bot resource.
func (client BotsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
@@ -200,10 +208,14 @@ func (client BotsClient) DeleteResponder(resp *http.Response) (result autorest.R
// Get returns a BotService specified by the parameters.
// Parameters:
-// resourceGroupName - the name of the resource group within the user's subscription.
+// resourceGroupName - the name of the Bot resource group in the user subscription.
// resourceName - the name of the Bot resource.
func (client BotsClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result Bot, err error) {
if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
@@ -427,8 +439,16 @@ func (client BotsClient) ListComplete(ctx context.Context) (result BotResponseLi
// ListByResourceGroup returns all the resources of a particular type belonging to a resource group
// Parameters:
-// resourceGroupName - the name of the resource group within the user's subscription.
+// resourceGroupName - the name of the Bot resource group in the user subscription.
func (client BotsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result BotResponseListPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("botservice.BotsClient", "ListByResourceGroup", err.Error())
+ }
+
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -520,11 +540,15 @@ func (client BotsClient) ListByResourceGroupComplete(ctx context.Context, resour
// Update updates a Bot Service
// Parameters:
-// resourceGroupName - the name of the resource group within the user's subscription.
+// resourceGroupName - the name of the Bot resource group in the user subscription.
// resourceName - the name of the Bot resource.
// parameters - the parameters to provide for the created bot.
func (client BotsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters Bot) (result Bot, err error) {
if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/channels.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/channels.go
index 33fb31264..b97f0d5bb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/channels.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/channels.go
@@ -42,12 +42,16 @@ func NewChannelsClientWithBaseURI(baseURI string, subscriptionID string) Channel
// Create creates a Channel registration for a Bot Service
// Parameters:
-// resourceGroupName - the name of the resource group within the user's subscription.
+// resourceGroupName - the name of the Bot resource group in the user subscription.
// resourceName - the name of the Bot resource.
// channelName - the name of the Channel resource.
// parameters - the parameters to provide for the created bot.
func (client ChannelsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, channelName ChannelName, parameters BotChannel) (result BotChannel, err error) {
if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
@@ -122,11 +126,15 @@ func (client ChannelsClient) CreateResponder(resp *http.Response) (result BotCha
// Delete deletes a Channel registration from a Bot Service
// Parameters:
-// resourceGroupName - the name of the resource group within the user's subscription.
+// resourceGroupName - the name of the Bot resource group in the user subscription.
// resourceName - the name of the Bot resource.
// channelName - the name of the Bot resource.
func (client ChannelsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, channelName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
@@ -202,11 +210,15 @@ func (client ChannelsClient) DeleteResponder(resp *http.Response) (result autore
// Get returns a BotService Channel registration specified by the parameters.
// Parameters:
-// resourceGroupName - the name of the resource group within the user's subscription.
+// resourceGroupName - the name of the Bot resource group in the user subscription.
// resourceName - the name of the Bot resource.
// channelName - the name of the Bot resource.
func (client ChannelsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, channelName string) (result BotChannel, err error) {
if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
@@ -283,10 +295,14 @@ func (client ChannelsClient) GetResponder(resp *http.Response) (result BotChanne
// ListByResourceGroup returns all the Channel registrations of a particular BotService resource
// Parameters:
-// resourceGroupName - the name of the resource group within the user's subscription.
+// resourceGroupName - the name of the Bot resource group in the user subscription.
// resourceName - the name of the Bot resource.
func (client ChannelsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, resourceName string) (result ChannelResponseListPage, err error) {
if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
@@ -386,11 +402,15 @@ func (client ChannelsClient) ListByResourceGroupComplete(ctx context.Context, re
// ListWithKeys lists a Channel registration for a Bot Service including secrets
// Parameters:
-// resourceGroupName - the name of the resource group within the user's subscription.
+// resourceGroupName - the name of the Bot resource group in the user subscription.
// resourceName - the name of the Bot resource.
// channelName - the name of the Channel resource.
func (client ChannelsClient) ListWithKeys(ctx context.Context, resourceGroupName string, resourceName string, channelName ChannelName) (result BotChannel, err error) {
if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
@@ -463,12 +483,16 @@ func (client ChannelsClient) ListWithKeysResponder(resp *http.Response) (result
// Update updates a Channel registration for a Bot Service
// Parameters:
-// resourceGroupName - the name of the resource group within the user's subscription.
+// resourceGroupName - the name of the Bot resource group in the user subscription.
// resourceName - the name of the Bot resource.
// channelName - the name of the Channel resource.
// parameters - the parameters to provide for the created bot.
func (client ChannelsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, channelName ChannelName, parameters BotChannel) (result BotChannel, err error) {
if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/models.go
index 919a91e3e..db871b184 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2017-12-01/botservices/models.go
@@ -759,6 +759,195 @@ type CheckNameAvailabilityResponseBody struct {
Message *string `json:"message,omitempty"`
}
+// ConnectionItemName the display name of a connection Item Setting registered with the Bot
+type ConnectionItemName struct {
+ // Name - Connection Item name that has been added in the API
+ Name *string `json:"name,omitempty"`
+}
+
+// ConnectionSetting bot channel resource definition
+type ConnectionSetting struct {
+ autorest.Response `json:"-"`
+ // Properties - The set of properties specific to bot channel resource
+ Properties *ConnectionSettingProperties `json:"properties,omitempty"`
+ // ID - Specifies the resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Specifies the name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Location - Specifies the location of the resource.
+ Location *string `json:"location,omitempty"`
+ // Type - Specifies the type of the resource.
+ Type *string `json:"type,omitempty"`
+ // Tags - Contains resource tags defined as key/value pairs.
+ Tags map[string]*string `json:"tags"`
+ // Sku - Gets or sets the SKU of the resource.
+ Sku *Sku `json:"sku,omitempty"`
+ // Kind - Required. Gets or sets the Kind of the resource. Possible values include: 'KindSdk', 'KindDesigner', 'KindBot', 'KindFunction'
+ Kind Kind `json:"kind,omitempty"`
+ // Etag - Entity Tag
+ Etag *string `json:"etag,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ConnectionSetting.
+func (cs ConnectionSetting) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cs.Properties != nil {
+ objectMap["properties"] = cs.Properties
+ }
+ if cs.ID != nil {
+ objectMap["id"] = cs.ID
+ }
+ if cs.Name != nil {
+ objectMap["name"] = cs.Name
+ }
+ if cs.Location != nil {
+ objectMap["location"] = cs.Location
+ }
+ if cs.Type != nil {
+ objectMap["type"] = cs.Type
+ }
+ if cs.Tags != nil {
+ objectMap["tags"] = cs.Tags
+ }
+ if cs.Sku != nil {
+ objectMap["sku"] = cs.Sku
+ }
+ if cs.Kind != "" {
+ objectMap["kind"] = cs.Kind
+ }
+ if cs.Etag != nil {
+ objectMap["etag"] = cs.Etag
+ }
+ return json.Marshal(objectMap)
+}
+
+// ConnectionSettingParameter extra Parameter in a Connection Setting Properties to indicate service provider
+// specific properties
+type ConnectionSettingParameter struct {
+ // Key - Key for the Connection Setting Parameter.
+ Key *string `json:"key,omitempty"`
+ // Value - Value associated with the Connection Setting Parameter.
+ Value *string `json:"value,omitempty"`
+}
+
+// ConnectionSettingProperties properties for a Connection Setting Item
+type ConnectionSettingProperties struct {
+ // ClientID - Client Id associated with the Connection Setting.
+ ClientID *string `json:"clientId,omitempty"`
+ // ClientSecret - Client Secret associated with the Connection Setting
+ ClientSecret *string `json:"clientSecret,omitempty"`
+ // Scopes - Scopes associated with the Connection Setting
+ Scopes *string `json:"scopes,omitempty"`
+ // ServiceProviderID - Service Provider Id associated with the Connection Setting
+ ServiceProviderID *string `json:"serviceProviderId,omitempty"`
+ // ServiceProviderDisplayName - Service Provider Display Name associated with the Connection Setting
+ ServiceProviderDisplayName *string `json:"serviceProviderDisplayName,omitempty"`
+ // Parameters - Service Provider Parameters associated with the Connection Setting
+ Parameters *[]ConnectionSettingParameter `json:"parameters,omitempty"`
+}
+
+// ConnectionSettingResponseList the list of bot service connection settings response.
+type ConnectionSettingResponseList struct {
+ autorest.Response `json:"-"`
+ // NextLink - The link used to get the next page of bot service connection setting resources.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Value - Gets the list of bot service connection settings and their properties.
+ Value *[]ConnectionSetting `json:"value,omitempty"`
+}
+
+// ConnectionSettingResponseListIterator provides access to a complete listing of ConnectionSetting values.
+type ConnectionSettingResponseListIterator struct {
+ i int
+ page ConnectionSettingResponseListPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ConnectionSettingResponseListIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ConnectionSettingResponseListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ConnectionSettingResponseListIterator) Response() ConnectionSettingResponseList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ConnectionSettingResponseListIterator) Value() ConnectionSetting {
+ if !iter.page.NotDone() {
+ return ConnectionSetting{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (csrl ConnectionSettingResponseList) IsEmpty() bool {
+ return csrl.Value == nil || len(*csrl.Value) == 0
+}
+
+// connectionSettingResponseListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (csrl ConnectionSettingResponseList) connectionSettingResponseListPreparer() (*http.Request, error) {
+ if csrl.NextLink == nil || len(to.String(csrl.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(csrl.NextLink)))
+}
+
+// ConnectionSettingResponseListPage contains a page of ConnectionSetting values.
+type ConnectionSettingResponseListPage struct {
+ fn func(ConnectionSettingResponseList) (ConnectionSettingResponseList, error)
+ csrl ConnectionSettingResponseList
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ConnectionSettingResponseListPage) Next() error {
+ next, err := page.fn(page.csrl)
+ if err != nil {
+ return err
+ }
+ page.csrl = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ConnectionSettingResponseListPage) NotDone() bool {
+ return !page.csrl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ConnectionSettingResponseListPage) Response() ConnectionSettingResponseList {
+ return page.csrl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ConnectionSettingResponseListPage) Values() []ConnectionSetting {
+ if page.csrl.IsEmpty() {
+ return nil
+ }
+ return *page.csrl.Value
+}
+
// DirectLineChannel direct Line channel definition
type DirectLineChannel struct {
// Properties - The set of properties specific to Direct Line channel resource
@@ -1440,6 +1629,53 @@ func (r Resource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
+// ServiceProvider service Provider Definition
+type ServiceProvider struct {
+ // Properties - The Properties of a Service Provider Object
+ Properties *ServiceProviderProperties `json:"properties,omitempty"`
+}
+
+// ServiceProviderParameter extra Parameters specific to each Service Provider
+type ServiceProviderParameter struct {
+ // Name - Name of the Service Provider
+ Name *string `json:"name,omitempty"`
+ // Type - Type of the Service Provider
+ Type *string `json:"type,omitempty"`
+ // DisplayName - Display Name of the Service Provider
+ DisplayName *string `json:"displayName,omitempty"`
+ // Description - Description of the Service Provider
+ Description *string `json:"description,omitempty"`
+ // HelpURL - Help Url for the Service Provider
+ HelpURL *string `json:"helpUrl,omitempty"`
+ // Default - Default Name for the Service Provider
+ Default *string `json:"default,omitempty"`
+}
+
+// ServiceProviderProperties the Object used to describe a Service Provider supported by Bot Service
+type ServiceProviderProperties struct {
+ // ID - Id for Service Provider
+ ID *string `json:"id,omitempty"`
+ // DisplayName - Diplay Name of the Service Provider
+ DisplayName *string `json:"displayName,omitempty"`
+ // ServiceProviderName - Diplay Name of the Service Provider
+ ServiceProviderName *string `json:"serviceProviderName,omitempty"`
+ // DevPortalURL - Diplay Name of the Service Provider
+ DevPortalURL *string `json:"devPortalUrl,omitempty"`
+ // IconURL - Diplay Name of the Service Provider
+ IconURL *string `json:"iconUrl,omitempty"`
+ // Parameters - The list of parameters for the Service Provider
+ Parameters *[]ServiceProviderParameter `json:"parameters,omitempty"`
+}
+
+// ServiceProviderResponseList the list of bot service service providers response.
+type ServiceProviderResponseList struct {
+ autorest.Response `json:"-"`
+ // NextLink - The link used to get the next page of bot service service providers.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Value - Gets the list of bot service service providers and their properties.
+ Value *[]ServiceProvider `json:"value,omitempty"`
+}
+
// Sku the SKU of the cognitive services account.
type Sku struct {
// Name - The sku name. Possible values include: 'F0', 'S1'
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/disks.go
index 7c9edd2bb..786631cce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/disks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/disks.go
@@ -110,15 +110,17 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
// 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) (future DisksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -181,15 +183,17 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName
// 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) (future DisksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -330,15 +334,17 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup
// 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) (future DisksGrantAccessFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -584,15 +590,17 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou
// 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) (future DisksRevokeAccessFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -658,15 +666,17 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName
// 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) (future DisksUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/images.go
index 0189597cb..dd9b89989 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/images.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/images.go
@@ -96,15 +96,17 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future ImagesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -165,15 +167,17 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/models.go
index d89551fb3..a13b4a3b9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/models.go
@@ -1006,12 +1006,11 @@ type DiskProperties struct {
// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err error) {
+func (future *DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1019,34 +1018,15 @@ func (future DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1054,12 +1034,11 @@ func (future DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err
// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksDeleteFuture) Result(client DisksClient) (osr OperationStatusResponse, err error) {
+func (future *DisksDeleteFuture) Result(client DisksClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1067,34 +1046,15 @@ func (future DisksDeleteFuture) Result(client DisksClient) (osr OperationStatusR
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1102,12 +1062,11 @@ func (future DisksDeleteFuture) Result(client DisksClient) (osr OperationStatusR
// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksGrantAccessFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksGrantAccessFuture) Result(client DisksClient) (au AccessURI, err error) {
+func (future *DisksGrantAccessFuture) Result(client DisksClient) (au AccessURI, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1115,34 +1074,15 @@ func (future DisksGrantAccessFuture) Result(client DisksClient) (au AccessURI, e
return
}
if !done {
- return au, azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- au, err = client.GrantAccessResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
+ au, err = client.GrantAccessResponder(au.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", resp, "Failure sending request")
- return
- }
- au, err = client.GrantAccessResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1150,12 +1090,11 @@ func (future DisksGrantAccessFuture) Result(client DisksClient) (au AccessURI, e
// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksRevokeAccessFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksRevokeAccessFuture) Result(client DisksClient) (osr OperationStatusResponse, err error) {
+func (future *DisksRevokeAccessFuture) Result(client DisksClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1163,34 +1102,15 @@ func (future DisksRevokeAccessFuture) Result(client DisksClient) (osr OperationS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RevokeAccessResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RevokeAccessResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RevokeAccessResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1198,12 +1118,11 @@ func (future DisksRevokeAccessFuture) Result(client DisksClient) (osr OperationS
// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DisksUpdateFuture) Result(client DisksClient) (d Disk, err error) {
+func (future *DisksUpdateFuture) Result(client DisksClient) (d Disk, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1211,34 +1130,15 @@ func (future DisksUpdateFuture) Result(client DisksClient) (d Disk, err error) {
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.UpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1616,12 +1516,11 @@ type ImageReference struct {
// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImagesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, err error) {
+func (future *ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1629,34 +1528,15 @@ func (future ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, e
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1664,12 +1544,11 @@ func (future ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, e
// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImagesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ImagesDeleteFuture) Result(client ImagesClient) (osr OperationStatusResponse, err error) {
+func (future *ImagesDeleteFuture) Result(client ImagesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1677,34 +1556,15 @@ func (future ImagesDeleteFuture) Result(client ImagesClient) (osr OperationStatu
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2339,12 +2199,11 @@ func (page SnapshotListPage) Values() []Snapshot {
// operation.
type SnapshotsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) {
+func (future *SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2352,34 +2211,15 @@ func (future SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s Sn
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2387,12 +2227,11 @@ func (future SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s Sn
// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SnapshotsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsDeleteFuture) Result(client SnapshotsClient) (osr OperationStatusResponse, err error) {
+func (future *SnapshotsDeleteFuture) Result(client SnapshotsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2400,34 +2239,15 @@ func (future SnapshotsDeleteFuture) Result(client SnapshotsClient) (osr Operatio
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2435,12 +2255,11 @@ func (future SnapshotsDeleteFuture) Result(client SnapshotsClient) (osr Operatio
// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SnapshotsGrantAccessFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsGrantAccessFuture) Result(client SnapshotsClient) (au AccessURI, err error) {
+func (future *SnapshotsGrantAccessFuture) Result(client SnapshotsClient) (au AccessURI, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2448,34 +2267,15 @@ func (future SnapshotsGrantAccessFuture) Result(client SnapshotsClient) (au Acce
return
}
if !done {
- return au, azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- au, err = client.GrantAccessResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
+ au, err = client.GrantAccessResponder(au.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", resp, "Failure sending request")
- return
- }
- au, err = client.GrantAccessResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2484,12 +2284,11 @@ func (future SnapshotsGrantAccessFuture) Result(client SnapshotsClient) (au Acce
// operation.
type SnapshotsRevokeAccessFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsRevokeAccessFuture) Result(client SnapshotsClient) (osr OperationStatusResponse, err error) {
+func (future *SnapshotsRevokeAccessFuture) Result(client SnapshotsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2497,34 +2296,15 @@ func (future SnapshotsRevokeAccessFuture) Result(client SnapshotsClient) (osr Op
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RevokeAccessResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RevokeAccessResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RevokeAccessResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2532,12 +2312,11 @@ func (future SnapshotsRevokeAccessFuture) Result(client SnapshotsClient) (osr Op
// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SnapshotsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SnapshotsUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) {
+func (future *SnapshotsUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2545,34 +2324,15 @@ func (future SnapshotsUpdateFuture) Result(client SnapshotsClient) (s Snapshot,
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3249,12 +3009,11 @@ type VirtualMachineExtensionProperties struct {
// long-running operation.
type VirtualMachineExtensionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+func (future *VirtualMachineExtensionsCreateOrUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3262,34 +3021,15 @@ func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client Virtual
return
}
if !done {
- return vme, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vme, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vme, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3298,12 +3038,11 @@ func (future VirtualMachineExtensionsCreateOrUpdateFuture) Result(client Virtual
// operation.
type VirtualMachineExtensionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineExtensionsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineExtensionsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3311,34 +3050,15 @@ func (future VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineE
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3354,12 +3074,11 @@ type VirtualMachineExtensionsListResult struct {
// operation.
type VirtualMachineExtensionsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+func (future *VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3367,34 +3086,15 @@ func (future VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineE
return
}
if !done {
- return vme, azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vme, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.UpdateResponder(vme.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vme, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4571,12 +4271,11 @@ type VirtualMachineScaleSetProperties struct {
// long-running operation.
type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
+func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4584,34 +4283,15 @@ func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualM
return
}
if !done {
- return vmss, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmss, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
+ vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vmss, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4620,12 +4300,11 @@ func (future VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualM
// long-running operation.
type VirtualMachineScaleSetsDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4633,34 +4312,15 @@ func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4669,12 +4329,11 @@ func (future VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachi
// operation.
type VirtualMachineScaleSetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4682,34 +4341,15 @@ func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineSc
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4718,12 +4358,11 @@ func (future VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineSc
// long-running operation.
type VirtualMachineScaleSetsDeleteInstancesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsDeleteInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsDeleteInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4731,34 +4370,15 @@ func (future VirtualMachineScaleSetsDeleteInstancesFuture) Result(client Virtual
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteInstancesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteInstancesResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteInstancesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4789,12 +4409,11 @@ type VirtualMachineScaleSetSkuCapacity struct {
// operation.
type VirtualMachineScaleSetsPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4802,34 +4421,15 @@ func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachine
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4838,12 +4438,11 @@ func (future VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachine
// long-running operation.
type VirtualMachineScaleSetsReimageAllFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4851,34 +4450,15 @@ func (future VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageAllResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageAllResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4887,12 +4467,11 @@ func (future VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachi
// operation.
type VirtualMachineScaleSetsReimageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4900,34 +4479,15 @@ func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4936,12 +4496,11 @@ func (future VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineS
// operation.
type VirtualMachineScaleSetsRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4949,34 +4508,15 @@ func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4985,12 +4525,11 @@ func (future VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineS
// operation.
type VirtualMachineScaleSetsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4998,34 +4537,15 @@ func (future VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineSca
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5044,12 +4564,11 @@ type VirtualMachineScaleSetStorageProfile struct {
// long-running operation.
type VirtualMachineScaleSetsUpdateInstancesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetsUpdateInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetsUpdateInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5057,34 +4576,15 @@ func (future VirtualMachineScaleSetsUpdateInstancesFuture) Result(client Virtual
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.UpdateInstancesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.UpdateInstancesResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.UpdateInstancesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5444,12 +4944,11 @@ type VirtualMachineScaleSetVMProperties struct {
// long-running operation.
type VirtualMachineScaleSetVMsDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5457,34 +4956,15 @@ func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMac
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5493,12 +4973,11 @@ func (future VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMac
// operation.
type VirtualMachineScaleSetVMsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5506,34 +4985,15 @@ func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachine
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5542,12 +5002,11 @@ func (future VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachine
// long-running operation.
type VirtualMachineScaleSetVMsPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5555,34 +5014,15 @@ func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachi
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5591,12 +5031,11 @@ func (future VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachi
// long-running operation.
type VirtualMachineScaleSetVMsReimageAllFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5604,34 +5043,15 @@ func (future VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMac
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageAllResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageAllResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5640,12 +5060,11 @@ func (future VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMac
// long-running operation.
type VirtualMachineScaleSetVMsReimageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5653,34 +5072,15 @@ func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachin
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ReimageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ReimageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5689,12 +5089,11 @@ func (future VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachin
// long-running operation.
type VirtualMachineScaleSetVMsRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5702,34 +5101,15 @@ func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachin
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5738,12 +5118,11 @@ func (future VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachin
// operation.
type VirtualMachineScaleSetVMsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5751,34 +5130,15 @@ func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineS
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5787,12 +5147,11 @@ func (future VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineS
// operation.
type VirtualMachinesCaptureFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
+func (future *VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5800,34 +5159,15 @@ func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return vmcr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vmcr, err = client.CaptureResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent {
+ vmcr, err = client.CaptureResponder(vmcr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", resp, "Failure sending request")
- return
- }
- vmcr, err = client.CaptureResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5836,12 +5176,11 @@ func (future VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient)
// long-running operation.
type VirtualMachinesConvertToManagedDisksFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5849,34 +5188,15 @@ func (future VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMa
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.ConvertToManagedDisksResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ConvertToManagedDisksResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.ConvertToManagedDisksResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5885,12 +5205,11 @@ func (future VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMa
// operation.
type VirtualMachinesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
+func (future *VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5898,34 +5217,15 @@ func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesC
return
}
if !done {
- return VM, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- VM, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
+ VM, err = client.CreateOrUpdateResponder(VM.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- VM, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5934,12 +5234,11 @@ func (future VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesC
// operation.
type VirtualMachinesDeallocateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5947,34 +5246,15 @@ func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClien
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeallocateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeallocateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5983,12 +5263,11 @@ func (future VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClien
// operation.
type VirtualMachinesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5996,34 +5275,15 @@ func (future VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6055,12 +5315,11 @@ type VirtualMachineSizeListResult struct {
// operation.
type VirtualMachinesPowerOffFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6068,34 +5327,15 @@ func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.PowerOffResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.PowerOffResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6104,12 +5344,11 @@ func (future VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesRedeployFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6117,34 +5356,15 @@ func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RedeployResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RedeployResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RedeployResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6153,12 +5373,11 @@ func (future VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient)
// operation.
type VirtualMachinesRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesRestartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6166,34 +5385,15 @@ func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient)
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6201,12 +5401,11 @@ func (future VirtualMachinesRestartFuture) Result(client VirtualMachinesClient)
// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VirtualMachinesStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
+func (future *VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6214,34 +5413,15 @@ func (future VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (o
return
}
if !done {
- return osr, azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- osr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", osr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", resp, "Failure sending request")
- return
- }
- osr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/snapshots.go
index ef27f2adb..1d8e0c573 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/snapshots.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/snapshots.go
@@ -108,15 +108,17 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour
// 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) (future SnapshotsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -177,15 +179,17 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN
// 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) (future SnapshotsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -322,15 +326,17 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG
// 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) (future SnapshotsGrantAccessFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -574,15 +580,17 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource
// 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) (future SnapshotsRevokeAccessFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -646,15 +654,17 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN
// 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) (future SnapshotsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensions.go
index f508d1033..4c890b8e4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensions.go
@@ -88,15 +88,17 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -306,15 +310,17 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context,
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachines.go
index d45bed4a8..35a73d107 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachines.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachines.go
@@ -96,15 +96,17 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc
// CaptureSender sends the Capture request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future VirtualMachinesCaptureFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -166,15 +168,17 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Co
// ConvertToManagedDisksSender sends the ConvertToManagedDisks request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Request) (future VirtualMachinesConvertToManagedDisksFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -259,15 +263,17 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -329,15 +335,17 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future VirtualMachinesDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -398,15 +406,17 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future VirtualMachinesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -929,15 +939,17 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future VirtualMachinesPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -998,15 +1010,17 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour
// RedeploySender sends the Redeploy request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future VirtualMachinesRedeployFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1067,15 +1081,17 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RestartSender(req *http.Request) (future VirtualMachinesRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1136,15 +1152,17 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) StartSender(req *http.Request) (future VirtualMachinesStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesets.go
index 43e6f12e9..5cd584500 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesets.go
@@ -87,15 +87,17 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -163,15 +165,17 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetsDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -232,15 +236,17 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -310,15 +316,17 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.
// DeleteInstancesSender sends the DeleteInstances request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Request) (future VirtualMachineScaleSetsDeleteInstancesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -801,15 +809,17 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetsPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -870,15 +880,17 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context,
// ReimageSender sends the Reimage request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetsReimageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -940,15 +952,17 @@ func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Conte
// ReimageAllSender sends the ReimageAll request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetsReimageAllFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1015,15 +1029,17 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context,
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetsRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1090,15 +1106,17 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1168,15 +1186,17 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.
// UpdateInstancesSender sends the UpdateInstances request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Request) (future VirtualMachineScaleSetsUpdateInstancesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesetvms.go
index 3f1f429eb..8992cd077 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesetvms.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesetvms.go
@@ -87,15 +87,17 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con
// DeallocateSender sends the Deallocate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetVMsDeallocateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -475,15 +479,17 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte
// PowerOffSender sends the PowerOff request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetVMsPowerOffFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -546,15 +552,17 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex
// ReimageSender sends the Reimage request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -618,15 +626,17 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Con
// ReimageAllSender sends the ReimageAll request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageAllFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -689,15 +699,17 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetVMsRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -760,15 +772,17 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context,
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetVMsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroups.go
index 23103874b..ee0a92d74 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroups.go
@@ -99,15 +99,17 @@ func (client ContainerGroupsClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (future ContainerGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/models.go
index a68957c7e..a5c9bcdd3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/models.go
@@ -440,12 +440,11 @@ type ContainerGroupPropertiesInstanceView struct {
// operation.
type ContainerGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ContainerGroupsCreateOrUpdateFuture) Result(client ContainerGroupsClient) (cg ContainerGroup, err error) {
+func (future *ContainerGroupsCreateOrUpdateFuture) Result(client ContainerGroupsClient) (cg ContainerGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -453,34 +452,15 @@ func (future ContainerGroupsCreateOrUpdateFuture) Result(client ContainerGroupsC
return
}
if !done {
- return cg, azure.NewAsyncOpIncompleteError("containerinstance.ContainerGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerinstance.ContainerGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cg.Response.Response, err = future.GetResult(sender); err == nil && cg.Response.Response.StatusCode != http.StatusNoContent {
+ cg, err = client.CreateOrUpdateResponder(cg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsCreateOrUpdateFuture", "Result", cg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- cg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/models.go
index 2ff1598cc..867c19d03 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/models.go
@@ -509,12 +509,11 @@ type RegenerateCredentialParameters struct {
// RegistriesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RegistriesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegistriesCreateFuture) Result(client RegistriesClient) (r Registry, err error) {
+func (future *RegistriesCreateFuture) Result(client RegistriesClient) (r Registry, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -522,34 +521,15 @@ func (future RegistriesCreateFuture) Result(client RegistriesClient) (r Registry
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("containerregistry.RegistriesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -557,12 +537,11 @@ func (future RegistriesCreateFuture) Result(client RegistriesClient) (r Registry
// RegistriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RegistriesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegistriesDeleteFuture) Result(client RegistriesClient) (ar autorest.Response, err error) {
+func (future *RegistriesDeleteFuture) Result(client RegistriesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -570,47 +549,21 @@ func (future RegistriesDeleteFuture) Result(client RegistriesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.RegistriesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// RegistriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RegistriesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegistriesUpdateFuture) Result(client RegistriesClient) (r Registry, err error) {
+func (future *RegistriesUpdateFuture) Result(client RegistriesClient) (r Registry, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -618,34 +571,15 @@ func (future RegistriesUpdateFuture) Result(client RegistriesClient) (r Registry
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("containerregistry.RegistriesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.UpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1245,12 +1179,11 @@ type ReplicationProperties struct {
// ReplicationsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ReplicationsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationsCreateFuture) Result(client ReplicationsClient) (r Replication, err error) {
+func (future *ReplicationsCreateFuture) Result(client ReplicationsClient) (r Replication, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1258,34 +1191,15 @@ func (future ReplicationsCreateFuture) Result(client ReplicationsClient) (r Repl
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1293,12 +1207,11 @@ func (future ReplicationsCreateFuture) Result(client ReplicationsClient) (r Repl
// ReplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ReplicationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationsDeleteFuture) Result(client ReplicationsClient) (ar autorest.Response, err error) {
+func (future *ReplicationsDeleteFuture) Result(client ReplicationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1306,47 +1219,21 @@ func (future ReplicationsDeleteFuture) Result(client ReplicationsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ReplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ReplicationsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationsUpdateFuture) Result(client ReplicationsClient) (r Replication, err error) {
+func (future *ReplicationsUpdateFuture) Result(client ReplicationsClient) (r Replication, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1354,34 +1241,15 @@ func (future ReplicationsUpdateFuture) Result(client ReplicationsClient) (r Repl
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.UpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1866,12 +1734,11 @@ func (wpup WebhookPropertiesUpdateParameters) MarshalJSON() ([]byte, error) {
// WebhooksCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WebhooksCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, err error) {
+func (future *WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1879,34 +1746,15 @@ func (future WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, err
return
}
if !done {
- return w, azure.NewAsyncOpIncompleteError("containerregistry.WebhooksCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- w, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent {
+ w, err = client.CreateResponder(w.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", w.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- w, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1914,12 +1762,11 @@ func (future WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, err
// WebhooksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WebhooksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WebhooksDeleteFuture) Result(client WebhooksClient) (ar autorest.Response, err error) {
+func (future *WebhooksDeleteFuture) Result(client WebhooksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1927,47 +1774,21 @@ func (future WebhooksDeleteFuture) Result(client WebhooksClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.WebhooksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// WebhooksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WebhooksUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WebhooksUpdateFuture) Result(client WebhooksClient) (w Webhook, err error) {
+func (future *WebhooksUpdateFuture) Result(client WebhooksClient) (w Webhook, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1975,34 +1796,15 @@ func (future WebhooksUpdateFuture) Result(client WebhooksClient) (w Webhook, err
return
}
if !done {
- return w, azure.NewAsyncOpIncompleteError("containerregistry.WebhooksUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- w, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent {
+ w, err = client.UpdateResponder(w.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", w.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- w, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/registries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/registries.go
index bc84919d4..91226cd4a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/registries.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/registries.go
@@ -179,15 +179,17 @@ func (client RegistriesClient) CreatePreparer(ctx context.Context, resourceGroup
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) CreateSender(req *http.Request) (future RegistriesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -256,15 +258,17 @@ func (client RegistriesClient) DeletePreparer(ctx context.Context, resourceGroup
// 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) (future RegistriesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -822,15 +826,17 @@ func (client RegistriesClient) UpdatePreparer(ctx context.Context, resourceGroup
// 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) (future RegistriesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/replications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/replications.go
index a97882b1e..b8477327a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/replications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/replications.go
@@ -101,15 +101,17 @@ func (client ReplicationsClient) CreatePreparer(ctx context.Context, resourceGro
// 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) (future ReplicationsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -184,15 +186,17 @@ func (client ReplicationsClient) DeletePreparer(ctx context.Context, resourceGro
// 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) (future ReplicationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -453,15 +457,17 @@ func (client ReplicationsClient) UpdatePreparer(ctx context.Context, resourceGro
// 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) (future ReplicationsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/webhooks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/webhooks.go
index a15ed8039..9050d856d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/webhooks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/webhooks.go
@@ -107,15 +107,17 @@ func (client WebhooksClient) CreatePreparer(ctx context.Context, resourceGroupNa
// 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) (future WebhooksCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -190,15 +192,17 @@ func (client WebhooksClient) DeletePreparer(ctx context.Context, resourceGroupNa
// 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) (future WebhooksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -730,15 +734,17 @@ func (client WebhooksClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// 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) (future WebhooksUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/builds.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/builds.go
index c1799176d..ac3ae83d8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/builds.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/builds.go
@@ -94,15 +94,17 @@ func (client BuildsClient) CancelPreparer(ctx context.Context, resourceGroupName
// CancelSender sends the Cancel request. The method will close the
// http.Response Body if it receives an error.
func (client BuildsClient) CancelSender(req *http.Request) (future BuildsCancelFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -445,15 +447,17 @@ func (client BuildsClient) UpdatePreparer(ctx context.Context, resourceGroupName
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client BuildsClient) UpdateSender(req *http.Request) (future BuildsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildsteps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildsteps.go
index 053cf0869..ffa63cd13 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildsteps.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildsteps.go
@@ -107,15 +107,17 @@ func (client BuildStepsClient) CreatePreparer(ctx context.Context, resourceGroup
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client BuildStepsClient) CreateSender(req *http.Request) (future BuildStepsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -196,15 +198,17 @@ func (client BuildStepsClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client BuildStepsClient) DeleteSender(req *http.Request) (future BuildStepsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -598,15 +602,17 @@ func (client BuildStepsClient) UpdatePreparer(ctx context.Context, resourceGroup
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client BuildStepsClient) UpdateSender(req *http.Request) (future BuildStepsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go
index ade76f52b..9f19b88da 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go
@@ -115,15 +115,17 @@ func (client BuildTasksClient) CreatePreparer(ctx context.Context, resourceGroup
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client BuildTasksClient) CreateSender(req *http.Request) (future BuildTasksCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -198,15 +200,17 @@ func (client BuildTasksClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client BuildTasksClient) DeleteSender(req *http.Request) (future BuildTasksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -557,15 +561,17 @@ func (client BuildTasksClient) UpdatePreparer(ctx context.Context, resourceGroup
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client BuildTasksClient) UpdateSender(req *http.Request) (future BuildTasksUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/models.go
index bc02aa9b6..fb0ecdbdd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/models.go
@@ -725,12 +725,11 @@ type BuildProperties struct {
// BuildsCancelFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type BuildsCancelFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BuildsCancelFuture) Result(client BuildsClient) (ar autorest.Response, err error) {
+func (future *BuildsCancelFuture) Result(client BuildsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -738,35 +737,10 @@ func (future BuildsCancelFuture) Result(client BuildsClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.BuildsCancelFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.CancelResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildsCancelFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.BuildsCancelFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildsCancelFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.CancelResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildsCancelFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1091,12 +1065,11 @@ func (bspup BuildStepPropertiesUpdateParameters) AsBasicBuildStepPropertiesUpdat
// BuildStepsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type BuildStepsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BuildStepsCreateFuture) Result(client BuildStepsClient) (bs BuildStep, err error) {
+func (future *BuildStepsCreateFuture) Result(client BuildStepsClient) (bs BuildStep, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1104,34 +1077,15 @@ func (future BuildStepsCreateFuture) Result(client BuildStepsClient) (bs BuildSt
return
}
if !done {
- return bs, azure.NewAsyncOpIncompleteError("containerregistry.BuildStepsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bs, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildStepsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.BuildStepsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bs.Response.Response, err = future.GetResult(sender); err == nil && bs.Response.Response.StatusCode != http.StatusNoContent {
+ bs, err = client.CreateResponder(bs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.BuildStepsCreateFuture", "Result", bs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildStepsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- bs, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildStepsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1139,12 +1093,11 @@ func (future BuildStepsCreateFuture) Result(client BuildStepsClient) (bs BuildSt
// BuildStepsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type BuildStepsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BuildStepsDeleteFuture) Result(client BuildStepsClient) (ar autorest.Response, err error) {
+func (future *BuildStepsDeleteFuture) Result(client BuildStepsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1152,47 +1105,21 @@ func (future BuildStepsDeleteFuture) Result(client BuildStepsClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.BuildStepsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildStepsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.BuildStepsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildStepsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildStepsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// BuildStepsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type BuildStepsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BuildStepsUpdateFuture) Result(client BuildStepsClient) (bs BuildStep, err error) {
+func (future *BuildStepsUpdateFuture) Result(client BuildStepsClient) (bs BuildStep, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1200,34 +1127,15 @@ func (future BuildStepsUpdateFuture) Result(client BuildStepsClient) (bs BuildSt
return
}
if !done {
- return bs, azure.NewAsyncOpIncompleteError("containerregistry.BuildStepsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bs, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildStepsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.BuildStepsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bs.Response.Response, err = future.GetResult(sender); err == nil && bs.Response.Response.StatusCode != http.StatusNoContent {
+ bs, err = client.UpdateResponder(bs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.BuildStepsUpdateFuture", "Result", bs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildStepsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- bs, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildStepsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1285,12 +1193,11 @@ func (bsup *BuildStepUpdateParameters) UnmarshalJSON(body []byte) error {
// BuildsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type BuildsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BuildsUpdateFuture) Result(client BuildsClient) (b Build, err error) {
+func (future *BuildsUpdateFuture) Result(client BuildsClient) (b Build, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1298,34 +1205,15 @@ func (future BuildsUpdateFuture) Result(client BuildsClient) (b Build, err error
return
}
if !done {
- return b, azure.NewAsyncOpIncompleteError("containerregistry.BuildsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- b, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.BuildsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if b.Response.Response, err = future.GetResult(sender); err == nil && b.Response.Response.StatusCode != http.StatusNoContent {
+ b, err = client.UpdateResponder(b.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.BuildsUpdateFuture", "Result", b.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- b, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1625,12 +1513,11 @@ type BuildTaskPropertiesUpdateParameters struct {
// BuildTasksCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type BuildTasksCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BuildTasksCreateFuture) Result(client BuildTasksClient) (bt BuildTask, err error) {
+func (future *BuildTasksCreateFuture) Result(client BuildTasksClient) (bt BuildTask, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1638,34 +1525,15 @@ func (future BuildTasksCreateFuture) Result(client BuildTasksClient) (bt BuildTa
return
}
if !done {
- return bt, azure.NewAsyncOpIncompleteError("containerregistry.BuildTasksCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bt, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildTasksCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.BuildTasksCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bt.Response.Response, err = future.GetResult(sender); err == nil && bt.Response.Response.StatusCode != http.StatusNoContent {
+ bt, err = client.CreateResponder(bt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.BuildTasksCreateFuture", "Result", bt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildTasksCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- bt, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildTasksCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1673,12 +1541,11 @@ func (future BuildTasksCreateFuture) Result(client BuildTasksClient) (bt BuildTa
// BuildTasksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type BuildTasksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BuildTasksDeleteFuture) Result(client BuildTasksClient) (ar autorest.Response, err error) {
+func (future *BuildTasksDeleteFuture) Result(client BuildTasksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1686,47 +1553,21 @@ func (future BuildTasksDeleteFuture) Result(client BuildTasksClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.BuildTasksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildTasksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.BuildTasksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildTasksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildTasksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// BuildTasksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type BuildTasksUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BuildTasksUpdateFuture) Result(client BuildTasksClient) (bt BuildTask, err error) {
+func (future *BuildTasksUpdateFuture) Result(client BuildTasksClient) (bt BuildTask, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1734,34 +1575,15 @@ func (future BuildTasksUpdateFuture) Result(client BuildTasksClient) (bt BuildTa
return
}
if !done {
- return bt, azure.NewAsyncOpIncompleteError("containerregistry.BuildTasksUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bt, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildTasksUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.BuildTasksUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bt.Response.Response, err = future.GetResult(sender); err == nil && bt.Response.Response.StatusCode != http.StatusNoContent {
+ bt, err = client.UpdateResponder(bt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.BuildTasksUpdateFuture", "Result", bt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildTasksUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- bt, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.BuildTasksUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2575,12 +2397,11 @@ type RegenerateCredentialParameters struct {
// RegistriesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RegistriesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegistriesCreateFuture) Result(client RegistriesClient) (r Registry, err error) {
+func (future *RegistriesCreateFuture) Result(client RegistriesClient) (r Registry, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2588,34 +2409,15 @@ func (future RegistriesCreateFuture) Result(client RegistriesClient) (r Registry
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("containerregistry.RegistriesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2623,12 +2425,11 @@ func (future RegistriesCreateFuture) Result(client RegistriesClient) (r Registry
// RegistriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RegistriesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegistriesDeleteFuture) Result(client RegistriesClient) (ar autorest.Response, err error) {
+func (future *RegistriesDeleteFuture) Result(client RegistriesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2636,35 +2437,10 @@ func (future RegistriesDeleteFuture) Result(client RegistriesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.RegistriesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2672,12 +2448,11 @@ func (future RegistriesDeleteFuture) Result(client RegistriesClient) (ar autores
// operation.
type RegistriesImportImageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegistriesImportImageFuture) Result(client RegistriesClient) (ar autorest.Response, err error) {
+func (future *RegistriesImportImageFuture) Result(client RegistriesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2685,47 +2460,21 @@ func (future RegistriesImportImageFuture) Result(client RegistriesClient) (ar au
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.RegistriesImportImageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ImportImageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesImportImageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesImportImageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesImportImageFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ImportImageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesImportImageFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// RegistriesQueueBuildFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RegistriesQueueBuildFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegistriesQueueBuildFuture) Result(client RegistriesClient) (b Build, err error) {
+func (future *RegistriesQueueBuildFuture) Result(client RegistriesClient) (b Build, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2733,34 +2482,15 @@ func (future RegistriesQueueBuildFuture) Result(client RegistriesClient) (b Buil
return
}
if !done {
- return b, azure.NewAsyncOpIncompleteError("containerregistry.RegistriesQueueBuildFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- b, err = client.QueueBuildResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesQueueBuildFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesQueueBuildFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if b.Response.Response, err = future.GetResult(sender); err == nil && b.Response.Response.StatusCode != http.StatusNoContent {
+ b, err = client.QueueBuildResponder(b.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.RegistriesQueueBuildFuture", "Result", b.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesQueueBuildFuture", "Result", resp, "Failure sending request")
- return
- }
- b, err = client.QueueBuildResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesQueueBuildFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2768,12 +2498,11 @@ func (future RegistriesQueueBuildFuture) Result(client RegistriesClient) (b Buil
// RegistriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RegistriesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegistriesUpdateFuture) Result(client RegistriesClient) (r Registry, err error) {
+func (future *RegistriesUpdateFuture) Result(client RegistriesClient) (r Registry, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2781,34 +2510,15 @@ func (future RegistriesUpdateFuture) Result(client RegistriesClient) (r Registry
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("containerregistry.RegistriesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.UpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3408,12 +3118,11 @@ type ReplicationProperties struct {
// ReplicationsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ReplicationsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationsCreateFuture) Result(client ReplicationsClient) (r Replication, err error) {
+func (future *ReplicationsCreateFuture) Result(client ReplicationsClient) (r Replication, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3421,34 +3130,15 @@ func (future ReplicationsCreateFuture) Result(client ReplicationsClient) (r Repl
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3456,12 +3146,11 @@ func (future ReplicationsCreateFuture) Result(client ReplicationsClient) (r Repl
// ReplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ReplicationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationsDeleteFuture) Result(client ReplicationsClient) (ar autorest.Response, err error) {
+func (future *ReplicationsDeleteFuture) Result(client ReplicationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3469,47 +3158,21 @@ func (future ReplicationsDeleteFuture) Result(client ReplicationsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ReplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ReplicationsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationsUpdateFuture) Result(client ReplicationsClient) (r Replication, err error) {
+func (future *ReplicationsUpdateFuture) Result(client ReplicationsClient) (r Replication, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3517,34 +3180,15 @@ func (future ReplicationsUpdateFuture) Result(client ReplicationsClient) (r Repl
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.UpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4073,12 +3717,11 @@ func (wpup WebhookPropertiesUpdateParameters) MarshalJSON() ([]byte, error) {
// WebhooksCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WebhooksCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, err error) {
+func (future *WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4086,34 +3729,15 @@ func (future WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, err
return
}
if !done {
- return w, azure.NewAsyncOpIncompleteError("containerregistry.WebhooksCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- w, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent {
+ w, err = client.CreateResponder(w.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", w.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- w, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4121,12 +3745,11 @@ func (future WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, err
// WebhooksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WebhooksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WebhooksDeleteFuture) Result(client WebhooksClient) (ar autorest.Response, err error) {
+func (future *WebhooksDeleteFuture) Result(client WebhooksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4134,47 +3757,21 @@ func (future WebhooksDeleteFuture) Result(client WebhooksClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerregistry.WebhooksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// WebhooksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WebhooksUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WebhooksUpdateFuture) Result(client WebhooksClient) (w Webhook, err error) {
+func (future *WebhooksUpdateFuture) Result(client WebhooksClient) (w Webhook, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4182,34 +3779,15 @@ func (future WebhooksUpdateFuture) Result(client WebhooksClient) (w Webhook, err
return
}
if !done {
- return w, azure.NewAsyncOpIncompleteError("containerregistry.WebhooksUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- w, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent {
+ w, err = client.UpdateResponder(w.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", w.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- w, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go
index 4948607b9..8df18709d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go
@@ -179,15 +179,17 @@ func (client RegistriesClient) CreatePreparer(ctx context.Context, resourceGroup
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) CreateSender(req *http.Request) (future RegistriesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -256,15 +258,17 @@ func (client RegistriesClient) DeletePreparer(ctx context.Context, resourceGroup
// 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) (future RegistriesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -490,15 +494,17 @@ func (client RegistriesClient) ImportImagePreparer(ctx context.Context, resource
// ImportImageSender sends the ImportImage request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) ImportImageSender(req *http.Request) (future RegistriesImportImageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -902,15 +908,17 @@ func (client RegistriesClient) QueueBuildPreparer(ctx context.Context, resourceG
// QueueBuildSender sends the QueueBuild request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) QueueBuildSender(req *http.Request) (future RegistriesQueueBuildFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1061,15 +1069,17 @@ func (client RegistriesClient) UpdatePreparer(ctx context.Context, resourceGroup
// 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) (future RegistriesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/replications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/replications.go
index dc05abe72..0fdc10204 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/replications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/replications.go
@@ -101,15 +101,17 @@ func (client ReplicationsClient) CreatePreparer(ctx context.Context, resourceGro
// 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) (future ReplicationsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -184,15 +186,17 @@ func (client ReplicationsClient) DeletePreparer(ctx context.Context, resourceGro
// 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) (future ReplicationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -453,15 +457,17 @@ func (client ReplicationsClient) UpdatePreparer(ctx context.Context, resourceGro
// 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) (future ReplicationsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/webhooks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/webhooks.go
index 33b67fa2a..09120fdb0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/webhooks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/webhooks.go
@@ -107,15 +107,17 @@ func (client WebhooksClient) CreatePreparer(ctx context.Context, resourceGroupNa
// 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) (future WebhooksCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -190,15 +192,17 @@ func (client WebhooksClient) DeletePreparer(ctx context.Context, resourceGroupNa
// 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) (future WebhooksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -730,15 +734,17 @@ func (client WebhooksClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// 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) (future WebhooksUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/containerservice.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/containerservice.go
index 8ab16b050..29d7a799b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/containerservice.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/containerservice.go
@@ -105,15 +105,17 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupNa
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -174,15 +176,17 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/models.go
index 5c03ec5d2..24b06ed3f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/models.go
@@ -272,12 +272,11 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error {
// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateOrUpdateFuture) Result(client Client) (cs ContainerService, err error) {
+func (future *CreateOrUpdateFuture) Result(client Client) (cs ContainerService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -285,34 +284,15 @@ func (future CreateOrUpdateFuture) Result(client Client) (cs ContainerService, e
return
}
if !done {
- return cs, azure.NewAsyncOpIncompleteError("containerservice.CreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cs, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.CreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.CreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "containerservice.CreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.CreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- cs, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.CreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -320,12 +300,11 @@ func (future CreateOrUpdateFuture) Result(client Client) (cs ContainerService, e
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -333,35 +312,10 @@ func (future DeleteFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("containerservice.DeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.DeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("containerservice.DeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.DeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.DeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/factories.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/factories.go
index 0c62cdb61..c927ed337 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/factories.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/factories.go
@@ -121,6 +121,74 @@ func (client FactoriesClient) CancelPipelineRunResponder(resp *http.Response) (r
return
}
+// ConfigureFactoryRepo updates a factory's repo information.
+// Parameters:
+// locationID - the location identifier.
+// factoryRepoUpdate - update factory repo request definition.
+func (client FactoriesClient) ConfigureFactoryRepo(ctx context.Context, locationID string, factoryRepoUpdate FactoryRepoUpdate) (result Factory, err error) {
+ req, err := client.ConfigureFactoryRepoPreparer(ctx, locationID, factoryRepoUpdate)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "datafactory.FactoriesClient", "ConfigureFactoryRepo", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ConfigureFactoryRepoSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "datafactory.FactoriesClient", "ConfigureFactoryRepo", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ConfigureFactoryRepoResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "datafactory.FactoriesClient", "ConfigureFactoryRepo", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ConfigureFactoryRepoPreparer prepares the ConfigureFactoryRepo request.
+func (client FactoriesClient) ConfigureFactoryRepoPreparer(ctx context.Context, locationID string, factoryRepoUpdate FactoryRepoUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "locationId": autorest.Encode("path", locationID),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-09-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo", pathParameters),
+ autorest.WithJSON(factoryRepoUpdate),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ConfigureFactoryRepoSender sends the ConfigureFactoryRepo request. The method will close the
+// http.Response Body if it receives an error.
+func (client FactoriesClient) ConfigureFactoryRepoSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ConfigureFactoryRepoResponder handles the response to the ConfigureFactoryRepo request. The method always
+// closes the http.Response Body.
+func (client FactoriesClient) ConfigureFactoryRepoResponder(resp *http.Response) (result Factory, 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 factory.
// Parameters:
// resourceGroupName - the resource group name.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimes.go
index e3b35dfe7..bd6017833 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimes.go
@@ -992,15 +992,17 @@ func (client IntegrationRuntimesClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) StartSender(req *http.Request) (future IntegrationRuntimesStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1079,15 +1081,17 @@ func (client IntegrationRuntimesClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client IntegrationRuntimesClient) StopSender(req *http.Request) (future IntegrationRuntimesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/models.go
index f9c6d9e3b..5f0249e30 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/models.go
@@ -78,6 +78,21 @@ func PossibleAzureSearchIndexWriteBehaviorTypeValues() []AzureSearchIndexWriteBe
return []AzureSearchIndexWriteBehaviorType{Merge, Upload}
}
+// BlobEventTypes enumerates the values for blob event types.
+type BlobEventTypes string
+
+const (
+ // MicrosoftStorageBlobCreated ...
+ MicrosoftStorageBlobCreated BlobEventTypes = "Microsoft.Storage.BlobCreated"
+ // MicrosoftStorageBlobDeleted ...
+ MicrosoftStorageBlobDeleted BlobEventTypes = "Microsoft.Storage.BlobDeleted"
+)
+
+// PossibleBlobEventTypesValues returns an array of possible values for the BlobEventTypes const type.
+func PossibleBlobEventTypesValues() []BlobEventTypes {
+ return []BlobEventTypes{MicrosoftStorageBlobCreated, MicrosoftStorageBlobDeleted}
+}
+
// CassandraSourceReadConsistencyLevels enumerates the values for cassandra source read consistency levels.
type CassandraSourceReadConsistencyLevels string
@@ -1649,6 +1664,8 @@ func PossibleTypeBasicLinkedServiceValues() []TypeBasicLinkedService {
type TypeBasicTrigger string
const (
+ // TypeBlobEventsTrigger ...
+ TypeBlobEventsTrigger TypeBasicTrigger = "BlobEventsTrigger"
// TypeBlobTrigger ...
TypeBlobTrigger TypeBasicTrigger = "BlobTrigger"
// TypeMultiplePipelineTrigger ...
@@ -1663,7 +1680,7 @@ const (
// PossibleTypeBasicTriggerValues returns an array of possible values for the TypeBasicTrigger const type.
func PossibleTypeBasicTriggerValues() []TypeBasicTrigger {
- return []TypeBasicTrigger{TypeBlobTrigger, TypeMultiplePipelineTrigger, TypeScheduleTrigger, TypeTrigger, TypeTumblingWindowTrigger}
+ return []TypeBasicTrigger{TypeBlobEventsTrigger, TypeBlobTrigger, TypeMultiplePipelineTrigger, TypeScheduleTrigger, TypeTrigger, TypeTumblingWindowTrigger}
}
// WebActivityMethod enumerates the values for web activity method.
@@ -17734,6 +17751,171 @@ func (ats AzureTableSource) AsBasicCopySource() (BasicCopySource, bool) {
return &ats, true
}
+// BlobEventsTrigger trigger that runs everytime a Blob event occurs.
+type BlobEventsTrigger struct {
+ // BlobEventsTriggerTypeProperties - Blob Events Trigger properties.
+ *BlobEventsTriggerTypeProperties `json:"typeProperties,omitempty"`
+ // Pipelines - Pipelines that need to be started.
+ Pipelines *[]TriggerPipelineReference `json:"pipelines,omitempty"`
+ // AdditionalProperties - Unmatched properties from the message are deserialized this collection
+ AdditionalProperties map[string]interface{} `json:""`
+ // Description - Trigger description.
+ Description *string `json:"description,omitempty"`
+ // RuntimeState - Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. Possible values include: 'TriggerRuntimeStateStarted', 'TriggerRuntimeStateStopped', 'TriggerRuntimeStateDisabled'
+ RuntimeState TriggerRuntimeState `json:"runtimeState,omitempty"`
+ // Type - Possible values include: 'TypeTrigger', 'TypeTumblingWindowTrigger', 'TypeBlobEventsTrigger', 'TypeBlobTrigger', 'TypeScheduleTrigger', 'TypeMultiplePipelineTrigger'
+ Type TypeBasicTrigger `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for BlobEventsTrigger.
+func (bet BlobEventsTrigger) MarshalJSON() ([]byte, error) {
+ bet.Type = TypeBlobEventsTrigger
+ objectMap := make(map[string]interface{})
+ if bet.BlobEventsTriggerTypeProperties != nil {
+ objectMap["typeProperties"] = bet.BlobEventsTriggerTypeProperties
+ }
+ if bet.Pipelines != nil {
+ objectMap["pipelines"] = bet.Pipelines
+ }
+ if bet.Description != nil {
+ objectMap["description"] = bet.Description
+ }
+ if bet.RuntimeState != "" {
+ objectMap["runtimeState"] = bet.RuntimeState
+ }
+ if bet.Type != "" {
+ objectMap["type"] = bet.Type
+ }
+ for k, v := range bet.AdditionalProperties {
+ objectMap[k] = v
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsTumblingWindowTrigger is the BasicTrigger implementation for BlobEventsTrigger.
+func (bet BlobEventsTrigger) AsTumblingWindowTrigger() (*TumblingWindowTrigger, bool) {
+ return nil, false
+}
+
+// AsBlobEventsTrigger is the BasicTrigger implementation for BlobEventsTrigger.
+func (bet BlobEventsTrigger) AsBlobEventsTrigger() (*BlobEventsTrigger, bool) {
+ return &bet, true
+}
+
+// AsBlobTrigger is the BasicTrigger implementation for BlobEventsTrigger.
+func (bet BlobEventsTrigger) AsBlobTrigger() (*BlobTrigger, bool) {
+ return nil, false
+}
+
+// AsScheduleTrigger is the BasicTrigger implementation for BlobEventsTrigger.
+func (bet BlobEventsTrigger) AsScheduleTrigger() (*ScheduleTrigger, bool) {
+ return nil, false
+}
+
+// AsMultiplePipelineTrigger is the BasicTrigger implementation for BlobEventsTrigger.
+func (bet BlobEventsTrigger) AsMultiplePipelineTrigger() (*MultiplePipelineTrigger, bool) {
+ return nil, false
+}
+
+// AsBasicMultiplePipelineTrigger is the BasicTrigger implementation for BlobEventsTrigger.
+func (bet BlobEventsTrigger) AsBasicMultiplePipelineTrigger() (BasicMultiplePipelineTrigger, bool) {
+ return &bet, true
+}
+
+// AsTrigger is the BasicTrigger implementation for BlobEventsTrigger.
+func (bet BlobEventsTrigger) AsTrigger() (*Trigger, bool) {
+ return nil, false
+}
+
+// AsBasicTrigger is the BasicTrigger implementation for BlobEventsTrigger.
+func (bet BlobEventsTrigger) AsBasicTrigger() (BasicTrigger, bool) {
+ return &bet, true
+}
+
+// UnmarshalJSON is the custom unmarshaler for BlobEventsTrigger struct.
+func (bet *BlobEventsTrigger) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "typeProperties":
+ if v != nil {
+ var blobEventsTriggerTypeProperties BlobEventsTriggerTypeProperties
+ err = json.Unmarshal(*v, &blobEventsTriggerTypeProperties)
+ if err != nil {
+ return err
+ }
+ bet.BlobEventsTriggerTypeProperties = &blobEventsTriggerTypeProperties
+ }
+ case "pipelines":
+ if v != nil {
+ var pipelines []TriggerPipelineReference
+ err = json.Unmarshal(*v, &pipelines)
+ if err != nil {
+ return err
+ }
+ bet.Pipelines = &pipelines
+ }
+ default:
+ if v != nil {
+ var additionalProperties interface{}
+ err = json.Unmarshal(*v, &additionalProperties)
+ if err != nil {
+ return err
+ }
+ if bet.AdditionalProperties == nil {
+ bet.AdditionalProperties = make(map[string]interface{})
+ }
+ bet.AdditionalProperties[k] = additionalProperties
+ }
+ case "description":
+ if v != nil {
+ var description string
+ err = json.Unmarshal(*v, &description)
+ if err != nil {
+ return err
+ }
+ bet.Description = &description
+ }
+ case "runtimeState":
+ if v != nil {
+ var runtimeState TriggerRuntimeState
+ err = json.Unmarshal(*v, &runtimeState)
+ if err != nil {
+ return err
+ }
+ bet.RuntimeState = runtimeState
+ }
+ case "type":
+ if v != nil {
+ var typeVar TypeBasicTrigger
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ bet.Type = typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// BlobEventsTriggerTypeProperties blob Events Trigger properties.
+type BlobEventsTriggerTypeProperties struct {
+ // BlobPathBeginsWith - The blob path must begin with the pattern provided for trigger to fire. For example, '/records/blobs/december/' will only fire the trigger for blobs in the december folder under the records container. At least one of these must be provided: blobPathBeginsWith, blobPathEndsWith.
+ BlobPathBeginsWith *string `json:"blobPathBeginsWith,omitempty"`
+ // BlobPathEndsWith - The blob path must end with the pattern provided for trigger to fire. For example, 'december/boxes.csv' will only fire the trigger for blobs named boxes in a december folder. At least one of these must be provided: blobPathBeginsWith, blobPathEndsWith.
+ BlobPathEndsWith *string `json:"blobPathEndsWith,omitempty"`
+ // Events - The type of events that cause this trigger to fire.
+ Events *[]BlobEventTypes `json:"events,omitempty"`
+ // Scope - The ARM resource ID of the Storage Account.
+ Scope *string `json:"scope,omitempty"`
+}
+
// BlobSink a copy activity Azure Blob sink.
type BlobSink struct {
// BlobWriterOverwriteFiles - Blob writer overwrite files. Type: boolean (or Expression with resultType boolean).
@@ -18169,7 +18351,7 @@ type BlobTrigger struct {
Description *string `json:"description,omitempty"`
// RuntimeState - Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. Possible values include: 'TriggerRuntimeStateStarted', 'TriggerRuntimeStateStopped', 'TriggerRuntimeStateDisabled'
RuntimeState TriggerRuntimeState `json:"runtimeState,omitempty"`
- // Type - Possible values include: 'TypeTrigger', 'TypeTumblingWindowTrigger', 'TypeBlobTrigger', 'TypeScheduleTrigger', 'TypeMultiplePipelineTrigger'
+ // Type - Possible values include: 'TypeTrigger', 'TypeTumblingWindowTrigger', 'TypeBlobEventsTrigger', 'TypeBlobTrigger', 'TypeScheduleTrigger', 'TypeMultiplePipelineTrigger'
Type TypeBasicTrigger `json:"type,omitempty"`
}
@@ -18203,6 +18385,11 @@ func (bt BlobTrigger) AsTumblingWindowTrigger() (*TumblingWindowTrigger, bool) {
return nil, false
}
+// AsBlobEventsTrigger is the BasicTrigger implementation for BlobTrigger.
+func (bt BlobTrigger) AsBlobEventsTrigger() (*BlobEventsTrigger, bool) {
+ return nil, false
+}
+
// AsBlobTrigger is the BasicTrigger implementation for BlobTrigger.
func (bt BlobTrigger) AsBlobTrigger() (*BlobTrigger, bool) {
return &bt, true
@@ -33226,6 +33413,18 @@ type FactoryProperties struct {
CreateTime *date.Time `json:"createTime,omitempty"`
// Version - Version of the factory.
Version *string `json:"version,omitempty"`
+ // VstsConfiguration - VSTS repo information of the factory.
+ VstsConfiguration *FactoryVSTSConfiguration `json:"vstsConfiguration,omitempty"`
+}
+
+// FactoryRepoUpdate factory's VSTS repo information.
+type FactoryRepoUpdate struct {
+ // FactoryResourceID - The factory resource id.
+ FactoryResourceID *string `json:"factoryResourceId,omitempty"`
+ // ResourceGroupName - The resource group name.
+ ResourceGroupName *string `json:"resourceGroupName,omitempty"`
+ // VstsConfiguration - VSTS repo information of the factory.
+ VstsConfiguration *FactoryVSTSConfiguration `json:"vstsConfiguration,omitempty"`
}
// FactoryUpdateParameters parameters for updating a factory resource.
@@ -33248,6 +33447,24 @@ func (fup FactoryUpdateParameters) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
+// FactoryVSTSConfiguration factory's VSTS repo information.
+type FactoryVSTSConfiguration struct {
+ // AccountName - VSTS account name.
+ AccountName *string `json:"accountName,omitempty"`
+ // ProjectName - VSTS project name.
+ ProjectName *string `json:"projectName,omitempty"`
+ // RepositoryName - VSTS repository name.
+ RepositoryName *string `json:"repositoryName,omitempty"`
+ // CollaborationBranch - VSTS collaboration branch.
+ CollaborationBranch *string `json:"collaborationBranch,omitempty"`
+ // RootFolder - VSTS root folder.
+ RootFolder *string `json:"rootFolder,omitempty"`
+ // LastCommitID - VSTS last commit id.
+ LastCommitID *string `json:"lastCommitId,omitempty"`
+ // TenantID - VSTS tenant id.
+ TenantID *string `json:"tenantId,omitempty"`
+}
+
// FileServerLinkedService file system linked service.
type FileServerLinkedService struct {
// FileServerLinkedServiceTypeProperties - File system linked service properties.
@@ -49615,12 +49832,11 @@ func (irsp IntegrationRuntimeSsisProperties) MarshalJSON() ([]byte, error) {
// operation.
type IntegrationRuntimesStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IntegrationRuntimesStartFuture) Result(client IntegrationRuntimesClient) (irsr IntegrationRuntimeStatusResponse, err error) {
+func (future *IntegrationRuntimesStartFuture) Result(client IntegrationRuntimesClient) (irsr IntegrationRuntimeStatusResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -49628,34 +49844,15 @@ func (future IntegrationRuntimesStartFuture) Result(client IntegrationRuntimesCl
return
}
if !done {
- return irsr, azure.NewAsyncOpIncompleteError("datafactory.IntegrationRuntimesStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- irsr, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datafactory.IntegrationRuntimesStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datafactory.IntegrationRuntimesStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if irsr.Response.Response, err = future.GetResult(sender); err == nil && irsr.Response.Response.StatusCode != http.StatusNoContent {
+ irsr, err = client.StartResponder(irsr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "datafactory.IntegrationRuntimesStartFuture", "Result", irsr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datafactory.IntegrationRuntimesStartFuture", "Result", resp, "Failure sending request")
- return
- }
- irsr, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datafactory.IntegrationRuntimesStartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -49664,12 +49861,11 @@ func (future IntegrationRuntimesStartFuture) Result(client IntegrationRuntimesCl
// operation.
type IntegrationRuntimesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IntegrationRuntimesStopFuture) Result(client IntegrationRuntimesClient) (ar autorest.Response, err error) {
+func (future *IntegrationRuntimesStopFuture) Result(client IntegrationRuntimesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -49677,35 +49873,10 @@ func (future IntegrationRuntimesStopFuture) Result(client IntegrationRuntimesCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("datafactory.IntegrationRuntimesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datafactory.IntegrationRuntimesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datafactory.IntegrationRuntimesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datafactory.IntegrationRuntimesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datafactory.IntegrationRuntimesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -57794,6 +57965,7 @@ func (mds MongoDbSource) AsBasicCopySource() (BasicCopySource, bool) {
// BasicMultiplePipelineTrigger base class for all triggers that support one to many model for trigger to pipeline.
type BasicMultiplePipelineTrigger interface {
+ AsBlobEventsTrigger() (*BlobEventsTrigger, bool)
AsBlobTrigger() (*BlobTrigger, bool)
AsScheduleTrigger() (*ScheduleTrigger, bool)
AsMultiplePipelineTrigger() (*MultiplePipelineTrigger, bool)
@@ -57809,7 +57981,7 @@ type MultiplePipelineTrigger struct {
Description *string `json:"description,omitempty"`
// RuntimeState - Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. Possible values include: 'TriggerRuntimeStateStarted', 'TriggerRuntimeStateStopped', 'TriggerRuntimeStateDisabled'
RuntimeState TriggerRuntimeState `json:"runtimeState,omitempty"`
- // Type - Possible values include: 'TypeTrigger', 'TypeTumblingWindowTrigger', 'TypeBlobTrigger', 'TypeScheduleTrigger', 'TypeMultiplePipelineTrigger'
+ // Type - Possible values include: 'TypeTrigger', 'TypeTumblingWindowTrigger', 'TypeBlobEventsTrigger', 'TypeBlobTrigger', 'TypeScheduleTrigger', 'TypeMultiplePipelineTrigger'
Type TypeBasicTrigger `json:"type,omitempty"`
}
@@ -57821,6 +57993,10 @@ func unmarshalBasicMultiplePipelineTrigger(body []byte) (BasicMultiplePipelineTr
}
switch m["type"] {
+ case string(TypeBlobEventsTrigger):
+ var bet BlobEventsTrigger
+ err := json.Unmarshal(body, &bet)
+ return bet, err
case string(TypeBlobTrigger):
var bt BlobTrigger
err := json.Unmarshal(body, &bt)
@@ -57881,6 +58057,11 @@ func (mpt MultiplePipelineTrigger) AsTumblingWindowTrigger() (*TumblingWindowTri
return nil, false
}
+// AsBlobEventsTrigger is the BasicTrigger implementation for MultiplePipelineTrigger.
+func (mpt MultiplePipelineTrigger) AsBlobEventsTrigger() (*BlobEventsTrigger, bool) {
+ return nil, false
+}
+
// AsBlobTrigger is the BasicTrigger implementation for MultiplePipelineTrigger.
func (mpt MultiplePipelineTrigger) AsBlobTrigger() (*BlobTrigger, bool) {
return nil, false
@@ -68008,6 +68189,10 @@ type QuickBooksLinkedServiceTypeProperties struct {
Endpoint interface{} `json:"endpoint,omitempty"`
// CompanyID - The company ID of the QuickBooks company to authorize.
CompanyID interface{} `json:"companyId,omitempty"`
+ // ConsumerKey - The consumer key for OAuth 1.0 authentication.
+ ConsumerKey interface{} `json:"consumerKey,omitempty"`
+ // ConsumerSecret - The consumer secret for OAuth 1.0 authentication.
+ ConsumerSecret BasicSecretBase `json:"consumerSecret,omitempty"`
// AccessToken - The access token for OAuth 1.0 authentication.
AccessToken BasicSecretBase `json:"accessToken,omitempty"`
// AccessTokenSecret - The access token secret for OAuth 1.0 authentication.
@@ -68045,6 +68230,23 @@ func (qblstp *QuickBooksLinkedServiceTypeProperties) UnmarshalJSON(body []byte)
}
qblstp.CompanyID = companyID
}
+ case "consumerKey":
+ if v != nil {
+ var consumerKey interface{}
+ err = json.Unmarshal(*v, &consumerKey)
+ if err != nil {
+ return err
+ }
+ qblstp.ConsumerKey = consumerKey
+ }
+ case "consumerSecret":
+ if v != nil {
+ consumerSecret, err := unmarshalBasicSecretBase(*v)
+ if err != nil {
+ return err
+ }
+ qblstp.ConsumerSecret = consumerSecret
+ }
case "accessToken":
if v != nil {
accessToken, err := unmarshalBasicSecretBase(*v)
@@ -77093,7 +77295,7 @@ type ScheduleTrigger struct {
Description *string `json:"description,omitempty"`
// RuntimeState - Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. Possible values include: 'TriggerRuntimeStateStarted', 'TriggerRuntimeStateStopped', 'TriggerRuntimeStateDisabled'
RuntimeState TriggerRuntimeState `json:"runtimeState,omitempty"`
- // Type - Possible values include: 'TypeTrigger', 'TypeTumblingWindowTrigger', 'TypeBlobTrigger', 'TypeScheduleTrigger', 'TypeMultiplePipelineTrigger'
+ // Type - Possible values include: 'TypeTrigger', 'TypeTumblingWindowTrigger', 'TypeBlobEventsTrigger', 'TypeBlobTrigger', 'TypeScheduleTrigger', 'TypeMultiplePipelineTrigger'
Type TypeBasicTrigger `json:"type,omitempty"`
}
@@ -77127,6 +77329,11 @@ func (st ScheduleTrigger) AsTumblingWindowTrigger() (*TumblingWindowTrigger, boo
return nil, false
}
+// AsBlobEventsTrigger is the BasicTrigger implementation for ScheduleTrigger.
+func (st ScheduleTrigger) AsBlobEventsTrigger() (*BlobEventsTrigger, bool) {
+ return nil, false
+}
+
// AsBlobTrigger is the BasicTrigger implementation for ScheduleTrigger.
func (st ScheduleTrigger) AsBlobTrigger() (*BlobTrigger, bool) {
return nil, false
@@ -78295,7 +78502,7 @@ func (snls *ServiceNowLinkedService) UnmarshalJSON(body []byte) error {
// ServiceNowLinkedServiceTypeProperties serviceNow server linked service properties.
type ServiceNowLinkedServiceTypeProperties struct {
- // Endpoint - The endpoint of the ServiceNow server. (i.e. ServiceNowData.com)
+ // Endpoint - The endpoint of the ServiceNow server. (i.e. .service-now.com)
Endpoint interface{} `json:"endpoint,omitempty"`
// AuthenticationType - The authentication type to use. Possible values include: 'ServiceNowAuthenticationTypeBasic', 'ServiceNowAuthenticationTypeOAuth2'
AuthenticationType ServiceNowAuthenticationType `json:"authenticationType,omitempty"`
@@ -86066,8 +86273,10 @@ func (slstp *SybaseLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error
// TabularTranslator a copy activity tabular translator.
type TabularTranslator struct {
- // ColumnMappings - Column mappings. Type: string (or Expression with resultType string).
+ // ColumnMappings - Column mappings. Example: "UserId: MyUserId, Group: MyGroup, Name: MyName" Type: string (or Expression with resultType string).
ColumnMappings interface{} `json:"columnMappings,omitempty"`
+ // SchemaMapping - The schema mapping to map between tabular data and hierarchical data. Example: {"Column1": "$.Column1", "Column2": "$.Column2.Property1", "Column3": "$.Column2.Property2"}. Type: object (or Expression with resultType object).
+ SchemaMapping interface{} `json:"schemaMapping,omitempty"`
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
// Type - Possible values include: 'TypeCopyTranslator', 'TypeTabularTranslator'
@@ -86079,6 +86288,7 @@ func (tt TabularTranslator) MarshalJSON() ([]byte, error) {
tt.Type = TypeTabularTranslator
objectMap := make(map[string]interface{})
objectMap["columnMappings"] = tt.ColumnMappings
+ objectMap["schemaMapping"] = tt.SchemaMapping
if tt.Type != "" {
objectMap["type"] = tt.Type
}
@@ -86755,6 +86965,7 @@ func (tf TextFormat) AsBasicDatasetStorageFormat() (BasicDatasetStorageFormat, b
// BasicTrigger azure data factory nested object which contains information about creating pipeline run
type BasicTrigger interface {
AsTumblingWindowTrigger() (*TumblingWindowTrigger, bool)
+ AsBlobEventsTrigger() (*BlobEventsTrigger, bool)
AsBlobTrigger() (*BlobTrigger, bool)
AsScheduleTrigger() (*ScheduleTrigger, bool)
AsMultiplePipelineTrigger() (*MultiplePipelineTrigger, bool)
@@ -86770,7 +86981,7 @@ type Trigger struct {
Description *string `json:"description,omitempty"`
// RuntimeState - Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. Possible values include: 'TriggerRuntimeStateStarted', 'TriggerRuntimeStateStopped', 'TriggerRuntimeStateDisabled'
RuntimeState TriggerRuntimeState `json:"runtimeState,omitempty"`
- // Type - Possible values include: 'TypeTrigger', 'TypeTumblingWindowTrigger', 'TypeBlobTrigger', 'TypeScheduleTrigger', 'TypeMultiplePipelineTrigger'
+ // Type - Possible values include: 'TypeTrigger', 'TypeTumblingWindowTrigger', 'TypeBlobEventsTrigger', 'TypeBlobTrigger', 'TypeScheduleTrigger', 'TypeMultiplePipelineTrigger'
Type TypeBasicTrigger `json:"type,omitempty"`
}
@@ -86786,6 +86997,10 @@ func unmarshalBasicTrigger(body []byte) (BasicTrigger, error) {
var twt TumblingWindowTrigger
err := json.Unmarshal(body, &twt)
return twt, err
+ case string(TypeBlobEventsTrigger):
+ var bet BlobEventsTrigger
+ err := json.Unmarshal(body, &bet)
+ return bet, err
case string(TypeBlobTrigger):
var bt BlobTrigger
err := json.Unmarshal(body, &bt)
@@ -86847,6 +87062,11 @@ func (t Trigger) AsTumblingWindowTrigger() (*TumblingWindowTrigger, bool) {
return nil, false
}
+// AsBlobEventsTrigger is the BasicTrigger implementation for Trigger.
+func (t Trigger) AsBlobEventsTrigger() (*BlobEventsTrigger, bool) {
+ return nil, false
+}
+
// AsBlobTrigger is the BasicTrigger implementation for Trigger.
func (t Trigger) AsBlobTrigger() (*BlobTrigger, bool) {
return nil, false
@@ -87233,12 +87453,11 @@ func (page TriggerRunListResponsePage) Values() []TriggerRun {
// TriggersStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TriggersStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TriggersStartFuture) Result(client TriggersClient) (ar autorest.Response, err error) {
+func (future *TriggersStartFuture) Result(client TriggersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -87246,47 +87465,21 @@ func (future TriggersStartFuture) Result(client TriggersClient) (ar autorest.Res
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("datafactory.TriggersStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datafactory.TriggersStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datafactory.TriggersStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datafactory.TriggersStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datafactory.TriggersStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// TriggersStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TriggersStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TriggersStopFuture) Result(client TriggersClient) (ar autorest.Response, err error) {
+func (future *TriggersStopFuture) Result(client TriggersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -87294,35 +87487,10 @@ func (future TriggersStopFuture) Result(client TriggersClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("datafactory.TriggersStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datafactory.TriggersStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datafactory.TriggersStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datafactory.TriggersStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datafactory.TriggersStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -87339,7 +87507,7 @@ type TumblingWindowTrigger struct {
Description *string `json:"description,omitempty"`
// RuntimeState - Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. Possible values include: 'TriggerRuntimeStateStarted', 'TriggerRuntimeStateStopped', 'TriggerRuntimeStateDisabled'
RuntimeState TriggerRuntimeState `json:"runtimeState,omitempty"`
- // Type - Possible values include: 'TypeTrigger', 'TypeTumblingWindowTrigger', 'TypeBlobTrigger', 'TypeScheduleTrigger', 'TypeMultiplePipelineTrigger'
+ // Type - Possible values include: 'TypeTrigger', 'TypeTumblingWindowTrigger', 'TypeBlobEventsTrigger', 'TypeBlobTrigger', 'TypeScheduleTrigger', 'TypeMultiplePipelineTrigger'
Type TypeBasicTrigger `json:"type,omitempty"`
}
@@ -87373,6 +87541,11 @@ func (twt TumblingWindowTrigger) AsTumblingWindowTrigger() (*TumblingWindowTrigg
return &twt, true
}
+// AsBlobEventsTrigger is the BasicTrigger implementation for TumblingWindowTrigger.
+func (twt TumblingWindowTrigger) AsBlobEventsTrigger() (*BlobEventsTrigger, bool) {
+ return nil, false
+}
+
// AsBlobTrigger is the BasicTrigger implementation for TumblingWindowTrigger.
func (twt TumblingWindowTrigger) AsBlobTrigger() (*BlobTrigger, bool) {
return nil, false
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/triggers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/triggers.go
index 01a49e1f2..d7d9d443c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/triggers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/triggers.go
@@ -593,15 +593,17 @@ func (client TriggersClient) StartPreparer(ctx context.Context, resourceGroupNam
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client TriggersClient) StartSender(req *http.Request) (future TriggersStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -679,15 +681,17 @@ func (client TriggersClient) StopPreparer(ctx context.Context, resourceGroupName
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client TriggersClient) StopSender(req *http.Request) (future TriggersStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2017-09-01-preview/job/job.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2017-09-01-preview/job/job.go
index 2d3675320..45125bcac 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2017-09-01-preview/job/job.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2017-09-01-preview/job/job.go
@@ -152,15 +152,17 @@ func (client Client) CancelPreparer(ctx context.Context, accountName string, job
// CancelSender sends the Cancel request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CancelSender(req *http.Request) (future CancelFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -657,15 +659,17 @@ func (client Client) UpdatePreparer(ctx context.Context, accountName string, job
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -730,15 +734,17 @@ func (client Client) YieldPreparer(ctx context.Context, accountName string, jobI
// YieldSender sends the Yield request. The method will close the
// http.Response Body if it receives an error.
func (client Client) YieldSender(req *http.Request) (future YieldFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2017-09-01-preview/job/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2017-09-01-preview/job/models.go
index 716513e59..24b37b6a9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2017-09-01-preview/job/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2017-09-01-preview/job/models.go
@@ -287,12 +287,11 @@ func (bjp *BuildJobParameters) UnmarshalJSON(body []byte) error {
// CancelFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CancelFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CancelFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *CancelFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -300,35 +299,10 @@ func (future CancelFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("job.CancelFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.CancelResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "job.CancelFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("job.CancelFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "job.CancelFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.CancelResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "job.CancelFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2003,12 +1977,11 @@ type StatisticsVertexStage struct {
// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateFuture) Result(client Client) (i Information, err error) {
+func (future *UpdateFuture) Result(client Client) (i Information, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2016,34 +1989,15 @@ func (future UpdateFuture) Result(client Client) (i Information, err error) {
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("job.UpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "job.UpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("job.UpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.UpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "job.UpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "job.UpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "job.UpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2193,12 +2147,11 @@ func (usjp USQLJobProperties) AsBasicProperties() (BasicProperties, bool) {
// YieldFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type YieldFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future YieldFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *YieldFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2206,34 +2159,9 @@ func (future YieldFuture) Result(client Client) (ar autorest.Response, err error
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("job.YieldFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.YieldResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "job.YieldFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("job.YieldFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "job.YieldFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.YieldResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "job.YieldFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/account.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/account.go
index dd43d70c3..10f90832f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/account.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/account.go
@@ -245,15 +245,17 @@ func (client Client) CreatePreparer(ctx context.Context, resourceGroupName strin
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateSender(req *http.Request) (future CreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -314,15 +316,17 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1552,15 +1556,17 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/models.go
index 423637da6..bb82e5154 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/models.go
@@ -133,12 +133,11 @@ type BlobContainerProperties struct {
// CreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateFuture) Result(client Client) (dlaa DataLakeAnalyticsAccount, err error) {
+func (future *CreateFuture) Result(client Client) (dlaa DataLakeAnalyticsAccount, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -146,34 +145,15 @@ func (future CreateFuture) Result(client Client) (dlaa DataLakeAnalyticsAccount,
return
}
if !done {
- return dlaa, azure.NewAsyncOpIncompleteError("account.CreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- dlaa, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.CreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("account.CreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dlaa.Response.Response, err = future.GetResult(sender); err == nil && dlaa.Response.Response.StatusCode != http.StatusNoContent {
+ dlaa, err = client.CreateResponder(dlaa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "account.CreateFuture", "Result", dlaa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.CreateFuture", "Result", resp, "Failure sending request")
- return
- }
- dlaa, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.CreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -576,12 +556,11 @@ type DataLakeStoreAccountInfoProperties struct {
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -589,35 +568,10 @@ func (future DeleteFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("account.DeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.DeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("account.DeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.DeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.DeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -884,12 +838,11 @@ type StorageAccountProperties struct {
// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateFuture) Result(client Client) (dlaa DataLakeAnalyticsAccount, err error) {
+func (future *UpdateFuture) Result(client Client) (dlaa DataLakeAnalyticsAccount, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -897,34 +850,15 @@ func (future UpdateFuture) Result(client Client) (dlaa DataLakeAnalyticsAccount,
return
}
if !done {
- return dlaa, azure.NewAsyncOpIncompleteError("account.UpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- dlaa, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.UpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("account.UpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dlaa.Response.Response, err = future.GetResult(sender); err == nil && dlaa.Response.Response.StatusCode != http.StatusNoContent {
+ dlaa, err = client.UpdateResponder(dlaa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "account.UpdateFuture", "Result", dlaa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.UpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- dlaa, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.UpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/store/mgmt/2015-10-01-preview/account/account.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/store/mgmt/2015-10-01-preview/account/account.go
index 182e0b67b..0c5a108fc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/store/mgmt/2015-10-01-preview/account/account.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/store/mgmt/2015-10-01-preview/account/account.go
@@ -86,15 +86,17 @@ func (client Client) CreatePreparer(ctx context.Context, resourceGroupName strin
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateSender(req *http.Request) (future CreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -227,15 +229,17 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -935,15 +939,17 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/store/mgmt/2015-10-01-preview/account/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/store/mgmt/2015-10-01-preview/account/models.go
index 964e5bd3a..b1d4229da 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/store/mgmt/2015-10-01-preview/account/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datalake/store/mgmt/2015-10-01-preview/account/models.go
@@ -161,12 +161,11 @@ type AzureAsyncOperationResult struct {
// CreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateFuture) Result(client Client) (dlsa DataLakeStoreAccount, err error) {
+func (future *CreateFuture) Result(client Client) (dlsa DataLakeStoreAccount, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -174,34 +173,15 @@ func (future CreateFuture) Result(client Client) (dlsa DataLakeStoreAccount, err
return
}
if !done {
- return dlsa, azure.NewAsyncOpIncompleteError("account.CreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- dlsa, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.CreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("account.CreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dlsa.Response.Response, err = future.GetResult(sender); err == nil && dlsa.Response.Response.StatusCode != http.StatusNoContent {
+ dlsa, err = client.CreateResponder(dlsa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "account.CreateFuture", "Result", dlsa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.CreateFuture", "Result", resp, "Failure sending request")
- return
- }
- dlsa, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.CreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -485,12 +465,11 @@ func (page DataLakeStoreFirewallRuleListResultPage) Values() []FirewallRule {
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -498,35 +477,10 @@ func (future DeleteFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("account.DeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.DeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("account.DeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.DeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.DeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -616,12 +570,11 @@ type KeyVaultMetaInfo struct {
// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateFuture) Result(client Client) (dlsa DataLakeStoreAccount, err error) {
+func (future *UpdateFuture) Result(client Client) (dlsa DataLakeStoreAccount, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -629,34 +582,15 @@ func (future UpdateFuture) Result(client Client) (dlsa DataLakeStoreAccount, err
return
}
if !done {
- return dlsa, azure.NewAsyncOpIncompleteError("account.UpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- dlsa, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.UpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("account.UpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dlsa.Response.Response, err = future.GetResult(sender); err == nil && dlsa.Response.Response.StatusCode != http.StatusNoContent {
+ dlsa, err = client.UpdateResponder(dlsa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "account.UpdateFuture", "Result", dlsa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.UpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- dlsa, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "account.UpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/models.go
index 92b28c1c1..1039418ab 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/models.go
@@ -1619,7 +1619,7 @@ func (msssdto MigrateSQLServerSQLDbTaskOutput) AsBasicMigrateSQLServerSQLDbTaskO
return &msssdto, true
}
-// MigrateSQLServerSQLDbTaskOutputDatabaseLevel ...
+// MigrateSQLServerSQLDbTaskOutputDatabaseLevel database level result for Sql Server to Azure Sql DB migration.
type MigrateSQLServerSQLDbTaskOutputDatabaseLevel struct {
// DatabaseName - Name of the item
DatabaseName *string `json:"databaseName,omitempty"`
@@ -1740,7 +1740,7 @@ func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsBasicMigrateSQLS
return &msssdtodl, true
}
-// MigrateSQLServerSQLDbTaskOutputError ...
+// MigrateSQLServerSQLDbTaskOutputError task errors for Sql Server to Azure Sql DB migration.
type MigrateSQLServerSQLDbTaskOutputError struct {
// Error - Migration error
Error *ReportableException `json:"error,omitempty"`
@@ -1796,7 +1796,7 @@ func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsBasicMigrateSQLServerSQLD
return &msssdtoe, true
}
-// MigrateSQLServerSQLDbTaskOutputMigrationLevel ...
+// MigrateSQLServerSQLDbTaskOutputMigrationLevel migration level result for Sql server to Azure Sql DB migration.
type MigrateSQLServerSQLDbTaskOutputMigrationLevel struct {
// StartedOn - Migration start time
StartedOn *date.Time `json:"startedOn,omitempty"`
@@ -1917,7 +1917,7 @@ func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsBasicMigrateSQL
return &msssdtoml, true
}
-// MigrateSQLServerSQLDbTaskOutputTableLevel ...
+// MigrateSQLServerSQLDbTaskOutputTableLevel table level result for Sql Server to Azure Sql DB migration.
type MigrateSQLServerSQLDbTaskOutputTableLevel struct {
// ObjectName - Name of the item
ObjectName *string `json:"objectName,omitempty"`
@@ -3550,12 +3550,11 @@ type ServiceProperties struct {
// operation.
type ServicesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Service, err error) {
+func (future *ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Service, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3563,34 +3562,15 @@ func (future ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Serv
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("datamigration.ServicesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datamigration.ServicesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3598,12 +3578,11 @@ func (future ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Serv
// ServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesDeleteFuture) Result(client ServicesClient) (ar autorest.Response, err error) {
+func (future *ServicesDeleteFuture) Result(client ServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3611,35 +3590,10 @@ func (future ServicesDeleteFuture) Result(client ServicesClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("datamigration.ServicesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datamigration.ServicesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3762,12 +3716,11 @@ func (page ServiceSkuListPage) Values() []AvailableServiceSku {
// ServicesStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesStartFuture) Result(client ServicesClient) (ar autorest.Response, err error) {
+func (future *ServicesStartFuture) Result(client ServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3775,47 +3728,21 @@ func (future ServicesStartFuture) Result(client ServicesClient) (ar autorest.Res
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("datamigration.ServicesStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datamigration.ServicesStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServicesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesStopFuture) Result(client ServicesClient) (ar autorest.Response, err error) {
+func (future *ServicesStopFuture) Result(client ServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3823,35 +3750,10 @@ func (future ServicesStopFuture) Result(client ServicesClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("datamigration.ServicesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datamigration.ServicesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3871,12 +3773,11 @@ type ServiceStatusResponse struct {
// ServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesUpdateFuture) Result(client ServicesClient) (s Service, err error) {
+func (future *ServicesUpdateFuture) Result(client ServicesClient) (s Service, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3884,34 +3785,15 @@ func (future ServicesUpdateFuture) Result(client ServicesClient) (s Service, err
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("datamigration.ServicesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datamigration.ServicesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/services.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/services.go
index 0235b8b9a..0014046f4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/services.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/services.go
@@ -306,15 +306,17 @@ func (client ServicesClient) CreateOrUpdatePreparer(ctx context.Context, paramet
// 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) (future ServicesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -380,15 +382,17 @@ func (client ServicesClient) DeletePreparer(ctx context.Context, groupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) DeleteSender(req *http.Request) (future ServicesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -798,15 +802,17 @@ func (client ServicesClient) StartPreparer(ctx context.Context, groupName string
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) StartSender(req *http.Request) (future ServicesStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -868,15 +874,17 @@ func (client ServicesClient) StopPreparer(ctx context.Context, groupName string,
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) StopSender(req *http.Request) (future ServicesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -941,15 +949,17 @@ func (client ServicesClient) UpdatePreparer(ctx context.Context, parameters Serv
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) UpdateSender(req *http.Request) (future ServicesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/models.go
index f3c0ee276..181186bb6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/models.go
@@ -1765,7 +1765,7 @@ type DataItemMigrationSummaryResult struct {
type Error struct {
// Message - Error description
Message *string `json:"message,omitempty"`
- // Type - Possible values include: 'ErrorTypeDefault', 'ErrorTypeWarning', 'ErrorTypeError'
+ // Type - Type of error. Possible values include: 'ErrorTypeDefault', 'ErrorTypeWarning', 'ErrorTypeError'
Type ErrorType `json:"type,omitempty"`
}
@@ -4847,12 +4847,11 @@ type ServiceProperties struct {
// operation.
type ServicesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Service, err error) {
+func (future *ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Service, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4860,34 +4859,15 @@ func (future ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Serv
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("datamigration.ServicesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datamigration.ServicesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4895,12 +4875,11 @@ func (future ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Serv
// ServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesDeleteFuture) Result(client ServicesClient) (ar autorest.Response, err error) {
+func (future *ServicesDeleteFuture) Result(client ServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4908,35 +4887,10 @@ func (future ServicesDeleteFuture) Result(client ServicesClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("datamigration.ServicesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datamigration.ServicesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5059,12 +5013,11 @@ func (page ServiceSkuListPage) Values() []AvailableServiceSku {
// ServicesStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesStartFuture) Result(client ServicesClient) (ar autorest.Response, err error) {
+func (future *ServicesStartFuture) Result(client ServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5072,47 +5025,21 @@ func (future ServicesStartFuture) Result(client ServicesClient) (ar autorest.Res
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("datamigration.ServicesStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datamigration.ServicesStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServicesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesStopFuture) Result(client ServicesClient) (ar autorest.Response, err error) {
+func (future *ServicesStopFuture) Result(client ServicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5120,35 +5047,10 @@ func (future ServicesStopFuture) Result(client ServicesClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("datamigration.ServicesStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datamigration.ServicesStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5168,12 +5070,11 @@ type ServiceStatusResponse struct {
// ServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesUpdateFuture) Result(client ServicesClient) (s Service, err error) {
+func (future *ServicesUpdateFuture) Result(client ServicesClient) (s Service, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5181,34 +5082,15 @@ func (future ServicesUpdateFuture) Result(client ServicesClient) (s Service, err
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("datamigration.ServicesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("datamigration.ServicesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5287,7 +5169,7 @@ type SQLMigrationTaskInput struct {
TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"`
}
-// StartMigrationScenarioServerRoleResult ...
+// StartMigrationScenarioServerRoleResult server role migration result
type StartMigrationScenarioServerRoleResult struct {
// Name - Name of server role.
Name *string `json:"name,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/services.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/services.go
index 787fc6249..295c9b78e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/services.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/services.go
@@ -306,15 +306,17 @@ func (client ServicesClient) CreateOrUpdatePreparer(ctx context.Context, paramet
// 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) (future ServicesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -380,15 +382,17 @@ func (client ServicesClient) DeletePreparer(ctx context.Context, groupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) DeleteSender(req *http.Request) (future ServicesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -798,15 +802,17 @@ func (client ServicesClient) StartPreparer(ctx context.Context, groupName string
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) StartSender(req *http.Request) (future ServicesStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -868,15 +874,17 @@ func (client ServicesClient) StopPreparer(ctx context.Context, groupName string,
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) StopSender(req *http.Request) (future ServicesStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -941,15 +949,17 @@ func (client ServicesClient) UpdatePreparer(ctx context.Context, parameters Serv
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ServicesClient) UpdateSender(req *http.Request) (future ServicesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/cost.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/cost.go
index 89d2d46d4..86d81adaf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/cost.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/cost.go
@@ -259,15 +259,17 @@ func (client CostClient) RefreshDataPreparer(ctx context.Context, resourceGroupN
// RefreshDataSender sends the RefreshData request. The method will close the
// http.Response Body if it receives an error.
func (client CostClient) RefreshDataSender(req *http.Request) (future CostRefreshDataFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/costinsight.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/costinsight.go
index 3b98ce775..ed2b73098 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/costinsight.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/costinsight.go
@@ -259,15 +259,17 @@ func (client CostInsightClient) RefreshDataPreparer(ctx context.Context, resourc
// RefreshDataSender sends the RefreshData request. The method will close the
// http.Response Body if it receives an error.
func (client CostInsightClient) RefreshDataSender(req *http.Request) (future CostInsightRefreshDataFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/customimage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/customimage.go
index edd994637..595905967 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/customimage.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/customimage.go
@@ -87,15 +87,17 @@ func (client CustomImageClient) CreateOrUpdateResourcePreparer(ctx context.Conte
// CreateOrUpdateResourceSender sends the CreateOrUpdateResource request. The method will close the
// http.Response Body if it receives an error.
func (client CustomImageClient) CreateOrUpdateResourceSender(req *http.Request) (future CustomImageCreateOrUpdateResourceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client CustomImageClient) DeleteResourcePreparer(ctx context.Context, reso
// DeleteResourceSender sends the DeleteResource request. The method will close the
// http.Response Body if it receives an error.
func (client CustomImageClient) DeleteResourceSender(req *http.Request) (future CustomImageDeleteResourceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/formula.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/formula.go
index df0a61a0c..72b64e7b1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/formula.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/formula.go
@@ -87,15 +87,17 @@ func (client FormulaClient) CreateOrUpdateResourcePreparer(ctx context.Context,
// CreateOrUpdateResourceSender sends the CreateOrUpdateResource request. The method will close the
// http.Response Body if it receives an error.
func (client FormulaClient) CreateOrUpdateResourceSender(req *http.Request) (future FormulaCreateOrUpdateResourceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/lab.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/lab.go
index 3e30d4fde..bfda56475 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/lab.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/lab.go
@@ -85,15 +85,17 @@ func (client LabClient) CreateEnvironmentPreparer(ctx context.Context, resourceG
// CreateEnvironmentSender sends the CreateEnvironment request. The method will close the
// http.Response Body if it receives an error.
func (client LabClient) CreateEnvironmentSender(req *http.Request) (future LabCreateEnvironmentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LabClient) CreateOrUpdateResourcePreparer(ctx context.Context, reso
// CreateOrUpdateResourceSender sends the CreateOrUpdateResource request. The method will close the
// http.Response Body if it receives an error.
func (client LabClient) CreateOrUpdateResourceSender(req *http.Request) (future LabCreateOrUpdateResourceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -224,15 +228,17 @@ func (client LabClient) DeleteResourcePreparer(ctx context.Context, resourceGrou
// DeleteResourceSender sends the DeleteResource request. The method will close the
// http.Response Body if it receives an error.
func (client LabClient) DeleteResourceSender(req *http.Request) (future LabDeleteResourceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/models.go
index c99a13075..4bb5cfb1e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/models.go
@@ -789,12 +789,11 @@ type CostInsightProperties struct {
// operation.
type CostInsightRefreshDataFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CostInsightRefreshDataFuture) Result(client CostInsightClient) (ar autorest.Response, err error) {
+func (future *CostInsightRefreshDataFuture) Result(client CostInsightClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -802,35 +801,10 @@ func (future CostInsightRefreshDataFuture) Result(client CostInsightClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.CostInsightRefreshDataFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RefreshDataResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CostInsightRefreshDataFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.CostInsightRefreshDataFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CostInsightRefreshDataFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RefreshDataResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CostInsightRefreshDataFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -855,12 +829,11 @@ type CostProperties struct {
// CostRefreshDataFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CostRefreshDataFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CostRefreshDataFuture) Result(client CostClient) (ar autorest.Response, err error) {
+func (future *CostRefreshDataFuture) Result(client CostClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -868,35 +841,10 @@ func (future CostRefreshDataFuture) Result(client CostClient) (ar autorest.Respo
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.CostRefreshDataFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RefreshDataResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CostRefreshDataFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.CostRefreshDataFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CostRefreshDataFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RefreshDataResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CostRefreshDataFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1014,12 +962,11 @@ func (ci *CustomImage) UnmarshalJSON(body []byte) error {
// long-running operation.
type CustomImageCreateOrUpdateResourceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomImageCreateOrUpdateResourceFuture) Result(client CustomImageClient) (ci CustomImage, err error) {
+func (future *CustomImageCreateOrUpdateResourceFuture) Result(client CustomImageClient) (ci CustomImage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1027,34 +974,15 @@ func (future CustomImageCreateOrUpdateResourceFuture) Result(client CustomImageC
return
}
if !done {
- return ci, azure.NewAsyncOpIncompleteError("dtl.CustomImageCreateOrUpdateResourceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ci, err = client.CreateOrUpdateResourceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CustomImageCreateOrUpdateResourceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.CustomImageCreateOrUpdateResourceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CreateOrUpdateResourceResponder(ci.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dtl.CustomImageCreateOrUpdateResourceFuture", "Result", ci.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CustomImageCreateOrUpdateResourceFuture", "Result", resp, "Failure sending request")
- return
- }
- ci, err = client.CreateOrUpdateResourceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CustomImageCreateOrUpdateResourceFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1063,12 +991,11 @@ func (future CustomImageCreateOrUpdateResourceFuture) Result(client CustomImageC
// operation.
type CustomImageDeleteResourceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CustomImageDeleteResourceFuture) Result(client CustomImageClient) (ar autorest.Response, err error) {
+func (future *CustomImageDeleteResourceFuture) Result(client CustomImageClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1076,35 +1003,10 @@ func (future CustomImageDeleteResourceFuture) Result(client CustomImageClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.CustomImageDeleteResourceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResourceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CustomImageDeleteResourceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.CustomImageDeleteResourceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CustomImageDeleteResourceFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResourceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.CustomImageDeleteResourceFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1287,12 +1189,11 @@ func (f *Formula) UnmarshalJSON(body []byte) error {
// operation.
type FormulaCreateOrUpdateResourceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FormulaCreateOrUpdateResourceFuture) Result(client FormulaClient) (f Formula, err error) {
+func (future *FormulaCreateOrUpdateResourceFuture) Result(client FormulaClient) (f Formula, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1300,34 +1201,15 @@ func (future FormulaCreateOrUpdateResourceFuture) Result(client FormulaClient) (
return
}
if !done {
- return f, azure.NewAsyncOpIncompleteError("dtl.FormulaCreateOrUpdateResourceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- f, err = client.CreateOrUpdateResourceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.FormulaCreateOrUpdateResourceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.FormulaCreateOrUpdateResourceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
+ f, err = client.CreateOrUpdateResourceResponder(f.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dtl.FormulaCreateOrUpdateResourceFuture", "Result", f.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.FormulaCreateOrUpdateResourceFuture", "Result", resp, "Failure sending request")
- return
- }
- f, err = client.CreateOrUpdateResourceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.FormulaCreateOrUpdateResourceFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1637,12 +1519,11 @@ func (l *Lab) UnmarshalJSON(body []byte) error {
// LabCreateEnvironmentFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LabCreateEnvironmentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LabCreateEnvironmentFuture) Result(client LabClient) (ar autorest.Response, err error) {
+func (future *LabCreateEnvironmentFuture) Result(client LabClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1650,35 +1531,10 @@ func (future LabCreateEnvironmentFuture) Result(client LabClient) (ar autorest.R
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.LabCreateEnvironmentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.CreateEnvironmentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabCreateEnvironmentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.LabCreateEnvironmentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabCreateEnvironmentFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.CreateEnvironmentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabCreateEnvironmentFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1686,12 +1542,11 @@ func (future LabCreateEnvironmentFuture) Result(client LabClient) (ar autorest.R
// operation.
type LabCreateOrUpdateResourceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LabCreateOrUpdateResourceFuture) Result(client LabClient) (l Lab, err error) {
+func (future *LabCreateOrUpdateResourceFuture) Result(client LabClient) (l Lab, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1699,34 +1554,15 @@ func (future LabCreateOrUpdateResourceFuture) Result(client LabClient) (l Lab, e
return
}
if !done {
- return l, azure.NewAsyncOpIncompleteError("dtl.LabCreateOrUpdateResourceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- l, err = client.CreateOrUpdateResourceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabCreateOrUpdateResourceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.LabCreateOrUpdateResourceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if l.Response.Response, err = future.GetResult(sender); err == nil && l.Response.Response.StatusCode != http.StatusNoContent {
+ l, err = client.CreateOrUpdateResourceResponder(l.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dtl.LabCreateOrUpdateResourceFuture", "Result", l.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabCreateOrUpdateResourceFuture", "Result", resp, "Failure sending request")
- return
- }
- l, err = client.CreateOrUpdateResourceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabCreateOrUpdateResourceFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1734,12 +1570,11 @@ func (future LabCreateOrUpdateResourceFuture) Result(client LabClient) (l Lab, e
// LabDeleteResourceFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LabDeleteResourceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LabDeleteResourceFuture) Result(client LabClient) (ar autorest.Response, err error) {
+func (future *LabDeleteResourceFuture) Result(client LabClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1747,35 +1582,10 @@ func (future LabDeleteResourceFuture) Result(client LabClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.LabDeleteResourceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResourceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabDeleteResourceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.LabDeleteResourceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabDeleteResourceFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResourceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.LabDeleteResourceFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3556,12 +3366,11 @@ func (s *Schedule) UnmarshalJSON(body []byte) error {
// operation.
type ScheduleCreateOrUpdateResourceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ScheduleCreateOrUpdateResourceFuture) Result(client ScheduleClient) (s Schedule, err error) {
+func (future *ScheduleCreateOrUpdateResourceFuture) Result(client ScheduleClient) (s Schedule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3569,34 +3378,15 @@ func (future ScheduleCreateOrUpdateResourceFuture) Result(client ScheduleClient)
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("dtl.ScheduleCreateOrUpdateResourceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResourceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.ScheduleCreateOrUpdateResourceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.ScheduleCreateOrUpdateResourceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResourceResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dtl.ScheduleCreateOrUpdateResourceFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.ScheduleCreateOrUpdateResourceFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResourceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.ScheduleCreateOrUpdateResourceFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3605,12 +3395,11 @@ func (future ScheduleCreateOrUpdateResourceFuture) Result(client ScheduleClient)
// operation.
type ScheduleDeleteResourceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ScheduleDeleteResourceFuture) Result(client ScheduleClient) (ar autorest.Response, err error) {
+func (future *ScheduleDeleteResourceFuture) Result(client ScheduleClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3618,47 +3407,21 @@ func (future ScheduleDeleteResourceFuture) Result(client ScheduleClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.ScheduleDeleteResourceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResourceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.ScheduleDeleteResourceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.ScheduleDeleteResourceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.ScheduleDeleteResourceFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResourceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.ScheduleDeleteResourceFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ScheduleExecuteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ScheduleExecuteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ScheduleExecuteFuture) Result(client ScheduleClient) (ar autorest.Response, err error) {
+func (future *ScheduleExecuteFuture) Result(client ScheduleClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3666,35 +3429,10 @@ func (future ScheduleExecuteFuture) Result(client ScheduleClient) (ar autorest.R
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.ScheduleExecuteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ExecuteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.ScheduleExecuteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.ScheduleExecuteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.ScheduleExecuteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ExecuteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.ScheduleExecuteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3753,12 +3491,11 @@ type SubscriptionNotificationProperties struct {
// operation.
type VirtualMachineApplyArtifactsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineApplyArtifactsFuture) Result(client VirtualMachineClient) (ar autorest.Response, err error) {
+func (future *VirtualMachineApplyArtifactsFuture) Result(client VirtualMachineClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3766,35 +3503,10 @@ func (future VirtualMachineApplyArtifactsFuture) Result(client VirtualMachineCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualMachineApplyArtifactsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ApplyArtifactsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineApplyArtifactsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachineApplyArtifactsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineApplyArtifactsFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ApplyArtifactsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineApplyArtifactsFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3802,12 +3514,11 @@ func (future VirtualMachineApplyArtifactsFuture) Result(client VirtualMachineCli
// long-running operation.
type VirtualMachineCreateOrUpdateResourceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineCreateOrUpdateResourceFuture) Result(client VirtualMachineClient) (lvm LabVirtualMachine, err error) {
+func (future *VirtualMachineCreateOrUpdateResourceFuture) Result(client VirtualMachineClient) (lvm LabVirtualMachine, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3815,34 +3526,15 @@ func (future VirtualMachineCreateOrUpdateResourceFuture) Result(client VirtualMa
return
}
if !done {
- return lvm, azure.NewAsyncOpIncompleteError("dtl.VirtualMachineCreateOrUpdateResourceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lvm, err = client.CreateOrUpdateResourceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineCreateOrUpdateResourceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachineCreateOrUpdateResourceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lvm.Response.Response, err = future.GetResult(sender); err == nil && lvm.Response.Response.StatusCode != http.StatusNoContent {
+ lvm, err = client.CreateOrUpdateResourceResponder(lvm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dtl.VirtualMachineCreateOrUpdateResourceFuture", "Result", lvm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineCreateOrUpdateResourceFuture", "Result", resp, "Failure sending request")
- return
- }
- lvm, err = client.CreateOrUpdateResourceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineCreateOrUpdateResourceFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3851,12 +3543,11 @@ func (future VirtualMachineCreateOrUpdateResourceFuture) Result(client VirtualMa
// operation.
type VirtualMachineDeleteResourceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineDeleteResourceFuture) Result(client VirtualMachineClient) (ar autorest.Response, err error) {
+func (future *VirtualMachineDeleteResourceFuture) Result(client VirtualMachineClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3864,47 +3555,21 @@ func (future VirtualMachineDeleteResourceFuture) Result(client VirtualMachineCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualMachineDeleteResourceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResourceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineDeleteResourceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachineDeleteResourceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineDeleteResourceFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResourceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineDeleteResourceFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// VirtualMachineStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VirtualMachineStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineStartFuture) Result(client VirtualMachineClient) (ar autorest.Response, err error) {
+func (future *VirtualMachineStartFuture) Result(client VirtualMachineClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3912,47 +3577,21 @@ func (future VirtualMachineStartFuture) Result(client VirtualMachineClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualMachineStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachineStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// VirtualMachineStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VirtualMachineStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualMachineStopFuture) Result(client VirtualMachineClient) (ar autorest.Response, err error) {
+func (future *VirtualMachineStopFuture) Result(client VirtualMachineClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3960,35 +3599,10 @@ func (future VirtualMachineStopFuture) Result(client VirtualMachineClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualMachineStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachineStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualMachineStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4106,12 +3720,11 @@ func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
// long-running operation.
type VirtualNetworkCreateOrUpdateResourceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkCreateOrUpdateResourceFuture) Result(client VirtualNetworkClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworkCreateOrUpdateResourceFuture) Result(client VirtualNetworkClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4119,34 +3732,15 @@ func (future VirtualNetworkCreateOrUpdateResourceFuture) Result(client VirtualNe
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("dtl.VirtualNetworkCreateOrUpdateResourceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResourceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualNetworkCreateOrUpdateResourceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualNetworkCreateOrUpdateResourceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResourceResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "dtl.VirtualNetworkCreateOrUpdateResourceFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualNetworkCreateOrUpdateResourceFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResourceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualNetworkCreateOrUpdateResourceFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4155,12 +3749,11 @@ func (future VirtualNetworkCreateOrUpdateResourceFuture) Result(client VirtualNe
// operation.
type VirtualNetworkDeleteResourceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkDeleteResourceFuture) Result(client VirtualNetworkClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkDeleteResourceFuture) Result(client VirtualNetworkClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4168,35 +3761,10 @@ func (future VirtualNetworkDeleteResourceFuture) Result(client VirtualNetworkCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dtl.VirtualNetworkDeleteResourceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResourceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualNetworkDeleteResourceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dtl.VirtualNetworkDeleteResourceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualNetworkDeleteResourceFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResourceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dtl.VirtualNetworkDeleteResourceFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/schedule.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/schedule.go
index a4ce69531..9f203dc55 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/schedule.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/schedule.go
@@ -87,15 +87,17 @@ func (client ScheduleClient) CreateOrUpdateResourcePreparer(ctx context.Context,
// CreateOrUpdateResourceSender sends the CreateOrUpdateResource request. The method will close the
// http.Response Body if it receives an error.
func (client ScheduleClient) CreateOrUpdateResourceSender(req *http.Request) (future ScheduleCreateOrUpdateResourceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client ScheduleClient) DeleteResourcePreparer(ctx context.Context, resourc
// DeleteResourceSender sends the DeleteResource request. The method will close the
// http.Response Body if it receives an error.
func (client ScheduleClient) DeleteResourceSender(req *http.Request) (future ScheduleDeleteResourceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -228,15 +232,17 @@ func (client ScheduleClient) ExecutePreparer(ctx context.Context, resourceGroupN
// ExecuteSender sends the Execute request. The method will close the
// http.Response Body if it receives an error.
func (client ScheduleClient) ExecuteSender(req *http.Request) (future ScheduleExecuteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualmachine.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualmachine.go
index ac773c388..300aa3898 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualmachine.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualmachine.go
@@ -87,15 +87,17 @@ func (client VirtualMachineClient) ApplyArtifactsPreparer(ctx context.Context, r
// ApplyArtifactsSender sends the ApplyArtifacts request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineClient) ApplyArtifactsSender(req *http.Request) (future VirtualMachineApplyArtifactsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client VirtualMachineClient) CreateOrUpdateResourcePreparer(ctx context.Co
// CreateOrUpdateResourceSender sends the CreateOrUpdateResource request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineClient) CreateOrUpdateResourceSender(req *http.Request) (future VirtualMachineCreateOrUpdateResourceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -230,15 +234,17 @@ func (client VirtualMachineClient) DeleteResourcePreparer(ctx context.Context, r
// DeleteResourceSender sends the DeleteResource request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineClient) DeleteResourceSender(req *http.Request) (future VirtualMachineDeleteResourceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -545,15 +551,17 @@ func (client VirtualMachineClient) StartPreparer(ctx context.Context, resourceGr
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineClient) StartSender(req *http.Request) (future VirtualMachineStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -615,15 +623,17 @@ func (client VirtualMachineClient) StopPreparer(ctx context.Context, resourceGro
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineClient) StopSender(req *http.Request) (future VirtualMachineStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualnetwork.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualnetwork.go
index aedddb343..47649acda 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualnetwork.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualnetwork.go
@@ -87,15 +87,17 @@ func (client VirtualNetworkClient) CreateOrUpdateResourcePreparer(ctx context.Co
// CreateOrUpdateResourceSender sends the CreateOrUpdateResource request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkClient) CreateOrUpdateResourceSender(req *http.Request) (future VirtualNetworkCreateOrUpdateResourceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client VirtualNetworkClient) DeleteResourcePreparer(ctx context.Context, r
// DeleteResourceSender sends the DeleteResource request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkClient) DeleteResourceSender(req *http.Request) (future VirtualNetworkDeleteResourceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go
index b032a20f1..c592f5591 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go
@@ -738,12 +738,11 @@ type ZoneProperties struct {
// ZonesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ZonesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response, err error) {
+func (future *ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -751,35 +750,10 @@ func (future ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go
index 5e728426c..a9369df17 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go
@@ -172,15 +172,17 @@ func (client ZonesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ZonesClient) DeleteSender(req *http.Request) (future ZonesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/eventsubscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/eventsubscriptions.go
index 2cf1657c1..daab67ad8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/eventsubscriptions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/eventsubscriptions.go
@@ -94,15 +94,17 @@ func (client EventSubscriptionsClient) CreatePreparer(ctx context.Context, scope
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client EventSubscriptionsClient) CreateSender(req *http.Request) (future EventSubscriptionsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client EventSubscriptionsClient) DeletePreparer(ctx context.Context, scope
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client EventSubscriptionsClient) DeleteSender(req *http.Request) (future EventSubscriptionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -995,15 +999,17 @@ func (client EventSubscriptionsClient) UpdatePreparer(ctx context.Context, scope
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client EventSubscriptionsClient) UpdateSender(req *http.Request) (future EventSubscriptionsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/models.go
index 9bad26ff6..1b833753c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/models.go
@@ -323,12 +323,11 @@ type EventSubscriptionProperties struct {
// operation.
type EventSubscriptionsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EventSubscriptionsCreateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
+func (future *EventSubscriptionsCreateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -336,34 +335,15 @@ func (future EventSubscriptionsCreateFuture) Result(client EventSubscriptionsCli
return
}
if !done {
- return es, azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- es, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if es.Response.Response, err = future.GetResult(sender); err == nil && es.Response.Response.StatusCode != http.StatusNoContent {
+ es, err = client.CreateResponder(es.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateFuture", "Result", es.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- es, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -372,12 +352,11 @@ func (future EventSubscriptionsCreateFuture) Result(client EventSubscriptionsCli
// operation.
type EventSubscriptionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EventSubscriptionsDeleteFuture) Result(client EventSubscriptionsClient) (ar autorest.Response, err error) {
+func (future *EventSubscriptionsDeleteFuture) Result(client EventSubscriptionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -385,35 +364,10 @@ func (future EventSubscriptionsDeleteFuture) Result(client EventSubscriptionsCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -428,12 +382,11 @@ type EventSubscriptionsListResult struct {
// operation.
type EventSubscriptionsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EventSubscriptionsUpdateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
+func (future *EventSubscriptionsUpdateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -441,34 +394,15 @@ func (future EventSubscriptionsUpdateFuture) Result(client EventSubscriptionsCli
return
}
if !done {
- return es, azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- es, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if es.Response.Response, err = future.GetResult(sender); err == nil && es.Response.Response.StatusCode != http.StatusNoContent {
+ es, err = client.UpdateResponder(es.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", es.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- es, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -749,12 +683,11 @@ type TopicRegenerateKeyRequest struct {
// TopicsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TopicsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
+func (future *TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -762,34 +695,15 @@ func (future TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, e
return
}
if !done {
- return t, azure.NewAsyncOpIncompleteError("eventgrid.TopicsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- t, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.TopicsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
+ t, err = client.CreateOrUpdateResponder(t.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", t.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- t, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -797,12 +711,11 @@ func (future TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, e
// TopicsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TopicsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TopicsDeleteFuture) Result(client TopicsClient) (ar autorest.Response, err error) {
+func (future *TopicsDeleteFuture) Result(client TopicsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -810,35 +723,10 @@ func (future TopicsDeleteFuture) Result(client TopicsClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("eventgrid.TopicsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.TopicsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/topics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/topics.go
index 52caa33be..e60cd344e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/topics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/topics.go
@@ -87,15 +87,17 @@ func (client TopicsClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) CreateOrUpdateSender(req *http.Request) (future TopicsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -156,15 +158,17 @@ func (client TopicsClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) DeleteSender(req *http.Request) (future TopicsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/eventsubscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/eventsubscriptions.go
index 31978d59e..567adbf5b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/eventsubscriptions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/eventsubscriptions.go
@@ -94,15 +94,17 @@ func (client EventSubscriptionsClient) CreatePreparer(ctx context.Context, scope
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client EventSubscriptionsClient) CreateSender(req *http.Request) (future EventSubscriptionsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client EventSubscriptionsClient) DeletePreparer(ctx context.Context, scope
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client EventSubscriptionsClient) DeleteSender(req *http.Request) (future EventSubscriptionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -995,15 +999,17 @@ func (client EventSubscriptionsClient) UpdatePreparer(ctx context.Context, scope
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client EventSubscriptionsClient) UpdateSender(req *http.Request) (future EventSubscriptionsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/models.go
index c0856820e..e5471b9a4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/models.go
@@ -489,12 +489,11 @@ func (esp *EventSubscriptionProperties) UnmarshalJSON(body []byte) error {
// operation.
type EventSubscriptionsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EventSubscriptionsCreateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
+func (future *EventSubscriptionsCreateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -502,34 +501,15 @@ func (future EventSubscriptionsCreateFuture) Result(client EventSubscriptionsCli
return
}
if !done {
- return es, azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- es, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if es.Response.Response, err = future.GetResult(sender); err == nil && es.Response.Response.StatusCode != http.StatusNoContent {
+ es, err = client.CreateResponder(es.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateFuture", "Result", es.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- es, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -538,12 +518,11 @@ func (future EventSubscriptionsCreateFuture) Result(client EventSubscriptionsCli
// operation.
type EventSubscriptionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EventSubscriptionsDeleteFuture) Result(client EventSubscriptionsClient) (ar autorest.Response, err error) {
+func (future *EventSubscriptionsDeleteFuture) Result(client EventSubscriptionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -551,35 +530,10 @@ func (future EventSubscriptionsDeleteFuture) Result(client EventSubscriptionsCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -594,12 +548,11 @@ type EventSubscriptionsListResult struct {
// operation.
type EventSubscriptionsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EventSubscriptionsUpdateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
+func (future *EventSubscriptionsUpdateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -607,34 +560,15 @@ func (future EventSubscriptionsUpdateFuture) Result(client EventSubscriptionsCli
return
}
if !done {
- return es, azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- es, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if es.Response.Response, err = future.GetResult(sender); err == nil && es.Response.Response.StatusCode != http.StatusNoContent {
+ es, err = client.UpdateResponder(es.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", es.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- es, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -956,12 +890,11 @@ type TopicRegenerateKeyRequest struct {
// TopicsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TopicsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
+func (future *TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -969,34 +902,15 @@ func (future TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, e
return
}
if !done {
- return t, azure.NewAsyncOpIncompleteError("eventgrid.TopicsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- t, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.TopicsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
+ t, err = client.CreateOrUpdateResponder(t.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", t.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- t, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1004,12 +918,11 @@ func (future TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, e
// TopicsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TopicsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TopicsDeleteFuture) Result(client TopicsClient) (ar autorest.Response, err error) {
+func (future *TopicsDeleteFuture) Result(client TopicsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1017,35 +930,10 @@ func (future TopicsDeleteFuture) Result(client TopicsClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("eventgrid.TopicsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.TopicsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1068,12 +956,11 @@ type TopicsListResult struct {
// TopicsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TopicsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TopicsUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
+func (future *TopicsUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1081,34 +968,15 @@ func (future TopicsUpdateFuture) Result(client TopicsClient) (t Topic, err error
return
}
if !done {
- return t, azure.NewAsyncOpIncompleteError("eventgrid.TopicsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- t, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.TopicsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
+ t, err = client.UpdateResponder(t.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.TopicsUpdateFuture", "Result", t.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- t, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/topics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/topics.go
index 1391ed046..3737241a1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/topics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/topics.go
@@ -87,15 +87,17 @@ func (client TopicsClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) CreateOrUpdateSender(req *http.Request) (future TopicsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -156,15 +158,17 @@ func (client TopicsClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) DeleteSender(req *http.Request) (future TopicsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -635,15 +639,17 @@ func (client TopicsClient) UpdatePreparer(ctx context.Context, resourceGroupName
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) UpdateSender(req *http.Request) (future TopicsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/eventsubscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/eventsubscriptions.go
index 1af28e597..b135a6b49 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/eventsubscriptions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/eventsubscriptions.go
@@ -94,15 +94,17 @@ func (client EventSubscriptionsClient) CreateOrUpdatePreparer(ctx context.Contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client EventSubscriptionsClient) CreateOrUpdateSender(req *http.Request) (future EventSubscriptionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client EventSubscriptionsClient) DeletePreparer(ctx context.Context, scope
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client EventSubscriptionsClient) DeleteSender(req *http.Request) (future EventSubscriptionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -995,15 +999,17 @@ func (client EventSubscriptionsClient) UpdatePreparer(ctx context.Context, scope
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client EventSubscriptionsClient) UpdateSender(req *http.Request) (future EventSubscriptionsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/models.go
index 93b9aceca..1bdf53ec9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/models.go
@@ -683,12 +683,11 @@ func (esp *EventSubscriptionProperties) UnmarshalJSON(body []byte) error {
// long-running operation.
type EventSubscriptionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EventSubscriptionsCreateOrUpdateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
+func (future *EventSubscriptionsCreateOrUpdateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -696,34 +695,15 @@ func (future EventSubscriptionsCreateOrUpdateFuture) Result(client EventSubscrip
return
}
if !done {
- return es, azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- es, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if es.Response.Response, err = future.GetResult(sender); err == nil && es.Response.Response.StatusCode != http.StatusNoContent {
+ es, err = client.CreateOrUpdateResponder(es.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateOrUpdateFuture", "Result", es.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- es, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -732,12 +712,11 @@ func (future EventSubscriptionsCreateOrUpdateFuture) Result(client EventSubscrip
// operation.
type EventSubscriptionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EventSubscriptionsDeleteFuture) Result(client EventSubscriptionsClient) (ar autorest.Response, err error) {
+func (future *EventSubscriptionsDeleteFuture) Result(client EventSubscriptionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -745,35 +724,10 @@ func (future EventSubscriptionsDeleteFuture) Result(client EventSubscriptionsCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -788,12 +742,11 @@ type EventSubscriptionsListResult struct {
// operation.
type EventSubscriptionsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EventSubscriptionsUpdateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
+func (future *EventSubscriptionsUpdateFuture) Result(client EventSubscriptionsClient) (es EventSubscription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -801,34 +754,15 @@ func (future EventSubscriptionsUpdateFuture) Result(client EventSubscriptionsCli
return
}
if !done {
- return es, azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- es, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.EventSubscriptionsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if es.Response.Response, err = future.GetResult(sender); err == nil && es.Response.Response.StatusCode != http.StatusNoContent {
+ es, err = client.UpdateResponder(es.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", es.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- es, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1689,12 +1623,11 @@ type TopicRegenerateKeyRequest struct {
// TopicsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TopicsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
+func (future *TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1702,34 +1635,15 @@ func (future TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, e
return
}
if !done {
- return t, azure.NewAsyncOpIncompleteError("eventgrid.TopicsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- t, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.TopicsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
+ t, err = client.CreateOrUpdateResponder(t.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", t.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- t, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1737,12 +1651,11 @@ func (future TopicsCreateOrUpdateFuture) Result(client TopicsClient) (t Topic, e
// TopicsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TopicsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TopicsDeleteFuture) Result(client TopicsClient) (ar autorest.Response, err error) {
+func (future *TopicsDeleteFuture) Result(client TopicsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1750,35 +1663,10 @@ func (future TopicsDeleteFuture) Result(client TopicsClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("eventgrid.TopicsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.TopicsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1801,12 +1689,11 @@ type TopicsListResult struct {
// TopicsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type TopicsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future TopicsUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
+func (future *TopicsUpdateFuture) Result(client TopicsClient) (t Topic, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1814,34 +1701,15 @@ func (future TopicsUpdateFuture) Result(client TopicsClient) (t Topic, err error
return
}
if !done {
- return t, azure.NewAsyncOpIncompleteError("eventgrid.TopicsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- t, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventgrid.TopicsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent {
+ t, err = client.UpdateResponder(t.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventgrid.TopicsUpdateFuture", "Result", t.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- t, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventgrid.TopicsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/topics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/topics.go
index 587308f50..48add2581 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/topics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/topics.go
@@ -87,15 +87,17 @@ func (client TopicsClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) CreateOrUpdateSender(req *http.Request) (future TopicsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -156,15 +158,17 @@ func (client TopicsClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) DeleteSender(req *http.Request) (future TopicsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -635,15 +639,17 @@ func (client TopicsClient) UpdatePreparer(ctx context.Context, resourceGroupName
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) UpdateSender(req *http.Request) (future TopicsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/clusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/clusters.go
index a3bb2f500..2e9422482 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/clusters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/clusters.go
@@ -274,15 +274,17 @@ func (client ClustersClient) PatchPreparer(ctx context.Context, resourceGroupNam
// PatchSender sends the Patch request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) PatchSender(req *http.Request) (future ClustersPatchFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/models.go
index ba2fd4e4d..614f304d8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/models.go
@@ -288,12 +288,11 @@ type ClusterSku struct {
// ClustersPatchFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersPatchFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersPatchFuture) Result(client ClustersClient) (c Cluster, err error) {
+func (future *ClustersPatchFuture) Result(client ClustersClient) (c Cluster, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -301,34 +300,15 @@ func (future ClustersPatchFuture) Result(client ClustersClient) (c Cluster, err
return
}
if !done {
- return c, azure.NewAsyncOpIncompleteError("eventhub.ClustersPatchFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- c, err = client.PatchResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.ClustersPatchFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("eventhub.ClustersPatchFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.PatchResponder(c.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "eventhub.ClustersPatchFuture", "Result", c.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.ClustersPatchFuture", "Result", resp, "Failure sending request")
- return
- }
- c, err = client.PatchResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "eventhub.ClustersPatchFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go
index 3528aa2a4..3d5122286 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go
@@ -30,11 +30,13 @@ type HanaHardwareTypeNamesEnum string
const (
// CiscoUCS ...
CiscoUCS HanaHardwareTypeNamesEnum = "Cisco_UCS"
+ // HPE ...
+ HPE HanaHardwareTypeNamesEnum = "HPE"
)
// PossibleHanaHardwareTypeNamesEnumValues returns an array of possible values for the HanaHardwareTypeNamesEnum const type.
func PossibleHanaHardwareTypeNamesEnumValues() []HanaHardwareTypeNamesEnum {
- return []HanaHardwareTypeNamesEnum{CiscoUCS}
+ return []HanaHardwareTypeNamesEnum{CiscoUCS, HPE}
}
// HanaInstanceSizeNamesEnum enumerates the values for hana instance size names enum.
@@ -49,15 +51,37 @@ const (
S192 HanaInstanceSizeNamesEnum = "S192"
// S192m ...
S192m HanaInstanceSizeNamesEnum = "S192m"
+ // S192xm ...
+ S192xm HanaInstanceSizeNamesEnum = "S192xm"
+ // S384 ...
+ S384 HanaInstanceSizeNamesEnum = "S384"
+ // S384m ...
+ S384m HanaInstanceSizeNamesEnum = "S384m"
+ // S384xm ...
+ S384xm HanaInstanceSizeNamesEnum = "S384xm"
+ // S384xxm ...
+ S384xxm HanaInstanceSizeNamesEnum = "S384xxm"
+ // S576m ...
+ S576m HanaInstanceSizeNamesEnum = "S576m"
+ // S576xm ...
+ S576xm HanaInstanceSizeNamesEnum = "S576xm"
// S72 ...
S72 HanaInstanceSizeNamesEnum = "S72"
// S72m ...
S72m HanaInstanceSizeNamesEnum = "S72m"
+ // S768 ...
+ S768 HanaInstanceSizeNamesEnum = "S768"
+ // S768m ...
+ S768m HanaInstanceSizeNamesEnum = "S768m"
+ // S768xm ...
+ S768xm HanaInstanceSizeNamesEnum = "S768xm"
+ // S960m ...
+ S960m HanaInstanceSizeNamesEnum = "S960m"
)
// PossibleHanaInstanceSizeNamesEnumValues returns an array of possible values for the HanaInstanceSizeNamesEnum const type.
func PossibleHanaInstanceSizeNamesEnumValues() []HanaInstanceSizeNamesEnum {
- return []HanaInstanceSizeNamesEnum{S144, S144m, S192, S192m, S72, S72m}
+ return []HanaInstanceSizeNamesEnum{S144, S144m, S192, S192m, S192xm, S384, S384m, S384xm, S384xxm, S576m, S576xm, S72, S72m, S768, S768m, S768xm, S960m}
}
// Disk specifies the disk information fo the HANA instance
@@ -320,9 +344,9 @@ func (page HanaInstancesListResultPage) Values() []HanaInstance {
// HardwareProfile specifies the hardware settings for the HANA instance.
type HardwareProfile struct {
- // HardwareType - Name of the hardware type (vendor and/or thrie product name). Possible values include: 'CiscoUCS'
+ // HardwareType - Name of the hardware type (vendor and/or their product name). Possible values include: 'CiscoUCS', 'HPE'
HardwareType HanaHardwareTypeNamesEnum `json:"hardwareType,omitempty"`
- // HanaInstanceSize - Specifies the HANA instance SKU. Possible values include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m'
+ // HanaInstanceSize - Specifies the HANA instance SKU. Possible values include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m', 'S192xm', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m'
HanaInstanceSize HanaInstanceSizeNamesEnum `json:"hanaInstanceSize,omitempty"`
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/applications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/applications.go
index 92c2c4ff8..f70f10841 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/applications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/applications.go
@@ -155,15 +155,17 @@ func (client ApplicationsClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) DeleteSender(req *http.Request) (future ApplicationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/clusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/clusters.go
index e26047296..31a6861f3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/clusters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/clusters.go
@@ -87,15 +87,17 @@ func (client ClustersClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) CreateSender(req *http.Request) (future ClustersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -156,15 +158,17 @@ func (client ClustersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) DeleteSender(req *http.Request) (future ClustersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -233,15 +237,17 @@ func (client ClustersClient) ExecuteScriptActionsPreparer(ctx context.Context, r
// ExecuteScriptActionsSender sends the ExecuteScriptActions request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) ExecuteScriptActionsSender(req *http.Request) (future ClustersExecuteScriptActionsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -555,15 +561,17 @@ func (client ClustersClient) ResizePreparer(ctx context.Context, resourceGroupNa
// ResizeSender sends the Resize request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) ResizeSender(req *http.Request) (future ClustersResizeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/configurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/configurations.go
index 6155de018..3bebc5fed 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/configurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/configurations.go
@@ -156,15 +156,17 @@ func (client ConfigurationsClient) UpdateHTTPSettingsPreparer(ctx context.Contex
// UpdateHTTPSettingsSender sends the UpdateHTTPSettings request. The method will close the
// http.Response Body if it receives an error.
func (client ConfigurationsClient) UpdateHTTPSettingsSender(req *http.Request) (future ConfigurationsUpdateHTTPSettingsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/extension.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/extension.go
index 0c6deed1f..d69f4f48d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/extension.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/extension.go
@@ -220,15 +220,17 @@ func (client ExtensionClient) DisableMonitoringPreparer(ctx context.Context, res
// DisableMonitoringSender sends the DisableMonitoring request. The method will close the
// http.Response Body if it receives an error.
func (client ExtensionClient) DisableMonitoringSender(req *http.Request) (future ExtensionDisableMonitoringFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -291,15 +293,17 @@ func (client ExtensionClient) EnableMonitoringPreparer(ctx context.Context, reso
// EnableMonitoringSender sends the EnableMonitoring request. The method will close the
// http.Response Body if it receives an error.
func (client ExtensionClient) EnableMonitoringSender(req *http.Request) (future ExtensionEnableMonitoringFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go
index 8d3f5fe11..f1f531dce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go
@@ -341,12 +341,11 @@ func (page ApplicationListResultPage) Values() []Application {
// ApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ApplicationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationsDeleteFuture) Result(client ApplicationsClient) (ar autorest.Response, err error) {
+func (future *ApplicationsDeleteFuture) Result(client ApplicationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -354,35 +353,10 @@ func (future ApplicationsDeleteFuture) Result(client ApplicationsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("hdinsight.ApplicationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ApplicationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("hdinsight.ApplicationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ApplicationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ApplicationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -731,12 +705,11 @@ type ClusterResizeParameters struct {
// ClustersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err error) {
+func (future *ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -744,34 +717,15 @@ func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err
return
}
if !done {
- return c, azure.NewAsyncOpIncompleteError("hdinsight.ClustersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- c, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ClustersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("hdinsight.ClustersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.CreateResponder(c.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "hdinsight.ClustersCreateFuture", "Result", c.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ClustersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- c, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ClustersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -779,12 +733,11 @@ func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err
// ClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Response, err error) {
+func (future *ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -792,35 +745,10 @@ func (future ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("hdinsight.ClustersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ClustersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("hdinsight.ClustersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ClustersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ClustersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -828,12 +756,11 @@ func (future ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Re
// operation.
type ClustersExecuteScriptActionsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersExecuteScriptActionsFuture) Result(client ClustersClient) (ar autorest.Response, err error) {
+func (future *ClustersExecuteScriptActionsFuture) Result(client ClustersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -841,47 +768,21 @@ func (future ClustersExecuteScriptActionsFuture) Result(client ClustersClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("hdinsight.ClustersExecuteScriptActionsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ExecuteScriptActionsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ClustersExecuteScriptActionsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("hdinsight.ClustersExecuteScriptActionsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ClustersExecuteScriptActionsFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ExecuteScriptActionsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ClustersExecuteScriptActionsFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ClustersResizeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersResizeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersResizeFuture) Result(client ClustersClient) (ar autorest.Response, err error) {
+func (future *ClustersResizeFuture) Result(client ClustersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -889,35 +790,10 @@ func (future ClustersResizeFuture) Result(client ClustersClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("hdinsight.ClustersResizeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ResizeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ClustersResizeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("hdinsight.ClustersResizeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ClustersResizeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ResizeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ClustersResizeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -931,12 +807,11 @@ type ComputeProfile struct {
// long-running operation.
type ConfigurationsUpdateHTTPSettingsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ConfigurationsUpdateHTTPSettingsFuture) Result(client ConfigurationsClient) (ar autorest.Response, err error) {
+func (future *ConfigurationsUpdateHTTPSettingsFuture) Result(client ConfigurationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -944,35 +819,10 @@ func (future ConfigurationsUpdateHTTPSettingsFuture) Result(client Configuration
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("hdinsight.ConfigurationsUpdateHTTPSettingsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.UpdateHTTPSettingsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ConfigurationsUpdateHTTPSettingsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("hdinsight.ConfigurationsUpdateHTTPSettingsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ConfigurationsUpdateHTTPSettingsFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.UpdateHTTPSettingsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ConfigurationsUpdateHTTPSettingsFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1027,12 +877,11 @@ type Extension struct {
// operation.
type ExtensionDisableMonitoringFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExtensionDisableMonitoringFuture) Result(client ExtensionClient) (ar autorest.Response, err error) {
+func (future *ExtensionDisableMonitoringFuture) Result(client ExtensionClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1040,35 +889,10 @@ func (future ExtensionDisableMonitoringFuture) Result(client ExtensionClient) (a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("hdinsight.ExtensionDisableMonitoringFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DisableMonitoringResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ExtensionDisableMonitoringFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("hdinsight.ExtensionDisableMonitoringFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ExtensionDisableMonitoringFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DisableMonitoringResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ExtensionDisableMonitoringFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1076,12 +900,11 @@ func (future ExtensionDisableMonitoringFuture) Result(client ExtensionClient) (a
// operation.
type ExtensionEnableMonitoringFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExtensionEnableMonitoringFuture) Result(client ExtensionClient) (ar autorest.Response, err error) {
+func (future *ExtensionEnableMonitoringFuture) Result(client ExtensionClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1089,35 +912,10 @@ func (future ExtensionEnableMonitoringFuture) Result(client ExtensionClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("hdinsight.ExtensionEnableMonitoringFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.EnableMonitoringResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ExtensionEnableMonitoringFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("hdinsight.ExtensionEnableMonitoringFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ExtensionEnableMonitoringFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.EnableMonitoringResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "hdinsight.ExtensionEnableMonitoringFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/apps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/apps.go
new file mode 100644
index 000000000..78f96a16d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/apps.go
@@ -0,0 +1,640 @@
+package iotcentral
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// AppsClient is the use this API to manage IoT Central Applications in your Azure subscription.
+type AppsClient struct {
+ BaseClient
+}
+
+// NewAppsClient creates an instance of the AppsClient client.
+func NewAppsClient(subscriptionID uuid.UUID) AppsClient {
+ return NewAppsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewAppsClientWithBaseURI creates an instance of the AppsClient client.
+func NewAppsClientWithBaseURI(baseURI string, subscriptionID uuid.UUID) AppsClient {
+ return AppsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CheckNameAvailability check if an IoT Central application name is available.
+// Parameters:
+// operationInputs - set the name parameter in the OperationInputs structure to the name of the IoT Central
+// application to check.
+func (client AppsClient) CheckNameAvailability(ctx context.Context, operationInputs OperationInputs) (result AppNameAvailabilityInfo, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: operationInputs,
+ Constraints: []validation.Constraint{{Target: "operationInputs.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("iotcentral.AppsClient", "CheckNameAvailability", err.Error())
+ }
+
+ req, err := client.CheckNameAvailabilityPreparer(ctx, operationInputs)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "CheckNameAvailability", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckNameAvailabilitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "CheckNameAvailability", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckNameAvailabilityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "CheckNameAvailability", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request.
+func (client AppsClient) CheckNameAvailabilityPreparer(ctx context.Context, operationInputs OperationInputs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-01-privatepreview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkNameAvailability", pathParameters),
+ autorest.WithJSON(operationInputs),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always
+// closes the http.Response Body.
+func (client AppsClient) CheckNameAvailabilityResponder(resp *http.Response) (result AppNameAvailabilityInfo, 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 create or update the metadata of an IoT Central application. The usual pattern to modify a property
+// is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified
+// values in a new body to update the IoT Central application.
+// Parameters:
+// resourceGroupName - the name of the resource group that contains the IoT Central application.
+// resourceName - the ARM resource name of the IoT Central application.
+// app - the IoT Central application metadata and security metadata.
+func (client AppsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, app App) (result AppsCreateOrUpdateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 100, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: app,
+ Constraints: []validation.Constraint{{Target: "app.AppProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "app.AppProperties.DisplayName", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "app.AppProperties.DisplayName", Name: validation.Pattern, Rule: `^.{1,200}$`, Chain: nil}}},
+ {Target: "app.AppProperties.Subdomain", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "app.AppProperties.Subdomain", Name: validation.Pattern, Rule: `^[a-z0-9-]{1,63}$`, Chain: nil}}},
+ }},
+ {Target: "app.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("iotcentral.AppsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, app)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client AppsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, app App) (*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 = "2017-07-01-privatepreview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps/{resourceName}", pathParameters),
+ autorest.WithJSON(app),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) CreateOrUpdateSender(req *http.Request) (future AppsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client AppsClient) CreateOrUpdateResponder(resp *http.Response) (result App, 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 delete an IoT Central application.
+// Parameters:
+// resourceGroupName - the name of the resource group that contains the IoT Central application.
+// resourceName - the ARM resource name of the IoT Central application.
+func (client AppsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result AppsDeleteFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 100, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("iotcentral.AppsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client AppsClient) DeletePreparer(ctx context.Context, 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 = "2017-07-01-privatepreview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) DeleteSender(req *http.Request) (future AppsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client AppsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get get the metadata of an IoT Central application.
+// Parameters:
+// resourceGroupName - the name of the resource group that contains the IoT Central application.
+// resourceName - the ARM resource name of the IoT Central application.
+func (client AppsClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result App, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 100, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("iotcentral.AppsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client AppsClient) GetPreparer(ctx context.Context, 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 = "2017-07-01-privatepreview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client AppsClient) GetResponder(resp *http.Response) (result App, 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 all the IoT Central Applications in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group that contains the IoT Central application.
+func (client AppsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AppListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("iotcentral.AppsClient", "ListByResourceGroup", err.Error())
+ }
+
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.alr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.alr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client AppsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-01-privatepreview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client AppsClient) ListByResourceGroupResponder(resp *http.Response) (result AppListResult, 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 AppsClient) listByResourceGroupNextResults(lastResults AppListResult) (result AppListResult, err error) {
+ req, err := lastResults.appListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "iotcentral.AppsClient", "listByResourceGroupNextResults", 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, "iotcentral.AppsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AppsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result AppListResultIterator, err error) {
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListBySubscription get all IoT Central Applications in a subscription.
+func (client AppsClient) ListBySubscription(ctx context.Context) (result AppListResultPage, err error) {
+ result.fn = client.listBySubscriptionNextResults
+ req, err := client.ListBySubscriptionPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.alr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result.alr, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "ListBySubscription", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client AppsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-01-privatepreview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/IoTApps", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client AppsClient) ListBySubscriptionResponder(resp *http.Response) (result AppListResult, 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 AppsClient) listBySubscriptionNextResults(lastResults AppListResult) (result AppListResult, err error) {
+ req, err := lastResults.appListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "iotcentral.AppsClient", "listBySubscriptionNextResults", 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, "iotcentral.AppsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AppsClient) ListBySubscriptionComplete(ctx context.Context) (result AppListResultIterator, err error) {
+ result.page, err = client.ListBySubscription(ctx)
+ return
+}
+
+// Update update the metadata of an IoT Central application.
+// Parameters:
+// resourceGroupName - the name of the resource group that contains the IoT Central application.
+// resourceName - the ARM resource name of the IoT Central application.
+// appPatch - the IoT Central application metadata and security metadata.
+func (client AppsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, appPatch AppPatch) (result AppsUpdateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 100, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("iotcentral.AppsClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, appPatch)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client AppsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, appPatch AppPatch) (*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 = "2017-07-01-privatepreview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps/{resourceName}", pathParameters),
+ autorest.WithJSON(appPatch),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) UpdateSender(req *http.Request) (future AppsUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client AppsClient) UpdateResponder(resp *http.Response) (result App, 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/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/client.go
new file mode 100644
index 000000000..3cf1b26f3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/client.go
@@ -0,0 +1,52 @@
+// Package iotcentral implements the Azure ARM Iotcentral service API version 2017-07-01-privatepreview.
+//
+// Use this API to manage IoT Central Applications in your Azure subscription.
+package iotcentral
+
+// 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/satori/go.uuid"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Iotcentral
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Iotcentral.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID uuid.UUID
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID uuid.UUID) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID uuid.UUID) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/models.go
new file mode 100644
index 000000000..d7c15bb53
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/models.go
@@ -0,0 +1,616 @@
+package iotcentral
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/to"
+ "net/http"
+)
+
+// AppNameUnavailabilityReason enumerates the values for app name unavailability reason.
+type AppNameUnavailabilityReason string
+
+const (
+ // AlreadyExists ...
+ AlreadyExists AppNameUnavailabilityReason = "AlreadyExists"
+ // Invalid ...
+ Invalid AppNameUnavailabilityReason = "Invalid"
+)
+
+// PossibleAppNameUnavailabilityReasonValues returns an array of possible values for the AppNameUnavailabilityReason const type.
+func PossibleAppNameUnavailabilityReasonValues() []AppNameUnavailabilityReason {
+ return []AppNameUnavailabilityReason{AlreadyExists, Invalid}
+}
+
+// AppSku enumerates the values for app sku.
+type AppSku string
+
+const (
+ // F1 ...
+ F1 AppSku = "F1"
+ // S1 ...
+ S1 AppSku = "S1"
+)
+
+// PossibleAppSkuValues returns an array of possible values for the AppSku const type.
+func PossibleAppSkuValues() []AppSku {
+ return []AppSku{F1, S1}
+}
+
+// App the IoT Central application.
+type App struct {
+ autorest.Response `json:"-"`
+ // AppProperties - The common properties of an IoT Central application.
+ *AppProperties `json:"properties,omitempty"`
+ // Sku - A valid instance SKU.
+ Sku *AppSkuInfo `json:"sku,omitempty"`
+ // ID - The ARM resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - The ARM resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - The resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - The resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - The resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for App.
+func (a App) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if a.AppProperties != nil {
+ objectMap["properties"] = a.AppProperties
+ }
+ if a.Sku != nil {
+ objectMap["sku"] = a.Sku
+ }
+ if a.ID != nil {
+ objectMap["id"] = a.ID
+ }
+ if a.Name != nil {
+ objectMap["name"] = a.Name
+ }
+ if a.Type != nil {
+ objectMap["type"] = a.Type
+ }
+ if a.Location != nil {
+ objectMap["location"] = a.Location
+ }
+ if a.Tags != nil {
+ objectMap["tags"] = a.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for App struct.
+func (a *App) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var appProperties AppProperties
+ err = json.Unmarshal(*v, &appProperties)
+ if err != nil {
+ return err
+ }
+ a.AppProperties = &appProperties
+ }
+ case "sku":
+ if v != nil {
+ var sku AppSkuInfo
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ a.Sku = &sku
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ a.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ a.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ a.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ a.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ a.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// AppListResult a list of IoT Central Applications with a next link.
+type AppListResult struct {
+ autorest.Response `json:"-"`
+ // NextLink - The link used to get the next page of IoT Central Applications.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Value - A list of IoT Central Applications.
+ Value *[]App `json:"value,omitempty"`
+}
+
+// AppListResultIterator provides access to a complete listing of App values.
+type AppListResultIterator struct {
+ i int
+ page AppListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *AppListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter AppListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter AppListResultIterator) Response() AppListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter AppListResultIterator) Value() App {
+ if !iter.page.NotDone() {
+ return App{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (alr AppListResult) IsEmpty() bool {
+ return alr.Value == nil || len(*alr.Value) == 0
+}
+
+// appListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (alr AppListResult) appListResultPreparer() (*http.Request, error) {
+ if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(alr.NextLink)))
+}
+
+// AppListResultPage contains a page of App values.
+type AppListResultPage struct {
+ fn func(AppListResult) (AppListResult, error)
+ alr AppListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *AppListResultPage) Next() error {
+ next, err := page.fn(page.alr)
+ if err != nil {
+ return err
+ }
+ page.alr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page AppListResultPage) NotDone() bool {
+ return !page.alr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page AppListResultPage) Response() AppListResult {
+ return page.alr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page AppListResultPage) Values() []App {
+ if page.alr.IsEmpty() {
+ return nil
+ }
+ return *page.alr.Value
+}
+
+// AppNameAvailabilityInfo the properties indicating whether a given IoT Central application name is available.
+type AppNameAvailabilityInfo struct {
+ autorest.Response `json:"-"`
+ // NameAvailable - The value which indicates whether the provided name is available.
+ NameAvailable *bool `json:"nameAvailable,omitempty"`
+ // Reason - The reason for unavailability. Possible values include: 'Invalid', 'AlreadyExists'
+ Reason AppNameUnavailabilityReason `json:"reason,omitempty"`
+ // Message - The detailed reason message.
+ Message *string `json:"message,omitempty"`
+}
+
+// AppPatch the description of the IoT Central application.
+type AppPatch struct {
+ // Tags - Instance tags
+ Tags map[string]*string `json:"tags"`
+ // AppProperties - The common properties of an IoT Central application.
+ *AppProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AppPatch.
+func (ap AppPatch) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ap.Tags != nil {
+ objectMap["tags"] = ap.Tags
+ }
+ if ap.AppProperties != nil {
+ objectMap["properties"] = ap.AppProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AppPatch struct.
+func (ap *AppPatch) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ap.Tags = tags
+ }
+ case "properties":
+ if v != nil {
+ var appProperties AppProperties
+ err = json.Unmarshal(*v, &appProperties)
+ if err != nil {
+ return err
+ }
+ ap.AppProperties = &appProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// AppProperties the properties of an IoT Central application.
+type AppProperties struct {
+ // ApplicationID - The ID of the application.
+ ApplicationID *string `json:"applicationId,omitempty"`
+ // DisplayName - The display name of the application.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Subdomain - The subdomain of the application.
+ Subdomain *string `json:"subdomain,omitempty"`
+ // Template - The ID of the application template, which is a blueprint that defines the characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch.
+ Template *string `json:"template,omitempty"`
+}
+
+// AppsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type AppsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *AppsCreateOrUpdateFuture) Result(client AppsClient) (a App, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("iotcentral.AppsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateOrUpdateResponder(a.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsCreateOrUpdateFuture", "Result", a.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// AppsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type AppsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *AppsDeleteFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("iotcentral.AppsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// AppSkuInfo information about the SKU of the IoT Central application.
+type AppSkuInfo struct {
+ // Name - The name of the SKU. Possible values include: 'F1', 'S1'
+ Name AppSku `json:"name,omitempty"`
+}
+
+// AppsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type AppsUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *AppsUpdateFuture) Result(client AppsClient) (a App, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("iotcentral.AppsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.UpdateResponder(a.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.AppsUpdateFuture", "Result", a.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ErrorDetails error details.
+type ErrorDetails struct {
+ // Code - The error code.
+ Code *string `json:"code,omitempty"`
+ // Message - The error message.
+ Message *string `json:"message,omitempty"`
+ // Target - The target of the particular error.
+ Target *string `json:"target,omitempty"`
+}
+
+// Operation ioT Central REST API operation
+type Operation struct {
+ // Name - Operation name: {provider}/{resource}/{read | write | action | delete}
+ Name *string `json:"name,omitempty"`
+ // Display - The object that represents the operation.
+ Display *OperationDisplay `json:"display,omitempty"`
+}
+
+// OperationDisplay the object that represents the operation.
+type OperationDisplay struct {
+ // Provider - Service provider: Microsoft IoT Central
+ Provider *string `json:"provider,omitempty"`
+ // Resource - Resource Type: IoT Central
+ Resource *string `json:"resource,omitempty"`
+ // Operation - Name of the operation
+ Operation *string `json:"operation,omitempty"`
+ // Description - Friendly description for the operation,
+ Description *string `json:"description,omitempty"`
+}
+
+// OperationInputs input values.
+type OperationInputs struct {
+ // Name - The name of the IoT Central application instance to check.
+ Name *string `json:"name,omitempty"`
+}
+
+// OperationListResult a list of IoT Central operations. It contains a list of operations and a URL link to get the
+// next set of results.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // NextLink - The link used to get the next page of IoT Central description objects.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Value - A list of operations supported by the Microsoft.IoTCentral resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+}
+
+// OperationListResultIterator provides access to a complete listing of Operation values.
+type OperationListResultIterator struct {
+ i int
+ page OperationListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OperationListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OperationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OperationListResultIterator) Response() OperationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OperationListResultIterator) Value() Operation {
+ if !iter.page.NotDone() {
+ return Operation{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (olr OperationListResult) IsEmpty() bool {
+ return olr.Value == nil || len(*olr.Value) == 0
+}
+
+// operationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+ if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(olr.NextLink)))
+}
+
+// OperationListResultPage contains a page of Operation values.
+type OperationListResultPage struct {
+ fn func(OperationListResult) (OperationListResult, error)
+ olr OperationListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OperationListResultPage) Next() error {
+ next, err := page.fn(page.olr)
+ if err != nil {
+ return err
+ }
+ page.olr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OperationListResultPage) NotDone() bool {
+ return !page.olr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OperationListResultPage) Response() OperationListResult {
+ return page.olr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OperationListResultPage) Values() []Operation {
+ if page.olr.IsEmpty() {
+ return nil
+ }
+ return *page.olr.Value
+}
+
+// Resource the common properties of an ARM resource.
+type Resource struct {
+ // ID - The ARM resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - The ARM resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - The resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - The resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - The resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.ID != nil {
+ objectMap["id"] = r.ID
+ }
+ if r.Name != nil {
+ objectMap["name"] = r.Name
+ }
+ if r.Type != nil {
+ objectMap["type"] = r.Type
+ }
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ return json.Marshal(objectMap)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/operations.go
new file mode 100644
index 000000000..4bc28470d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/operations.go
@@ -0,0 +1,127 @@
+package iotcentral
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// OperationsClient is the use this API to manage IoT Central Applications in your Azure subscription.
+type OperationsClient struct {
+ BaseClient
+}
+
+// NewOperationsClient creates an instance of the OperationsClient client.
+func NewOperationsClient(subscriptionID uuid.UUID) OperationsClient {
+ return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID uuid.UUID) OperationsClient {
+ return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List lists all of the available IoT Central application REST API operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.olr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "iotcentral.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.olr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2017-07-01-privatepreview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.IoTCentral/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// 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, "iotcentral.OperationsClient", "listNextResults", 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, "iotcentral.OperationsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "iotcentral.OperationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/version.go
new file mode 100644
index 000000000..872ab9454
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotcentral/mgmt/2017-07-01-privatepreview/iotcentral/version.go
@@ -0,0 +1,30 @@
+package iotcentral
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " iotcentral/2017-07-01-privatepreview"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/iotspaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/iotspaces.go
index 408a67e5f..c151bf9da 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/iotspaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/iotspaces.go
@@ -175,15 +175,17 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupNa
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -254,15 +256,17 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -603,15 +607,17 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/models.go
index eee784bdd..4deaecfd0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/models.go
@@ -83,12 +83,11 @@ func PossibleSkuValues() []Sku {
// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateOrUpdateFuture) Result(client Client) (d Description, err error) {
+func (future *CreateOrUpdateFuture) Result(client Client) (d Description, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -96,34 +95,15 @@ func (future CreateOrUpdateFuture) Result(client Client) (d Description, err err
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("iotspaces.CreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "iotspaces.CreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("iotspaces.CreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "iotspaces.CreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "iotspaces.CreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "iotspaces.CreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -131,12 +111,11 @@ func (future CreateOrUpdateFuture) Result(client Client) (d Description, err err
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteFuture) Result(client Client) (d Description, err error) {
+func (future *DeleteFuture) Result(client Client) (d Description, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -144,34 +123,15 @@ func (future DeleteFuture) Result(client Client) (d Description, err error) {
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("iotspaces.DeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "iotspaces.DeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("iotspaces.DeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.DeleteResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "iotspaces.DeleteFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "iotspaces.DeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "iotspaces.DeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -561,12 +521,11 @@ type StorageContainerProperties struct {
// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateFuture) Result(client Client) (d Description, err error) {
+func (future *UpdateFuture) Result(client Client) (d Description, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -574,34 +533,15 @@ func (future UpdateFuture) Result(client Client) (d Description, err error) {
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("iotspaces.UpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "iotspaces.UpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("iotspaces.UpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.UpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "iotspaces.UpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "iotspaces.UpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "iotspaces.UpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/logic/mgmt/2015-02-01-preview/logic/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/logic/mgmt/2015-02-01-preview/logic/models.go
index a59c6598c..ef43a03b5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/logic/mgmt/2015-02-01-preview/logic/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/logic/mgmt/2015-02-01-preview/logic/models.go
@@ -1293,12 +1293,11 @@ type WorkflowSecretKeys struct {
// WorkflowsRunFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type WorkflowsRunFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WorkflowsRunFuture) Result(client WorkflowsClient) (wr WorkflowRun, err error) {
+func (future *WorkflowsRunFuture) Result(client WorkflowsClient) (wr WorkflowRun, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1306,34 +1305,15 @@ func (future WorkflowsRunFuture) Result(client WorkflowsClient) (wr WorkflowRun,
return
}
if !done {
- return wr, azure.NewAsyncOpIncompleteError("logic.WorkflowsRunFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- wr, err = client.RunResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "logic.WorkflowsRunFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("logic.WorkflowsRunFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if wr.Response.Response, err = future.GetResult(sender); err == nil && wr.Response.Response.StatusCode != http.StatusNoContent {
+ wr, err = client.RunResponder(wr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "logic.WorkflowsRunFuture", "Result", wr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "logic.WorkflowsRunFuture", "Result", resp, "Failure sending request")
- return
- }
- wr, err = client.RunResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "logic.WorkflowsRunFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/logic/mgmt/2015-02-01-preview/logic/workflows.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/logic/mgmt/2015-02-01-preview/logic/workflows.go
index 309939177..338a7ec89 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/logic/mgmt/2015-02-01-preview/logic/workflows.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/logic/mgmt/2015-02-01-preview/logic/workflows.go
@@ -621,15 +621,17 @@ func (client WorkflowsClient) RunPreparer(ctx context.Context, resourceGroupName
// RunSender sends the Run request. The method will close the
// http.Response Body if it receives an error.
func (client WorkflowsClient) RunSender(req *http.Request) (future WorkflowsRunFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/models.go
index 67ee59553..4a711a70c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/models.go
@@ -299,12 +299,11 @@ type CommitmentPlan struct {
// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateOrUpdateFuture) Result(client Client) (ws WebService, err error) {
+func (future *CreateOrUpdateFuture) Result(client Client) (ws WebService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -312,34 +311,15 @@ func (future CreateOrUpdateFuture) Result(client Client) (ws WebService, err err
return
}
if !done {
- return ws, azure.NewAsyncOpIncompleteError("webservices.CreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ws, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.CreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("webservices.CreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ws.Response.Response, err = future.GetResult(sender); err == nil && ws.Response.Response.StatusCode != http.StatusNoContent {
+ ws, err = client.CreateOrUpdateResponder(ws.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "webservices.CreateOrUpdateFuture", "Result", ws.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.CreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ws, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.CreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -624,12 +604,11 @@ func (page PaginatedWebServicesListPage) Values() []WebService {
// PatchFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type PatchFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PatchFuture) Result(client Client) (ws WebService, err error) {
+func (future *PatchFuture) Result(client Client) (ws WebService, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -637,34 +616,15 @@ func (future PatchFuture) Result(client Client) (ws WebService, err error) {
return
}
if !done {
- return ws, azure.NewAsyncOpIncompleteError("webservices.PatchFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ws, err = client.PatchResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.PatchFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("webservices.PatchFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ws.Response.Response, err = future.GetResult(sender); err == nil && ws.Response.Response.StatusCode != http.StatusNoContent {
+ ws, err = client.PatchResponder(ws.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "webservices.PatchFuture", "Result", ws.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.PatchFuture", "Result", resp, "Failure sending request")
- return
- }
- ws, err = client.PatchResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.PatchFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -978,12 +938,11 @@ type RealtimeConfiguration struct {
// RemoveFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RemoveFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RemoveFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *RemoveFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -991,35 +950,10 @@ func (future RemoveFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("webservices.RemoveFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RemoveResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.RemoveFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("webservices.RemoveFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.RemoveFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RemoveResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "webservices.RemoveFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservices.go
index 63eeb6b8b..f526d2fc2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservices.go
@@ -117,15 +117,17 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupNa
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -517,15 +519,17 @@ func (client Client) PatchPreparer(ctx context.Context, resourceGroupName string
// PatchSender sends the Patch request. The method will close the
// http.Response Body if it receives an error.
func (client Client) PatchSender(req *http.Request) (future PatchFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -586,15 +590,17 @@ func (client Client) RemovePreparer(ctx context.Context, resourceGroupName strin
// RemoveSender sends the Remove request. The method will close the
// http.Response Body if it receives an error.
func (client Client) RemoveSender(req *http.Request) (future RemoveFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/models.go
index 65a92291e..774a379c4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/models.go
@@ -546,12 +546,11 @@ type OperationalizationClusterProperties struct {
// long-running operation.
type OperationalizationClustersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future OperationalizationClustersCreateOrUpdateFuture) Result(client OperationalizationClustersClient) (oc OperationalizationCluster, err error) {
+func (future *OperationalizationClustersCreateOrUpdateFuture) Result(client OperationalizationClustersClient) (oc OperationalizationCluster, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -559,34 +558,15 @@ func (future OperationalizationClustersCreateOrUpdateFuture) Result(client Opera
return
}
if !done {
- return oc, azure.NewAsyncOpIncompleteError("compute.OperationalizationClustersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- oc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.OperationalizationClustersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.OperationalizationClustersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if oc.Response.Response, err = future.GetResult(sender); err == nil && oc.Response.Response.StatusCode != http.StatusNoContent {
+ oc, err = client.CreateOrUpdateResponder(oc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.OperationalizationClustersCreateOrUpdateFuture", "Result", oc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.OperationalizationClustersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- oc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.OperationalizationClustersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -595,12 +575,11 @@ func (future OperationalizationClustersCreateOrUpdateFuture) Result(client Opera
// long-running operation.
type OperationalizationClustersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future OperationalizationClustersDeleteFuture) Result(client OperationalizationClustersClient) (ar autorest.Response, err error) {
+func (future *OperationalizationClustersDeleteFuture) Result(client OperationalizationClustersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -608,35 +587,10 @@ func (future OperationalizationClustersDeleteFuture) Result(client Operationaliz
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("compute.OperationalizationClustersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.OperationalizationClustersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.OperationalizationClustersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.OperationalizationClustersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.OperationalizationClustersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -644,12 +598,11 @@ func (future OperationalizationClustersDeleteFuture) Result(client Operationaliz
// a long-running operation.
type OperationalizationClustersUpdateSystemServicesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future OperationalizationClustersUpdateSystemServicesFuture) Result(client OperationalizationClustersClient) (ussr UpdateSystemServicesResponse, err error) {
+func (future *OperationalizationClustersUpdateSystemServicesFuture) Result(client OperationalizationClustersClient) (ussr UpdateSystemServicesResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -657,34 +610,15 @@ func (future OperationalizationClustersUpdateSystemServicesFuture) Result(client
return
}
if !done {
- return ussr, azure.NewAsyncOpIncompleteError("compute.OperationalizationClustersUpdateSystemServicesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ussr, err = client.UpdateSystemServicesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.OperationalizationClustersUpdateSystemServicesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("compute.OperationalizationClustersUpdateSystemServicesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ussr.Response.Response, err = future.GetResult(sender); err == nil && ussr.Response.Response.StatusCode != http.StatusNoContent {
+ ussr, err = client.UpdateSystemServicesResponder(ussr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "compute.OperationalizationClustersUpdateSystemServicesFuture", "Result", ussr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.OperationalizationClustersUpdateSystemServicesFuture", "Result", resp, "Failure sending request")
- return
- }
- ussr, err = client.UpdateSystemServicesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.OperationalizationClustersUpdateSystemServicesFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/operationalizationclusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/operationalizationclusters.go
index 578a39ab4..0c2c2a1f1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/operationalizationclusters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/operationalizationclusters.go
@@ -213,15 +213,17 @@ func (client OperationalizationClustersClient) CreateOrUpdatePreparer(ctx contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client OperationalizationClustersClient) CreateOrUpdateSender(req *http.Request) (future OperationalizationClustersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -298,15 +300,17 @@ func (client OperationalizationClustersClient) DeletePreparer(ctx context.Contex
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client OperationalizationClustersClient) DeleteSender(req *http.Request) (future OperationalizationClustersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -821,15 +825,17 @@ func (client OperationalizationClustersClient) UpdateSystemServicesPreparer(ctx
// UpdateSystemServicesSender sends the UpdateSystemServices request. The method will close the
// http.Response Body if it receives an error.
func (client OperationalizationClustersClient) UpdateSystemServicesSender(req *http.Request) (future OperationalizationClustersUpdateSystemServicesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/client.go
new file mode 100644
index 000000000..72d151cc8
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/client.go
@@ -0,0 +1,51 @@
+// Package services implements the Azure ARM Services service API version 2018-03-01-preview.
+//
+// These APIs allow end users to operate on Azure Machine Learning Workspace resources.
+package services
+
+// 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 Services
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Services.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/machinelearningcompute.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/machinelearningcompute.go
new file mode 100644
index 000000000..d33777689
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/machinelearningcompute.go
@@ -0,0 +1,428 @@
+package services
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// MachineLearningComputeClient is the these APIs allow end users to operate on Azure Machine Learning Workspace
+// resources.
+type MachineLearningComputeClient struct {
+ BaseClient
+}
+
+// NewMachineLearningComputeClient creates an instance of the MachineLearningComputeClient client.
+func NewMachineLearningComputeClient(subscriptionID string) MachineLearningComputeClient {
+ return NewMachineLearningComputeClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client.
+func NewMachineLearningComputeClientWithBaseURI(baseURI string, subscriptionID string) MachineLearningComputeClient {
+ return MachineLearningComputeClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable
+// operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// computeName - name of the Azure Machine Learning compute.
+// parameters - payload with Machine Learning compute definition.
+func (client MachineLearningComputeClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ComputeResource) (result MachineLearningComputeCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, computeName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client MachineLearningComputeClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ComputeResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "computeName": autorest.Encode("path", computeName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client MachineLearningComputeClient) CreateOrUpdateSender(req *http.Request) (future MachineLearningComputeCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client MachineLearningComputeClient) CreateOrUpdateResponder(resp *http.Response) (result ComputeResource, 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 specified Machine Learning compute.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// computeName - name of the Azure Machine Learning compute.
+func (client MachineLearningComputeClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result MachineLearningComputeDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, computeName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client MachineLearningComputeClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "computeName": autorest.Encode("path", computeName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client MachineLearningComputeClient) DeleteSender(req *http.Request) (future MachineLearningComputeDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client MachineLearningComputeClient) 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 compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use
+// 'keys' nested resource to get them.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// computeName - name of the Azure Machine Learning compute.
+func (client MachineLearningComputeClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result ComputeResource, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, computeName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client MachineLearningComputeClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "computeName": autorest.Encode("path", computeName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client MachineLearningComputeClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client MachineLearningComputeClient) GetResponder(resp *http.Response) (result ComputeResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetKeys gets secrets related to Machine Learning compute (storage keys, service credentials, etc).
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// computeName - name of the Azure Machine Learning compute.
+func (client MachineLearningComputeClient) GetKeys(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result ComputeSecretsModel, err error) {
+ req, err := client.GetKeysPreparer(ctx, resourceGroupName, workspaceName, computeName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "GetKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetKeysSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "GetKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "GetKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetKeysPreparer prepares the GetKeys request.
+func (client MachineLearningComputeClient) GetKeysPreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "computeName": autorest.Encode("path", computeName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workspaceName": autorest.Encode("path", workspaceName),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetKeysSender sends the GetKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client MachineLearningComputeClient) GetKeysSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetKeysResponder handles the response to the GetKeys request. The method always
+// closes the http.Response Body.
+func (client MachineLearningComputeClient) GetKeysResponder(resp *http.Response) (result ComputeSecretsModel, 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 computes in specified workspace.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// skiptoken - continuation token for pagination.
+func (client MachineLearningComputeClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result PaginatedComputeResourcesListPage, err error) {
+ result.fn = client.listByWorkspaceNextResults
+ req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "ListByWorkspace", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByWorkspaceSender(req)
+ if err != nil {
+ result.pcrl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "ListByWorkspace", resp, "Failure sending request")
+ return
+ }
+
+ result.pcrl, err = client.ListByWorkspaceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "ListByWorkspace", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByWorkspacePreparer prepares the ListByWorkspace request.
+func (client MachineLearningComputeClient) ListByWorkspacePreparer(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken 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 = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the
+// http.Response Body if it receives an error.
+func (client MachineLearningComputeClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always
+// closes the http.Response Body.
+func (client MachineLearningComputeClient) ListByWorkspaceResponder(resp *http.Response) (result PaginatedComputeResourcesList, 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 MachineLearningComputeClient) listByWorkspaceNextResults(lastResults PaginatedComputeResourcesList) (result PaginatedComputeResourcesList, err error) {
+ req, err := lastResults.paginatedComputeResourcesListPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "listByWorkspaceNextResults", 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, "services.MachineLearningComputeClient", "listByWorkspaceNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByWorkspaceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required.
+func (client MachineLearningComputeClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result PaginatedComputeResourcesListIterator, err error) {
+ result.page, err = client.ListByWorkspace(ctx, resourceGroupName, workspaceName, skiptoken)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/models.go
new file mode 100644
index 000000000..abd1e2964
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/models.go
@@ -0,0 +1,1577 @@
+package services
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "net/http"
+)
+
+// ComputeType enumerates the values for compute type.
+type ComputeType string
+
+const (
+ // ComputeTypeAKS ...
+ ComputeTypeAKS ComputeType = "AKS"
+ // ComputeTypeBatchAI ...
+ ComputeTypeBatchAI ComputeType = "BatchAI"
+ // ComputeTypeDataFactory ...
+ ComputeTypeDataFactory ComputeType = "DataFactory"
+ // ComputeTypeVirtualMachine ...
+ ComputeTypeVirtualMachine ComputeType = "VirtualMachine"
+)
+
+// PossibleComputeTypeValues returns an array of possible values for the ComputeType const type.
+func PossibleComputeTypeValues() []ComputeType {
+ return []ComputeType{ComputeTypeAKS, ComputeTypeBatchAI, ComputeTypeDataFactory, ComputeTypeVirtualMachine}
+}
+
+// ComputeTypeBasicCompute enumerates the values for compute type basic compute.
+type ComputeTypeBasicCompute string
+
+const (
+ // ComputeTypeAKS1 ...
+ ComputeTypeAKS1 ComputeTypeBasicCompute = "AKS"
+ // ComputeTypeBatchAI1 ...
+ ComputeTypeBatchAI1 ComputeTypeBasicCompute = "BatchAI"
+ // ComputeTypeCompute ...
+ ComputeTypeCompute ComputeTypeBasicCompute = "Compute"
+ // ComputeTypeDataFactory1 ...
+ ComputeTypeDataFactory1 ComputeTypeBasicCompute = "DataFactory"
+ // ComputeTypeVirtualMachine1 ...
+ ComputeTypeVirtualMachine1 ComputeTypeBasicCompute = "VirtualMachine"
+)
+
+// PossibleComputeTypeBasicComputeValues returns an array of possible values for the ComputeTypeBasicCompute const type.
+func PossibleComputeTypeBasicComputeValues() []ComputeTypeBasicCompute {
+ return []ComputeTypeBasicCompute{ComputeTypeAKS1, ComputeTypeBatchAI1, ComputeTypeCompute, ComputeTypeDataFactory1, ComputeTypeVirtualMachine1}
+}
+
+// ComputeTypeBasicComputeSecrets enumerates the values for compute type basic compute secrets.
+type ComputeTypeBasicComputeSecrets string
+
+const (
+ // ComputeTypeBasicComputeSecretsComputeTypeAKS ...
+ ComputeTypeBasicComputeSecretsComputeTypeAKS ComputeTypeBasicComputeSecrets = "AKS"
+ // ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets ...
+ ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets ComputeTypeBasicComputeSecrets = "ComputeSecrets"
+ // ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine ...
+ ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine ComputeTypeBasicComputeSecrets = "VirtualMachine"
+)
+
+// PossibleComputeTypeBasicComputeSecretsValues returns an array of possible values for the ComputeTypeBasicComputeSecrets const type.
+func PossibleComputeTypeBasicComputeSecretsValues() []ComputeTypeBasicComputeSecrets {
+ return []ComputeTypeBasicComputeSecrets{ComputeTypeBasicComputeSecretsComputeTypeAKS, ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets, ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine}
+}
+
+// ProvisioningState enumerates the values for provisioning state.
+type ProvisioningState string
+
+const (
+ // Canceled ...
+ Canceled ProvisioningState = "Canceled"
+ // Creating ...
+ Creating ProvisioningState = "Creating"
+ // Deleting ...
+ Deleting ProvisioningState = "Deleting"
+ // Failed ...
+ Failed ProvisioningState = "Failed"
+ // Succeeded ...
+ Succeeded ProvisioningState = "Succeeded"
+ // Unknown ...
+ Unknown ProvisioningState = "Unknown"
+ // Updating ...
+ Updating ProvisioningState = "Updating"
+)
+
+// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
+func PossibleProvisioningStateValues() []ProvisioningState {
+ return []ProvisioningState{Canceled, Creating, Deleting, Failed, Succeeded, Unknown, Updating}
+}
+
+// ResourceIdentityType enumerates the values for resource identity type.
+type ResourceIdentityType string
+
+const (
+ // SystemAssigned ...
+ SystemAssigned ResourceIdentityType = "SystemAssigned"
+)
+
+// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type.
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return []ResourceIdentityType{SystemAssigned}
+}
+
+// Status enumerates the values for status.
+type Status string
+
+const (
+ // Disabled ...
+ Disabled Status = "Disabled"
+ // Enabled ...
+ Enabled Status = "Enabled"
+)
+
+// PossibleStatusValues returns an array of possible values for the Status const type.
+func PossibleStatusValues() []Status {
+ return []Status{Disabled, Enabled}
+}
+
+// AKS a Machine Learning compute based on AKS.
+type AKS struct {
+ // Properties - AKS properties
+ Properties *AKSProperties `json:"properties,omitempty"`
+ // ProvisioningState - The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Description - The description of the Machine Learning compute.
+ Description *string `json:"description,omitempty"`
+ // CreatedOn - The date and time when the compute was created.
+ CreatedOn *date.Time `json:"createdOn,omitempty"`
+ // ModifiedOn - The date and time when the compute was last modified.
+ ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
+ // ResourceID - ARM resource id of the compute
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ProvisioningErrors - Errors during provisioning
+ ProvisioningErrors *[]MachineLearningServiceError `json:"provisioningErrors,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeBatchAI1', 'ComputeTypeVirtualMachine1', 'ComputeTypeDataFactory1'
+ ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AKS.
+func (a AKS) MarshalJSON() ([]byte, error) {
+ a.ComputeType = ComputeTypeAKS1
+ objectMap := make(map[string]interface{})
+ if a.Properties != nil {
+ objectMap["properties"] = a.Properties
+ }
+ if a.ProvisioningState != "" {
+ objectMap["provisioningState"] = a.ProvisioningState
+ }
+ if a.Description != nil {
+ objectMap["description"] = a.Description
+ }
+ if a.CreatedOn != nil {
+ objectMap["createdOn"] = a.CreatedOn
+ }
+ if a.ModifiedOn != nil {
+ objectMap["modifiedOn"] = a.ModifiedOn
+ }
+ if a.ResourceID != nil {
+ objectMap["resourceId"] = a.ResourceID
+ }
+ if a.ProvisioningErrors != nil {
+ objectMap["provisioningErrors"] = a.ProvisioningErrors
+ }
+ if a.ComputeType != "" {
+ objectMap["computeType"] = a.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAKS is the BasicCompute implementation for AKS.
+func (a AKS) AsAKS() (*AKS, bool) {
+ return &a, true
+}
+
+// AsBatchAI is the BasicCompute implementation for AKS.
+func (a AKS) AsBatchAI() (*BatchAI, bool) {
+ return nil, false
+}
+
+// AsVirtualMachine is the BasicCompute implementation for AKS.
+func (a AKS) AsVirtualMachine() (*VirtualMachine, bool) {
+ return nil, false
+}
+
+// AsDataFactory is the BasicCompute implementation for AKS.
+func (a AKS) AsDataFactory() (*DataFactory, bool) {
+ return nil, false
+}
+
+// AsCompute is the BasicCompute implementation for AKS.
+func (a AKS) AsCompute() (*Compute, bool) {
+ return nil, false
+}
+
+// AsBasicCompute is the BasicCompute implementation for AKS.
+func (a AKS) AsBasicCompute() (BasicCompute, bool) {
+ return &a, true
+}
+
+// AksComputeSecrets secrets related to a Machine Learning compute based on AKS.
+type AksComputeSecrets struct {
+ // UserKubeConfig - Content of kubeconfig file that can be used to connect to the Kubernetes cluster.
+ UserKubeConfig *string `json:"userKubeConfig,omitempty"`
+ // AdminKubeConfig - Content of kubeconfig file that can be used to connect to the Kubernetes cluster.
+ AdminKubeConfig *string `json:"adminKubeConfig,omitempty"`
+ // ImagePullSecretName - Image registry pull secret.
+ ImagePullSecretName *string `json:"imagePullSecretName,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine'
+ ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AksComputeSecrets.
+func (acs AksComputeSecrets) MarshalJSON() ([]byte, error) {
+ acs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeAKS
+ objectMap := make(map[string]interface{})
+ if acs.UserKubeConfig != nil {
+ objectMap["userKubeConfig"] = acs.UserKubeConfig
+ }
+ if acs.AdminKubeConfig != nil {
+ objectMap["adminKubeConfig"] = acs.AdminKubeConfig
+ }
+ if acs.ImagePullSecretName != nil {
+ objectMap["imagePullSecretName"] = acs.ImagePullSecretName
+ }
+ if acs.ComputeType != "" {
+ objectMap["computeType"] = acs.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAksComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
+func (acs AksComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
+ return &acs, true
+}
+
+// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
+func (acs AksComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
+ return nil, false
+}
+
+// AsComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
+func (acs AksComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
+ return nil, false
+}
+
+// AsBasicComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
+func (acs AksComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
+ return &acs, true
+}
+
+// AKSProperties AKS properties
+type AKSProperties struct {
+ // ClusterFqdn - Cluster full qualified domain name
+ ClusterFqdn *string `json:"clusterFqdn,omitempty"`
+ // SystemServices - System services
+ SystemServices *[]SystemService `json:"systemServices,omitempty"`
+ // AgentCount - Number of agents
+ AgentCount *int32 `json:"agentCount,omitempty"`
+ // AgentVMSize - Agent virtual machine size
+ AgentVMSize *string `json:"agentVMSize,omitempty"`
+ // SslConfiguration - SSL configuration
+ SslConfiguration *SslConfiguration `json:"sslConfiguration,omitempty"`
+}
+
+// BatchAI a Machine Learning compute based on Azure BatchAI.
+type BatchAI struct {
+ // Properties - BatchAI properties
+ Properties *BatchAIProperties `json:"properties,omitempty"`
+ // ProvisioningState - The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Description - The description of the Machine Learning compute.
+ Description *string `json:"description,omitempty"`
+ // CreatedOn - The date and time when the compute was created.
+ CreatedOn *date.Time `json:"createdOn,omitempty"`
+ // ModifiedOn - The date and time when the compute was last modified.
+ ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
+ // ResourceID - ARM resource id of the compute
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ProvisioningErrors - Errors during provisioning
+ ProvisioningErrors *[]MachineLearningServiceError `json:"provisioningErrors,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeBatchAI1', 'ComputeTypeVirtualMachine1', 'ComputeTypeDataFactory1'
+ ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for BatchAI.
+func (ba BatchAI) MarshalJSON() ([]byte, error) {
+ ba.ComputeType = ComputeTypeBatchAI1
+ objectMap := make(map[string]interface{})
+ if ba.Properties != nil {
+ objectMap["properties"] = ba.Properties
+ }
+ if ba.ProvisioningState != "" {
+ objectMap["provisioningState"] = ba.ProvisioningState
+ }
+ if ba.Description != nil {
+ objectMap["description"] = ba.Description
+ }
+ if ba.CreatedOn != nil {
+ objectMap["createdOn"] = ba.CreatedOn
+ }
+ if ba.ModifiedOn != nil {
+ objectMap["modifiedOn"] = ba.ModifiedOn
+ }
+ if ba.ResourceID != nil {
+ objectMap["resourceId"] = ba.ResourceID
+ }
+ if ba.ProvisioningErrors != nil {
+ objectMap["provisioningErrors"] = ba.ProvisioningErrors
+ }
+ if ba.ComputeType != "" {
+ objectMap["computeType"] = ba.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAKS is the BasicCompute implementation for BatchAI.
+func (ba BatchAI) AsAKS() (*AKS, bool) {
+ return nil, false
+}
+
+// AsBatchAI is the BasicCompute implementation for BatchAI.
+func (ba BatchAI) AsBatchAI() (*BatchAI, bool) {
+ return &ba, true
+}
+
+// AsVirtualMachine is the BasicCompute implementation for BatchAI.
+func (ba BatchAI) AsVirtualMachine() (*VirtualMachine, bool) {
+ return nil, false
+}
+
+// AsDataFactory is the BasicCompute implementation for BatchAI.
+func (ba BatchAI) AsDataFactory() (*DataFactory, bool) {
+ return nil, false
+}
+
+// AsCompute is the BasicCompute implementation for BatchAI.
+func (ba BatchAI) AsCompute() (*Compute, bool) {
+ return nil, false
+}
+
+// AsBasicCompute is the BasicCompute implementation for BatchAI.
+func (ba BatchAI) AsBasicCompute() (BasicCompute, bool) {
+ return &ba, true
+}
+
+// BatchAIProperties batchAI properties
+type BatchAIProperties struct {
+ // VMSize - Virtual Machine Size
+ VMSize *string `json:"vmSize,omitempty"`
+ // VMPriority - Virtual Machine priority
+ VMPriority *string `json:"vmPriority,omitempty"`
+ // ScaleSettings - Scale settings for BatchAI
+ ScaleSettings *ScaleSettings `json:"scaleSettings,omitempty"`
+}
+
+// BasicCompute machine Learning compute object.
+type BasicCompute interface {
+ AsAKS() (*AKS, bool)
+ AsBatchAI() (*BatchAI, bool)
+ AsVirtualMachine() (*VirtualMachine, bool)
+ AsDataFactory() (*DataFactory, bool)
+ AsCompute() (*Compute, bool)
+}
+
+// Compute machine Learning compute object.
+type Compute struct {
+ // ProvisioningState - The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Description - The description of the Machine Learning compute.
+ Description *string `json:"description,omitempty"`
+ // CreatedOn - The date and time when the compute was created.
+ CreatedOn *date.Time `json:"createdOn,omitempty"`
+ // ModifiedOn - The date and time when the compute was last modified.
+ ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
+ // ResourceID - ARM resource id of the compute
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ProvisioningErrors - Errors during provisioning
+ ProvisioningErrors *[]MachineLearningServiceError `json:"provisioningErrors,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeBatchAI1', 'ComputeTypeVirtualMachine1', 'ComputeTypeDataFactory1'
+ ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
+}
+
+func unmarshalBasicCompute(body []byte) (BasicCompute, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["computeType"] {
+ case string(ComputeTypeAKS1):
+ var a AKS
+ err := json.Unmarshal(body, &a)
+ return a, err
+ case string(ComputeTypeBatchAI1):
+ var ba BatchAI
+ err := json.Unmarshal(body, &ba)
+ return ba, err
+ case string(ComputeTypeVirtualMachine1):
+ var VM VirtualMachine
+ err := json.Unmarshal(body, &VM)
+ return VM, err
+ case string(ComputeTypeDataFactory1):
+ var df DataFactory
+ err := json.Unmarshal(body, &df)
+ return df, err
+ default:
+ var c Compute
+ err := json.Unmarshal(body, &c)
+ return c, err
+ }
+}
+func unmarshalBasicComputeArray(body []byte) ([]BasicCompute, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ cArray := make([]BasicCompute, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ c, err := unmarshalBasicCompute(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ cArray[index] = c
+ }
+ return cArray, nil
+}
+
+// MarshalJSON is the custom marshaler for Compute.
+func (c Compute) MarshalJSON() ([]byte, error) {
+ c.ComputeType = ComputeTypeCompute
+ objectMap := make(map[string]interface{})
+ if c.ProvisioningState != "" {
+ objectMap["provisioningState"] = c.ProvisioningState
+ }
+ if c.Description != nil {
+ objectMap["description"] = c.Description
+ }
+ if c.CreatedOn != nil {
+ objectMap["createdOn"] = c.CreatedOn
+ }
+ if c.ModifiedOn != nil {
+ objectMap["modifiedOn"] = c.ModifiedOn
+ }
+ if c.ResourceID != nil {
+ objectMap["resourceId"] = c.ResourceID
+ }
+ if c.ProvisioningErrors != nil {
+ objectMap["provisioningErrors"] = c.ProvisioningErrors
+ }
+ if c.ComputeType != "" {
+ objectMap["computeType"] = c.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAKS is the BasicCompute implementation for Compute.
+func (c Compute) AsAKS() (*AKS, bool) {
+ return nil, false
+}
+
+// AsBatchAI is the BasicCompute implementation for Compute.
+func (c Compute) AsBatchAI() (*BatchAI, bool) {
+ return nil, false
+}
+
+// AsVirtualMachine is the BasicCompute implementation for Compute.
+func (c Compute) AsVirtualMachine() (*VirtualMachine, bool) {
+ return nil, false
+}
+
+// AsDataFactory is the BasicCompute implementation for Compute.
+func (c Compute) AsDataFactory() (*DataFactory, bool) {
+ return nil, false
+}
+
+// AsCompute is the BasicCompute implementation for Compute.
+func (c Compute) AsCompute() (*Compute, bool) {
+ return &c, true
+}
+
+// AsBasicCompute is the BasicCompute implementation for Compute.
+func (c Compute) AsBasicCompute() (BasicCompute, bool) {
+ return &c, true
+}
+
+// ComputeResource machine Learning compute object wrapped into ARM resource envelope.
+type ComputeResource struct {
+ autorest.Response `json:"-"`
+ // Properties - Compute properties
+ Properties BasicCompute `json:"properties,omitempty"`
+ // ID - Specifies the resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Specifies the name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Identity - The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // Location - Specifies the location of the resource.
+ Location *string `json:"location,omitempty"`
+ // Type - Specifies the type of the resource.
+ Type *string `json:"type,omitempty"`
+ // Tags - Contains resource tags defined as key/value pairs.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ComputeResource.
+func (cr ComputeResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ objectMap["properties"] = cr.Properties
+ if cr.ID != nil {
+ objectMap["id"] = cr.ID
+ }
+ if cr.Name != nil {
+ objectMap["name"] = cr.Name
+ }
+ if cr.Identity != nil {
+ objectMap["identity"] = cr.Identity
+ }
+ if cr.Location != nil {
+ objectMap["location"] = cr.Location
+ }
+ if cr.Type != nil {
+ objectMap["type"] = cr.Type
+ }
+ if cr.Tags != nil {
+ objectMap["tags"] = cr.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ComputeResource struct.
+func (cr *ComputeResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ properties, err := unmarshalBasicCompute(*v)
+ if err != nil {
+ return err
+ }
+ cr.Properties = properties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ cr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cr.Name = &name
+ }
+ case "identity":
+ if v != nil {
+ var identity Identity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ cr.Identity = &identity
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ cr.Location = &location
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cr.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ cr.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// BasicComputeSecrets secrets related to a Machine Learning compute. Might differ for every type of compute.
+type BasicComputeSecrets interface {
+ AsAksComputeSecrets() (*AksComputeSecrets, bool)
+ AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool)
+ AsComputeSecrets() (*ComputeSecrets, bool)
+}
+
+// ComputeSecrets secrets related to a Machine Learning compute. Might differ for every type of compute.
+type ComputeSecrets struct {
+ autorest.Response `json:"-"`
+ // ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine'
+ ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
+}
+
+func unmarshalBasicComputeSecrets(body []byte) (BasicComputeSecrets, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["computeType"] {
+ case string(ComputeTypeBasicComputeSecretsComputeTypeAKS):
+ var acs AksComputeSecrets
+ err := json.Unmarshal(body, &acs)
+ return acs, err
+ case string(ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine):
+ var vms VirtualMachineSecrets
+ err := json.Unmarshal(body, &vms)
+ return vms, err
+ default:
+ var cs ComputeSecrets
+ err := json.Unmarshal(body, &cs)
+ return cs, err
+ }
+}
+func unmarshalBasicComputeSecretsArray(body []byte) ([]BasicComputeSecrets, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ csArray := make([]BasicComputeSecrets, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ cs, err := unmarshalBasicComputeSecrets(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ csArray[index] = cs
+ }
+ return csArray, nil
+}
+
+// MarshalJSON is the custom marshaler for ComputeSecrets.
+func (cs ComputeSecrets) MarshalJSON() ([]byte, error) {
+ cs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets
+ objectMap := make(map[string]interface{})
+ if cs.ComputeType != "" {
+ objectMap["computeType"] = cs.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAksComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
+func (cs ComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
+ return nil, false
+}
+
+// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
+func (cs ComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
+ return nil, false
+}
+
+// AsComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
+func (cs ComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
+ return &cs, true
+}
+
+// AsBasicComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
+func (cs ComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
+ return &cs, true
+}
+
+// ComputeSecretsModel ...
+type ComputeSecretsModel struct {
+ autorest.Response `json:"-"`
+ Value BasicComputeSecrets `json:"value,omitempty"`
+}
+
+// UnmarshalJSON is the custom unmarshaler for ComputeSecretsModel struct.
+func (csm *ComputeSecretsModel) UnmarshalJSON(body []byte) error {
+ cs, err := unmarshalBasicComputeSecrets(body)
+ if err != nil {
+ return err
+ }
+ csm.Value = cs
+
+ return nil
+}
+
+// DataFactory a DataFactory compute.
+type DataFactory struct {
+ // ProvisioningState - The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Description - The description of the Machine Learning compute.
+ Description *string `json:"description,omitempty"`
+ // CreatedOn - The date and time when the compute was created.
+ CreatedOn *date.Time `json:"createdOn,omitempty"`
+ // ModifiedOn - The date and time when the compute was last modified.
+ ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
+ // ResourceID - ARM resource id of the compute
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ProvisioningErrors - Errors during provisioning
+ ProvisioningErrors *[]MachineLearningServiceError `json:"provisioningErrors,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeBatchAI1', 'ComputeTypeVirtualMachine1', 'ComputeTypeDataFactory1'
+ ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DataFactory.
+func (df DataFactory) MarshalJSON() ([]byte, error) {
+ df.ComputeType = ComputeTypeDataFactory1
+ objectMap := make(map[string]interface{})
+ if df.ProvisioningState != "" {
+ objectMap["provisioningState"] = df.ProvisioningState
+ }
+ if df.Description != nil {
+ objectMap["description"] = df.Description
+ }
+ if df.CreatedOn != nil {
+ objectMap["createdOn"] = df.CreatedOn
+ }
+ if df.ModifiedOn != nil {
+ objectMap["modifiedOn"] = df.ModifiedOn
+ }
+ if df.ResourceID != nil {
+ objectMap["resourceId"] = df.ResourceID
+ }
+ if df.ProvisioningErrors != nil {
+ objectMap["provisioningErrors"] = df.ProvisioningErrors
+ }
+ if df.ComputeType != "" {
+ objectMap["computeType"] = df.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAKS is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsAKS() (*AKS, bool) {
+ return nil, false
+}
+
+// AsBatchAI is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsBatchAI() (*BatchAI, bool) {
+ return nil, false
+}
+
+// AsVirtualMachine is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsVirtualMachine() (*VirtualMachine, bool) {
+ return nil, false
+}
+
+// AsDataFactory is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsDataFactory() (*DataFactory, bool) {
+ return &df, true
+}
+
+// AsCompute is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsCompute() (*Compute, bool) {
+ return nil, false
+}
+
+// AsBasicCompute is the BasicCompute implementation for DataFactory.
+func (df DataFactory) AsBasicCompute() (BasicCompute, bool) {
+ return &df, true
+}
+
+// ErrorDetail error detail information.
+type ErrorDetail struct {
+ // Code - Error code.
+ Code *string `json:"code,omitempty"`
+ // Message - Error message.
+ Message *string `json:"message,omitempty"`
+}
+
+// ErrorResponse error response information.
+type ErrorResponse struct {
+ // Code - Error code.
+ Code *string `json:"code,omitempty"`
+ // Message - Error message.
+ Message *string `json:"message,omitempty"`
+ // Details - An array of error detail objects.
+ Details *[]ErrorDetail `json:"details,omitempty"`
+}
+
+// Identity identity for the resource.
+type Identity struct {
+ // PrincipalID - The principal ID of resource identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - The tenant ID of resource.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The identity type. Possible values include: 'SystemAssigned'
+ Type ResourceIdentityType `json:"type,omitempty"`
+}
+
+// ListWorkspaceKeysResult ...
+type ListWorkspaceKeysResult struct {
+ autorest.Response `json:"-"`
+ UserStorageKey *string `json:"userStorageKey,omitempty"`
+ UserStorageResourceID *string `json:"userStorageResourceId,omitempty"`
+ AppInsightsInstrumentationKey *string `json:"appInsightsInstrumentationKey,omitempty"`
+ ContainerRegistryCredentials *RegistryListCredentialsResult `json:"containerRegistryCredentials,omitempty"`
+}
+
+// MachineLearningComputeCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type MachineLearningComputeCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *MachineLearningComputeCreateOrUpdateFuture) Result(client MachineLearningComputeClient) (cr ComputeResource, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("services.MachineLearningComputeCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
+ cr, err = client.CreateOrUpdateResponder(cr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeCreateOrUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// MachineLearningComputeDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type MachineLearningComputeDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *MachineLearningComputeDeleteFuture) Result(client MachineLearningComputeClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.MachineLearningComputeDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("services.MachineLearningComputeDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// MachineLearningServiceError wrapper for error response to follow ARM guidelines.
+type MachineLearningServiceError struct {
+ // Error - The error response.
+ Error *ErrorResponse `json:"error,omitempty"`
+}
+
+// Operation azure Machine Learning workspace REST API operation
+type Operation struct {
+ // Name - Operation name: {provider}/{resource}/{operation}
+ Name *string `json:"name,omitempty"`
+ // Display - Display name of operation
+ Display *OperationDisplay `json:"display,omitempty"`
+}
+
+// OperationDisplay display name of operation
+type OperationDisplay struct {
+ // Provider - The resource provider name: Microsoft.MachineLearningExperimentation
+ Provider *string `json:"provider,omitempty"`
+ // Resource - The resource on which the operation is performed.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - The operation that users can perform.
+ Operation *string `json:"operation,omitempty"`
+ // Description - The description for the operation.
+ Description *string `json:"description,omitempty"`
+}
+
+// OperationListResult an array of operations supported by the resource provider.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of AML workspace operations supported by the AML workspace resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+}
+
+// PaginatedComputeResourcesList paginated list of Machine Learning compute objects wrapped in ARM resource
+// envelope.
+type PaginatedComputeResourcesList struct {
+ autorest.Response `json:"-"`
+ // Value - An array of Machine Learning compute objects wrapped in ARM resource envelope.
+ Value *[]ComputeResource `json:"value,omitempty"`
+ // NextLink - A continuation link (absolute URI) to the next page of results in the list.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// PaginatedComputeResourcesListIterator provides access to a complete listing of ComputeResource values.
+type PaginatedComputeResourcesListIterator struct {
+ i int
+ page PaginatedComputeResourcesListPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *PaginatedComputeResourcesListIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter PaginatedComputeResourcesListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter PaginatedComputeResourcesListIterator) Response() PaginatedComputeResourcesList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter PaginatedComputeResourcesListIterator) Value() ComputeResource {
+ if !iter.page.NotDone() {
+ return ComputeResource{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (pcrl PaginatedComputeResourcesList) IsEmpty() bool {
+ return pcrl.Value == nil || len(*pcrl.Value) == 0
+}
+
+// paginatedComputeResourcesListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (pcrl PaginatedComputeResourcesList) paginatedComputeResourcesListPreparer() (*http.Request, error) {
+ if pcrl.NextLink == nil || len(to.String(pcrl.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(pcrl.NextLink)))
+}
+
+// PaginatedComputeResourcesListPage contains a page of ComputeResource values.
+type PaginatedComputeResourcesListPage struct {
+ fn func(PaginatedComputeResourcesList) (PaginatedComputeResourcesList, error)
+ pcrl PaginatedComputeResourcesList
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *PaginatedComputeResourcesListPage) Next() error {
+ next, err := page.fn(page.pcrl)
+ if err != nil {
+ return err
+ }
+ page.pcrl = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page PaginatedComputeResourcesListPage) NotDone() bool {
+ return !page.pcrl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page PaginatedComputeResourcesListPage) Response() PaginatedComputeResourcesList {
+ return page.pcrl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page PaginatedComputeResourcesListPage) Values() []ComputeResource {
+ if page.pcrl.IsEmpty() {
+ return nil
+ }
+ return *page.pcrl.Value
+}
+
+// Password ...
+type Password struct {
+ Name *string `json:"name,omitempty"`
+ Value *string `json:"value,omitempty"`
+}
+
+// PrincipalCredentials service principal credentials.
+type PrincipalCredentials struct {
+ // ClientID - Client Id
+ ClientID *string `json:"clientId,omitempty"`
+ // ClientSecret - Client secret
+ ClientSecret *string `json:"clientSecret,omitempty"`
+}
+
+// RegistryListCredentialsResult ...
+type RegistryListCredentialsResult struct {
+ Location *string `json:"location,omitempty"`
+ Username *string `json:"username,omitempty"`
+ Passwords *[]Password `json:"passwords,omitempty"`
+}
+
+// Resource azure Resource Manager resource envelope.
+type Resource struct {
+ // ID - Specifies the resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Specifies the name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Identity - The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // Location - Specifies the location of the resource.
+ Location *string `json:"location,omitempty"`
+ // Type - Specifies the type of the resource.
+ Type *string `json:"type,omitempty"`
+ // Tags - Contains resource tags defined as key/value pairs.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.ID != nil {
+ objectMap["id"] = r.ID
+ }
+ if r.Name != nil {
+ objectMap["name"] = r.Name
+ }
+ if r.Identity != nil {
+ objectMap["identity"] = r.Identity
+ }
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Type != nil {
+ objectMap["type"] = r.Type
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// ScaleSettings scale settings for BatchAI Compute
+type ScaleSettings struct {
+ // MaxNodeCount - Max number of nodes to use
+ MaxNodeCount *int32 `json:"maxNodeCount,omitempty"`
+ // MinNodeCount - Min number of nodes to use
+ MinNodeCount *int32 `json:"minNodeCount,omitempty"`
+ // AutoScaleEnabled - Enable or disable auto scale
+ AutoScaleEnabled *bool `json:"autoScaleEnabled,omitempty"`
+}
+
+// SslConfiguration the ssl configugation for scoring
+type SslConfiguration struct {
+ // Status - Enable or disable ssl for scoring. Possible values include: 'Disabled', 'Enabled'
+ Status Status `json:"status,omitempty"`
+ // Cert - Cert data
+ Cert *string `json:"cert,omitempty"`
+ // Key - Key data
+ Key *string `json:"key,omitempty"`
+ // Cname - CNAME of the cert
+ Cname *string `json:"cname,omitempty"`
+}
+
+// SystemService a system service running on a compute.
+type SystemService struct {
+ // SystemServiceType - The type of this system service.
+ SystemServiceType *string `json:"systemServiceType,omitempty"`
+ // PublicIPAddress - Public IP address
+ PublicIPAddress *string `json:"publicIpAddress,omitempty"`
+ // Version - The version for this type.
+ Version *string `json:"version,omitempty"`
+}
+
+// VirtualMachine a Machine Learning compute based on Azure Virtual Machines.
+type VirtualMachine struct {
+ Properties *VirtualMachineProperties `json:"properties,omitempty"`
+ // ProvisioningState - The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Description - The description of the Machine Learning compute.
+ Description *string `json:"description,omitempty"`
+ // CreatedOn - The date and time when the compute was created.
+ CreatedOn *date.Time `json:"createdOn,omitempty"`
+ // ModifiedOn - The date and time when the compute was last modified.
+ ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
+ // ResourceID - ARM resource id of the compute
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ProvisioningErrors - Errors during provisioning
+ ProvisioningErrors *[]MachineLearningServiceError `json:"provisioningErrors,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeBatchAI1', 'ComputeTypeVirtualMachine1', 'ComputeTypeDataFactory1'
+ ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachine.
+func (VM VirtualMachine) MarshalJSON() ([]byte, error) {
+ VM.ComputeType = ComputeTypeVirtualMachine1
+ objectMap := make(map[string]interface{})
+ if VM.Properties != nil {
+ objectMap["properties"] = VM.Properties
+ }
+ if VM.ProvisioningState != "" {
+ objectMap["provisioningState"] = VM.ProvisioningState
+ }
+ if VM.Description != nil {
+ objectMap["description"] = VM.Description
+ }
+ if VM.CreatedOn != nil {
+ objectMap["createdOn"] = VM.CreatedOn
+ }
+ if VM.ModifiedOn != nil {
+ objectMap["modifiedOn"] = VM.ModifiedOn
+ }
+ if VM.ResourceID != nil {
+ objectMap["resourceId"] = VM.ResourceID
+ }
+ if VM.ProvisioningErrors != nil {
+ objectMap["provisioningErrors"] = VM.ProvisioningErrors
+ }
+ if VM.ComputeType != "" {
+ objectMap["computeType"] = VM.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAKS is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsAKS() (*AKS, bool) {
+ return nil, false
+}
+
+// AsBatchAI is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsBatchAI() (*BatchAI, bool) {
+ return nil, false
+}
+
+// AsVirtualMachine is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsVirtualMachine() (*VirtualMachine, bool) {
+ return &VM, true
+}
+
+// AsDataFactory is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsDataFactory() (*DataFactory, bool) {
+ return nil, false
+}
+
+// AsCompute is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsCompute() (*Compute, bool) {
+ return nil, false
+}
+
+// AsBasicCompute is the BasicCompute implementation for VirtualMachine.
+func (VM VirtualMachine) AsBasicCompute() (BasicCompute, bool) {
+ return &VM, true
+}
+
+// VirtualMachineProperties ...
+type VirtualMachineProperties struct {
+ // VirtualMachineSize - Virtual Machine size
+ VirtualMachineSize *string `json:"virtualMachineSize,omitempty"`
+ // AdministratorAccount - Admin credentials for virtual machine
+ AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
+}
+
+// VirtualMachineSecrets secrets related to a Machine Learning compute based on AKS.
+type VirtualMachineSecrets struct {
+ // AdministratorAccount - Admin creadentials for virtual machine.
+ AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
+ // ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine'
+ ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineSecrets.
+func (vms VirtualMachineSecrets) MarshalJSON() ([]byte, error) {
+ vms.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine
+ objectMap := make(map[string]interface{})
+ if vms.AdministratorAccount != nil {
+ objectMap["administratorAccount"] = vms.AdministratorAccount
+ }
+ if vms.ComputeType != "" {
+ objectMap["computeType"] = vms.ComputeType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsAksComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
+func (vms VirtualMachineSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
+ return nil, false
+}
+
+// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
+func (vms VirtualMachineSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
+ return &vms, true
+}
+
+// AsComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
+func (vms VirtualMachineSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
+ return nil, false
+}
+
+// AsBasicComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
+func (vms VirtualMachineSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
+ return &vms, true
+}
+
+// VirtualMachineSSHCredentials admin credentials for virtual machine
+type VirtualMachineSSHCredentials struct {
+ // Username - Username of admin account
+ Username *string `json:"username,omitempty"`
+ // Password - Password of admin account
+ Password *string `json:"password,omitempty"`
+ // PublicKeyData - Public key data
+ PublicKeyData *string `json:"publicKeyData,omitempty"`
+ // PrivateKeyData - Private key data
+ PrivateKeyData *string `json:"privateKeyData,omitempty"`
+}
+
+// Workspace an object that represents a machine learning workspace.
+type Workspace struct {
+ autorest.Response `json:"-"`
+ // WorkspaceProperties - The properties of the machine learning workspace.
+ *WorkspaceProperties `json:"properties,omitempty"`
+ // ID - Specifies the resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Specifies the name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Identity - The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // Location - Specifies the location of the resource.
+ Location *string `json:"location,omitempty"`
+ // Type - Specifies the type of the resource.
+ Type *string `json:"type,omitempty"`
+ // Tags - Contains resource tags defined as key/value pairs.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Workspace.
+func (w Workspace) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if w.WorkspaceProperties != nil {
+ objectMap["properties"] = w.WorkspaceProperties
+ }
+ if w.ID != nil {
+ objectMap["id"] = w.ID
+ }
+ if w.Name != nil {
+ objectMap["name"] = w.Name
+ }
+ if w.Identity != nil {
+ objectMap["identity"] = w.Identity
+ }
+ if w.Location != nil {
+ objectMap["location"] = w.Location
+ }
+ if w.Type != nil {
+ objectMap["type"] = w.Type
+ }
+ if w.Tags != nil {
+ objectMap["tags"] = w.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Workspace struct.
+func (w *Workspace) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var workspaceProperties WorkspaceProperties
+ err = json.Unmarshal(*v, &workspaceProperties)
+ if err != nil {
+ return err
+ }
+ w.WorkspaceProperties = &workspaceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ w.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ w.Name = &name
+ }
+ case "identity":
+ if v != nil {
+ var identity Identity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ w.Identity = &identity
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ w.Location = &location
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ w.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ w.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// WorkspaceListResult the result of a request to list machine learning workspaces.
+type WorkspaceListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to request the next list of machine learning workspaces.
+ Value *[]Workspace `json:"value,omitempty"`
+ // NextLink - The URI that can be used to request the next list of machine learning workspaces.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// WorkspaceListResultIterator provides access to a complete listing of Workspace values.
+type WorkspaceListResultIterator struct {
+ i int
+ page WorkspaceListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *WorkspaceListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter WorkspaceListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter WorkspaceListResultIterator) Response() WorkspaceListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter WorkspaceListResultIterator) Value() Workspace {
+ if !iter.page.NotDone() {
+ return Workspace{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (wlr WorkspaceListResult) IsEmpty() bool {
+ return wlr.Value == nil || len(*wlr.Value) == 0
+}
+
+// workspaceListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (wlr WorkspaceListResult) workspaceListResultPreparer() (*http.Request, error) {
+ if wlr.NextLink == nil || len(to.String(wlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(wlr.NextLink)))
+}
+
+// WorkspaceListResultPage contains a page of Workspace values.
+type WorkspaceListResultPage struct {
+ fn func(WorkspaceListResult) (WorkspaceListResult, error)
+ wlr WorkspaceListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *WorkspaceListResultPage) Next() error {
+ next, err := page.fn(page.wlr)
+ if err != nil {
+ return err
+ }
+ page.wlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page WorkspaceListResultPage) NotDone() bool {
+ return !page.wlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page WorkspaceListResultPage) Response() WorkspaceListResult {
+ return page.wlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page WorkspaceListResultPage) Values() []Workspace {
+ if page.wlr.IsEmpty() {
+ return nil
+ }
+ return *page.wlr.Value
+}
+
+// WorkspaceProperties the properties of a machine learning workspace.
+type WorkspaceProperties struct {
+ // WorkspaceID - The immutable id associated with this workspace.
+ WorkspaceID *string `json:"workspaceId,omitempty"`
+ // Description - The description of this workspace.
+ Description *string `json:"description,omitempty"`
+ // FriendlyName - The friendly name for this workspace. This name in mutable
+ FriendlyName *string `json:"friendlyName,omitempty"`
+ // CreationTime - The creation time of the machine learning workspace in ISO8601 format.
+ CreationTime *date.Time `json:"creationTime,omitempty"`
+ // KeyVault - ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created
+ KeyVault *string `json:"keyVault,omitempty"`
+ // ApplicationInsights - ARM id of the application insights associated with this workspace. This cannot be changed once the workspace has been created
+ ApplicationInsights *string `json:"applicationInsights,omitempty"`
+ // ContainerRegistry - ARM id of the container registry associated with this workspace. This cannot be changed once the workspace has been created
+ ContainerRegistry *string `json:"containerRegistry,omitempty"`
+ // StorageAccount - ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created
+ StorageAccount *string `json:"storageAccount,omitempty"`
+ // DiscoveryURL - Url for the discovery service to identify regional endpoints for machine learning experimentation services
+ DiscoveryURL *string `json:"discoveryUrl,omitempty"`
+ // ProvisioningState - The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+}
+
+// WorkspacePropertiesUpdateParameters the parameters for updating the properties of a machine learning workspace.
+type WorkspacePropertiesUpdateParameters struct {
+ // Description - The description of this workspace.
+ Description *string `json:"description,omitempty"`
+ // FriendlyName - The friendly name for this workspace.
+ FriendlyName *string `json:"friendlyName,omitempty"`
+}
+
+// WorkspaceUpdateParameters the parameters for updating a machine learning workspace.
+type WorkspaceUpdateParameters struct {
+ // Tags - The resource tags for the machine learning workspace.
+ Tags map[string]*string `json:"tags"`
+ // WorkspacePropertiesUpdateParameters - The properties that the machine learning workspace will be updated with.
+ *WorkspacePropertiesUpdateParameters `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for WorkspaceUpdateParameters.
+func (wup WorkspaceUpdateParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if wup.Tags != nil {
+ objectMap["tags"] = wup.Tags
+ }
+ if wup.WorkspacePropertiesUpdateParameters != nil {
+ objectMap["properties"] = wup.WorkspacePropertiesUpdateParameters
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for WorkspaceUpdateParameters struct.
+func (wup *WorkspaceUpdateParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ wup.Tags = tags
+ }
+ case "properties":
+ if v != nil {
+ var workspacePropertiesUpdateParameters WorkspacePropertiesUpdateParameters
+ err = json.Unmarshal(*v, &workspacePropertiesUpdateParameters)
+ if err != nil {
+ return err
+ }
+ wup.WorkspacePropertiesUpdateParameters = &workspacePropertiesUpdateParameters
+ }
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/operations.go
new file mode 100644
index 000000000..563fbdbf5
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/operations.go
@@ -0,0 +1,98 @@
+package services
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// OperationsClient is the these APIs allow end users to operate on Azure Machine Learning Workspace resources.
+type OperationsClient struct {
+ BaseClient
+}
+
+// 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 Azure Machine Learning Workspaces REST API operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.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, "services.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.MachineLearningServices/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// 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/services/preview/machinelearning/mgmt/2018-03-01-preview/services/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/version.go
new file mode 100644
index 000000000..80c355d06
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/version.go
@@ -0,0 +1,30 @@
+package services
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " services/2018-03-01-preview"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/workspaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/workspaces.go
new file mode 100644
index 000000000..ea07d0808
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/machinelearning/mgmt/2018-03-01-preview/services/workspaces.go
@@ -0,0 +1,640 @@
+package services
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// WorkspacesClient is the these APIs allow end users to operate on Azure Machine Learning Workspace resources.
+type WorkspacesClient struct {
+ BaseClient
+}
+
+// NewWorkspacesClient creates an instance of the WorkspacesClient client.
+func NewWorkspacesClient(subscriptionID string) WorkspacesClient {
+ return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client.
+func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) WorkspacesClient {
+ return WorkspacesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a workspace with the specified parameters.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// parameters - the parameters for creating or updating a machine learning workspace.
+func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result Workspace, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client WorkspacesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (*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 = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) CreateOrUpdateResponder(resp *http.Response) (result Workspace, 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 machine learning workspace.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+func (client WorkspacesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client WorkspacesClient) DeletePreparer(ctx context.Context, 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 = "2018-03-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.MachineLearningServices/workspaces/{workspaceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) 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 properties of the specified machine learning workspace.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+func (client WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result Workspace, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client WorkspacesClient) GetPreparer(ctx context.Context, 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 = "2018-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.MachineLearningServices/workspaces/{workspaceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) GetResponder(resp *http.Response) (result Workspace, 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 lists all the available machine learning workspaces under the specified resource group.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// skiptoken - continuation token for pagination.
+func (client WorkspacesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, skiptoken string) (result WorkspaceListResultPage, err error) {
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.wlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.wlr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client WorkspacesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, skiptoken string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) ListByResourceGroupResponder(resp *http.Response) (result WorkspaceListResult, 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 WorkspacesClient) listByResourceGroupNextResults(lastResults WorkspaceListResult) (result WorkspaceListResult, err error) {
+ req, err := lastResults.workspaceListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "services.WorkspacesClient", "listByResourceGroupNextResults", 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, "services.WorkspacesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client WorkspacesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skiptoken string) (result WorkspaceListResultIterator, err error) {
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, skiptoken)
+ return
+}
+
+// ListBySubscription lists all the available machine learning workspaces under the specified subscription.
+// Parameters:
+// skiptoken - continuation token for pagination.
+func (client WorkspacesClient) ListBySubscription(ctx context.Context, skiptoken string) (result WorkspaceListResultPage, err error) {
+ result.fn = client.listBySubscriptionNextResults
+ req, err := client.ListBySubscriptionPreparer(ctx, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.wlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result.wlr, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "ListBySubscription", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client WorkspacesClient) ListBySubscriptionPreparer(ctx context.Context, skiptoken string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) ListBySubscriptionResponder(resp *http.Response) (result WorkspaceListResult, 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 WorkspacesClient) listBySubscriptionNextResults(lastResults WorkspaceListResult) (result WorkspaceListResult, err error) {
+ req, err := lastResults.workspaceListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "services.WorkspacesClient", "listBySubscriptionNextResults", 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, "services.WorkspacesClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client WorkspacesClient) ListBySubscriptionComplete(ctx context.Context, skiptoken string) (result WorkspaceListResultIterator, err error) {
+ result.page, err = client.ListBySubscription(ctx, skiptoken)
+ return
+}
+
+// ListKeys lists all the keys associated with this workspace. This includes keys for the storage account, app insights
+// and password for container registry
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+func (client WorkspacesClient) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result ListWorkspaceKeysResult, err error) {
+ req, err := client.ListKeysPreparer(ctx, resourceGroupName, workspaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "ListKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListKeysSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "ListKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "ListKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListKeysPreparer prepares the ListKeys request.
+func (client WorkspacesClient) ListKeysPreparer(ctx context.Context, 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 = "2018-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.MachineLearningServices/workspaces/{workspaceName}/listKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListKeysSender sends the ListKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) ListKeysSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListKeysResponder handles the response to the ListKeys request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) ListKeysResponder(resp *http.Response) (result ListWorkspaceKeysResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ResyncKeys resync all the keys associated with this workspace. This includes keys for the storage account, app
+// insights and password for container registry
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+func (client WorkspacesClient) ResyncKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) {
+ req, err := client.ResyncKeysPreparer(ctx, resourceGroupName, workspaceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "ResyncKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ResyncKeysSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "ResyncKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ResyncKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "ResyncKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ResyncKeysPreparer prepares the ResyncKeys request.
+func (client WorkspacesClient) ResyncKeysPreparer(ctx context.Context, 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 = "2018-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.MachineLearningServices/workspaces/{workspaceName}/resyncKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ResyncKeysSender sends the ResyncKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) ResyncKeysSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ResyncKeysResponder handles the response to the ResyncKeys request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) ResyncKeysResponder(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 machine learning workspace with the specified parameters.
+// Parameters:
+// resourceGroupName - name of the resource group in which workspace is located.
+// workspaceName - name of Azure Machine Learning workspace.
+// parameters - the parameters for updating a machine learning workspace.
+func (client WorkspacesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspaceUpdateParameters) (result Workspace, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, workspaceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "services.WorkspacesClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client WorkspacesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspaceUpdateParameters) (*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 = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkspacesClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client WorkspacesClient) UpdateResponder(resp *http.Response) (result Workspace, 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/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveevents.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveevents.go
index 9cb9746a2..f4c9e3b4a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveevents.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveevents.go
@@ -104,15 +104,17 @@ func (client LiveEventsClient) CreatePreparer(ctx context.Context, resourceGroup
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client LiveEventsClient) CreateSender(req *http.Request) (future LiveEventsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -183,15 +185,17 @@ func (client LiveEventsClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LiveEventsClient) DeleteSender(req *http.Request) (future LiveEventsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -433,15 +437,17 @@ func (client LiveEventsClient) ResetPreparer(ctx context.Context, resourceGroupN
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client LiveEventsClient) ResetSender(req *http.Request) (future LiveEventsResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -511,15 +517,17 @@ func (client LiveEventsClient) StartPreparer(ctx context.Context, resourceGroupN
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client LiveEventsClient) StartSender(req *http.Request) (future LiveEventsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -592,15 +600,17 @@ func (client LiveEventsClient) StopPreparer(ctx context.Context, resourceGroupNa
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client LiveEventsClient) StopSender(req *http.Request) (future LiveEventsStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -673,15 +683,17 @@ func (client LiveEventsClient) UpdatePreparer(ctx context.Context, resourceGroup
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client LiveEventsClient) UpdateSender(req *http.Request) (future LiveEventsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveoutputs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveoutputs.go
index 846ca5bc2..48029453e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveoutputs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveoutputs.go
@@ -108,15 +108,17 @@ func (client LiveOutputsClient) CreatePreparer(ctx context.Context, resourceGrou
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client LiveOutputsClient) CreateSender(req *http.Request) (future LiveOutputsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -193,15 +195,17 @@ func (client LiveOutputsClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LiveOutputsClient) DeleteSender(req *http.Request) (future LiveOutputsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/models.go
index 717b65a3a..fb1321f80 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/models.go
@@ -6056,12 +6056,11 @@ type LiveEventProperties struct {
// LiveEventsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LiveEventsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LiveEventsCreateFuture) Result(client LiveEventsClient) (le LiveEvent, err error) {
+func (future *LiveEventsCreateFuture) Result(client LiveEventsClient) (le LiveEvent, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6069,34 +6068,15 @@ func (future LiveEventsCreateFuture) Result(client LiveEventsClient) (le LiveEve
return
}
if !done {
- return le, azure.NewAsyncOpIncompleteError("media.LiveEventsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- le, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.LiveEventsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if le.Response.Response, err = future.GetResult(sender); err == nil && le.Response.Response.StatusCode != http.StatusNoContent {
+ le, err = client.CreateResponder(le.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "media.LiveEventsCreateFuture", "Result", le.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- le, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6104,12 +6084,11 @@ func (future LiveEventsCreateFuture) Result(client LiveEventsClient) (le LiveEve
// LiveEventsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LiveEventsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LiveEventsDeleteFuture) Result(client LiveEventsClient) (ar autorest.Response, err error) {
+func (future *LiveEventsDeleteFuture) Result(client LiveEventsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6117,47 +6096,21 @@ func (future LiveEventsDeleteFuture) Result(client LiveEventsClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("media.LiveEventsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.LiveEventsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// LiveEventsResetFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LiveEventsResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LiveEventsResetFuture) Result(client LiveEventsClient) (ar autorest.Response, err error) {
+func (future *LiveEventsResetFuture) Result(client LiveEventsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6165,47 +6118,21 @@ func (future LiveEventsResetFuture) Result(client LiveEventsClient) (ar autorest
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("media.LiveEventsResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.LiveEventsResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsResetFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsResetFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// LiveEventsStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LiveEventsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LiveEventsStartFuture) Result(client LiveEventsClient) (ar autorest.Response, err error) {
+func (future *LiveEventsStartFuture) Result(client LiveEventsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6213,47 +6140,21 @@ func (future LiveEventsStartFuture) Result(client LiveEventsClient) (ar autorest
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("media.LiveEventsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.LiveEventsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// LiveEventsStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LiveEventsStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LiveEventsStopFuture) Result(client LiveEventsClient) (ar autorest.Response, err error) {
+func (future *LiveEventsStopFuture) Result(client LiveEventsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6261,47 +6162,21 @@ func (future LiveEventsStopFuture) Result(client LiveEventsClient) (ar autorest.
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("media.LiveEventsStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.LiveEventsStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// LiveEventsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LiveEventsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LiveEventsUpdateFuture) Result(client LiveEventsClient) (le LiveEvent, err error) {
+func (future *LiveEventsUpdateFuture) Result(client LiveEventsClient) (le LiveEvent, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6309,34 +6184,15 @@ func (future LiveEventsUpdateFuture) Result(client LiveEventsClient) (le LiveEve
return
}
if !done {
- return le, azure.NewAsyncOpIncompleteError("media.LiveEventsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- le, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.LiveEventsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if le.Response.Response, err = future.GetResult(sender); err == nil && le.Response.Response.StatusCode != http.StatusNoContent {
+ le, err = client.UpdateResponder(le.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "media.LiveEventsUpdateFuture", "Result", le.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- le, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveEventsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6554,12 +6410,11 @@ type LiveOutputProperties struct {
// LiveOutputsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LiveOutputsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LiveOutputsCreateFuture) Result(client LiveOutputsClient) (lo LiveOutput, err error) {
+func (future *LiveOutputsCreateFuture) Result(client LiveOutputsClient) (lo LiveOutput, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6567,34 +6422,15 @@ func (future LiveOutputsCreateFuture) Result(client LiveOutputsClient) (lo LiveO
return
}
if !done {
- return lo, azure.NewAsyncOpIncompleteError("media.LiveOutputsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lo, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveOutputsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.LiveOutputsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lo.Response.Response, err = future.GetResult(sender); err == nil && lo.Response.Response.StatusCode != http.StatusNoContent {
+ lo, err = client.CreateResponder(lo.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "media.LiveOutputsCreateFuture", "Result", lo.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveOutputsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- lo, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveOutputsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6602,12 +6438,11 @@ func (future LiveOutputsCreateFuture) Result(client LiveOutputsClient) (lo LiveO
// LiveOutputsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LiveOutputsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LiveOutputsDeleteFuture) Result(client LiveOutputsClient) (ar autorest.Response, err error) {
+func (future *LiveOutputsDeleteFuture) Result(client LiveOutputsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6615,35 +6450,10 @@ func (future LiveOutputsDeleteFuture) Result(client LiveOutputsClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("media.LiveOutputsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveOutputsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.LiveOutputsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveOutputsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.LiveOutputsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8130,12 +7940,11 @@ type StreamingEndpointProperties struct {
// operation.
type StreamingEndpointsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future StreamingEndpointsCreateFuture) Result(client StreamingEndpointsClient) (se StreamingEndpoint, err error) {
+func (future *StreamingEndpointsCreateFuture) Result(client StreamingEndpointsClient) (se StreamingEndpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8143,34 +7952,15 @@ func (future StreamingEndpointsCreateFuture) Result(client StreamingEndpointsCli
return
}
if !done {
- return se, azure.NewAsyncOpIncompleteError("media.StreamingEndpointsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- se, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.StreamingEndpointsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if se.Response.Response, err = future.GetResult(sender); err == nil && se.Response.Response.StatusCode != http.StatusNoContent {
+ se, err = client.CreateResponder(se.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "media.StreamingEndpointsCreateFuture", "Result", se.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- se, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8179,12 +7969,11 @@ func (future StreamingEndpointsCreateFuture) Result(client StreamingEndpointsCli
// operation.
type StreamingEndpointsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future StreamingEndpointsDeleteFuture) Result(client StreamingEndpointsClient) (ar autorest.Response, err error) {
+func (future *StreamingEndpointsDeleteFuture) Result(client StreamingEndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8192,35 +7981,10 @@ func (future StreamingEndpointsDeleteFuture) Result(client StreamingEndpointsCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("media.StreamingEndpointsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.StreamingEndpointsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8228,12 +7992,11 @@ func (future StreamingEndpointsDeleteFuture) Result(client StreamingEndpointsCli
// operation.
type StreamingEndpointsScaleFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future StreamingEndpointsScaleFuture) Result(client StreamingEndpointsClient) (ar autorest.Response, err error) {
+func (future *StreamingEndpointsScaleFuture) Result(client StreamingEndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8241,35 +8004,10 @@ func (future StreamingEndpointsScaleFuture) Result(client StreamingEndpointsClie
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("media.StreamingEndpointsScaleFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ScaleResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsScaleFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.StreamingEndpointsScaleFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsScaleFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ScaleResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsScaleFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8277,12 +8015,11 @@ func (future StreamingEndpointsScaleFuture) Result(client StreamingEndpointsClie
// operation.
type StreamingEndpointsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future StreamingEndpointsStartFuture) Result(client StreamingEndpointsClient) (ar autorest.Response, err error) {
+func (future *StreamingEndpointsStartFuture) Result(client StreamingEndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8290,35 +8027,10 @@ func (future StreamingEndpointsStartFuture) Result(client StreamingEndpointsClie
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("media.StreamingEndpointsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.StreamingEndpointsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8326,12 +8038,11 @@ func (future StreamingEndpointsStartFuture) Result(client StreamingEndpointsClie
// operation.
type StreamingEndpointsStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future StreamingEndpointsStopFuture) Result(client StreamingEndpointsClient) (ar autorest.Response, err error) {
+func (future *StreamingEndpointsStopFuture) Result(client StreamingEndpointsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8339,35 +8050,10 @@ func (future StreamingEndpointsStopFuture) Result(client StreamingEndpointsClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("media.StreamingEndpointsStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.StreamingEndpointsStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8375,12 +8061,11 @@ func (future StreamingEndpointsStopFuture) Result(client StreamingEndpointsClien
// operation.
type StreamingEndpointsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future StreamingEndpointsUpdateFuture) Result(client StreamingEndpointsClient) (se StreamingEndpoint, err error) {
+func (future *StreamingEndpointsUpdateFuture) Result(client StreamingEndpointsClient) (se StreamingEndpoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8388,34 +8073,15 @@ func (future StreamingEndpointsUpdateFuture) Result(client StreamingEndpointsCli
return
}
if !done {
- return se, azure.NewAsyncOpIncompleteError("media.StreamingEndpointsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- se, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("media.StreamingEndpointsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if se.Response.Response, err = future.GetResult(sender); err == nil && se.Response.Response.StatusCode != http.StatusNoContent {
+ se, err = client.UpdateResponder(se.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "media.StreamingEndpointsUpdateFuture", "Result", se.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- se, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "media.StreamingEndpointsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingendpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingendpoints.go
index 727d8d1cb..dbc4b1f6b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingendpoints.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingendpoints.go
@@ -101,15 +101,17 @@ func (client StreamingEndpointsClient) CreatePreparer(ctx context.Context, resou
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client StreamingEndpointsClient) CreateSender(req *http.Request) (future StreamingEndpointsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -180,15 +182,17 @@ func (client StreamingEndpointsClient) DeletePreparer(ctx context.Context, resou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client StreamingEndpointsClient) DeleteSender(req *http.Request) (future StreamingEndpointsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -433,15 +437,17 @@ func (client StreamingEndpointsClient) ScalePreparer(ctx context.Context, resour
// ScaleSender sends the Scale request. The method will close the
// http.Response Body if it receives an error.
func (client StreamingEndpointsClient) ScaleSender(req *http.Request) (future StreamingEndpointsScaleFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -511,15 +517,17 @@ func (client StreamingEndpointsClient) StartPreparer(ctx context.Context, resour
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client StreamingEndpointsClient) StartSender(req *http.Request) (future StreamingEndpointsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -589,15 +597,17 @@ func (client StreamingEndpointsClient) StopPreparer(ctx context.Context, resourc
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client StreamingEndpointsClient) StopSender(req *http.Request) (future StreamingEndpointsStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -670,15 +680,17 @@ func (client StreamingEndpointsClient) UpdatePreparer(ctx context.Context, resou
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client StreamingEndpointsClient) UpdateSender(req *http.Request) (future StreamingEndpointsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/models.go
index 29289669c..629b8af12 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/models.go
@@ -509,17 +509,14 @@ func PossibleUnitValues() []Unit {
return []Unit{UnitBytes, UnitByteSeconds, UnitBytesPerSecond, UnitCount, UnitCountPerSecond, UnitMilliSeconds, UnitPercent, UnitSeconds, UnitUnspecified}
}
-// BasicAction an alert action.
+// BasicAction ...
type BasicAction interface {
AsAlertingAction() (*AlertingAction, bool)
AsAction() (*Action, bool)
}
-// Action an alert action.
+// Action ...
type Action struct {
- // ActionGroupID - the id of the action group to use.
- ActionGroupID *string `json:"actionGroupId,omitempty"`
- WebhookProperties map[string]*string `json:"webhookProperties"`
// OdataType - Possible values include: 'OdataTypeAction', 'OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesAlertingAction'
OdataType OdataTypeBasicAction `json:"odata.type,omitempty"`
}
@@ -565,12 +562,6 @@ func unmarshalBasicActionArray(body []byte) ([]BasicAction, error) {
func (a Action) MarshalJSON() ([]byte, error) {
a.OdataType = OdataTypeAction
objectMap := make(map[string]interface{})
- if a.ActionGroupID != nil {
- objectMap["actionGroupId"] = a.ActionGroupID
- }
- if a.WebhookProperties != nil {
- objectMap["webhookProperties"] = a.WebhookProperties
- }
if a.OdataType != "" {
objectMap["odata.type"] = a.OdataType
}
@@ -1034,15 +1025,12 @@ func (alar *ActivityLogAlertResource) UnmarshalJSON(body []byte) error {
type AlertingAction struct {
// Severity - Severity of the alert. Possible values include: 'Zero', 'One', 'Two', 'Three', 'Four'
Severity AlertSeverity `json:"severity,omitempty"`
- // AznsAction - azns notification group reference.
+ // AznsAction - Azure action group reference.
AznsAction *AzNsActionGroup `json:"aznsAction,omitempty"`
- // ThrottlingInMin - time (in minutes) for which Alerts should be throttled
+ // ThrottlingInMin - time (in minutes) for which Alerts should be throttled or suppressed.
ThrottlingInMin *int32 `json:"throttlingInMin,omitempty"`
// Trigger - The trigger condition that results in the alert rule being.
Trigger *TriggerCondition `json:"trigger,omitempty"`
- // ActionGroupID - the id of the action group to use.
- ActionGroupID *string `json:"actionGroupId,omitempty"`
- WebhookProperties map[string]*string `json:"webhookProperties"`
// OdataType - Possible values include: 'OdataTypeAction', 'OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesAlertingAction'
OdataType OdataTypeBasicAction `json:"odata.type,omitempty"`
}
@@ -1063,12 +1051,6 @@ func (aa AlertingAction) MarshalJSON() ([]byte, error) {
if aa.Trigger != nil {
objectMap["trigger"] = aa.Trigger
}
- if aa.ActionGroupID != nil {
- objectMap["actionGroupId"] = aa.ActionGroupID
- }
- if aa.WebhookProperties != nil {
- objectMap["webhookProperties"] = aa.WebhookProperties
- }
if aa.OdataType != "" {
objectMap["odata.type"] = aa.OdataType
}
@@ -1663,13 +1645,13 @@ func (asrp *AutoscaleSettingResourcePatch) UnmarshalJSON(body []byte) error {
return nil
}
-// AzNsActionGroup azns notification group
+// AzNsActionGroup azure action group
type AzNsActionGroup struct {
- // ActionGroup - Azure Group reference.
+ // ActionGroup - Azure Action Group reference.
ActionGroup *[]string `json:"actionGroup,omitempty"`
- // EmailSubject - Custom subject for Azns email
+ // EmailSubject - Custom subject override for all email ids in Azure action group
EmailSubject *string `json:"emailSubject,omitempty"`
- // CustomWebhookPayload - Custom webhook payload to be send to azns action group
+ // CustomWebhookPayload - Custom payload to be sent for all webook URI in Azure action group
CustomWebhookPayload *string `json:"customWebhookPayload,omitempty"`
}
@@ -2989,6 +2971,25 @@ type Metric struct {
Timeseries *[]TimeSeriesElement `json:"timeseries,omitempty"`
}
+// MetricAlertAction an alert action.
+type MetricAlertAction struct {
+ // ActionGroupID - the id of the action group to use.
+ ActionGroupID *string `json:"actionGroupId,omitempty"`
+ WebhookProperties map[string]*string `json:"webhookProperties"`
+}
+
+// MarshalJSON is the custom marshaler for MetricAlertAction.
+func (maa MetricAlertAction) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if maa.ActionGroupID != nil {
+ objectMap["actionGroupId"] = maa.ActionGroupID
+ }
+ if maa.WebhookProperties != nil {
+ objectMap["webhookProperties"] = maa.WebhookProperties
+ }
+ return json.Marshal(objectMap)
+}
+
// BasicMetricAlertCriteria the rule criteria that defines the conditions of the alert rule.
type BasicMetricAlertCriteria interface {
AsMetricAlertSingleResourceMultipleMetricCriteria() (*MetricAlertSingleResourceMultipleMetricCriteria, bool)
@@ -3084,8 +3085,10 @@ type MetricAlertProperties struct {
WindowSize *string `json:"windowSize,omitempty"`
// Criteria - defines the specific alert criteria information.
Criteria BasicMetricAlertCriteria `json:"criteria,omitempty"`
+ // AutoMitigate - the flag that indicates whether the alert should be auto resolved or not.
+ AutoMitigate *bool `json:"autoMitigate,omitempty"`
// Actions - the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
- Actions *[]BasicAction `json:"actions,omitempty"`
+ Actions *[]MetricAlertAction `json:"actions,omitempty"`
// LastUpdatedTime - Last time the rule was updated in ISO8601 format.
LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
}
@@ -3161,9 +3164,19 @@ func (mapVar *MetricAlertProperties) UnmarshalJSON(body []byte) error {
}
mapVar.Criteria = criteria
}
+ case "autoMitigate":
+ if v != nil {
+ var autoMitigate bool
+ err = json.Unmarshal(*v, &autoMitigate)
+ if err != nil {
+ return err
+ }
+ mapVar.AutoMitigate = &autoMitigate
+ }
case "actions":
if v != nil {
- actions, err := unmarshalBasicActionArray(*v)
+ var actions []MetricAlertAction
+ err = json.Unmarshal(*v, &actions)
if err != nil {
return err
}
@@ -4285,8 +4298,8 @@ type Source struct {
Query *string `json:"query,omitempty"`
// AuthorizedResources - List of Resource referred into query
AuthorizedResources *[]string `json:"authorizedResources,omitempty"`
- // DatasourceID - The resource uri over which log search query is to be run.
- DatasourceID *string `json:"datasourceId,omitempty"`
+ // DataSourceID - The resource uri over which log search query is to be run.
+ DataSourceID *string `json:"dataSourceId,omitempty"`
// QueryType - Set value to ResultCount if query should be returning search result count. Set it to Number if its a metric query. Possible values include: 'ResultCount'
QueryType QueryType `json:"queryType,omitempty"`
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/scheduledqueryrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/scheduledqueryrules.go
index 7ab4e1cb2..99d77ba3b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/scheduledqueryrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/scheduledqueryrules.go
@@ -51,7 +51,7 @@ func (client ScheduledQueryRulesClient) CreateOrUpdate(ctx context.Context, reso
Constraints: []validation.Constraint{{Target: "parameters.LogSearchRule", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.LogSearchRule.Source", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.LogSearchRule.Source.Query", Name: validation.Null, Rule: true, Chain: nil},
- {Target: "parameters.LogSearchRule.Source.DatasourceID", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.LogSearchRule.Source.DataSourceID", Name: validation.Null, Rule: true, Chain: nil},
}},
{Target: "parameters.LogSearchRule.Schedule", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.LogSearchRule.Schedule.FrequencyInMinutes", Name: validation.Null, Rule: true, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/applicationgateways.go
index f6f8bdb07..0273cfe3d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/applicationgateways.go
@@ -86,15 +86,17 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -474,15 +478,17 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -543,15 +549,17 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitauthorizations.go
index 9db3c6956..c905ab395 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitauthorizations.go
@@ -91,15 +91,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -163,15 +165,17 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitpeerings.go
index 8277c502c..5baeaa63f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitpeerings.go
@@ -88,15 +88,17 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuits.go
index d74dd15f1..d0c35576e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuits.go
@@ -86,15 +86,17 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/interfaces.go
index ccfb4f71e..ec9f0b7cc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/interfaces.go
@@ -86,15 +86,17 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/loadbalancers.go
index e73f576fc..7d0ec510f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/loadbalancers.go
@@ -86,15 +86,17 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/localnetworkgateways.go
index a273487c5..8bf6e8da7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/localnetworkgateways.go
@@ -88,15 +88,17 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/models.go
index d4057d007..1dba23b8b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/models.go
@@ -1362,12 +1362,11 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1375,34 +1374,15 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
return
}
if !done {
- return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ag, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ag, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1411,12 +1391,11 @@ func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationG
// operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1424,35 +1403,10 @@ func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1562,12 +1516,11 @@ type ApplicationGatewaySslCertificatePropertiesFormat struct {
// operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1575,35 +1528,10 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1611,12 +1539,11 @@ func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysCl
// operation.
type ApplicationGatewaysStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1624,35 +1551,10 @@ func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2148,12 +2050,11 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2161,34 +2062,15 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
return
}
if !done {
- return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erca, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erca, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2197,12 +2079,11 @@ func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clien
// long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2210,35 +2091,10 @@ func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expres
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2575,12 +2431,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
// long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2588,34 +2443,15 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
return
}
if !done {
- return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ercp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ercp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2624,12 +2460,11 @@ func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client Expr
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2637,35 +2472,10 @@ func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRoute
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2808,12 +2618,11 @@ func (page ExpressRouteCircuitsArpTableListResultPage) Values() []ExpressRouteCi
// long-running operation.
type ExpressRouteCircuitsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2821,34 +2630,15 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
return
}
if !done {
- return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- erc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- erc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2857,12 +2647,11 @@ func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRout
// operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2870,35 +2659,10 @@ func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuit
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3928,12 +3692,11 @@ type InterfacePropertiesFormat struct {
// operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
+func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3941,34 +3704,15 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
if !done {
- return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- i, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- i, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3976,12 +3720,11 @@ func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InterfacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
+func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3989,35 +3732,10 @@ func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4272,12 +3990,11 @@ type LoadBalancerPropertiesFormat struct {
// operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4285,34 +4002,15 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
return
}
if !done {
- return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lb, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lb, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4320,12 +4018,11 @@ func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClien
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LoadBalancersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
+func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4333,35 +4030,10 @@ func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4710,12 +4382,11 @@ type LocalNetworkGatewayPropertiesFormat struct {
// long-running operation.
type LocalNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4723,34 +4394,15 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
return
}
if !done {
- return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- lng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4759,12 +4411,11 @@ func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwor
// operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4772,35 +4423,10 @@ func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGateway
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5131,12 +4757,11 @@ type PublicIPAddressDNSSettings struct {
// operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5144,34 +4769,15 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
return
}
if !done {
- return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pia, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pia, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5180,12 +4786,11 @@ func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddres
// operation.
type PublicIPAddressesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5193,35 +4798,10 @@ func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5578,12 +5158,11 @@ type RoutePropertiesFormat struct {
// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
+func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5591,34 +5170,15 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5626,12 +5186,11 @@ func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, e
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
+func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5639,35 +5198,10 @@ func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5910,12 +5444,11 @@ type RouteTablePropertiesFormat struct {
// operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
+func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5923,34 +5456,15 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5958,12 +5472,11 @@ func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RouteTablesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
+func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5971,35 +5484,10 @@ func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6248,12 +5736,11 @@ type SecurityGroupPropertiesFormat struct {
// operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6261,34 +5748,15 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6296,12 +5764,11 @@ func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCli
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6309,35 +5776,10 @@ func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6553,12 +5995,11 @@ type SecurityRulePropertiesFormat struct {
// operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
+func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6566,34 +6007,15 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6601,12 +6023,11 @@ func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClien
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SecurityRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
+func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6614,35 +6035,10 @@ func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6847,12 +6243,11 @@ type SubnetPropertiesFormat struct {
// operation.
type SubnetsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
+func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6860,34 +6255,15 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6895,12 +6271,11 @@ func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubnetsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
+func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6908,35 +6283,10 @@ func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7569,12 +6919,11 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7582,34 +6931,15 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
return
}
if !done {
- return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vngc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vngc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7618,12 +6948,11 @@ func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7631,35 +6960,10 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7667,12 +6971,11 @@ func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtual
// a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7680,34 +6983,15 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
return
}
if !done {
- return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- crsk, err = client.ResetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- crsk, err = client.ResetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7716,12 +7000,11 @@ func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client
// long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7729,34 +7012,15 @@ func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client V
return
}
if !done {
- return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- csk, err = client.SetSharedKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- csk, err = client.SetSharedKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7979,12 +7243,11 @@ type VirtualNetworkGatewayPropertiesFormat struct {
// long-running operation.
type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7992,34 +7255,15 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8028,12 +7272,11 @@ func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNe
// operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8041,35 +7284,10 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8077,12 +7295,11 @@ func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGat
// operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8090,34 +7307,15 @@ func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGate
return
}
if !done {
- return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vng, err = client.ResetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
- return
- }
- vng, err = client.ResetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8242,12 +7440,11 @@ type VirtualNetworkPropertiesFormat struct {
// operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8255,34 +7452,15 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
return
}
if !done {
- return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8291,12 +7469,11 @@ func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksC
// operation.
type VirtualNetworksDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8304,34 +7481,9 @@ func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/publicipaddresses.go
index c24dbaf60..7283f64dd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/publicipaddresses.go
@@ -86,15 +86,17 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/routes.go
index ace10d767..8768f3687 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/routes.go
@@ -88,15 +88,17 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/routetables.go
index 6830d1753..bad813ed5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/routetables.go
@@ -86,15 +86,17 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/securitygroups.go
index 6833afaef..6566cd8c8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/securitygroups.go
@@ -87,15 +87,17 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -156,15 +158,17 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/securityrules.go
index fef97771f..a20c70b95 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/securityrules.go
@@ -99,15 +99,17 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/subnets.go
index 993b0280a..c9b91683c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/subnets.go
@@ -96,15 +96,17 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgatewayconnections.go
index 4e0da7e73..4fc2d8c44 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgatewayconnections.go
@@ -89,15 +89,17 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -463,15 +467,17 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -538,15 +544,17 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgateways.go
index af1a8e5c7..ce6cf7b3d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgateways.go
@@ -88,15 +88,17 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -392,15 +396,17 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworks.go
index cb99de6fa..852a413fb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworks.go
@@ -86,15 +86,17 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/models.go
index d13266704..6041417ca 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/models.go
@@ -840,12 +840,11 @@ type WorkspaceProperties struct {
// operation.
type WorkspacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future WorkspacesCreateOrUpdateFuture) Result(client WorkspacesClient) (w Workspace, err error) {
+func (future *WorkspacesCreateOrUpdateFuture) Result(client WorkspacesClient) (w Workspace, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -853,34 +852,15 @@ func (future WorkspacesCreateOrUpdateFuture) Result(client WorkspacesClient) (w
return
}
if !done {
- return w, azure.NewAsyncOpIncompleteError("operationalinsights.WorkspacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- w, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("operationalinsights.WorkspacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent {
+ w, err = client.CreateOrUpdateResponder(w.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesCreateOrUpdateFuture", "Result", w.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- w, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go
index 91278e3cc..f047c6afc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go
@@ -102,15 +102,17 @@ func (client WorkspacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client WorkspacesClient) CreateOrUpdateSender(req *http.Request) (future WorkspacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/provisioningservices/preview/mgmt/2017-08-21-preview/iothub/iotdpsresource.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/provisioningservices/preview/mgmt/2017-08-21-preview/iothub/iotdpsresource.go
index 075e0fca3..e2b941174 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/provisioningservices/preview/mgmt/2017-08-21-preview/iothub/iotdpsresource.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/provisioningservices/preview/mgmt/2017-08-21-preview/iothub/iotdpsresource.go
@@ -169,15 +169,17 @@ func (client IotDpsResourceClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client IotDpsResourceClient) CreateOrUpdateSender(req *http.Request) (future IotDpsResourceCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -238,15 +240,17 @@ func (client IotDpsResourceClient) DeletePreparer(ctx context.Context, provision
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client IotDpsResourceClient) DeleteSender(req *http.Request) (future IotDpsResourceDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/provisioningservices/preview/mgmt/2017-08-21-preview/iothub/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/provisioningservices/preview/mgmt/2017-08-21-preview/iothub/models.go
index f0d4672c1..7b32c287d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/provisioningservices/preview/mgmt/2017-08-21-preview/iothub/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/provisioningservices/preview/mgmt/2017-08-21-preview/iothub/models.go
@@ -245,12 +245,11 @@ type IotDpsPropertiesDescription struct {
// operation.
type IotDpsResourceCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotDpsResourceCreateOrUpdateFuture) Result(client IotDpsResourceClient) (psd ProvisioningServiceDescription, err error) {
+func (future *IotDpsResourceCreateOrUpdateFuture) Result(client IotDpsResourceClient) (psd ProvisioningServiceDescription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -258,34 +257,15 @@ func (future IotDpsResourceCreateOrUpdateFuture) Result(client IotDpsResourceCli
return
}
if !done {
- return psd, azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- psd, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if psd.Response.Response, err = future.GetResult(sender); err == nil && psd.Response.Response.StatusCode != http.StatusNoContent {
+ psd, err = client.CreateOrUpdateResponder(psd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceCreateOrUpdateFuture", "Result", psd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- psd, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -293,12 +273,11 @@ func (future IotDpsResourceCreateOrUpdateFuture) Result(client IotDpsResourceCli
// IotDpsResourceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type IotDpsResourceDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotDpsResourceDeleteFuture) Result(client IotDpsResourceClient) (ar autorest.Response, err error) {
+func (future *IotDpsResourceDeleteFuture) Result(client IotDpsResourceClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -306,35 +285,10 @@ func (future IotDpsResourceDeleteFuture) Result(client IotDpsResourceClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliancedefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliancedefinitions.go
index b5c83c6c5..c13d9cb17 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliancedefinitions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliancedefinitions.go
@@ -103,15 +103,17 @@ func (client ApplianceDefinitionsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplianceDefinitionsClient) CreateOrUpdateSender(req *http.Request) (future ApplianceDefinitionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -183,15 +185,17 @@ func (client ApplianceDefinitionsClient) CreateOrUpdateByIDPreparer(ctx context.
// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the
// http.Response Body if it receives an error.
func (client ApplianceDefinitionsClient) CreateOrUpdateByIDSender(req *http.Request) (future ApplianceDefinitionsCreateOrUpdateByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -263,15 +267,17 @@ func (client ApplianceDefinitionsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplianceDefinitionsClient) DeleteSender(req *http.Request) (future ApplianceDefinitionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -330,15 +336,17 @@ func (client ApplianceDefinitionsClient) DeleteByIDPreparer(ctx context.Context,
// DeleteByIDSender sends the DeleteByID request. The method will close the
// http.Response Body if it receives an error.
func (client ApplianceDefinitionsClient) DeleteByIDSender(req *http.Request) (future ApplianceDefinitionsDeleteByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliances.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliances.go
index c62040d87..a1a6b7a5e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliances.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliances.go
@@ -109,15 +109,17 @@ func (client AppliancesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client AppliancesClient) CreateOrUpdateSender(req *http.Request) (future AppliancesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -195,15 +197,17 @@ func (client AppliancesClient) CreateOrUpdateByIDPreparer(ctx context.Context, a
// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the
// http.Response Body if it receives an error.
func (client AppliancesClient) CreateOrUpdateByIDSender(req *http.Request) (future AppliancesCreateOrUpdateByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -275,15 +279,17 @@ func (client AppliancesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client AppliancesClient) DeleteSender(req *http.Request) (future AppliancesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -342,15 +348,17 @@ func (client AppliancesClient) DeleteByIDPreparer(ctx context.Context, appliance
// DeleteByIDSender sends the DeleteByID request. The method will close the
// http.Response Body if it receives an error.
func (client AppliancesClient) DeleteByIDSender(req *http.Request) (future AppliancesDeleteByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/models.go
index 8343e9c6a..771802c6b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/models.go
@@ -567,12 +567,11 @@ type ApplianceDefinitionProperties struct {
// long-running operation.
type ApplianceDefinitionsCreateOrUpdateByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplianceDefinitionsCreateOrUpdateByIDFuture) Result(client ApplianceDefinitionsClient) (ad ApplianceDefinition, err error) {
+func (future *ApplianceDefinitionsCreateOrUpdateByIDFuture) Result(client ApplianceDefinitionsClient) (ad ApplianceDefinition, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -580,34 +579,15 @@ func (future ApplianceDefinitionsCreateOrUpdateByIDFuture) Result(client Applian
return
}
if !done {
- return ad, azure.NewAsyncOpIncompleteError("managedapplications.ApplianceDefinitionsCreateOrUpdateByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ad, err = client.CreateOrUpdateByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsCreateOrUpdateByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplianceDefinitionsCreateOrUpdateByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ad.Response.Response, err = future.GetResult(sender); err == nil && ad.Response.Response.StatusCode != http.StatusNoContent {
+ ad, err = client.CreateOrUpdateByIDResponder(ad.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsCreateOrUpdateByIDFuture", "Result", ad.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsCreateOrUpdateByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- ad, err = client.CreateOrUpdateByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsCreateOrUpdateByIDFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -616,12 +596,11 @@ func (future ApplianceDefinitionsCreateOrUpdateByIDFuture) Result(client Applian
// long-running operation.
type ApplianceDefinitionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplianceDefinitionsCreateOrUpdateFuture) Result(client ApplianceDefinitionsClient) (ad ApplianceDefinition, err error) {
+func (future *ApplianceDefinitionsCreateOrUpdateFuture) Result(client ApplianceDefinitionsClient) (ad ApplianceDefinition, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -629,34 +608,15 @@ func (future ApplianceDefinitionsCreateOrUpdateFuture) Result(client ApplianceDe
return
}
if !done {
- return ad, azure.NewAsyncOpIncompleteError("managedapplications.ApplianceDefinitionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ad, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplianceDefinitionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ad.Response.Response, err = future.GetResult(sender); err == nil && ad.Response.Response.StatusCode != http.StatusNoContent {
+ ad, err = client.CreateOrUpdateResponder(ad.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsCreateOrUpdateFuture", "Result", ad.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ad, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -665,12 +625,11 @@ func (future ApplianceDefinitionsCreateOrUpdateFuture) Result(client ApplianceDe
// operation.
type ApplianceDefinitionsDeleteByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplianceDefinitionsDeleteByIDFuture) Result(client ApplianceDefinitionsClient) (ar autorest.Response, err error) {
+func (future *ApplianceDefinitionsDeleteByIDFuture) Result(client ApplianceDefinitionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -678,35 +637,10 @@ func (future ApplianceDefinitionsDeleteByIDFuture) Result(client ApplianceDefini
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("managedapplications.ApplianceDefinitionsDeleteByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsDeleteByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplianceDefinitionsDeleteByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsDeleteByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsDeleteByIDFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -714,12 +648,11 @@ func (future ApplianceDefinitionsDeleteByIDFuture) Result(client ApplianceDefini
// operation.
type ApplianceDefinitionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplianceDefinitionsDeleteFuture) Result(client ApplianceDefinitionsClient) (ar autorest.Response, err error) {
+func (future *ApplianceDefinitionsDeleteFuture) Result(client ApplianceDefinitionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -727,35 +660,10 @@ func (future ApplianceDefinitionsDeleteFuture) Result(client ApplianceDefinition
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("managedapplications.ApplianceDefinitionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplianceDefinitionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplianceDefinitionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1084,12 +992,11 @@ type ApplianceProviderAuthorization struct {
// operation.
type AppliancesCreateOrUpdateByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppliancesCreateOrUpdateByIDFuture) Result(client AppliancesClient) (a Appliance, err error) {
+func (future *AppliancesCreateOrUpdateByIDFuture) Result(client AppliancesClient) (a Appliance, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1097,34 +1004,15 @@ func (future AppliancesCreateOrUpdateByIDFuture) Result(client AppliancesClient)
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("managedapplications.AppliancesCreateOrUpdateByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateOrUpdateByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.AppliancesCreateOrUpdateByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.AppliancesCreateOrUpdateByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateOrUpdateByIDResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "managedapplications.AppliancesCreateOrUpdateByIDFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.AppliancesCreateOrUpdateByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateOrUpdateByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.AppliancesCreateOrUpdateByIDFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1133,12 +1021,11 @@ func (future AppliancesCreateOrUpdateByIDFuture) Result(client AppliancesClient)
// operation.
type AppliancesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppliancesCreateOrUpdateFuture) Result(client AppliancesClient) (a Appliance, err error) {
+func (future *AppliancesCreateOrUpdateFuture) Result(client AppliancesClient) (a Appliance, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1146,34 +1033,15 @@ func (future AppliancesCreateOrUpdateFuture) Result(client AppliancesClient) (a
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("managedapplications.AppliancesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.AppliancesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.AppliancesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateOrUpdateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "managedapplications.AppliancesCreateOrUpdateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.AppliancesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.AppliancesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1181,12 +1049,11 @@ func (future AppliancesCreateOrUpdateFuture) Result(client AppliancesClient) (a
// AppliancesDeleteByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppliancesDeleteByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppliancesDeleteByIDFuture) Result(client AppliancesClient) (ar autorest.Response, err error) {
+func (future *AppliancesDeleteByIDFuture) Result(client AppliancesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1194,47 +1061,21 @@ func (future AppliancesDeleteByIDFuture) Result(client AppliancesClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("managedapplications.AppliancesDeleteByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.AppliancesDeleteByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.AppliancesDeleteByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.AppliancesDeleteByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.AppliancesDeleteByIDFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// AppliancesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppliancesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppliancesDeleteFuture) Result(client AppliancesClient) (ar autorest.Response, err error) {
+func (future *AppliancesDeleteFuture) Result(client AppliancesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1242,35 +1083,10 @@ func (future AppliancesDeleteFuture) Result(client AppliancesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("managedapplications.AppliancesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.AppliancesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.AppliancesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.AppliancesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.AppliancesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management/managementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management/managementgroups.go
index c93073199..674fef890 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management/managementgroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management/managementgroups.go
@@ -95,15 +95,17 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, groupID string,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client Client) DeletePreparer(ctx context.Context, groupID string, cacheCo
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management/models.go
index 184bbc588..d39cc2ff0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-01-01-preview/management/models.go
@@ -96,28 +96,28 @@ func PossibleReasonValues() []Reason {
type Type string
const (
- // ProvidersMicrosoftManagementmanagementGroup ...
- ProvidersMicrosoftManagementmanagementGroup Type = "/providers/Microsoft.Management/managementGroup"
+ // ProvidersMicrosoftManagementmanagementGroups ...
+ ProvidersMicrosoftManagementmanagementGroups Type = "/providers/Microsoft.Management/managementGroups"
)
// PossibleTypeValues returns an array of possible values for the Type const type.
func PossibleTypeValues() []Type {
- return []Type{ProvidersMicrosoftManagementmanagementGroup}
+ return []Type{ProvidersMicrosoftManagementmanagementGroups}
}
// Type1 enumerates the values for type 1.
type Type1 string
const (
- // ProvidersMicrosoftManagementmanagementGroups ...
- ProvidersMicrosoftManagementmanagementGroups Type1 = "/providers/Microsoft.Management/managementGroups"
- // Subscriptions ...
- Subscriptions Type1 = "/subscriptions"
+ // Type1ProvidersMicrosoftManagementmanagementGroups ...
+ Type1ProvidersMicrosoftManagementmanagementGroups Type1 = "/providers/Microsoft.Management/managementGroups"
+ // Type1Subscriptions ...
+ Type1Subscriptions Type1 = "/subscriptions"
)
// PossibleType1Values returns an array of possible values for the Type1 const type.
func PossibleType1Values() []Type1 {
- return []Type1{ProvidersMicrosoftManagementmanagementGroups, Subscriptions}
+ return []Type1{Type1ProvidersMicrosoftManagementmanagementGroups, Type1Subscriptions}
}
// Type2 enumerates the values for type 2.
@@ -139,7 +139,7 @@ func PossibleType2Values() []Type2 {
type CheckNameAvailabilityRequest struct {
// Name - the name to check for availability
Name *string `json:"name,omitempty"`
- // Type - fully qualified resource type which includes provider namespace. Possible values include: 'ProvidersMicrosoftManagementmanagementGroup'
+ // Type - fully qualified resource type which includes provider namespace. Possible values include: 'ProvidersMicrosoftManagementmanagementGroups'
Type Type `json:"type,omitempty"`
}
@@ -156,7 +156,7 @@ type CheckNameAvailabilityResult struct {
// ChildInfo the child information of a management group.
type ChildInfo struct {
- // Type - The fully qualified resource type which includes provider namespace (e.g. /providers/Microsoft.Management/managementGroups). Possible values include: 'ProvidersMicrosoftManagementmanagementGroups', 'Subscriptions'
+ // Type - The fully qualified resource type which includes provider namespace (e.g. /providers/Microsoft.Management/managementGroups). Possible values include: 'Type1ProvidersMicrosoftManagementmanagementGroups', 'Type1Subscriptions'
Type Type1 `json:"type,omitempty"`
// ID - The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
ID *string `json:"id,omitempty"`
@@ -293,12 +293,11 @@ func (cmgr *CreateManagementGroupRequest) UnmarshalJSON(body []byte) error {
// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateOrUpdateFuture) Result(client Client) (so SetObject, err error) {
+func (future *CreateOrUpdateFuture) Result(client Client) (so SetObject, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -306,34 +305,15 @@ func (future CreateOrUpdateFuture) Result(client Client) (so SetObject, err erro
return
}
if !done {
- return so, azure.NewAsyncOpIncompleteError("managementgroups.CreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- so, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managementgroups.CreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.CreateOrUpdateResponder(so.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", so.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- so, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -351,12 +331,11 @@ type CreateParentGroupInfo struct {
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteFuture) Result(client Client) (or OperationResults, err error) {
+func (future *DeleteFuture) Result(client Client) (or OperationResults, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -364,34 +343,15 @@ func (future DeleteFuture) Result(client Client) (or OperationResults, err error
return
}
if !done {
- return or, azure.NewAsyncOpIncompleteError("managementgroups.DeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- or, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managementgroups.DeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if or.Response.Response, err = future.GetResult(sender); err == nil && or.Response.Response.StatusCode != http.StatusNoContent {
+ or, err = client.DeleteResponder(or.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", or.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- or, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/client.go
new file mode 100644
index 000000000..38085ea83
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/client.go
@@ -0,0 +1,231 @@
+// Package managementgroups implements the Azure ARM Managementgroups service API version 2018-03-01-preview.
+//
+// The Azure Management Groups API enables consolidation of multiple subscriptions/resources into an organizational
+// hierarchy and centrally manage access control, policies, alerting and reporting for those resources.
+package managementgroups
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Managementgroups
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Managementgroups.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+}
+
+// New creates an instance of the BaseClient client.
+func New() BaseClient {
+ return NewWithBaseURI(DefaultBaseURI)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ }
+}
+
+// CheckNameAvailability checks if the specified management group name is valid and unique
+// Parameters:
+// checkNameAvailabilityRequest - management group name availability check parameters.
+func (client BaseClient) CheckNameAvailability(ctx context.Context, checkNameAvailabilityRequest CheckNameAvailabilityRequest) (result CheckNameAvailabilityResult, err error) {
+ req, err := client.CheckNameAvailabilityPreparer(ctx, checkNameAvailabilityRequest)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "CheckNameAvailability", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckNameAvailabilitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "CheckNameAvailability", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckNameAvailabilityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "CheckNameAvailability", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request.
+func (client BaseClient) CheckNameAvailabilityPreparer(ctx context.Context, checkNameAvailabilityRequest CheckNameAvailabilityRequest) (*http.Request, error) {
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Management/checkNameAvailability"),
+ autorest.WithJSON(checkNameAvailabilityRequest),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always
+// closes the http.Response Body.
+func (client BaseClient) 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
+}
+
+// StartTenantBackfill starts backfilling subscriptions for the Tenant.
+func (client BaseClient) StartTenantBackfill(ctx context.Context) (result TenantBackfillStatusResult, err error) {
+ req, err := client.StartTenantBackfillPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "StartTenantBackfill", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.StartTenantBackfillSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "StartTenantBackfill", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.StartTenantBackfillResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "StartTenantBackfill", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// StartTenantBackfillPreparer prepares the StartTenantBackfill request.
+func (client BaseClient) StartTenantBackfillPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Management/startTenantBackfill"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StartTenantBackfillSender sends the StartTenantBackfill request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) StartTenantBackfillSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// StartTenantBackfillResponder handles the response to the StartTenantBackfill request. The method always
+// closes the http.Response Body.
+func (client BaseClient) StartTenantBackfillResponder(resp *http.Response) (result TenantBackfillStatusResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// TenantBackfillStatus gets tenant backfill status
+func (client BaseClient) TenantBackfillStatus(ctx context.Context) (result TenantBackfillStatusResult, err error) {
+ req, err := client.TenantBackfillStatusPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "TenantBackfillStatus", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.TenantBackfillStatusSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "TenantBackfillStatus", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.TenantBackfillStatusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "TenantBackfillStatus", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// TenantBackfillStatusPreparer prepares the TenantBackfillStatus request.
+func (client BaseClient) TenantBackfillStatusPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Management/tenantBackfillStatus"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// TenantBackfillStatusSender sends the TenantBackfillStatus request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) TenantBackfillStatusSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// TenantBackfillStatusResponder handles the response to the TenantBackfillStatus request. The method always
+// closes the http.Response Body.
+func (client BaseClient) TenantBackfillStatusResponder(resp *http.Response) (result TenantBackfillStatusResult, 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/services/preview/resources/mgmt/2018-03-01-preview/management/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/entities.go
new file mode 100644
index 000000000..b3b576119
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/entities.go
@@ -0,0 +1,186 @@
+package managementgroups
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// EntitiesClient is the the Azure Management Groups API enables consolidation of multiple subscriptions/resources into
+// an organizational hierarchy and centrally manage access control, policies, alerting and reporting for those
+// resources.
+type EntitiesClient struct {
+ BaseClient
+}
+
+// NewEntitiesClient creates an instance of the EntitiesClient client.
+func NewEntitiesClient() EntitiesClient {
+ return NewEntitiesClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewEntitiesClientWithBaseURI creates an instance of the EntitiesClient client.
+func NewEntitiesClientWithBaseURI(baseURI string) EntitiesClient {
+ return EntitiesClient{NewWithBaseURI(baseURI)}
+}
+
+// List list all entities (Management Groups, Subscriptions, etc.) for the authenticated user.
+// Parameters:
+// skiptoken - page continuation token 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 token
+// parameter that specifies a starting point to use for subsequent calls.
+// skip - number of entities to skip over when retrieving results. Passing this in will override $skipToken.
+// top - number of elements to return when retrieving results. Passing this in will override $skipToken.
+// selectParameter - this parameter specifies the fields to include in the response. Can include any
+// combination of Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g.
+// '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. When specified the $select parameter
+// can override select in $skipToken.
+// search - the $search parameter is used in conjunction with the $filter parameter to return three different
+// outputs depending on the parameter passed in. With $search=AllowedParents the API will return the entity
+// info of all groups that the requested entity will be able to reparent to as determined by the user's
+// permissions. With $search=AllowedChildren the API will return the entity info of all entities that can be
+// added as children of the requested entity. With $search=ParentAndFirstLevelChildren the API will return the
+// parent and first level of children that the user has either direct access to or indirect access via one of
+// their descendants.
+// filter - the filter parameter allows you to filter on the the name or display name fields. You can check for
+// equality on the name field (e.g. name eq '{entityName}') and you can check for substrings on either the
+// name or display name fields(e.g. contains(name, '{substringToSearch}'), contains(displayName,
+// '{substringToSearch')). Note that the '{entityName}' and '{substringToSearch}' fields are checked case
+// insensitively.
+// view - the view parameter allows clients to filter the type of data that is returned by the getEntities
+// call.
+// groupName - a filter which allows the get entities call to focus on a particular group (i.e. "$filter=name
+// eq 'groupName'")
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client EntitiesClient) List(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (result EntityListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, skiptoken, skip, top, selectParameter, search, filter, view, groupName, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.elr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.elr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client EntitiesClient) ListPreparer(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (*http.Request, error) {
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+ if skip != nil {
+ queryParameters["$skip"] = autorest.Encode("query", *skip)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(selectParameter) > 0 {
+ queryParameters["$select"] = autorest.Encode("query", selectParameter)
+ }
+ if len(string(search)) > 0 {
+ queryParameters["$search"] = autorest.Encode("query", search)
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(string(view)) > 0 {
+ queryParameters["$view"] = autorest.Encode("query", view)
+ }
+ if len(groupName) > 0 {
+ queryParameters["groupName"] = autorest.Encode("query", groupName)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Management/getEntities"),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client EntitiesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client EntitiesClient) ListResponder(resp *http.Response) (result EntityListResult, 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 EntitiesClient) listNextResults(lastResults EntityListResult) (result EntityListResult, err error) {
+ req, err := lastResults.entityListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "listNextResults", 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, "managementgroups.EntitiesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client EntitiesClient) ListComplete(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (result EntityListResultIterator, err error) {
+ result.page, err = client.List(ctx, skiptoken, skip, top, selectParameter, search, filter, view, groupName, cacheControl)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/managementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/managementgroups.go
new file mode 100644
index 000000000..c5b8f0aab
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/managementgroups.go
@@ -0,0 +1,460 @@
+package managementgroups
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// Client is the the Azure Management Groups API enables consolidation of multiple subscriptions/resources into an
+// organizational hierarchy and centrally manage access control, policies, alerting and reporting for those resources.
+type Client struct {
+ BaseClient
+}
+
+// NewClient creates an instance of the Client client.
+func NewClient() Client {
+ return NewClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewClientWithBaseURI creates an instance of the Client client.
+func NewClientWithBaseURI(baseURI string) Client {
+ return Client{NewWithBaseURI(baseURI)}
+}
+
+// CreateOrUpdate create or update a management group. If a management group is already created and a subsequent create
+// request is issued with different properties, the management group properties will be updated.
+// Parameters:
+// groupID - management Group ID.
+// createManagementGroupRequest - management group creation parameters.
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client Client) CreateOrUpdate(ctx context.Context, groupID string, createManagementGroupRequest CreateManagementGroupRequest, cacheControl string) (result CreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, groupID, createManagementGroupRequest, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client Client) CreateOrUpdatePreparer(ctx context.Context, groupID string, createManagementGroupRequest CreateManagementGroupRequest, cacheControl string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupId": autorest.Encode("path", groupID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}", pathParameters),
+ autorest.WithJSON(createManagementGroupRequest),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client Client) CreateOrUpdateResponder(resp *http.Response) (result SetObject, 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 delete management group. If a management group contains child resources, the request will fail.
+// Parameters:
+// groupID - management Group ID.
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client Client) Delete(ctx context.Context, groupID string, cacheControl string) (result DeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, groupID, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client Client) DeletePreparer(ctx context.Context, groupID string, cacheControl string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupId": autorest.Encode("path", groupID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client Client) DeleteResponder(resp *http.Response) (result OperationResults, 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 get the details of the management group.
+// Parameters:
+// groupID - management Group ID.
+// expand - the $expand=children query string parameter allows clients to request inclusion of children in the
+// response payload.
+// recurse - the $recurse=true query string parameter allows clients to request inclusion of entire hierarchy
+// in the response payload. Note that $expand=children must be passed up if $recurse is set to true.
+// filter - a filter which allows the exclusion of subscriptions from results (i.e. '$filter=children.childType
+// ne Subscription')
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client Client) Get(ctx context.Context, groupID string, expand string, recurse *bool, filter string, cacheControl string) (result ManagementGroup, err error) {
+ req, err := client.GetPreparer(ctx, groupID, expand, recurse, filter, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client Client) GetPreparer(ctx context.Context, groupID string, expand string, recurse *bool, filter string, cacheControl string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupId": autorest.Encode("path", groupID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+ if recurse != nil {
+ queryParameters["$recurse"] = autorest.Encode("query", *recurse)
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client Client) GetResponder(resp *http.Response) (result ManagementGroup, 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 management groups for the authenticated user.
+// Parameters:
+// cacheControl - indicates that the request shouldn't utilize any caches.
+// skiptoken - page continuation token 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 token
+// parameter that specifies a starting point to use for subsequent calls.
+func (client Client) List(ctx context.Context, cacheControl string, skiptoken string) (result ListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, cacheControl, skiptoken)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client Client) ListPreparer(ctx context.Context, cacheControl string, skiptoken string) (*http.Request, error) {
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(skiptoken) > 0 {
+ queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Management/managementGroups"),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client Client) ListResponder(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
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client Client) listNextResults(lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "managementgroups.Client", "listNextResults", 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, "managementgroups.Client", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client Client) ListComplete(ctx context.Context, cacheControl string, skiptoken string) (result ListResultIterator, err error) {
+ result.page, err = client.List(ctx, cacheControl, skiptoken)
+ return
+}
+
+// Update update a management group.
+// Parameters:
+// groupID - management Group ID.
+// patchGroupRequest - management group patch parameters.
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client Client) Update(ctx context.Context, groupID string, patchGroupRequest PatchManagementGroupRequest, cacheControl string) (result ManagementGroup, err error) {
+ req, err := client.UpdatePreparer(ctx, groupID, patchGroupRequest, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.Client", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client Client) UpdatePreparer(ctx context.Context, groupID string, patchGroupRequest PatchManagementGroupRequest, cacheControl string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupId": autorest.Encode("path", groupID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}", pathParameters),
+ autorest.WithJSON(patchGroupRequest),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client Client) UpdateResponder(resp *http.Response) (result ManagementGroup, 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/services/preview/resources/mgmt/2018-03-01-preview/management/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/models.go
new file mode 100644
index 000000000..e422a4054
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/models.go
@@ -0,0 +1,1246 @@
+package managementgroups
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "net/http"
+)
+
+// InheritedPermissions enumerates the values for inherited permissions.
+type InheritedPermissions string
+
+const (
+ // Delete ...
+ Delete InheritedPermissions = "delete"
+ // Edit ...
+ Edit InheritedPermissions = "edit"
+ // Noaccess ...
+ Noaccess InheritedPermissions = "noaccess"
+ // View ...
+ View InheritedPermissions = "view"
+)
+
+// PossibleInheritedPermissionsValues returns an array of possible values for the InheritedPermissions const type.
+func PossibleInheritedPermissionsValues() []InheritedPermissions {
+ return []InheritedPermissions{Delete, Edit, Noaccess, View}
+}
+
+// Permissions enumerates the values for permissions.
+type Permissions string
+
+const (
+ // PermissionsDelete ...
+ PermissionsDelete Permissions = "delete"
+ // PermissionsEdit ...
+ PermissionsEdit Permissions = "edit"
+ // PermissionsNoaccess ...
+ PermissionsNoaccess Permissions = "noaccess"
+ // PermissionsView ...
+ PermissionsView Permissions = "view"
+)
+
+// PossiblePermissionsValues returns an array of possible values for the Permissions const type.
+func PossiblePermissionsValues() []Permissions {
+ return []Permissions{PermissionsDelete, PermissionsEdit, PermissionsNoaccess, PermissionsView}
+}
+
+// Permissions1 enumerates the values for permissions 1.
+type Permissions1 string
+
+const (
+ // Permissions1Delete ...
+ Permissions1Delete Permissions1 = "delete"
+ // Permissions1Edit ...
+ Permissions1Edit Permissions1 = "edit"
+ // Permissions1Noaccess ...
+ Permissions1Noaccess Permissions1 = "noaccess"
+ // Permissions1View ...
+ Permissions1View Permissions1 = "view"
+)
+
+// PossiblePermissions1Values returns an array of possible values for the Permissions1 const type.
+func PossiblePermissions1Values() []Permissions1 {
+ return []Permissions1{Permissions1Delete, Permissions1Edit, Permissions1Noaccess, Permissions1View}
+}
+
+// ProvisioningState enumerates the values for provisioning state.
+type ProvisioningState string
+
+const (
+ // Updating ...
+ Updating ProvisioningState = "Updating"
+)
+
+// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
+func PossibleProvisioningStateValues() []ProvisioningState {
+ return []ProvisioningState{Updating}
+}
+
+// Reason enumerates the values for reason.
+type Reason string
+
+const (
+ // AlreadyExists ...
+ AlreadyExists Reason = "AlreadyExists"
+ // Invalid ...
+ Invalid Reason = "Invalid"
+)
+
+// PossibleReasonValues returns an array of possible values for the Reason const type.
+func PossibleReasonValues() []Reason {
+ return []Reason{AlreadyExists, Invalid}
+}
+
+// Status enumerates the values for status.
+type Status string
+
+const (
+ // Cancelled ...
+ Cancelled Status = "Cancelled"
+ // Completed ...
+ Completed Status = "Completed"
+ // Failed ...
+ Failed Status = "Failed"
+ // NotStarted ...
+ NotStarted Status = "NotStarted"
+ // NotStartedButGroupsExist ...
+ NotStartedButGroupsExist Status = "NotStartedButGroupsExist"
+ // Started ...
+ Started Status = "Started"
+)
+
+// PossibleStatusValues returns an array of possible values for the Status const type.
+func PossibleStatusValues() []Status {
+ return []Status{Cancelled, Completed, Failed, NotStarted, NotStartedButGroupsExist, Started}
+}
+
+// Type enumerates the values for type.
+type Type string
+
+const (
+ // ProvidersMicrosoftManagementmanagementGroups ...
+ ProvidersMicrosoftManagementmanagementGroups Type = "/providers/Microsoft.Management/managementGroups"
+)
+
+// PossibleTypeValues returns an array of possible values for the Type const type.
+func PossibleTypeValues() []Type {
+ return []Type{ProvidersMicrosoftManagementmanagementGroups}
+}
+
+// Type1 enumerates the values for type 1.
+type Type1 string
+
+const (
+ // Type1ProvidersMicrosoftManagementmanagementGroups ...
+ Type1ProvidersMicrosoftManagementmanagementGroups Type1 = "/providers/Microsoft.Management/managementGroups"
+ // Type1Subscriptions ...
+ Type1Subscriptions Type1 = "/subscriptions"
+)
+
+// PossibleType1Values returns an array of possible values for the Type1 const type.
+func PossibleType1Values() []Type1 {
+ return []Type1{Type1ProvidersMicrosoftManagementmanagementGroups, Type1Subscriptions}
+}
+
+// Type2 enumerates the values for type 2.
+type Type2 string
+
+const (
+ // Type2ProvidersMicrosoftManagementmanagementGroups ...
+ Type2ProvidersMicrosoftManagementmanagementGroups Type2 = "/providers/Microsoft.Management/managementGroups"
+ // Type2Subscriptions ...
+ Type2Subscriptions Type2 = "/subscriptions"
+)
+
+// PossibleType2Values returns an array of possible values for the Type2 const type.
+func PossibleType2Values() []Type2 {
+ return []Type2{Type2ProvidersMicrosoftManagementmanagementGroups, Type2Subscriptions}
+}
+
+// CheckNameAvailabilityRequest management group name availability check parameters.
+type CheckNameAvailabilityRequest struct {
+ // Name - the name to check for availability
+ Name *string `json:"name,omitempty"`
+ // Type - fully qualified resource type which includes provider namespace. Possible values include: 'ProvidersMicrosoftManagementmanagementGroups'
+ Type Type `json:"type,omitempty"`
+}
+
+// CheckNameAvailabilityResult describes the result of the request to check management group name availability.
+type CheckNameAvailabilityResult struct {
+ autorest.Response `json:"-"`
+ // NameAvailable - Required. True indicates name is valid and available. False indicates the name is invalid, unavailable, or both.
+ NameAvailable *bool `json:"nameAvailable,omitempty"`
+ // Reason - Required if nameAvailable == false. Invalid indicates the name provided does not match the resource provider's naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. Possible values include: 'Invalid', 'AlreadyExists'
+ Reason Reason `json:"reason,omitempty"`
+ // Message - Required if nameAvailable == false. Localized. If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name.
+ Message *string `json:"message,omitempty"`
+}
+
+// ChildInfo the child information of a management group.
+type ChildInfo struct {
+ // Type - The fully qualified resource type which includes provider namespace (e.g. /providers/Microsoft.Management/managementGroups). Possible values include: 'Type1ProvidersMicrosoftManagementmanagementGroups', 'Type1Subscriptions'
+ Type Type1 `json:"type,omitempty"`
+ // ID - The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the child entity.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The friendly name of the child resource.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Roles - The roles definitions associated with the management group.
+ Roles *[]string `json:"roles,omitempty"`
+ // Children - The list of children.
+ Children *[]ChildInfo `json:"children,omitempty"`
+}
+
+// CreateManagementGroupChildInfo the child information of a management group used during creation.
+type CreateManagementGroupChildInfo struct {
+ // Type - The fully qualified resource type which includes provider namespace (e.g. /providers/Microsoft.Management/managementGroups). Possible values include: 'Type2ProvidersMicrosoftManagementmanagementGroups', 'Type2Subscriptions'
+ Type Type2 `json:"type,omitempty"`
+ // ID - The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the child entity.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The friendly name of the child resource.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Roles - The roles definitions associated with the management group.
+ Roles *[]string `json:"roles,omitempty"`
+ // Children - The list of children.
+ Children *[]CreateManagementGroupChildInfo `json:"children,omitempty"`
+}
+
+// CreateManagementGroupDetails the details of a management group used during creation.
+type CreateManagementGroupDetails struct {
+ // Version - The version number of the object.
+ Version *float64 `json:"version,omitempty"`
+ // UpdatedTime - The date and time when this object was last updated.
+ UpdatedTime *date.Time `json:"updatedTime,omitempty"`
+ // UpdatedBy - The identity of the principal or process that updated the object.
+ UpdatedBy *string `json:"updatedBy,omitempty"`
+ Parent *CreateParentGroupInfo `json:"parent,omitempty"`
+}
+
+// CreateManagementGroupProperties the generic properties of a management group used during creation.
+type CreateManagementGroupProperties struct {
+ // TenantID - The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000
+ TenantID *string `json:"tenantId,omitempty"`
+ // DisplayName - The friendly name of the management group. If no value is passed then this field will be set to the groupId.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Roles - The roles definitions associated with the management group.
+ Roles *[]string `json:"roles,omitempty"`
+ Details *CreateManagementGroupDetails `json:"details,omitempty"`
+ // Children - The list of children.
+ Children *[]CreateManagementGroupChildInfo `json:"children,omitempty"`
+}
+
+// CreateManagementGroupRequest management group creation parameters.
+type CreateManagementGroupRequest struct {
+ // ID - The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Type - The type of the resource. For example, /providers/Microsoft.Management/managementGroups
+ Type *string `json:"type,omitempty"`
+ // Name - The name of the management group. For example, 00000000-0000-0000-0000-000000000000
+ Name *string `json:"name,omitempty"`
+ *CreateManagementGroupProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CreateManagementGroupRequest.
+func (cmgr CreateManagementGroupRequest) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cmgr.ID != nil {
+ objectMap["id"] = cmgr.ID
+ }
+ if cmgr.Type != nil {
+ objectMap["type"] = cmgr.Type
+ }
+ if cmgr.Name != nil {
+ objectMap["name"] = cmgr.Name
+ }
+ if cmgr.CreateManagementGroupProperties != nil {
+ objectMap["properties"] = cmgr.CreateManagementGroupProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for CreateManagementGroupRequest struct.
+func (cmgr *CreateManagementGroupRequest) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ cmgr.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cmgr.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cmgr.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var createManagementGroupProperties CreateManagementGroupProperties
+ err = json.Unmarshal(*v, &createManagementGroupProperties)
+ if err != nil {
+ return err
+ }
+ cmgr.CreateManagementGroupProperties = &createManagementGroupProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type CreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *CreateOrUpdateFuture) Result(client Client) (so SetObject, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("managementgroups.CreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.CreateOrUpdateResponder(so.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.CreateOrUpdateFuture", "Result", so.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// CreateParentGroupInfo (Optional) The ID of the parent management group used during creation.
+type CreateParentGroupInfo struct {
+ // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the parent management group
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The friendly name of the parent management group.
+ DisplayName *string `json:"displayName,omitempty"`
+}
+
+// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type DeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *DeleteFuture) Result(client Client) (or OperationResults, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("managementgroups.DeleteFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if or.Response.Response, err = future.GetResult(sender); err == nil && or.Response.Response.StatusCode != http.StatusNoContent {
+ or, err = client.DeleteResponder(or.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.DeleteFuture", "Result", or.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// Details the details of a management group.
+type Details struct {
+ // Version - The version number of the object.
+ Version *float64 `json:"version,omitempty"`
+ // UpdatedTime - The date and time when this object was last updated.
+ UpdatedTime *date.Time `json:"updatedTime,omitempty"`
+ // UpdatedBy - The identity of the principal or process that updated the object.
+ UpdatedBy *string `json:"updatedBy,omitempty"`
+ Parent *ParentGroupInfo `json:"parent,omitempty"`
+}
+
+// EntityHierarchyItem the management group details for the hierarchy view.
+type EntityHierarchyItem struct {
+ // ID - The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Type - The type of the resource. For example, /providers/Microsoft.Management/managementGroups
+ Type *string `json:"type,omitempty"`
+ // Name - The name of the management group. For example, 00000000-0000-0000-0000-000000000000
+ Name *string `json:"name,omitempty"`
+ *EntityHierarchyItemProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for EntityHierarchyItem.
+func (ehi EntityHierarchyItem) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ehi.ID != nil {
+ objectMap["id"] = ehi.ID
+ }
+ if ehi.Type != nil {
+ objectMap["type"] = ehi.Type
+ }
+ if ehi.Name != nil {
+ objectMap["name"] = ehi.Name
+ }
+ if ehi.EntityHierarchyItemProperties != nil {
+ objectMap["properties"] = ehi.EntityHierarchyItemProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for EntityHierarchyItem struct.
+func (ehi *EntityHierarchyItem) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ehi.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ehi.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ehi.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var entityHierarchyItemProperties EntityHierarchyItemProperties
+ err = json.Unmarshal(*v, &entityHierarchyItemProperties)
+ if err != nil {
+ return err
+ }
+ ehi.EntityHierarchyItemProperties = &entityHierarchyItemProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// EntityHierarchyItemProperties the generic properties of a management group.
+type EntityHierarchyItemProperties struct {
+ // DisplayName - The friendly name of the management group.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Permissions - Possible values include: 'Permissions1Noaccess', 'Permissions1View', 'Permissions1Edit', 'Permissions1Delete'
+ Permissions Permissions1 `json:"permissions,omitempty"`
+ // Children - The list of children.
+ Children *[]EntityHierarchyItem `json:"children,omitempty"`
+}
+
+// EntityInfo the entity.
+type EntityInfo struct {
+ // ID - The fully qualified ID for the entity. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Type - The type of the resource. For example, /providers/Microsoft.Management/managementGroups
+ Type *string `json:"type,omitempty"`
+ // Name - The name of the entity. For example, 00000000-0000-0000-0000-000000000000
+ Name *string `json:"name,omitempty"`
+ *EntityInfoProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for EntityInfo.
+func (ei EntityInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ei.ID != nil {
+ objectMap["id"] = ei.ID
+ }
+ if ei.Type != nil {
+ objectMap["type"] = ei.Type
+ }
+ if ei.Name != nil {
+ objectMap["name"] = ei.Name
+ }
+ if ei.EntityInfoProperties != nil {
+ objectMap["properties"] = ei.EntityInfoProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for EntityInfo struct.
+func (ei *EntityInfo) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ei.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ei.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ei.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var entityInfoProperties EntityInfoProperties
+ err = json.Unmarshal(*v, &entityInfoProperties)
+ if err != nil {
+ return err
+ }
+ ei.EntityInfoProperties = &entityInfoProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// EntityInfoProperties the generic properties of an entity.
+type EntityInfoProperties struct {
+ // TenantID - The AAD Tenant ID associated with the entity. For example, 00000000-0000-0000-0000-000000000000
+ TenantID *string `json:"tenantId,omitempty"`
+ // DisplayName - The friendly name of the management group.
+ DisplayName *string `json:"displayName,omitempty"`
+ Parent *EntityParentGroupInfo `json:"parent,omitempty"`
+ // Permissions - Possible values include: 'PermissionsNoaccess', 'PermissionsView', 'PermissionsEdit', 'PermissionsDelete'
+ Permissions Permissions `json:"permissions,omitempty"`
+ // InheritedPermissions - Possible values include: 'Noaccess', 'View', 'Edit', 'Delete'
+ InheritedPermissions InheritedPermissions `json:"inheritedPermissions,omitempty"`
+ NumberOfDescendants *int32 `json:"numberOfDescendants,omitempty"`
+ // ParentDisplayNameChain - The parent display name chain from the root group to the immediate parent
+ ParentDisplayNameChain *[]string `json:"parentDisplayNameChain,omitempty"`
+ // ParentNameChain - The parent name chain from the root group to the immediate parent
+ ParentNameChain *[]string `json:"parentNameChain,omitempty"`
+}
+
+// EntityListResult describes the result of the request to view entities.
+type EntityListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of entities.
+ Value *[]EntityInfo `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// EntityListResultIterator provides access to a complete listing of EntityInfo values.
+type EntityListResultIterator struct {
+ i int
+ page EntityListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *EntityListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter EntityListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter EntityListResultIterator) Response() EntityListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter EntityListResultIterator) Value() EntityInfo {
+ if !iter.page.NotDone() {
+ return EntityInfo{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (elr EntityListResult) IsEmpty() bool {
+ return elr.Value == nil || len(*elr.Value) == 0
+}
+
+// entityListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (elr EntityListResult) entityListResultPreparer() (*http.Request, error) {
+ if elr.NextLink == nil || len(to.String(elr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(elr.NextLink)))
+}
+
+// EntityListResultPage contains a page of EntityInfo values.
+type EntityListResultPage struct {
+ fn func(EntityListResult) (EntityListResult, error)
+ elr EntityListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *EntityListResultPage) Next() error {
+ next, err := page.fn(page.elr)
+ if err != nil {
+ return err
+ }
+ page.elr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page EntityListResultPage) NotDone() bool {
+ return !page.elr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page EntityListResultPage) Response() EntityListResult {
+ return page.elr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page EntityListResultPage) Values() []EntityInfo {
+ if page.elr.IsEmpty() {
+ return nil
+ }
+ return *page.elr.Value
+}
+
+// EntityParentGroupInfo (Optional) The ID of the parent management group.
+type EntityParentGroupInfo struct {
+ // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+}
+
+// ErrorDetails the details of the error.
+type ErrorDetails struct {
+ // Code - One of a server-defined set of error codes.
+ Code *string `json:"code,omitempty"`
+ // Message - A human-readable representation of the error.
+ Message *string `json:"message,omitempty"`
+ // Details - A human-readable representation of the error's details.
+ Details *string `json:"details,omitempty"`
+}
+
+// ErrorResponse the error object.
+type ErrorResponse struct {
+ Error *ErrorDetails `json:"error,omitempty"`
+}
+
+// Info the management group resource.
+type Info struct {
+ // ID - The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Type - The type of the resource. For example, /providers/Microsoft.Management/managementGroups
+ Type *string `json:"type,omitempty"`
+ // Name - The name of the management group. For example, 00000000-0000-0000-0000-000000000000
+ Name *string `json:"name,omitempty"`
+ *InfoProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Info.
+func (i Info) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if i.ID != nil {
+ objectMap["id"] = i.ID
+ }
+ if i.Type != nil {
+ objectMap["type"] = i.Type
+ }
+ if i.Name != nil {
+ objectMap["name"] = i.Name
+ }
+ if i.InfoProperties != nil {
+ objectMap["properties"] = i.InfoProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Info struct.
+func (i *Info) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ i.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ i.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ i.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var infoProperties InfoProperties
+ err = json.Unmarshal(*v, &infoProperties)
+ if err != nil {
+ return err
+ }
+ i.InfoProperties = &infoProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// InfoProperties the generic properties of a management group.
+type InfoProperties struct {
+ // TenantID - The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000
+ TenantID *string `json:"tenantId,omitempty"`
+ // DisplayName - The friendly name of the management group.
+ DisplayName *string `json:"displayName,omitempty"`
+}
+
+// ListResult describes the result of the request to list management groups.
+type ListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of management groups.
+ Value *[]Info `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListResultIterator provides access to a complete listing of Info values.
+type ListResultIterator struct {
+ i int
+ page ListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ListResultIterator) Response() ListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ListResultIterator) Value() Info {
+ if !iter.page.NotDone() {
+ return Info{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lr ListResult) IsEmpty() bool {
+ return lr.Value == nil || len(*lr.Value) == 0
+}
+
+// listResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lr ListResult) listResultPreparer() (*http.Request, error) {
+ if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lr.NextLink)))
+}
+
+// ListResultPage contains a page of Info values.
+type ListResultPage struct {
+ fn func(ListResult) (ListResult, error)
+ lr ListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ListResultPage) Next() error {
+ next, err := page.fn(page.lr)
+ if err != nil {
+ return err
+ }
+ page.lr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListResultPage) NotDone() bool {
+ return !page.lr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListResultPage) Response() ListResult {
+ return page.lr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListResultPage) Values() []Info {
+ if page.lr.IsEmpty() {
+ return nil
+ }
+ return *page.lr.Value
+}
+
+// ManagementGroup the management group details.
+type ManagementGroup struct {
+ autorest.Response `json:"-"`
+ // ID - The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Type - The type of the resource. For example, /providers/Microsoft.Management/managementGroups
+ Type *string `json:"type,omitempty"`
+ // Name - The name of the management group. For example, 00000000-0000-0000-0000-000000000000
+ Name *string `json:"name,omitempty"`
+ *Properties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagementGroup.
+func (mg ManagementGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mg.ID != nil {
+ objectMap["id"] = mg.ID
+ }
+ if mg.Type != nil {
+ objectMap["type"] = mg.Type
+ }
+ if mg.Name != nil {
+ objectMap["name"] = mg.Name
+ }
+ if mg.Properties != nil {
+ objectMap["properties"] = mg.Properties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ManagementGroup struct.
+func (mg *ManagementGroup) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ mg.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ mg.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ mg.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var properties Properties
+ err = json.Unmarshal(*v, &properties)
+ if err != nil {
+ return err
+ }
+ mg.Properties = &properties
+ }
+ }
+ }
+
+ return nil
+}
+
+// Operation operation supported by the Microsoft.Management resource provider.
+type Operation struct {
+ // Name - Operation name: {provider}/{resource}/{operation}.
+ Name *string `json:"name,omitempty"`
+ Display *OperationDisplayProperties `json:"display,omitempty"`
+}
+
+// OperationDisplayProperties the object that represents the operation.
+type OperationDisplayProperties struct {
+ // Provider - The name of the provider.
+ Provider *string `json:"provider,omitempty"`
+ // Resource - The resource on which the operation is performed.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - The operation that can be performed.
+ Operation *string `json:"operation,omitempty"`
+ // Description - Operation description.
+ Description *string `json:"description,omitempty"`
+}
+
+// OperationListResult describes the result of the request to list Microsoft.Management operations.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of operations supported by the Microsoft.Management resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+ // NextLink - URL to get the next set of operation list results if there are any.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// OperationListResultIterator provides access to a complete listing of Operation values.
+type OperationListResultIterator struct {
+ i int
+ page OperationListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OperationListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OperationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OperationListResultIterator) Response() OperationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OperationListResultIterator) Value() Operation {
+ if !iter.page.NotDone() {
+ return Operation{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (olr OperationListResult) IsEmpty() bool {
+ return olr.Value == nil || len(*olr.Value) == 0
+}
+
+// operationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+ if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(olr.NextLink)))
+}
+
+// OperationListResultPage contains a page of Operation values.
+type OperationListResultPage struct {
+ fn func(OperationListResult) (OperationListResult, error)
+ olr OperationListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OperationListResultPage) Next() error {
+ next, err := page.fn(page.olr)
+ if err != nil {
+ return err
+ }
+ page.olr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OperationListResultPage) NotDone() bool {
+ return !page.olr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OperationListResultPage) Response() OperationListResult {
+ return page.olr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OperationListResultPage) Values() []Operation {
+ if page.olr.IsEmpty() {
+ return nil
+ }
+ return *page.olr.Value
+}
+
+// OperationResults the results of an asynchronous operation.
+type OperationResults struct {
+ autorest.Response `json:"-"`
+ // ID - The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Type - The type of the resource. For example, /providers/Microsoft.Management/managementGroups
+ Type *string `json:"type,omitempty"`
+ // Name - The name of the management group. For example, 00000000-0000-0000-0000-000000000000
+ Name *string `json:"name,omitempty"`
+ *OperationResultsProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OperationResults.
+func (or OperationResults) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if or.ID != nil {
+ objectMap["id"] = or.ID
+ }
+ if or.Type != nil {
+ objectMap["type"] = or.Type
+ }
+ if or.Name != nil {
+ objectMap["name"] = or.Name
+ }
+ if or.OperationResultsProperties != nil {
+ objectMap["properties"] = or.OperationResultsProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for OperationResults struct.
+func (or *OperationResults) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ or.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ or.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ or.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var operationResultsProperties OperationResultsProperties
+ err = json.Unmarshal(*v, &operationResultsProperties)
+ if err != nil {
+ return err
+ }
+ or.OperationResultsProperties = &operationResultsProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// OperationResultsProperties ...
+type OperationResultsProperties struct {
+ // ProvisioningState - Possible values include: 'Updating'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+}
+
+// ParentGroupInfo (Optional) The ID of the parent management group.
+type ParentGroupInfo struct {
+ // ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the parent management group
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The friendly name of the parent management group.
+ DisplayName *string `json:"displayName,omitempty"`
+}
+
+// PatchManagementGroupRequest management group patch parameters.
+type PatchManagementGroupRequest struct {
+ // DisplayName - The friendly name of the management group.
+ DisplayName *string `json:"displayName,omitempty"`
+ // ParentID - (Optional) The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
+ ParentID *string `json:"parentId,omitempty"`
+}
+
+// Properties the generic properties of a management group.
+type Properties struct {
+ // TenantID - The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000
+ TenantID *string `json:"tenantId,omitempty"`
+ // DisplayName - The friendly name of the management group.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Roles - The role definitions associated with the management group.
+ Roles *[]string `json:"roles,omitempty"`
+ Details *Details `json:"details,omitempty"`
+ // Children - The list of children.
+ Children *[]ChildInfo `json:"children,omitempty"`
+}
+
+// SetObject ...
+type SetObject struct {
+ autorest.Response `json:"-"`
+ Value interface{} `json:"value,omitempty"`
+}
+
+// TenantBackfillStatusResult the tenant backfill status
+type TenantBackfillStatusResult struct {
+ autorest.Response `json:"-"`
+ // TenantID - The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000
+ TenantID *string `json:"tenantId,omitempty"`
+ // Status - The status of the Tenant Backfill. Possible values include: 'NotStarted', 'NotStartedButGroupsExist', 'Started', 'Failed', 'Cancelled', 'Completed'
+ Status Status `json:"status,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/operations.go
new file mode 100644
index 000000000..26c8dd758
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/operations.go
@@ -0,0 +1,128 @@
+package managementgroups
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// OperationsClient is the the Azure Management Groups API enables consolidation of multiple subscriptions/resources
+// into an organizational hierarchy and centrally manage access control, policies, alerting and reporting for those
+// resources.
+type OperationsClient struct {
+ BaseClient
+}
+
+// NewOperationsClient creates an instance of the OperationsClient client.
+func NewOperationsClient() OperationsClient {
+ return NewOperationsClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
+func NewOperationsClientWithBaseURI(baseURI string) OperationsClient {
+ return OperationsClient{NewWithBaseURI(baseURI)}
+}
+
+// List lists all of the available Management REST API operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.olr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.olr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Management/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// 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, "managementgroups.OperationsClient", "listNextResults", 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, "managementgroups.OperationsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/subscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/subscriptions.go
new file mode 100644
index 000000000..50a883ff3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/subscriptions.go
@@ -0,0 +1,188 @@
+package managementgroups
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// SubscriptionsClient is the the Azure Management Groups API enables consolidation of multiple subscriptions/resources
+// into an organizational hierarchy and centrally manage access control, policies, alerting and reporting for those
+// resources.
+type SubscriptionsClient struct {
+ BaseClient
+}
+
+// NewSubscriptionsClient creates an instance of the SubscriptionsClient client.
+func NewSubscriptionsClient() SubscriptionsClient {
+ return NewSubscriptionsClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client.
+func NewSubscriptionsClientWithBaseURI(baseURI string) SubscriptionsClient {
+ return SubscriptionsClient{NewWithBaseURI(baseURI)}
+}
+
+// Create associates existing subscription with the management group.
+// Parameters:
+// groupID - management Group ID.
+// subscriptionID - subscription ID.
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client SubscriptionsClient) Create(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (result autorest.Response, err error) {
+ req, err := client.CreatePreparer(ctx, groupID, subscriptionID, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Create", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Create", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client SubscriptionsClient) CreatePreparer(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupId": autorest.Encode("path", groupID),
+ "subscriptionId": autorest.Encode("path", subscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client SubscriptionsClient) CreateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client SubscriptionsClient) CreateResponder(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
+}
+
+// Delete de-associates subscription from the management group.
+// Parameters:
+// groupID - management Group ID.
+// subscriptionID - subscription ID.
+// cacheControl - indicates that the request shouldn't utilize any caches.
+func (client SubscriptionsClient) Delete(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, groupID, subscriptionID, cacheControl)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client SubscriptionsClient) DeletePreparer(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "groupId": autorest.Encode("path", groupID),
+ "subscriptionId": autorest.Encode("path", subscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(cacheControl) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String(cacheControl)))
+ } else {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("Cache-Control", autorest.String("no-cache")))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client SubscriptionsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client SubscriptionsClient) 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/services/preview/resources/mgmt/2018-03-01-preview/management/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/version.go
new file mode 100644
index 000000000..1816eb81e
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/version.go
@@ -0,0 +1,30 @@
+package managementgroups
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " managementgroups/2018-03-01-preview"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/gateway.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/gateway.go
index 415234252..c10287c7e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/gateway.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/gateway.go
@@ -99,15 +99,17 @@ func (client GatewayClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client GatewayClient) CreateSender(req *http.Request) (future GatewayCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -342,15 +344,17 @@ func (client GatewayClient) GetProfilePreparer(ctx context.Context, resourceGrou
// GetProfileSender sends the GetProfile request. The method will close the
// http.Response Body if it receives an error.
func (client GatewayClient) GetProfileSender(req *http.Request) (future GatewayGetProfileFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -614,15 +618,17 @@ func (client GatewayClient) RegenerateProfilePreparer(ctx context.Context, resou
// RegenerateProfileSender sends the RegenerateProfile request. The method will close the
// http.Response Body if it receives an error.
func (client GatewayClient) RegenerateProfileSender(req *http.Request) (future GatewayRegenerateProfileFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -697,15 +703,17 @@ func (client GatewayClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client GatewayClient) UpdateSender(req *http.Request) (future GatewayUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -778,15 +786,17 @@ func (client GatewayClient) UpgradePreparer(ctx context.Context, resourceGroupNa
// UpgradeSender sends the Upgrade request. The method will close the
// http.Response Body if it receives an error.
func (client GatewayClient) UpgradeSender(req *http.Request) (future GatewayUpgradeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/models.go
index 0ccf5c9b8..836218042 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/models.go
@@ -94,12 +94,11 @@ type Error struct {
// GatewayCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GatewayCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GatewayCreateFuture) Result(client GatewayClient) (gr GatewayResource, err error) {
+func (future *GatewayCreateFuture) Result(client GatewayClient) (gr GatewayResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -107,34 +106,15 @@ func (future GatewayCreateFuture) Result(client GatewayClient) (gr GatewayResour
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("servermanagement.GatewayCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.GatewayCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.GatewayCreateFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -142,12 +122,11 @@ func (future GatewayCreateFuture) Result(client GatewayClient) (gr GatewayResour
// GatewayGetProfileFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GatewayGetProfileFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GatewayGetProfileFuture) Result(client GatewayClient) (gp GatewayProfile, err error) {
+func (future *GatewayGetProfileFuture) Result(client GatewayClient) (gp GatewayProfile, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -155,34 +134,15 @@ func (future GatewayGetProfileFuture) Result(client GatewayClient) (gp GatewayPr
return
}
if !done {
- return gp, azure.NewAsyncOpIncompleteError("servermanagement.GatewayGetProfileFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gp, err = client.GetProfileResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayGetProfileFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.GatewayGetProfileFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gp.Response.Response, err = future.GetResult(sender); err == nil && gp.Response.Response.StatusCode != http.StatusNoContent {
+ gp, err = client.GetProfileResponder(gp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.GatewayGetProfileFuture", "Result", gp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayGetProfileFuture", "Result", resp, "Failure sending request")
- return
- }
- gp, err = client.GetProfileResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayGetProfileFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -286,12 +246,11 @@ type GatewayProfile struct {
// operation.
type GatewayRegenerateProfileFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GatewayRegenerateProfileFuture) Result(client GatewayClient) (ar autorest.Response, err error) {
+func (future *GatewayRegenerateProfileFuture) Result(client GatewayClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -299,35 +258,10 @@ func (future GatewayRegenerateProfileFuture) Result(client GatewayClient) (ar au
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("servermanagement.GatewayRegenerateProfileFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RegenerateProfileResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayRegenerateProfileFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.GatewayRegenerateProfileFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayRegenerateProfileFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RegenerateProfileResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayRegenerateProfileFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -604,12 +538,11 @@ type GatewayStatus struct {
// GatewayUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GatewayUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GatewayUpdateFuture) Result(client GatewayClient) (gr GatewayResource, err error) {
+func (future *GatewayUpdateFuture) Result(client GatewayClient) (gr GatewayResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -617,34 +550,15 @@ func (future GatewayUpdateFuture) Result(client GatewayClient) (gr GatewayResour
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("servermanagement.GatewayUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.GatewayUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -652,12 +566,11 @@ func (future GatewayUpdateFuture) Result(client GatewayClient) (gr GatewayResour
// GatewayUpgradeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GatewayUpgradeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GatewayUpgradeFuture) Result(client GatewayClient) (ar autorest.Response, err error) {
+func (future *GatewayUpgradeFuture) Result(client GatewayClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -665,47 +578,21 @@ func (future GatewayUpgradeFuture) Result(client GatewayClient) (ar autorest.Res
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("servermanagement.GatewayUpgradeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.UpgradeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpgradeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.GatewayUpgradeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpgradeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.UpgradeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpgradeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// NodeCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type NodeCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NodeCreateFuture) Result(client NodeClient) (nr NodeResource, err error) {
+func (future *NodeCreateFuture) Result(client NodeClient) (nr NodeResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -713,34 +600,15 @@ func (future NodeCreateFuture) Result(client NodeClient) (nr NodeResource, err e
return
}
if !done {
- return nr, azure.NewAsyncOpIncompleteError("servermanagement.NodeCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.NodeCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.NodeCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nr.Response.Response, err = future.GetResult(sender); err == nil && nr.Response.Response.StatusCode != http.StatusNoContent {
+ nr, err = client.CreateResponder(nr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.NodeCreateFuture", "Result", nr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.NodeCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- nr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.NodeCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1060,12 +928,11 @@ func (page NodeResourcesPage) Values() []NodeResource {
// NodeUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type NodeUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NodeUpdateFuture) Result(client NodeClient) (nr NodeResource, err error) {
+func (future *NodeUpdateFuture) Result(client NodeClient) (nr NodeResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1073,34 +940,15 @@ func (future NodeUpdateFuture) Result(client NodeClient) (nr NodeResource, err e
return
}
if !done {
- return nr, azure.NewAsyncOpIncompleteError("servermanagement.NodeUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.NodeUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.NodeUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nr.Response.Response, err = future.GetResult(sender); err == nil && nr.Response.Response.StatusCode != http.StatusNoContent {
+ nr, err = client.UpdateResponder(nr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.NodeUpdateFuture", "Result", nr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.NodeUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- nr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.NodeUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1109,12 +957,11 @@ func (future NodeUpdateFuture) Result(client NodeClient) (nr NodeResource, err e
// operation.
type PowerShellCancelCommandFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PowerShellCancelCommandFuture) Result(client PowerShellClient) (pscr PowerShellCommandResults, err error) {
+func (future *PowerShellCancelCommandFuture) Result(client PowerShellClient) (pscr PowerShellCommandResults, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1122,34 +969,15 @@ func (future PowerShellCancelCommandFuture) Result(client PowerShellClient) (psc
return
}
if !done {
- return pscr, azure.NewAsyncOpIncompleteError("servermanagement.PowerShellCancelCommandFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pscr, err = client.CancelCommandResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCancelCommandFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.PowerShellCancelCommandFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pscr.Response.Response, err = future.GetResult(sender); err == nil && pscr.Response.Response.StatusCode != http.StatusNoContent {
+ pscr, err = client.CancelCommandResponder(pscr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCancelCommandFuture", "Result", pscr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCancelCommandFuture", "Result", resp, "Failure sending request")
- return
- }
- pscr, err = client.CancelCommandResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCancelCommandFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1357,12 +1185,11 @@ func (pscs *PowerShellCommandStatus) UnmarshalJSON(body []byte) error {
// operation.
type PowerShellCreateSessionFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PowerShellCreateSessionFuture) Result(client PowerShellClient) (pssr PowerShellSessionResource, err error) {
+func (future *PowerShellCreateSessionFuture) Result(client PowerShellClient) (pssr PowerShellSessionResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1370,34 +1197,15 @@ func (future PowerShellCreateSessionFuture) Result(client PowerShellClient) (pss
return
}
if !done {
- return pssr, azure.NewAsyncOpIncompleteError("servermanagement.PowerShellCreateSessionFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pssr, err = client.CreateSessionResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCreateSessionFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.PowerShellCreateSessionFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pssr.Response.Response, err = future.GetResult(sender); err == nil && pssr.Response.Response.StatusCode != http.StatusNoContent {
+ pssr, err = client.CreateSessionResponder(pssr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCreateSessionFuture", "Result", pssr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCreateSessionFuture", "Result", resp, "Failure sending request")
- return
- }
- pssr, err = client.CreateSessionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCreateSessionFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1406,12 +1214,11 @@ func (future PowerShellCreateSessionFuture) Result(client PowerShellClient) (pss
// operation.
type PowerShellInvokeCommandFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PowerShellInvokeCommandFuture) Result(client PowerShellClient) (pscr PowerShellCommandResults, err error) {
+func (future *PowerShellInvokeCommandFuture) Result(client PowerShellClient) (pscr PowerShellCommandResults, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1419,34 +1226,15 @@ func (future PowerShellInvokeCommandFuture) Result(client PowerShellClient) (psc
return
}
if !done {
- return pscr, azure.NewAsyncOpIncompleteError("servermanagement.PowerShellInvokeCommandFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pscr, err = client.InvokeCommandResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellInvokeCommandFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.PowerShellInvokeCommandFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pscr.Response.Response, err = future.GetResult(sender); err == nil && pscr.Response.Response.StatusCode != http.StatusNoContent {
+ pscr, err = client.InvokeCommandResponder(pscr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.PowerShellInvokeCommandFuture", "Result", pscr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellInvokeCommandFuture", "Result", resp, "Failure sending request")
- return
- }
- pscr, err = client.InvokeCommandResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellInvokeCommandFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1616,12 +1404,11 @@ type PowerShellTabCompletionResults struct {
// operation.
type PowerShellUpdateCommandFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PowerShellUpdateCommandFuture) Result(client PowerShellClient) (pscr PowerShellCommandResults, err error) {
+func (future *PowerShellUpdateCommandFuture) Result(client PowerShellClient) (pscr PowerShellCommandResults, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1629,34 +1416,15 @@ func (future PowerShellUpdateCommandFuture) Result(client PowerShellClient) (psc
return
}
if !done {
- return pscr, azure.NewAsyncOpIncompleteError("servermanagement.PowerShellUpdateCommandFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pscr, err = client.UpdateCommandResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellUpdateCommandFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.PowerShellUpdateCommandFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pscr.Response.Response, err = future.GetResult(sender); err == nil && pscr.Response.Response.StatusCode != http.StatusNoContent {
+ pscr, err = client.UpdateCommandResponder(pscr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.PowerShellUpdateCommandFuture", "Result", pscr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellUpdateCommandFuture", "Result", resp, "Failure sending request")
- return
- }
- pscr, err = client.UpdateCommandResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellUpdateCommandFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1723,12 +1491,11 @@ func (r Resource) MarshalJSON() ([]byte, error) {
// SessionCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SessionCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SessionCreateFuture) Result(client SessionClient) (sr SessionResource, err error) {
+func (future *SessionCreateFuture) Result(client SessionClient) (sr SessionResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1736,34 +1503,15 @@ func (future SessionCreateFuture) Result(client SessionClient) (sr SessionResour
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("servermanagement.SessionCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.SessionCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.SessionCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.SessionCreateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.SessionCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.SessionCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/node.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/node.go
index 5b688a1be..870b718a3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/node.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/node.go
@@ -99,15 +99,17 @@ func (client NodeClient) CreatePreparer(ctx context.Context, resourceGroupName s
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client NodeClient) CreateSender(req *http.Request) (future NodeCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -531,15 +533,17 @@ func (client NodeClient) UpdatePreparer(ctx context.Context, resourceGroupName s
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client NodeClient) UpdateSender(req *http.Request) (future NodeUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/powershell.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/powershell.go
index f11a26b68..12264647a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/powershell.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/powershell.go
@@ -100,15 +100,17 @@ func (client PowerShellClient) CancelCommandPreparer(ctx context.Context, resour
// CancelCommandSender sends the CancelCommand request. The method will close the
// http.Response Body if it receives an error.
func (client PowerShellClient) CancelCommandSender(req *http.Request) (future PowerShellCancelCommandFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -185,15 +187,17 @@ func (client PowerShellClient) CreateSessionPreparer(ctx context.Context, resour
// CreateSessionSender sends the CreateSession request. The method will close the
// http.Response Body if it receives an error.
func (client PowerShellClient) CreateSessionSender(req *http.Request) (future PowerShellCreateSessionFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -360,15 +364,17 @@ func (client PowerShellClient) InvokeCommandPreparer(ctx context.Context, resour
// InvokeCommandSender sends the InvokeCommand request. The method will close the
// http.Response Body if it receives an error.
func (client PowerShellClient) InvokeCommandSender(req *http.Request) (future PowerShellInvokeCommandFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -612,15 +618,17 @@ func (client PowerShellClient) UpdateCommandPreparer(ctx context.Context, resour
// UpdateCommandSender sends the UpdateCommand request. The method will close the
// http.Response Body if it receives an error.
func (client PowerShellClient) UpdateCommandSender(req *http.Request) (future PowerShellUpdateCommandFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/session.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/session.go
index c08ec0602..5f30b9bb0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/session.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2015-07-01-preview/servermanagement/session.go
@@ -101,15 +101,17 @@ func (client SessionClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client SessionClient) CreateSender(req *http.Request) (future SessionCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/gateway.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/gateway.go
index 53bb69368..db8a0edee 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/gateway.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/gateway.go
@@ -99,15 +99,17 @@ func (client GatewayClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client GatewayClient) CreateSender(req *http.Request) (future GatewayCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -342,15 +344,17 @@ func (client GatewayClient) GetProfilePreparer(ctx context.Context, resourceGrou
// GetProfileSender sends the GetProfile request. The method will close the
// http.Response Body if it receives an error.
func (client GatewayClient) GetProfileSender(req *http.Request) (future GatewayGetProfileFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -614,15 +618,17 @@ func (client GatewayClient) RegenerateProfilePreparer(ctx context.Context, resou
// RegenerateProfileSender sends the RegenerateProfile request. The method will close the
// http.Response Body if it receives an error.
func (client GatewayClient) RegenerateProfileSender(req *http.Request) (future GatewayRegenerateProfileFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -697,15 +703,17 @@ func (client GatewayClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client GatewayClient) UpdateSender(req *http.Request) (future GatewayUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -778,15 +786,17 @@ func (client GatewayClient) UpgradePreparer(ctx context.Context, resourceGroupNa
// UpgradeSender sends the Upgrade request. The method will close the
// http.Response Body if it receives an error.
func (client GatewayClient) UpgradeSender(req *http.Request) (future GatewayUpgradeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/models.go
index ed6460fc8..ff834fef6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/models.go
@@ -132,12 +132,11 @@ type Error struct {
// GatewayCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GatewayCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GatewayCreateFuture) Result(client GatewayClient) (gr GatewayResource, err error) {
+func (future *GatewayCreateFuture) Result(client GatewayClient) (gr GatewayResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -145,34 +144,15 @@ func (future GatewayCreateFuture) Result(client GatewayClient) (gr GatewayResour
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("servermanagement.GatewayCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.GatewayCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.GatewayCreateFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -180,12 +160,11 @@ func (future GatewayCreateFuture) Result(client GatewayClient) (gr GatewayResour
// GatewayGetProfileFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GatewayGetProfileFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GatewayGetProfileFuture) Result(client GatewayClient) (gp GatewayProfile, err error) {
+func (future *GatewayGetProfileFuture) Result(client GatewayClient) (gp GatewayProfile, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -193,34 +172,15 @@ func (future GatewayGetProfileFuture) Result(client GatewayClient) (gp GatewayPr
return
}
if !done {
- return gp, azure.NewAsyncOpIncompleteError("servermanagement.GatewayGetProfileFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gp, err = client.GetProfileResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayGetProfileFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.GatewayGetProfileFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gp.Response.Response, err = future.GetResult(sender); err == nil && gp.Response.Response.StatusCode != http.StatusNoContent {
+ gp, err = client.GetProfileResponder(gp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.GatewayGetProfileFuture", "Result", gp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayGetProfileFuture", "Result", resp, "Failure sending request")
- return
- }
- gp, err = client.GetProfileResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayGetProfileFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -325,12 +285,11 @@ type GatewayProfile struct {
// operation.
type GatewayRegenerateProfileFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GatewayRegenerateProfileFuture) Result(client GatewayClient) (ar autorest.Response, err error) {
+func (future *GatewayRegenerateProfileFuture) Result(client GatewayClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -338,35 +297,10 @@ func (future GatewayRegenerateProfileFuture) Result(client GatewayClient) (ar au
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("servermanagement.GatewayRegenerateProfileFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RegenerateProfileResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayRegenerateProfileFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.GatewayRegenerateProfileFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayRegenerateProfileFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RegenerateProfileResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayRegenerateProfileFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -668,12 +602,11 @@ type GatewayStatus struct {
// GatewayUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GatewayUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GatewayUpdateFuture) Result(client GatewayClient) (gr GatewayResource, err error) {
+func (future *GatewayUpdateFuture) Result(client GatewayClient) (gr GatewayResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -681,34 +614,15 @@ func (future GatewayUpdateFuture) Result(client GatewayClient) (gr GatewayResour
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("servermanagement.GatewayUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.GatewayUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -716,12 +630,11 @@ func (future GatewayUpdateFuture) Result(client GatewayClient) (gr GatewayResour
// GatewayUpgradeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GatewayUpgradeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GatewayUpgradeFuture) Result(client GatewayClient) (ar autorest.Response, err error) {
+func (future *GatewayUpgradeFuture) Result(client GatewayClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -729,47 +642,21 @@ func (future GatewayUpgradeFuture) Result(client GatewayClient) (ar autorest.Res
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("servermanagement.GatewayUpgradeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.UpgradeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpgradeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.GatewayUpgradeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpgradeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.UpgradeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.GatewayUpgradeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// NodeCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type NodeCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NodeCreateFuture) Result(client NodeClient) (nr NodeResource, err error) {
+func (future *NodeCreateFuture) Result(client NodeClient) (nr NodeResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -777,34 +664,15 @@ func (future NodeCreateFuture) Result(client NodeClient) (nr NodeResource, err e
return
}
if !done {
- return nr, azure.NewAsyncOpIncompleteError("servermanagement.NodeCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.NodeCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.NodeCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nr.Response.Response, err = future.GetResult(sender); err == nil && nr.Response.Response.StatusCode != http.StatusNoContent {
+ nr, err = client.CreateResponder(nr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.NodeCreateFuture", "Result", nr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.NodeCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- nr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.NodeCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1126,12 +994,11 @@ func (page NodeResourcesPage) Values() []NodeResource {
// NodeUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type NodeUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NodeUpdateFuture) Result(client NodeClient) (nr NodeResource, err error) {
+func (future *NodeUpdateFuture) Result(client NodeClient) (nr NodeResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1139,34 +1006,15 @@ func (future NodeUpdateFuture) Result(client NodeClient) (nr NodeResource, err e
return
}
if !done {
- return nr, azure.NewAsyncOpIncompleteError("servermanagement.NodeUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.NodeUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.NodeUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nr.Response.Response, err = future.GetResult(sender); err == nil && nr.Response.Response.StatusCode != http.StatusNoContent {
+ nr, err = client.UpdateResponder(nr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.NodeUpdateFuture", "Result", nr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.NodeUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- nr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.NodeUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1175,12 +1023,11 @@ func (future NodeUpdateFuture) Result(client NodeClient) (nr NodeResource, err e
// operation.
type PowerShellCancelCommandFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PowerShellCancelCommandFuture) Result(client PowerShellClient) (pscr PowerShellCommandResults, err error) {
+func (future *PowerShellCancelCommandFuture) Result(client PowerShellClient) (pscr PowerShellCommandResults, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1188,34 +1035,15 @@ func (future PowerShellCancelCommandFuture) Result(client PowerShellClient) (psc
return
}
if !done {
- return pscr, azure.NewAsyncOpIncompleteError("servermanagement.PowerShellCancelCommandFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pscr, err = client.CancelCommandResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCancelCommandFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.PowerShellCancelCommandFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pscr.Response.Response, err = future.GetResult(sender); err == nil && pscr.Response.Response.StatusCode != http.StatusNoContent {
+ pscr, err = client.CancelCommandResponder(pscr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCancelCommandFuture", "Result", pscr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCancelCommandFuture", "Result", resp, "Failure sending request")
- return
- }
- pscr, err = client.CancelCommandResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCancelCommandFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1424,12 +1252,11 @@ func (pscs *PowerShellCommandStatus) UnmarshalJSON(body []byte) error {
// operation.
type PowerShellCreateSessionFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PowerShellCreateSessionFuture) Result(client PowerShellClient) (pssr PowerShellSessionResource, err error) {
+func (future *PowerShellCreateSessionFuture) Result(client PowerShellClient) (pssr PowerShellSessionResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1437,34 +1264,15 @@ func (future PowerShellCreateSessionFuture) Result(client PowerShellClient) (pss
return
}
if !done {
- return pssr, azure.NewAsyncOpIncompleteError("servermanagement.PowerShellCreateSessionFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pssr, err = client.CreateSessionResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCreateSessionFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.PowerShellCreateSessionFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pssr.Response.Response, err = future.GetResult(sender); err == nil && pssr.Response.Response.StatusCode != http.StatusNoContent {
+ pssr, err = client.CreateSessionResponder(pssr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCreateSessionFuture", "Result", pssr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCreateSessionFuture", "Result", resp, "Failure sending request")
- return
- }
- pssr, err = client.CreateSessionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellCreateSessionFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1473,12 +1281,11 @@ func (future PowerShellCreateSessionFuture) Result(client PowerShellClient) (pss
// operation.
type PowerShellInvokeCommandFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PowerShellInvokeCommandFuture) Result(client PowerShellClient) (pscr PowerShellCommandResults, err error) {
+func (future *PowerShellInvokeCommandFuture) Result(client PowerShellClient) (pscr PowerShellCommandResults, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1486,34 +1293,15 @@ func (future PowerShellInvokeCommandFuture) Result(client PowerShellClient) (psc
return
}
if !done {
- return pscr, azure.NewAsyncOpIncompleteError("servermanagement.PowerShellInvokeCommandFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pscr, err = client.InvokeCommandResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellInvokeCommandFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.PowerShellInvokeCommandFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pscr.Response.Response, err = future.GetResult(sender); err == nil && pscr.Response.Response.StatusCode != http.StatusNoContent {
+ pscr, err = client.InvokeCommandResponder(pscr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.PowerShellInvokeCommandFuture", "Result", pscr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellInvokeCommandFuture", "Result", resp, "Failure sending request")
- return
- }
- pscr, err = client.InvokeCommandResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellInvokeCommandFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1684,12 +1472,11 @@ type PowerShellTabCompletionResults struct {
// operation.
type PowerShellUpdateCommandFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future PowerShellUpdateCommandFuture) Result(client PowerShellClient) (pscr PowerShellCommandResults, err error) {
+func (future *PowerShellUpdateCommandFuture) Result(client PowerShellClient) (pscr PowerShellCommandResults, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1697,34 +1484,15 @@ func (future PowerShellUpdateCommandFuture) Result(client PowerShellClient) (psc
return
}
if !done {
- return pscr, azure.NewAsyncOpIncompleteError("servermanagement.PowerShellUpdateCommandFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pscr, err = client.UpdateCommandResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellUpdateCommandFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.PowerShellUpdateCommandFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pscr.Response.Response, err = future.GetResult(sender); err == nil && pscr.Response.Response.StatusCode != http.StatusNoContent {
+ pscr, err = client.UpdateCommandResponder(pscr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.PowerShellUpdateCommandFuture", "Result", pscr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellUpdateCommandFuture", "Result", resp, "Failure sending request")
- return
- }
- pscr, err = client.UpdateCommandResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.PowerShellUpdateCommandFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1791,12 +1559,11 @@ func (r Resource) MarshalJSON() ([]byte, error) {
// SessionCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SessionCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SessionCreateFuture) Result(client SessionClient) (sr SessionResource, err error) {
+func (future *SessionCreateFuture) Result(client SessionClient) (sr SessionResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1804,34 +1571,15 @@ func (future SessionCreateFuture) Result(client SessionClient) (sr SessionResour
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("servermanagement.SessionCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.SessionCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servermanagement.SessionCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servermanagement.SessionCreateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.SessionCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servermanagement.SessionCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/node.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/node.go
index 07df5535d..6f3f87c09 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/node.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/node.go
@@ -99,15 +99,17 @@ func (client NodeClient) CreatePreparer(ctx context.Context, resourceGroupName s
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client NodeClient) CreateSender(req *http.Request) (future NodeCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -531,15 +533,17 @@ func (client NodeClient) UpdatePreparer(ctx context.Context, resourceGroupName s
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client NodeClient) UpdateSender(req *http.Request) (future NodeUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/powershell.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/powershell.go
index 4b7281cd6..536c426e7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/powershell.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/powershell.go
@@ -100,15 +100,17 @@ func (client PowerShellClient) CancelCommandPreparer(ctx context.Context, resour
// CancelCommandSender sends the CancelCommand request. The method will close the
// http.Response Body if it receives an error.
func (client PowerShellClient) CancelCommandSender(req *http.Request) (future PowerShellCancelCommandFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -185,15 +187,17 @@ func (client PowerShellClient) CreateSessionPreparer(ctx context.Context, resour
// CreateSessionSender sends the CreateSession request. The method will close the
// http.Response Body if it receives an error.
func (client PowerShellClient) CreateSessionSender(req *http.Request) (future PowerShellCreateSessionFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -360,15 +364,17 @@ func (client PowerShellClient) InvokeCommandPreparer(ctx context.Context, resour
// InvokeCommandSender sends the InvokeCommand request. The method will close the
// http.Response Body if it receives an error.
func (client PowerShellClient) InvokeCommandSender(req *http.Request) (future PowerShellInvokeCommandFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -612,15 +618,17 @@ func (client PowerShellClient) UpdateCommandPreparer(ctx context.Context, resour
// UpdateCommandSender sends the UpdateCommand request. The method will close the
// http.Response Body if it receives an error.
func (client PowerShellClient) UpdateCommandSender(req *http.Request) (future PowerShellUpdateCommandFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/session.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/session.go
index 2f3708d05..1accdfcdb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/session.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servermanagement/mgmt/2016-07-01-preview/servermanagement/session.go
@@ -101,15 +101,17 @@ func (client SessionClient) CreatePreparer(ctx context.Context, resourceGroupNam
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client SessionClient) CreateSender(req *http.Request) (future SessionCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/application.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/application.go
index 43f432505..fd239ba76 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/application.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/application.go
@@ -24,7 +24,7 @@ import (
"net/http"
)
-// ApplicationClient is the azure Service Fabric Resource Provider API Client
+// ApplicationClient is the service Fabric Management Client
type ApplicationClient struct {
BaseClient
}
@@ -86,15 +86,17 @@ func (client ApplicationClient) DeletePreparer(ctx context.Context, subscription
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationClient) DeleteSender(req *http.Request) (future ApplicationDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -298,15 +300,17 @@ func (client ApplicationClient) PatchPreparer(ctx context.Context, subscriptionI
// PatchSender sends the Patch request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationClient) PatchSender(req *http.Request) (future ApplicationPatchFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -373,15 +377,17 @@ func (client ApplicationClient) PutPreparer(ctx context.Context, subscriptionID
// PutSender sends the Put request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationClient) PutSender(req *http.Request) (future ApplicationPutFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/applicationtype.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/applicationtype.go
index a0102932a..18ab1477d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/applicationtype.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/applicationtype.go
@@ -24,7 +24,7 @@ import (
"net/http"
)
-// ApplicationTypeClient is the azure Service Fabric Resource Provider API Client
+// ApplicationTypeClient is the service Fabric Management Client
type ApplicationTypeClient struct {
BaseClient
}
@@ -86,15 +86,17 @@ func (client ApplicationTypeClient) DeletePreparer(ctx context.Context, subscrip
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationTypeClient) DeleteSender(req *http.Request) (future ApplicationTypeDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/client.go
index e9c365db0..ec52e8301 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/client.go
@@ -1,6 +1,6 @@
// Package servicefabric implements the Azure ARM Servicefabric service API version 2017-07-01-preview.
//
-// Azure Service Fabric Resource Provider API Client
+// Service Fabric Management Client
package servicefabric
// Copyright (c) Microsoft and contributors. All rights reserved.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go
index b5659cea4..1cb03effc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go
@@ -25,7 +25,7 @@ import (
"net/http"
)
-// ClustersClient is the azure Service Fabric Resource Provider API Client
+// ClustersClient is the service Fabric Management Client
type ClustersClient struct {
BaseClient
}
@@ -140,15 +140,17 @@ func (client ClustersClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) CreateSender(req *http.Request) (future ClustersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -479,15 +481,17 @@ func (client ClustersClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) UpdateSender(req *http.Request) (future ClustersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusterversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusterversions.go
index 19de4dace..b71e99545 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusterversions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusterversions.go
@@ -24,7 +24,7 @@ import (
"net/http"
)
-// ClusterVersionsClient is the azure Service Fabric Resource Provider API Client
+// ClusterVersionsClient is the service Fabric Management Client
type ClusterVersionsClient struct {
BaseClient
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/models.go
index 3ac61ec36..af0b61498 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/models.go
@@ -330,12 +330,11 @@ func PossibleX509StoreNameValues() []X509StoreName {
// ApplicationDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ApplicationDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationDeleteFuture) Result(client ApplicationClient) (ar autorest.Response, err error) {
+func (future *ApplicationDeleteFuture) Result(client ApplicationClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -343,35 +342,10 @@ func (future ApplicationDeleteFuture) Result(client ApplicationClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("servicefabric.ApplicationDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ApplicationDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ApplicationDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ApplicationDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ApplicationDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -424,12 +398,11 @@ type ApplicationParameter struct {
// ApplicationPatchFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ApplicationPatchFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationPatchFuture) Result(client ApplicationClient) (aru ApplicationResourceUpdate, err error) {
+func (future *ApplicationPatchFuture) Result(client ApplicationClient) (aru ApplicationResourceUpdate, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -437,34 +410,15 @@ func (future ApplicationPatchFuture) Result(client ApplicationClient) (aru Appli
return
}
if !done {
- return aru, azure.NewAsyncOpIncompleteError("servicefabric.ApplicationPatchFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- aru, err = client.PatchResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ApplicationPatchFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ApplicationPatchFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if aru.Response.Response, err = future.GetResult(sender); err == nil && aru.Response.Response.StatusCode != http.StatusNoContent {
+ aru, err = client.PatchResponder(aru.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationPatchFuture", "Result", aru.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ApplicationPatchFuture", "Result", resp, "Failure sending request")
- return
- }
- aru, err = client.PatchResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ApplicationPatchFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -489,12 +443,11 @@ type ApplicationProperties struct {
// ApplicationPutFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ApplicationPutFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationPutFuture) Result(client ApplicationClient) (ar ApplicationResource, err error) {
+func (future *ApplicationPutFuture) Result(client ApplicationClient) (ar ApplicationResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -502,34 +455,15 @@ func (future ApplicationPutFuture) Result(client ApplicationClient) (ar Applicat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("servicefabric.ApplicationPutFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PutResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ApplicationPutFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ApplicationPutFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ar.Response.Response, err = future.GetResult(sender); err == nil && ar.Response.Response.StatusCode != http.StatusNoContent {
+ ar, err = client.PutResponder(ar.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationPutFuture", "Result", ar.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ApplicationPutFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PutResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ApplicationPutFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -734,12 +668,11 @@ func (aru *ApplicationResourceUpdate) UnmarshalJSON(body []byte) error {
// operation.
type ApplicationTypeDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationTypeDeleteFuture) Result(client ApplicationTypeClient) (ar autorest.Response, err error) {
+func (future *ApplicationTypeDeleteFuture) Result(client ApplicationTypeClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -747,35 +680,10 @@ func (future ApplicationTypeDeleteFuture) Result(client ApplicationTypeClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("servicefabric.ApplicationTypeDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ApplicationTypeDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1246,12 +1154,11 @@ type ClusterPropertiesUpdateParameters struct {
// ClustersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err error) {
+func (future *ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1259,34 +1166,15 @@ func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err
return
}
if !done {
- return c, azure.NewAsyncOpIncompleteError("servicefabric.ClustersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- c, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ClustersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ClustersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.CreateResponder(c.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersCreateFuture", "Result", c.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ClustersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- c, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ClustersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1294,12 +1182,11 @@ func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err
// ClustersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersUpdateFuture) Result(client ClustersClient) (c Cluster, err error) {
+func (future *ClustersUpdateFuture) Result(client ClustersClient) (c Cluster, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1307,34 +1194,15 @@ func (future ClustersUpdateFuture) Result(client ClustersClient) (c Cluster, err
return
}
if !done {
- return c, azure.NewAsyncOpIncompleteError("servicefabric.ClustersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- c, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ClustersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ClustersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.UpdateResponder(c.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersUpdateFuture", "Result", c.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ClustersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- c, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ClustersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1854,12 +1722,11 @@ type ServiceCorrelationDescription struct {
// ServiceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServiceDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServiceDeleteFuture) Result(client ServiceClient) (ar autorest.Response, err error) {
+func (future *ServiceDeleteFuture) Result(client ServiceClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1867,35 +1734,10 @@ func (future ServiceDeleteFuture) Result(client ServiceClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("servicefabric.ServiceDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ServiceDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ServiceDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ServiceDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ServiceDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1916,12 +1758,11 @@ type ServiceLoadMetricDescription struct {
// ServicePatchFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicePatchFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicePatchFuture) Result(client ServiceClient) (sru ServiceResourceUpdate, err error) {
+func (future *ServicePatchFuture) Result(client ServiceClient) (sru ServiceResourceUpdate, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1929,34 +1770,15 @@ func (future ServicePatchFuture) Result(client ServiceClient) (sru ServiceResour
return
}
if !done {
- return sru, azure.NewAsyncOpIncompleteError("servicefabric.ServicePatchFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sru, err = client.PatchResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ServicePatchFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ServicePatchFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sru.Response.Response, err = future.GetResult(sender); err == nil && sru.Response.Response.StatusCode != http.StatusNoContent {
+ sru, err = client.PatchResponder(sru.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicePatchFuture", "Result", sru.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ServicePatchFuture", "Result", resp, "Failure sending request")
- return
- }
- sru, err = client.PatchResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ServicePatchFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2310,12 +2132,11 @@ func (spb *ServicePropertiesBase) UnmarshalJSON(body []byte) error {
// ServicePutFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServicePutFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicePutFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
+func (future *ServicePutFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2323,34 +2144,15 @@ func (future ServicePutFuture) Result(client ServiceClient) (sr ServiceResource,
return
}
if !done {
- return sr, azure.NewAsyncOpIncompleteError("servicefabric.ServicePutFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sr, err = client.PutResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ServicePutFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ServicePutFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.PutResponder(sr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicePutFuture", "Result", sr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ServicePutFuture", "Result", resp, "Failure sending request")
- return
- }
- sr, err = client.PutResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ServicePutFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3637,12 +3439,11 @@ func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsBasicPartitionSchem
// VersionDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VersionDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VersionDeleteFuture) Result(client VersionClient) (ar autorest.Response, err error) {
+func (future *VersionDeleteFuture) Result(client VersionClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3650,35 +3451,10 @@ func (future VersionDeleteFuture) Result(client VersionClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("servicefabric.VersionDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.VersionDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicefabric.VersionDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.VersionDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.VersionDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3694,12 +3470,11 @@ type VersionProperties struct {
// VersionPutFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VersionPutFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VersionPutFuture) Result(client VersionClient) (vr VersionResource, err error) {
+func (future *VersionPutFuture) Result(client VersionClient) (vr VersionResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3707,34 +3482,15 @@ func (future VersionPutFuture) Result(client VersionClient) (vr VersionResource,
return
}
if !done {
- return vr, azure.NewAsyncOpIncompleteError("servicefabric.VersionPutFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vr, err = client.PutResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.VersionPutFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicefabric.VersionPutFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vr.Response.Response, err = future.GetResult(sender); err == nil && vr.Response.Response.StatusCode != http.StatusNoContent {
+ vr, err = client.PutResponder(vr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servicefabric.VersionPutFuture", "Result", vr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.VersionPutFuture", "Result", resp, "Failure sending request")
- return
- }
- vr, err = client.PutResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.VersionPutFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/operations.go
index c939ab70d..feec24825 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/operations.go
@@ -24,7 +24,7 @@ import (
"net/http"
)
-// OperationsClient is the azure Service Fabric Resource Provider API Client
+// OperationsClient is the service Fabric Management Client
type OperationsClient struct {
BaseClient
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/service.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/service.go
index 6bc64eefe..ca500215d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/service.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/service.go
@@ -24,7 +24,7 @@ import (
"net/http"
)
-// ServiceClient is the azure Service Fabric Resource Provider API Client
+// ServiceClient is the service Fabric Management Client
type ServiceClient struct {
BaseClient
}
@@ -88,15 +88,17 @@ func (client ServiceClient) DeletePreparer(ctx context.Context, subscriptionID s
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) DeleteSender(req *http.Request) (future ServiceDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -306,15 +308,17 @@ func (client ServiceClient) PatchPreparer(ctx context.Context, subscriptionID st
// PatchSender sends the Patch request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) PatchSender(req *http.Request) (future ServicePatchFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -383,15 +387,17 @@ func (client ServiceClient) PutPreparer(ctx context.Context, subscriptionID stri
// PutSender sends the Put request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceClient) PutSender(req *http.Request) (future ServicePutFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/versiongroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/versiongroup.go
index 2780e386a..239bcc35d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/versiongroup.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/versiongroup.go
@@ -25,7 +25,7 @@ import (
"net/http"
)
-// VersionClient is the azure Service Fabric Resource Provider API Client
+// VersionClient is the service Fabric Management Client
type VersionClient struct {
BaseClient
}
@@ -89,15 +89,17 @@ func (client VersionClient) DeletePreparer(ctx context.Context, subscriptionID s
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VersionClient) DeleteSender(req *http.Request) (future VersionDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -314,15 +316,17 @@ func (client VersionClient) PutPreparer(ctx context.Context, subscriptionID stri
// PutSender sends the Put request. The method will close the
// http.Response Body if it receives an error.
func (client VersionClient) PutSender(req *http.Request) (future VersionPutFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/models.go
index d11b1b848..e99f82d47 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/models.go
@@ -89,12 +89,11 @@ func PossibleSkuTierValues() []SkuTier {
// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateOrUpdateFuture) Result(client Client) (rt ResourceType, err error) {
+func (future *CreateOrUpdateFuture) Result(client Client) (rt ResourceType, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -102,34 +101,15 @@ func (future CreateOrUpdateFuture) Result(client Client) (rt ResourceType, err e
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("signalr.CreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "signalr.CreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("signalr.CreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "signalr.CreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "signalr.CreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "signalr.CreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -177,12 +157,11 @@ func (cp CreateParameters) MarshalJSON() ([]byte, error) {
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -190,35 +169,10 @@ func (future DeleteFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("signalr.DeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "signalr.DeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("signalr.DeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "signalr.DeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "signalr.DeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -425,12 +379,11 @@ type Properties struct {
// RegenerateKeyFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RegenerateKeyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RegenerateKeyFuture) Result(client Client) (kVar Keys, err error) {
+func (future *RegenerateKeyFuture) Result(client Client) (kVar Keys, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -438,34 +391,15 @@ func (future RegenerateKeyFuture) Result(client Client) (kVar Keys, err error) {
return
}
if !done {
- return kVar, azure.NewAsyncOpIncompleteError("signalr.RegenerateKeyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- kVar, err = client.RegenerateKeyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "signalr.RegenerateKeyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("signalr.RegenerateKeyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if kVar.Response.Response, err = future.GetResult(sender); err == nil && kVar.Response.Response.StatusCode != http.StatusNoContent {
+ kVar, err = client.RegenerateKeyResponder(kVar.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "signalr.RegenerateKeyFuture", "Result", kVar.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "signalr.RegenerateKeyFuture", "Result", resp, "Failure sending request")
- return
- }
- kVar, err = client.RegenerateKeyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "signalr.RegenerateKeyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -772,12 +706,11 @@ func (tr TrackedResource) MarshalJSON() ([]byte, error) {
// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateFuture) Result(client Client) (rt ResourceType, err error) {
+func (future *UpdateFuture) Result(client Client) (rt ResourceType, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -785,34 +718,15 @@ func (future UpdateFuture) Result(client Client) (rt ResourceType, err error) {
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("signalr.UpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "signalr.UpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("signalr.UpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.UpdateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "signalr.UpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "signalr.UpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "signalr.UpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalr.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalr.go
index 8e8d5bb12..35f6efcb6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalr.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalr.go
@@ -42,8 +42,9 @@ func NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
// CheckNameAvailability checks that the SignalR name is valid and is not already in use.
// Parameters:
+// location - the region
// parameters - parameters supplied to the operation.
-func (client Client) CheckNameAvailability(ctx context.Context, parameters *NameAvailabilityParameters) (result NameAvailability, err error) {
+func (client Client) CheckNameAvailability(ctx context.Context, location string, parameters *NameAvailabilityParameters) (result NameAvailability, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false,
@@ -53,7 +54,7 @@ func (client Client) CheckNameAvailability(ctx context.Context, parameters *Name
return result, validation.NewError("signalr.Client", "CheckNameAvailability", err.Error())
}
- req, err := client.CheckNameAvailabilityPreparer(ctx, parameters)
+ req, err := client.CheckNameAvailabilityPreparer(ctx, location, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "signalr.Client", "CheckNameAvailability", nil, "Failure preparing request")
return
@@ -75,8 +76,9 @@ func (client Client) CheckNameAvailability(ctx context.Context, parameters *Name
}
// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request.
-func (client Client) CheckNameAvailabilityPreparer(ctx context.Context, parameters *NameAvailabilityParameters) (*http.Request, error) {
+func (client Client) CheckNameAvailabilityPreparer(ctx context.Context, location string, parameters *NameAvailabilityParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
@@ -89,7 +91,7 @@ func (client Client) CheckNameAvailabilityPreparer(ctx context.Context, paramete
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/checkNameAvailability", pathParameters),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability", pathParameters),
autorest.WithQueryParameters(queryParameters))
if parameters != nil {
preparer = autorest.DecoratePreparer(preparer,
@@ -176,15 +178,17 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupNa
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -246,15 +250,17 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -642,15 +648,17 @@ func (client Client) RegenerateKeyPreparer(ctx context.Context, resourceGroupNam
// RegenerateKeySender sends the RegenerateKey request. The method will close the
// http.Response Body if it receives an error.
func (client Client) RegenerateKeySender(req *http.Request) (future RegenerateKeyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -718,15 +726,17 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionpolicies.go
index faae3cc09..4434c8d88 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionpolicies.go
@@ -101,15 +101,17 @@ func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdatePreparer(ctx c
// 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) (future BackupLongTermRetentionPoliciesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionvaults.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionvaults.go
index b3d59e262..81316d000 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionvaults.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionvaults.go
@@ -99,15 +99,17 @@ func (client BackupLongTermRetentionVaultsClient) CreateOrUpdatePreparer(ctx con
// 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) (future BackupLongTermRetentionVaultsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databases.go
index 58a2cf31f..8417ebc15 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databases.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databases.go
@@ -101,15 +101,17 @@ func (client DatabasesClient) CreateImportOperationPreparer(ctx context.Context,
// CreateImportOperationSender sends the CreateImportOperation request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) CreateImportOperationSender(req *http.Request) (future DatabasesCreateImportOperationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client DatabasesClient) CreateOrUpdatePreparer(ctx context.Context, resour
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future DatabasesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -329,15 +333,17 @@ func (client DatabasesClient) ExportPreparer(ctx context.Context, resourceGroupN
// ExportSender sends the Export request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) ExportSender(req *http.Request) (future DatabasesExportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -628,15 +634,17 @@ func (client DatabasesClient) ImportPreparer(ctx context.Context, resourceGroupN
// ImportSender sends the Import request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) ImportSender(req *http.Request) (future DatabasesImportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1059,15 +1067,17 @@ func (client DatabasesClient) PausePreparer(ctx context.Context, resourceGroupNa
// PauseSender sends the Pause request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) PauseSender(req *http.Request) (future DatabasesPauseFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1130,15 +1140,17 @@ func (client DatabasesClient) ResumePreparer(ctx context.Context, resourceGroupN
// ResumeSender sends the Resume request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) ResumeSender(req *http.Request) (future DatabasesResumeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1204,15 +1216,17 @@ func (client DatabasesClient) UpdatePreparer(ctx context.Context, resourceGroupN
// 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) (future DatabasesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpools.go
index f22c556db..c872c28ea 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpools.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpools.go
@@ -91,15 +91,17 @@ func (client ElasticPoolsClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) CreateOrUpdateSender(req *http.Request) (future ElasticPoolsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -515,15 +517,17 @@ func (client ElasticPoolsClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) UpdateSender(req *http.Request) (future ElasticPoolsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/encryptionprotectors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/encryptionprotectors.go
index 1fb598433..645c86c4c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/encryptionprotectors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/encryptionprotectors.go
@@ -90,15 +90,17 @@ func (client EncryptionProtectorsClient) CreateOrUpdatePreparer(ctx context.Cont
// 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) (future EncryptionProtectorsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/failovergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/failovergroups.go
index 5e6afe4aa..114ab7212 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/failovergroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/failovergroups.go
@@ -101,15 +101,17 @@ func (client FailoverGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// 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) (future FailoverGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -173,15 +175,17 @@ func (client FailoverGroupsClient) DeletePreparer(ctx context.Context, resourceG
// 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) (future FailoverGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -244,15 +248,17 @@ func (client FailoverGroupsClient) FailoverPreparer(ctx context.Context, resourc
// 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) (future FailoverGroupsFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -317,15 +323,17 @@ func (client FailoverGroupsClient) ForceFailoverAllowDataLossPreparer(ctx contex
// 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) (future FailoverGroupsForceFailoverAllowDataLossFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -558,15 +566,17 @@ func (client FailoverGroupsClient) UpdatePreparer(ctx context.Context, resourceG
// 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) (future FailoverGroupsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/managedinstances.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/managedinstances.go
index 974afbfb3..64efddd7e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/managedinstances.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/managedinstances.go
@@ -97,15 +97,17 @@ func (client ManagedInstancesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedInstancesClient) CreateOrUpdateSender(req *http.Request) (future ManagedInstancesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client ManagedInstancesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedInstancesClient) DeleteSender(req *http.Request) (future ManagedInstancesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -491,15 +495,17 @@ func (client ManagedInstancesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedInstancesClient) UpdateSender(req *http.Request) (future ManagedInstancesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/models.go
index 8e20a0065..428ca0a93 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/models.go
@@ -1036,12 +1036,11 @@ func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState {
// a long-running operation.
type BackupLongTermRetentionPoliciesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BackupLongTermRetentionPoliciesCreateOrUpdateFuture) Result(client BackupLongTermRetentionPoliciesClient) (bltrp BackupLongTermRetentionPolicy, err error) {
+func (future *BackupLongTermRetentionPoliciesCreateOrUpdateFuture) Result(client BackupLongTermRetentionPoliciesClient) (bltrp BackupLongTermRetentionPolicy, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1049,34 +1048,15 @@ func (future BackupLongTermRetentionPoliciesCreateOrUpdateFuture) Result(client
return
}
if !done {
- return bltrp, azure.NewAsyncOpIncompleteError("sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bltrp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bltrp.Response.Response, err = future.GetResult(sender); err == nil && bltrp.Response.Response.StatusCode != http.StatusNoContent {
+ bltrp, err = client.CreateOrUpdateResponder(bltrp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", bltrp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- bltrp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1305,12 +1285,11 @@ type BackupLongTermRetentionVaultProperties struct {
// long-running operation.
type BackupLongTermRetentionVaultsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BackupLongTermRetentionVaultsCreateOrUpdateFuture) Result(client BackupLongTermRetentionVaultsClient) (bltrv BackupLongTermRetentionVault, err error) {
+func (future *BackupLongTermRetentionVaultsCreateOrUpdateFuture) Result(client BackupLongTermRetentionVaultsClient) (bltrv BackupLongTermRetentionVault, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1318,34 +1297,15 @@ func (future BackupLongTermRetentionVaultsCreateOrUpdateFuture) Result(client Ba
return
}
if !done {
- return bltrv, azure.NewAsyncOpIncompleteError("sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bltrv, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bltrv.Response.Response, err = future.GetResult(sender); err == nil && bltrv.Response.Response.StatusCode != http.StatusNoContent {
+ bltrv, err = client.CreateOrUpdateResponder(bltrv.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture", "Result", bltrv.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- bltrv, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1378,10 +1338,10 @@ type Database struct {
Kind *string `json:"kind,omitempty"`
// DatabaseProperties - The properties representing the resource.
*DatabaseProperties `json:"properties,omitempty"`
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -1399,12 +1359,12 @@ func (d Database) MarshalJSON() ([]byte, error) {
if d.DatabaseProperties != nil {
objectMap["properties"] = d.DatabaseProperties
}
- if d.Tags != nil {
- objectMap["tags"] = d.Tags
- }
if d.Location != nil {
objectMap["location"] = d.Location
}
+ if d.Tags != nil {
+ objectMap["tags"] = d.Tags
+ }
if d.ID != nil {
objectMap["id"] = d.ID
}
@@ -1444,15 +1404,6 @@ func (d *Database) UnmarshalJSON(body []byte) error {
}
d.DatabaseProperties = &databaseProperties
}
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- d.Tags = tags
- }
case "location":
if v != nil {
var location string
@@ -1462,6 +1413,15 @@ func (d *Database) UnmarshalJSON(body []byte) error {
}
d.Location = &location
}
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ d.Tags = tags
+ }
case "id":
if v != nil {
var ID string
@@ -1684,12 +1644,11 @@ type DatabaseProperties struct {
// operation.
type DatabasesCreateImportOperationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesCreateImportOperationFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
+func (future *DatabasesCreateImportOperationFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1697,34 +1656,15 @@ func (future DatabasesCreateImportOperationFuture) Result(client DatabasesClient
return
}
if !done {
- return ier, azure.NewAsyncOpIncompleteError("sql.DatabasesCreateImportOperationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ier, err = client.CreateImportOperationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesCreateImportOperationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent {
+ ier, err = client.CreateImportOperationResponder(ier.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", ier.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", resp, "Failure sending request")
- return
- }
- ier, err = client.CreateImportOperationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1733,12 +1673,11 @@ func (future DatabasesCreateImportOperationFuture) Result(client DatabasesClient
// operation.
type DatabasesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
+func (future *DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1746,34 +1685,15 @@ func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Da
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("sql.DatabasesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1911,12 +1831,11 @@ type DatabaseSecurityAlertPolicyProperties struct {
// DatabasesExportFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesExportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesExportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
+func (future *DatabasesExportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1924,34 +1843,15 @@ func (future DatabasesExportFuture) Result(client DatabasesClient) (ier ImportEx
return
}
if !done {
- return ier, azure.NewAsyncOpIncompleteError("sql.DatabasesExportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ier, err = client.ExportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesExportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent {
+ ier, err = client.ExportResponder(ier.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", ier.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", resp, "Failure sending request")
- return
- }
- ier, err = client.ExportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1959,12 +1859,11 @@ func (future DatabasesExportFuture) Result(client DatabasesClient) (ier ImportEx
// DatabasesImportFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesImportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesImportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
+func (future *DatabasesImportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1972,34 +1871,15 @@ func (future DatabasesImportFuture) Result(client DatabasesClient) (ier ImportEx
return
}
if !done {
- return ier, azure.NewAsyncOpIncompleteError("sql.DatabasesImportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ier, err = client.ImportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesImportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent {
+ ier, err = client.ImportResponder(ier.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", ier.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", resp, "Failure sending request")
- return
- }
- ier, err = client.ImportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2007,12 +1887,11 @@ func (future DatabasesImportFuture) Result(client DatabasesClient) (ier ImportEx
// DatabasesPauseFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesPauseFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesPauseFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
+func (future *DatabasesPauseFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2020,47 +1899,21 @@ func (future DatabasesPauseFuture) Result(client DatabasesClient) (ar autorest.R
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.DatabasesPauseFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PauseResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesPauseFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PauseResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DatabasesResumeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesResumeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesResumeFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
+func (future *DatabasesResumeFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2068,47 +1921,21 @@ func (future DatabasesResumeFuture) Result(client DatabasesClient) (ar autorest.
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.DatabasesResumeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesResumeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
+func (future *DatabasesUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2116,34 +1943,15 @@ func (future DatabasesUpdateFuture) Result(client DatabasesClient) (d Database,
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("sql.DatabasesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.UpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2554,10 +2362,10 @@ type ElasticPool struct {
*ElasticPoolProperties `json:"properties,omitempty"`
// Kind - Kind of elastic pool. This is metadata used for the Azure portal experience.
Kind *string `json:"kind,omitempty"`
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -2575,12 +2383,12 @@ func (ep ElasticPool) MarshalJSON() ([]byte, error) {
if ep.Kind != nil {
objectMap["kind"] = ep.Kind
}
- if ep.Tags != nil {
- objectMap["tags"] = ep.Tags
- }
if ep.Location != nil {
objectMap["location"] = ep.Location
}
+ if ep.Tags != nil {
+ objectMap["tags"] = ep.Tags
+ }
if ep.ID != nil {
objectMap["id"] = ep.ID
}
@@ -2620,15 +2428,6 @@ func (ep *ElasticPool) UnmarshalJSON(body []byte) error {
}
ep.Kind = &kind
}
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- ep.Tags = tags
- }
case "location":
if v != nil {
var location string
@@ -2638,6 +2437,15 @@ func (ep *ElasticPool) UnmarshalJSON(body []byte) error {
}
ep.Location = &location
}
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ep.Tags = tags
+ }
case "id":
if v != nil {
var ID string
@@ -3038,12 +2846,11 @@ type ElasticPoolProperties struct {
// operation.
type ElasticPoolsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
+func (future *ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3051,34 +2858,15 @@ func (future ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient)
return
}
if !done {
- return ep, azure.NewAsyncOpIncompleteError("sql.ElasticPoolsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ep, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent {
+ ep, err = client.CreateOrUpdateResponder(ep.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", ep.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ep, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3086,12 +2874,11 @@ func (future ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient)
// ElasticPoolsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ElasticPoolsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ElasticPoolsUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
+func (future *ElasticPoolsUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3099,34 +2886,15 @@ func (future ElasticPoolsUpdateFuture) Result(client ElasticPoolsClient) (ep Ela
return
}
if !done {
- return ep, azure.NewAsyncOpIncompleteError("sql.ElasticPoolsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ep, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent {
+ ep, err = client.UpdateResponder(ep.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", ep.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ep, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3456,12 +3224,11 @@ type EncryptionProtectorProperties struct {
// long-running operation.
type EncryptionProtectorsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EncryptionProtectorsCreateOrUpdateFuture) Result(client EncryptionProtectorsClient) (ep EncryptionProtector, err error) {
+func (future *EncryptionProtectorsCreateOrUpdateFuture) Result(client EncryptionProtectorsClient) (ep EncryptionProtector, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3469,34 +3236,15 @@ func (future EncryptionProtectorsCreateOrUpdateFuture) Result(client EncryptionP
return
}
if !done {
- return ep, azure.NewAsyncOpIncompleteError("sql.EncryptionProtectorsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ep, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.EncryptionProtectorsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent {
+ ep, err = client.CreateOrUpdateResponder(ep.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsCreateOrUpdateFuture", "Result", ep.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ep, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3763,12 +3511,11 @@ type FailoverGroupReadWriteEndpoint struct {
// operation.
type FailoverGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FailoverGroupsCreateOrUpdateFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
+func (future *FailoverGroupsCreateOrUpdateFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3776,34 +3523,15 @@ func (future FailoverGroupsCreateOrUpdateFuture) Result(client FailoverGroupsCli
return
}
if !done {
- return fg, azure.NewAsyncOpIncompleteError("sql.FailoverGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent {
+ fg, err = client.CreateOrUpdateResponder(fg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.FailoverGroupsCreateOrUpdateFuture", "Result", fg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- fg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3811,12 +3539,11 @@ func (future FailoverGroupsCreateOrUpdateFuture) Result(client FailoverGroupsCli
// FailoverGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type FailoverGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FailoverGroupsDeleteFuture) Result(client FailoverGroupsClient) (ar autorest.Response, err error) {
+func (future *FailoverGroupsDeleteFuture) Result(client FailoverGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3824,35 +3551,10 @@ func (future FailoverGroupsDeleteFuture) Result(client FailoverGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.FailoverGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3860,12 +3562,11 @@ func (future FailoverGroupsDeleteFuture) Result(client FailoverGroupsClient) (ar
// operation.
type FailoverGroupsFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FailoverGroupsFailoverFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
+func (future *FailoverGroupsFailoverFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3873,34 +3574,15 @@ func (future FailoverGroupsFailoverFuture) Result(client FailoverGroupsClient) (
return
}
if !done {
- return fg, azure.NewAsyncOpIncompleteError("sql.FailoverGroupsFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fg, err = client.FailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent {
+ fg, err = client.FailoverResponder(fg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.FailoverGroupsFailoverFuture", "Result", fg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- fg, err = client.FailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3909,12 +3591,11 @@ func (future FailoverGroupsFailoverFuture) Result(client FailoverGroupsClient) (
// long-running operation.
type FailoverGroupsForceFailoverAllowDataLossFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FailoverGroupsForceFailoverAllowDataLossFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
+func (future *FailoverGroupsForceFailoverAllowDataLossFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3922,34 +3603,15 @@ func (future FailoverGroupsForceFailoverAllowDataLossFuture) Result(client Failo
return
}
if !done {
- return fg, azure.NewAsyncOpIncompleteError("sql.FailoverGroupsForceFailoverAllowDataLossFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fg, err = client.ForceFailoverAllowDataLossResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsForceFailoverAllowDataLossFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsForceFailoverAllowDataLossFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent {
+ fg, err = client.ForceFailoverAllowDataLossResponder(fg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.FailoverGroupsForceFailoverAllowDataLossFuture", "Result", fg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsForceFailoverAllowDataLossFuture", "Result", resp, "Failure sending request")
- return
- }
- fg, err = client.ForceFailoverAllowDataLossResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsForceFailoverAllowDataLossFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3957,12 +3619,11 @@ func (future FailoverGroupsForceFailoverAllowDataLossFuture) Result(client Failo
// FailoverGroupsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type FailoverGroupsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FailoverGroupsUpdateFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
+func (future *FailoverGroupsUpdateFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3970,34 +3631,15 @@ func (future FailoverGroupsUpdateFuture) Result(client FailoverGroupsClient) (fg
return
}
if !done {
- return fg, azure.NewAsyncOpIncompleteError("sql.FailoverGroupsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fg, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent {
+ fg, err = client.UpdateResponder(fg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.FailoverGroupsUpdateFuture", "Result", fg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- fg, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4550,10 +4192,10 @@ type ManagedInstance struct {
Sku *Sku `json:"sku,omitempty"`
// ManagedInstanceProperties - Resource properties.
*ManagedInstanceProperties `json:"properties,omitempty"`
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -4574,12 +4216,12 @@ func (mi ManagedInstance) MarshalJSON() ([]byte, error) {
if mi.ManagedInstanceProperties != nil {
objectMap["properties"] = mi.ManagedInstanceProperties
}
- if mi.Tags != nil {
- objectMap["tags"] = mi.Tags
- }
if mi.Location != nil {
objectMap["location"] = mi.Location
}
+ if mi.Tags != nil {
+ objectMap["tags"] = mi.Tags
+ }
if mi.ID != nil {
objectMap["id"] = mi.ID
}
@@ -4628,15 +4270,6 @@ func (mi *ManagedInstance) UnmarshalJSON(body []byte) error {
}
mi.ManagedInstanceProperties = &managedInstanceProperties
}
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- mi.Tags = tags
- }
case "location":
if v != nil {
var location string
@@ -4646,6 +4279,15 @@ func (mi *ManagedInstance) UnmarshalJSON(body []byte) error {
}
mi.Location = &location
}
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ mi.Tags = tags
+ }
case "id":
if v != nil {
var ID string
@@ -4805,12 +4447,11 @@ type ManagedInstanceProperties struct {
// operation.
type ManagedInstancesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedInstancesCreateOrUpdateFuture) Result(client ManagedInstancesClient) (mi ManagedInstance, err error) {
+func (future *ManagedInstancesCreateOrUpdateFuture) Result(client ManagedInstancesClient) (mi ManagedInstance, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4818,34 +4459,15 @@ func (future ManagedInstancesCreateOrUpdateFuture) Result(client ManagedInstance
return
}
if !done {
- return mi, azure.NewAsyncOpIncompleteError("sql.ManagedInstancesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mi, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
+ mi, err = client.CreateOrUpdateResponder(mi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", mi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- mi, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4854,12 +4476,11 @@ func (future ManagedInstancesCreateOrUpdateFuture) Result(client ManagedInstance
// operation.
type ManagedInstancesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedInstancesDeleteFuture) Result(client ManagedInstancesClient) (ar autorest.Response, err error) {
+func (future *ManagedInstancesDeleteFuture) Result(client ManagedInstancesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4867,35 +4488,10 @@ func (future ManagedInstancesDeleteFuture) Result(client ManagedInstancesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ManagedInstancesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4903,12 +4499,11 @@ func (future ManagedInstancesDeleteFuture) Result(client ManagedInstancesClient)
// operation.
type ManagedInstancesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedInstancesUpdateFuture) Result(client ManagedInstancesClient) (mi ManagedInstance, err error) {
+func (future *ManagedInstancesUpdateFuture) Result(client ManagedInstancesClient) (mi ManagedInstance, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4916,34 +4511,15 @@ func (future ManagedInstancesUpdateFuture) Result(client ManagedInstancesClient)
return
}
if !done {
- return mi, azure.NewAsyncOpIncompleteError("sql.ManagedInstancesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mi, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
+ mi, err = client.UpdateResponder(mi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", mi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- mi, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5628,12 +5204,11 @@ type ReplicationLinkProperties struct {
// long-running operation.
type ReplicationLinksFailoverAllowDataLossFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationLinksFailoverAllowDataLossFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
+func (future *ReplicationLinksFailoverAllowDataLossFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5641,35 +5216,10 @@ func (future ReplicationLinksFailoverAllowDataLossFuture) Result(client Replicat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverAllowDataLossFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.FailoverAllowDataLossResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverAllowDataLossFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverAllowDataLossFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverAllowDataLossFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.FailoverAllowDataLossResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverAllowDataLossFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5677,12 +5227,11 @@ func (future ReplicationLinksFailoverAllowDataLossFuture) Result(client Replicat
// operation.
type ReplicationLinksFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationLinksFailoverFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
+func (future *ReplicationLinksFailoverFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5690,35 +5239,10 @@ func (future ReplicationLinksFailoverFuture) Result(client ReplicationLinksClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.FailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.FailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5972,10 +5496,10 @@ type Server struct {
Kind *string `json:"kind,omitempty"`
// ServerProperties - Resource properties.
*ServerProperties `json:"properties,omitempty"`
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -5996,12 +5520,12 @@ func (s Server) MarshalJSON() ([]byte, error) {
if s.ServerProperties != nil {
objectMap["properties"] = s.ServerProperties
}
- if s.Tags != nil {
- objectMap["tags"] = s.Tags
- }
if s.Location != nil {
objectMap["location"] = s.Location
}
+ if s.Tags != nil {
+ objectMap["tags"] = s.Tags
+ }
if s.ID != nil {
objectMap["id"] = s.ID
}
@@ -6050,15 +5574,6 @@ func (s *Server) UnmarshalJSON(body []byte) error {
}
s.ServerProperties = &serverProperties
}
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- s.Tags = tags
- }
case "location":
if v != nil {
var location string
@@ -6068,6 +5583,15 @@ func (s *Server) UnmarshalJSON(body []byte) error {
}
s.Location = &location
}
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ s.Tags = tags
+ }
case "id":
if v != nil {
var ID string
@@ -6206,12 +5730,11 @@ func (saaa *ServerAzureADAdministrator) UnmarshalJSON(body []byte) error {
// long-running operation.
type ServerAzureADAdministratorsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerAzureADAdministratorsCreateOrUpdateFuture) Result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) {
+func (future *ServerAzureADAdministratorsCreateOrUpdateFuture) Result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6219,34 +5742,15 @@ func (future ServerAzureADAdministratorsCreateOrUpdateFuture) Result(client Serv
return
}
if !done {
- return saaa, azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- saaa, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if saaa.Response.Response, err = future.GetResult(sender); err == nil && saaa.Response.Response.StatusCode != http.StatusNoContent {
+ saaa, err = client.CreateOrUpdateResponder(saaa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", saaa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- saaa, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6255,12 +5759,11 @@ func (future ServerAzureADAdministratorsCreateOrUpdateFuture) Result(client Serv
// long-running operation.
type ServerAzureADAdministratorsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerAzureADAdministratorsDeleteFuture) Result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) {
+func (future *ServerAzureADAdministratorsDeleteFuture) Result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6268,34 +5771,15 @@ func (future ServerAzureADAdministratorsDeleteFuture) Result(client ServerAzureA
return
}
if !done {
- return saaa, azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- saaa, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if saaa.Response.Response, err = future.GetResult(sender); err == nil && saaa.Response.Response.StatusCode != http.StatusNoContent {
+ saaa, err = client.DeleteResponder(saaa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", saaa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- saaa, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6429,12 +5913,11 @@ type ServerCommunicationLinkProperties struct {
// long-running operation.
type ServerCommunicationLinksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerCommunicationLinksCreateOrUpdateFuture) Result(client ServerCommunicationLinksClient) (scl ServerCommunicationLink, err error) {
+func (future *ServerCommunicationLinksCreateOrUpdateFuture) Result(client ServerCommunicationLinksClient) (scl ServerCommunicationLink, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6442,34 +5925,15 @@ func (future ServerCommunicationLinksCreateOrUpdateFuture) Result(client ServerC
return
}
if !done {
- return scl, azure.NewAsyncOpIncompleteError("sql.ServerCommunicationLinksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- scl, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServerCommunicationLinksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if scl.Response.Response, err = future.GetResult(sender); err == nil && scl.Response.Response.StatusCode != http.StatusNoContent {
+ scl, err = client.CreateOrUpdateResponder(scl.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksCreateOrUpdateFuture", "Result", scl.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- scl, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6820,12 +6284,11 @@ type ServerKeyProperties struct {
// operation.
type ServerKeysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerKeysCreateOrUpdateFuture) Result(client ServerKeysClient) (sk ServerKey, err error) {
+func (future *ServerKeysCreateOrUpdateFuture) Result(client ServerKeysClient) (sk ServerKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6833,34 +6296,15 @@ func (future ServerKeysCreateOrUpdateFuture) Result(client ServerKeysClient) (sk
return
}
if !done {
- return sk, azure.NewAsyncOpIncompleteError("sql.ServerKeysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sk, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerKeysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServerKeysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sk.Response.Response, err = future.GetResult(sender); err == nil && sk.Response.Response.StatusCode != http.StatusNoContent {
+ sk, err = client.CreateOrUpdateResponder(sk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ServerKeysCreateOrUpdateFuture", "Result", sk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerKeysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sk, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerKeysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6868,12 +6312,11 @@ func (future ServerKeysCreateOrUpdateFuture) Result(client ServerKeysClient) (sk
// ServerKeysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServerKeysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerKeysDeleteFuture) Result(client ServerKeysClient) (ar autorest.Response, err error) {
+func (future *ServerKeysDeleteFuture) Result(client ServerKeysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6881,35 +6324,10 @@ func (future ServerKeysDeleteFuture) Result(client ServerKeysClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ServerKeysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerKeysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServerKeysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerKeysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerKeysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7033,12 +6451,11 @@ type ServerProperties struct {
// operation.
type ServersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersCreateOrUpdateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersCreateOrUpdateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7046,34 +6463,15 @@ func (future ServersCreateOrUpdateFuture) Result(client ServersClient) (s Server
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("sql.ServersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ServersCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7081,12 +6479,11 @@ func (future ServersCreateOrUpdateFuture) Result(client ServersClient) (s Server
// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7094,47 +6491,21 @@ func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ServersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7142,34 +6513,15 @@ func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("sql.ServersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ServersUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7518,17 +6870,17 @@ type ServiceTierAdvisorProperties struct {
Confidence *float64 `json:"confidence,omitempty"`
}
-// Sku an ARM Resource SKU.
+// Sku the resource model definition representing SKU
type Sku struct {
- // Name - The name of the SKU, typically, a letter + Number code, e.g. P3.
+ // Name - The name of the SKU. Ex - P3. It is typically a letter+number code
Name *string `json:"name,omitempty"`
- // Tier - The tier of the particular SKU, e.g. Basic, Premium.
+ // Tier - This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.
Tier *string `json:"tier,omitempty"`
- // Size - Size of the particular SKU
+ // Size - The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.
Size *string `json:"size,omitempty"`
// Family - If the service has different generations of hardware, for the same SKU, then that can be captured here.
Family *string `json:"family,omitempty"`
- // Capacity - Capacity of the particular SKU.
+ // Capacity - If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.
Capacity *int32 `json:"capacity,omitempty"`
}
@@ -8151,12 +7503,11 @@ type SyncAgentProperties struct {
// operation.
type SyncAgentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncAgentsCreateOrUpdateFuture) Result(client SyncAgentsClient) (sa SyncAgent, err error) {
+func (future *SyncAgentsCreateOrUpdateFuture) Result(client SyncAgentsClient) (sa SyncAgent, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8164,34 +7515,15 @@ func (future SyncAgentsCreateOrUpdateFuture) Result(client SyncAgentsClient) (sa
return
}
if !done {
- return sa, azure.NewAsyncOpIncompleteError("sql.SyncAgentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sa, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncAgentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncAgentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sa.Response.Response, err = future.GetResult(sender); err == nil && sa.Response.Response.StatusCode != http.StatusNoContent {
+ sa, err = client.CreateOrUpdateResponder(sa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.SyncAgentsCreateOrUpdateFuture", "Result", sa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncAgentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sa, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncAgentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8199,12 +7531,11 @@ func (future SyncAgentsCreateOrUpdateFuture) Result(client SyncAgentsClient) (sa
// SyncAgentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SyncAgentsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncAgentsDeleteFuture) Result(client SyncAgentsClient) (ar autorest.Response, err error) {
+func (future *SyncAgentsDeleteFuture) Result(client SyncAgentsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8212,35 +7543,10 @@ func (future SyncAgentsDeleteFuture) Result(client SyncAgentsClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.SyncAgentsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncAgentsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncAgentsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncAgentsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncAgentsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8847,12 +8153,11 @@ type SyncGroupSchemaTableColumn struct {
// operation.
type SyncGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncGroupsCreateOrUpdateFuture) Result(client SyncGroupsClient) (sg SyncGroup, err error) {
+func (future *SyncGroupsCreateOrUpdateFuture) Result(client SyncGroupsClient) (sg SyncGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8860,34 +8165,15 @@ func (future SyncGroupsCreateOrUpdateFuture) Result(client SyncGroupsClient) (sg
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("sql.SyncGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.SyncGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8895,12 +8181,11 @@ func (future SyncGroupsCreateOrUpdateFuture) Result(client SyncGroupsClient) (sg
// SyncGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SyncGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncGroupsDeleteFuture) Result(client SyncGroupsClient) (ar autorest.Response, err error) {
+func (future *SyncGroupsDeleteFuture) Result(client SyncGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8908,35 +8193,10 @@ func (future SyncGroupsDeleteFuture) Result(client SyncGroupsClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.SyncGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8944,12 +8204,11 @@ func (future SyncGroupsDeleteFuture) Result(client SyncGroupsClient) (ar autores
// operation.
type SyncGroupsRefreshHubSchemaFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncGroupsRefreshHubSchemaFuture) Result(client SyncGroupsClient) (ar autorest.Response, err error) {
+func (future *SyncGroupsRefreshHubSchemaFuture) Result(client SyncGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8957,47 +8216,21 @@ func (future SyncGroupsRefreshHubSchemaFuture) Result(client SyncGroupsClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.SyncGroupsRefreshHubSchemaFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RefreshHubSchemaResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsRefreshHubSchemaFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsRefreshHubSchemaFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsRefreshHubSchemaFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RefreshHubSchemaResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsRefreshHubSchemaFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// SyncGroupsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SyncGroupsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncGroupsUpdateFuture) Result(client SyncGroupsClient) (sg SyncGroup, err error) {
+func (future *SyncGroupsUpdateFuture) Result(client SyncGroupsClient) (sg SyncGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9005,34 +8238,15 @@ func (future SyncGroupsUpdateFuture) Result(client SyncGroupsClient) (sg SyncGro
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("sql.SyncGroupsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.UpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.SyncGroupsUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9247,12 +8461,11 @@ type SyncMemberProperties struct {
// operation.
type SyncMembersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncMembersCreateOrUpdateFuture) Result(client SyncMembersClient) (sm SyncMember, err error) {
+func (future *SyncMembersCreateOrUpdateFuture) Result(client SyncMembersClient) (sm SyncMember, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9260,34 +8473,15 @@ func (future SyncMembersCreateOrUpdateFuture) Result(client SyncMembersClient) (
return
}
if !done {
- return sm, azure.NewAsyncOpIncompleteError("sql.SyncMembersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sm, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncMembersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sm.Response.Response, err = future.GetResult(sender); err == nil && sm.Response.Response.StatusCode != http.StatusNoContent {
+ sm, err = client.CreateOrUpdateResponder(sm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.SyncMembersCreateOrUpdateFuture", "Result", sm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sm, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9295,12 +8489,11 @@ func (future SyncMembersCreateOrUpdateFuture) Result(client SyncMembersClient) (
// SyncMembersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SyncMembersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncMembersDeleteFuture) Result(client SyncMembersClient) (ar autorest.Response, err error) {
+func (future *SyncMembersDeleteFuture) Result(client SyncMembersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9308,35 +8501,10 @@ func (future SyncMembersDeleteFuture) Result(client SyncMembersClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.SyncMembersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncMembersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9344,12 +8512,11 @@ func (future SyncMembersDeleteFuture) Result(client SyncMembersClient) (ar autor
// operation.
type SyncMembersRefreshMemberSchemaFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncMembersRefreshMemberSchemaFuture) Result(client SyncMembersClient) (ar autorest.Response, err error) {
+func (future *SyncMembersRefreshMemberSchemaFuture) Result(client SyncMembersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9357,47 +8524,21 @@ func (future SyncMembersRefreshMemberSchemaFuture) Result(client SyncMembersClie
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.SyncMembersRefreshMemberSchemaFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RefreshMemberSchemaResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersRefreshMemberSchemaFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncMembersRefreshMemberSchemaFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersRefreshMemberSchemaFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RefreshMemberSchemaResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersRefreshMemberSchemaFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// SyncMembersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SyncMembersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncMembersUpdateFuture) Result(client SyncMembersClient) (sm SyncMember, err error) {
+func (future *SyncMembersUpdateFuture) Result(client SyncMembersClient) (sm SyncMember, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9405,44 +8546,25 @@ func (future SyncMembersUpdateFuture) Result(client SyncMembersClient) (sm SyncM
return
}
if !done {
- return sm, azure.NewAsyncOpIncompleteError("sql.SyncMembersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sm, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncMembersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sm.Response.Response, err = future.GetResult(sender); err == nil && sm.Response.Response.StatusCode != http.StatusNoContent {
+ sm, err = client.UpdateResponder(sm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.SyncMembersUpdateFuture", "Result", sm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sm, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
// TrackedResource ARM tracked top level resource.
type TrackedResource struct {
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -9454,12 +8576,12 @@ type TrackedResource struct {
// MarshalJSON is the custom marshaler for TrackedResource.
func (tr TrackedResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
- if tr.Tags != nil {
- objectMap["tags"] = tr.Tags
- }
if tr.Location != nil {
objectMap["location"] = tr.Location
}
+ if tr.Tags != nil {
+ objectMap["tags"] = tr.Tags
+ }
if tr.ID != nil {
objectMap["id"] = tr.ID
}
@@ -9884,12 +9006,11 @@ type VirtualNetworkRuleProperties struct {
// long-running operation.
type VirtualNetworkRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetworkRulesClient) (vnr VirtualNetworkRule, err error) {
+func (future *VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetworkRulesClient) (vnr VirtualNetworkRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9897,34 +9018,15 @@ func (future VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetwo
return
}
if !done {
- return vnr, azure.NewAsyncOpIncompleteError("sql.VirtualNetworkRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.VirtualNetworkRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnr.Response.Response, err = future.GetResult(sender); err == nil && vnr.Response.Response.StatusCode != http.StatusNoContent {
+ vnr, err = client.CreateOrUpdateResponder(vnr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", vnr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9933,12 +9035,11 @@ func (future VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetwo
// operation.
type VirtualNetworkRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkRulesDeleteFuture) Result(client VirtualNetworkRulesClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkRulesDeleteFuture) Result(client VirtualNetworkRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9946,34 +9047,9 @@ func (future VirtualNetworkRulesDeleteFuture) Result(client VirtualNetworkRulesC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.VirtualNetworkRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.VirtualNetworkRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/replicationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/replicationlinks.go
index 38dd9bdad..d4560b265 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/replicationlinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/replicationlinks.go
@@ -161,15 +161,17 @@ func (client ReplicationLinksClient) FailoverPreparer(ctx context.Context, resou
// 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) (future ReplicationLinksFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -235,15 +237,17 @@ func (client ReplicationLinksClient) FailoverAllowDataLossPreparer(ctx context.C
// 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) (future ReplicationLinksFailoverAllowDataLossFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/serverazureadadministrators.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/serverazureadadministrators.go
index 9d0595fc7..21b4055b1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/serverazureadadministrators.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/serverazureadadministrators.go
@@ -103,15 +103,17 @@ func (client ServerAzureADAdministratorsClient) CreateOrUpdatePreparer(ctx conte
// 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) (future ServerAzureADAdministratorsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -174,15 +176,17 @@ func (client ServerAzureADAdministratorsClient) DeletePreparer(ctx context.Conte
// 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) (future ServerAzureADAdministratorsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/servercommunicationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/servercommunicationlinks.go
index 9c619b85b..d59823088 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/servercommunicationlinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/servercommunicationlinks.go
@@ -99,15 +99,17 @@ func (client ServerCommunicationLinksClient) CreateOrUpdatePreparer(ctx context.
// 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) (future ServerCommunicationLinksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/serverkeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/serverkeys.go
index 81086a048..a70e07c85 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/serverkeys.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/serverkeys.go
@@ -94,15 +94,17 @@ func (client ServerKeysClient) CreateOrUpdatePreparer(ctx context.Context, resou
// 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) (future ServerKeysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -166,15 +168,17 @@ func (client ServerKeysClient) DeletePreparer(ctx context.Context, resourceGroup
// 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) (future ServerKeysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/servers.go
index b3a35b00d..78d1a37f6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/servers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/servers.go
@@ -163,15 +163,17 @@ func (client ServersClient) CreateOrUpdatePreparer(ctx context.Context, resource
// 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) (future ServersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -233,15 +235,17 @@ func (client ServersClient) DeletePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -557,15 +561,17 @@ func (client ServersClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/syncagents.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/syncagents.go
index 6b587e738..83be0b22b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/syncagents.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/syncagents.go
@@ -91,15 +91,17 @@ func (client SyncAgentsClient) CreateOrUpdatePreparer(ctx context.Context, resou
// 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) (future SyncAgentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -163,15 +165,17 @@ func (client SyncAgentsClient) DeletePreparer(ctx context.Context, resourceGroup
// 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) (future SyncAgentsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/syncgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/syncgroups.go
index 5b405d5c9..e1d7d2209 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/syncgroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/syncgroups.go
@@ -164,15 +164,17 @@ func (client SyncGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resou
// 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) (future SyncGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -238,15 +240,17 @@ func (client SyncGroupsClient) DeletePreparer(ctx context.Context, resourceGroup
// 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) (future SyncGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -784,15 +788,17 @@ func (client SyncGroupsClient) RefreshHubSchemaPreparer(ctx context.Context, res
// 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) (future SyncGroupsRefreshHubSchemaFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -931,15 +937,17 @@ func (client SyncGroupsClient) UpdatePreparer(ctx context.Context, resourceGroup
// 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) (future SyncGroupsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/syncmembers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/syncmembers.go
index 01e211f11..28c36fba4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/syncmembers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/syncmembers.go
@@ -95,15 +95,17 @@ func (client SyncMembersClient) CreateOrUpdatePreparer(ctx context.Context, reso
// 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) (future SyncMembersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -171,15 +173,17 @@ func (client SyncMembersClient) DeletePreparer(ctx context.Context, resourceGrou
// 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) (future SyncMembersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -522,15 +526,17 @@ func (client SyncMembersClient) RefreshMemberSchemaPreparer(ctx context.Context,
// 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) (future SyncMembersRefreshMemberSchemaFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -600,15 +606,17 @@ func (client SyncMembersClient) UpdatePreparer(ctx context.Context, resourceGrou
// 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) (future SyncMembersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/virtualnetworkrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/virtualnetworkrules.go
index ab735d07f..957b02b25 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/virtualnetworkrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/virtualnetworkrules.go
@@ -99,15 +99,17 @@ func (client VirtualNetworkRulesClient) CreateOrUpdatePreparer(ctx context.Conte
// 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) (future VirtualNetworkRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -171,15 +173,17 @@ func (client VirtualNetworkRulesClient) DeletePreparer(ctx context.Context, reso
// 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) (future VirtualNetworkRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionpolicies.go
index faae3cc09..4434c8d88 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionpolicies.go
@@ -101,15 +101,17 @@ func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdatePreparer(ctx c
// 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) (future BackupLongTermRetentionPoliciesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionvaults.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionvaults.go
index b3d59e262..81316d000 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionvaults.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionvaults.go
@@ -99,15 +99,17 @@ func (client BackupLongTermRetentionVaultsClient) CreateOrUpdatePreparer(ctx con
// 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) (future BackupLongTermRetentionVaultsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databases.go
index df9298566..f20383ecc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databases.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databases.go
@@ -101,15 +101,17 @@ func (client DatabasesClient) CreateImportOperationPreparer(ctx context.Context,
// CreateImportOperationSender sends the CreateImportOperation request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) CreateImportOperationSender(req *http.Request) (future DatabasesCreateImportOperationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client DatabasesClient) CreateOrUpdatePreparer(ctx context.Context, resour
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future DatabasesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -329,15 +333,17 @@ func (client DatabasesClient) ExportPreparer(ctx context.Context, resourceGroupN
// ExportSender sends the Export request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) ExportSender(req *http.Request) (future DatabasesExportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -628,15 +634,17 @@ func (client DatabasesClient) ImportPreparer(ctx context.Context, resourceGroupN
// ImportSender sends the Import request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) ImportSender(req *http.Request) (future DatabasesImportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1059,15 +1067,17 @@ func (client DatabasesClient) PausePreparer(ctx context.Context, resourceGroupNa
// PauseSender sends the Pause request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) PauseSender(req *http.Request) (future DatabasesPauseFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1208,15 +1218,17 @@ func (client DatabasesClient) ResumePreparer(ctx context.Context, resourceGroupN
// ResumeSender sends the Resume request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) ResumeSender(req *http.Request) (future DatabasesResumeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1282,15 +1294,17 @@ func (client DatabasesClient) UpdatePreparer(ctx context.Context, resourceGroupN
// 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) (future DatabasesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessmentrulebaselines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessmentrulebaselines.go
new file mode 100644
index 000000000..c337dd1a9
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessmentrulebaselines.go
@@ -0,0 +1,282 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// DatabaseVulnerabilityAssessmentRuleBaselinesClient 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 DatabaseVulnerabilityAssessmentRuleBaselinesClient struct {
+ BaseClient
+}
+
+// NewDatabaseVulnerabilityAssessmentRuleBaselinesClient creates an instance of the
+// DatabaseVulnerabilityAssessmentRuleBaselinesClient client.
+func NewDatabaseVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string) DatabaseVulnerabilityAssessmentRuleBaselinesClient {
+ return NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI creates an instance of the
+// DatabaseVulnerabilityAssessmentRuleBaselinesClient client.
+func NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseVulnerabilityAssessmentRuleBaselinesClient {
+ return DatabaseVulnerabilityAssessmentRuleBaselinesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a database's vulnerability assessment rule baseline.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// databaseName - the name of the database for which the vulnerability assessment rule baseline is defined.
+// ruleID - the vulnerability assessment rule ID.
+// baselineName - the name of the vulnerability assessment rule baseline (default implies a baseline on a
+// database level rule and master for server level rule).
+// parameters - the requested rule baseline resource.
+func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters DatabaseVulnerabilityAssessmentRuleBaseline) (result DatabaseVulnerabilityAssessmentRuleBaseline, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.DatabaseVulnerabilityAssessmentRuleBaselineProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.DatabaseVulnerabilityAssessmentRuleBaselineProperties.BaselineResults", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, ruleID, baselineName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "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.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters DatabaseVulnerabilityAssessmentRuleBaseline) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "baselineName": autorest.Encode("path", baselineName),
+ "databaseName": autorest.Encode("path", databaseName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "ruleId": autorest.Encode("path", ruleID),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vulnerabilityAssessmentName": autorest.Encode("path", "default"),
+ }
+
+ const APIVersion = "2017-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentRuleBaseline, 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 the database's vulnerability assessment rule baseline.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// databaseName - the name of the database for which the vulnerability assessment rule baseline is defined.
+// ruleID - the vulnerability assessment rule ID.
+// baselineName - the name of the vulnerability assessment rule baseline (default implies a baseline on a
+// database level rule and master for server level rule).
+func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName, ruleID, baselineName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "baselineName": autorest.Encode("path", baselineName),
+ "databaseName": autorest.Encode("path", databaseName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "ruleId": autorest.Encode("path", ruleID),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vulnerabilityAssessmentName": autorest.Encode("path", "default"),
+ }
+
+ const APIVersion = "2017-03-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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) 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 a database's vulnerability assessment rule baseline.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// databaseName - the name of the database for which the vulnerability assessment rule baseline is defined.
+// ruleID - the vulnerability assessment rule ID.
+// baselineName - the name of the vulnerability assessment rule baseline (default implies a baseline on a
+// database level rule and master for server level rule).
+func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName) (result DatabaseVulnerabilityAssessmentRuleBaseline, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName, ruleID, baselineName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "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.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentRuleBaselinesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "baselineName": autorest.Encode("path", baselineName),
+ "databaseName": autorest.Encode("path", databaseName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "ruleId": autorest.Encode("path", ruleID),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vulnerabilityAssessmentName": autorest.Encode("path", "default"),
+ }
+
+ 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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) GetResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentRuleBaseline, 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/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessments.go
new file mode 100644
index 000000000..c28eb0a3b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessments.go
@@ -0,0 +1,268 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// DatabaseVulnerabilityAssessmentsClient 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 DatabaseVulnerabilityAssessmentsClient struct {
+ BaseClient
+}
+
+// NewDatabaseVulnerabilityAssessmentsClient creates an instance of the DatabaseVulnerabilityAssessmentsClient client.
+func NewDatabaseVulnerabilityAssessmentsClient(subscriptionID string) DatabaseVulnerabilityAssessmentsClient {
+ return NewDatabaseVulnerabilityAssessmentsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDatabaseVulnerabilityAssessmentsClientWithBaseURI creates an instance of the
+// DatabaseVulnerabilityAssessmentsClient client.
+func NewDatabaseVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseVulnerabilityAssessmentsClient {
+ return DatabaseVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates the database's vulnerability assessment.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// databaseName - the name of the database for which the vulnerability assessment is defined.
+// parameters - the requested resource.
+func (client DatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseVulnerabilityAssessment) (result DatabaseVulnerabilityAssessment, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.DatabaseVulnerabilityAssessmentProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.DatabaseVulnerabilityAssessmentProperties.StorageContainerPath", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.DatabaseVulnerabilityAssessmentProperties.StorageContainerSasKey", Name: validation.Null, Rule: true, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("sql.DatabaseVulnerabilityAssessmentsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "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.DatabaseVulnerabilityAssessmentsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DatabaseVulnerabilityAssessmentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseVulnerabilityAssessment) (*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),
+ "vulnerabilityAssessmentName": autorest.Encode("path", "default"),
+ }
+
+ const APIVersion = "2017-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DatabaseVulnerabilityAssessmentsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client DatabaseVulnerabilityAssessmentsClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseVulnerabilityAssessment, 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 removes the database's vulnerability assessment.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// databaseName - the name of the database for which the vulnerability assessment is defined.
+func (client DatabaseVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DatabaseVulnerabilityAssessmentsClient) DeletePreparer(ctx context.Context, 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),
+ "vulnerabilityAssessmentName": autorest.Encode("path", "default"),
+ }
+
+ const APIVersion = "2017-03-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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DatabaseVulnerabilityAssessmentsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client DatabaseVulnerabilityAssessmentsClient) 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 database's vulnerability assessment.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// databaseName - the name of the database for which the vulnerability assessment is defined.
+func (client DatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseVulnerabilityAssessment, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "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.DatabaseVulnerabilityAssessmentsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DatabaseVulnerabilityAssessmentsClient) GetPreparer(ctx context.Context, 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),
+ "vulnerabilityAssessmentName": autorest.Encode("path", "default"),
+ }
+
+ 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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DatabaseVulnerabilityAssessmentsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DatabaseVulnerabilityAssessmentsClient) GetResponder(resp *http.Response) (result DatabaseVulnerabilityAssessment, 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/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpools.go
index f22c556db..c872c28ea 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpools.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpools.go
@@ -91,15 +91,17 @@ func (client ElasticPoolsClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) CreateOrUpdateSender(req *http.Request) (future ElasticPoolsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -515,15 +517,17 @@ func (client ElasticPoolsClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) UpdateSender(req *http.Request) (future ElasticPoolsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/encryptionprotectors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/encryptionprotectors.go
index 1fb598433..645c86c4c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/encryptionprotectors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/encryptionprotectors.go
@@ -90,15 +90,17 @@ func (client EncryptionProtectorsClient) CreateOrUpdatePreparer(ctx context.Cont
// 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) (future EncryptionProtectorsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/failovergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/failovergroups.go
index 5e6afe4aa..114ab7212 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/failovergroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/failovergroups.go
@@ -101,15 +101,17 @@ func (client FailoverGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// 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) (future FailoverGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -173,15 +175,17 @@ func (client FailoverGroupsClient) DeletePreparer(ctx context.Context, resourceG
// 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) (future FailoverGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -244,15 +248,17 @@ func (client FailoverGroupsClient) FailoverPreparer(ctx context.Context, resourc
// 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) (future FailoverGroupsFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -317,15 +323,17 @@ func (client FailoverGroupsClient) ForceFailoverAllowDataLossPreparer(ctx contex
// 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) (future FailoverGroupsForceFailoverAllowDataLossFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -558,15 +566,17 @@ func (client FailoverGroupsClient) UpdatePreparer(ctx context.Context, resourceG
// 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) (future FailoverGroupsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobagents.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobagents.go
new file mode 100644
index 000000000..8d3fb6174
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobagents.go
@@ -0,0 +1,445 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// JobAgentsClient 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 JobAgentsClient struct {
+ BaseClient
+}
+
+// NewJobAgentsClient creates an instance of the JobAgentsClient client.
+func NewJobAgentsClient(subscriptionID string) JobAgentsClient {
+ return NewJobAgentsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewJobAgentsClientWithBaseURI creates an instance of the JobAgentsClient client.
+func NewJobAgentsClientWithBaseURI(baseURI string, subscriptionID string) JobAgentsClient {
+ return JobAgentsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a job agent.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent to be created or updated.
+// parameters - the requested job agent resource state.
+func (client JobAgentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgent) (result JobAgentsCreateOrUpdateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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.JobAgentProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.JobAgentProperties.DatabaseID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("sql.JobAgentsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client JobAgentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgent) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "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.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobAgentsClient) CreateOrUpdateSender(req *http.Request) (future JobAgentsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client JobAgentsClient) CreateOrUpdateResponder(resp *http.Response) (result JobAgent, 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 job agent.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent to be deleted.
+func (client JobAgentsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobAgentsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, jobAgentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client JobAgentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "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.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobAgentsClient) DeleteSender(req *http.Request) (future JobAgentsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client JobAgentsClient) 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 job agent.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent to be retrieved.
+func (client JobAgentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobAgent, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "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.JobAgentsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client JobAgentsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "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}/jobAgents/{jobAgentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobAgentsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client JobAgentsClient) GetResponder(resp *http.Response) (result JobAgent, 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 job agents in a server.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+func (client JobAgentsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result JobAgentListResultPage, err error) {
+ result.fn = client.listByServerNextResults
+ req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "ListByServer", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByServerSender(req)
+ if err != nil {
+ result.jalr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "ListByServer", resp, "Failure sending request")
+ return
+ }
+
+ result.jalr, err = client.ListByServerResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "ListByServer", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByServerPreparer prepares the ListByServer request.
+func (client JobAgentsClient) ListByServerPreparer(ctx context.Context, 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-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}/jobAgents", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByServerSender sends the ListByServer request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobAgentsClient) ListByServerSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByServerResponder handles the response to the ListByServer request. The method always
+// closes the http.Response Body.
+func (client JobAgentsClient) ListByServerResponder(resp *http.Response) (result JobAgentListResult, 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 JobAgentsClient) listByServerNextResults(lastResults JobAgentListResult) (result JobAgentListResult, err error) {
+ req, err := lastResults.jobAgentListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "sql.JobAgentsClient", "listByServerNextResults", 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.JobAgentsClient", "listByServerNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByServerResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "listByServerNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByServerComplete enumerates all values, automatically crossing page boundaries as required.
+func (client JobAgentsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result JobAgentListResultIterator, err error) {
+ result.page, err = client.ListByServer(ctx, resourceGroupName, serverName)
+ return
+}
+
+// Update updates a job agent.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent to be updated.
+// parameters - the update to the job agent.
+func (client JobAgentsClient) Update(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgentUpdate) (result JobAgentsUpdateFuture, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client JobAgentsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgentUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "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.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobAgentsClient) UpdateSender(req *http.Request) (future JobAgentsUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client JobAgentsClient) UpdateResponder(resp *http.Response) (result JobAgent, 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/services/preview/sql/mgmt/2017-03-01-preview/sql/jobcredentials.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobcredentials.go
new file mode 100644
index 000000000..7cbb1276d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobcredentials.go
@@ -0,0 +1,368 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// JobCredentialsClient 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 JobCredentialsClient struct {
+ BaseClient
+}
+
+// NewJobCredentialsClient creates an instance of the JobCredentialsClient client.
+func NewJobCredentialsClient(subscriptionID string) JobCredentialsClient {
+ return NewJobCredentialsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewJobCredentialsClientWithBaseURI creates an instance of the JobCredentialsClient client.
+func NewJobCredentialsClientWithBaseURI(baseURI string, subscriptionID string) JobCredentialsClient {
+ return JobCredentialsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a job credential.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// credentialName - the name of the credential.
+// parameters - the requested job credential state.
+func (client JobCredentialsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string, parameters JobCredential) (result JobCredential, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.JobCredentialProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.JobCredentialProperties.Username", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.JobCredentialProperties.Password", Name: validation.Null, Rule: true, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("sql.JobCredentialsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, credentialName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "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.JobCredentialsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client JobCredentialsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string, parameters JobCredential) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "credentialName": autorest.Encode("path", credentialName),
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "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.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobCredentialsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client JobCredentialsClient) CreateOrUpdateResponder(resp *http.Response) (result JobCredential, 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 job credential.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// credentialName - the name of the credential.
+func (client JobCredentialsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, jobAgentName, credentialName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client JobCredentialsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "credentialName": autorest.Encode("path", credentialName),
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "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.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobCredentialsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client JobCredentialsClient) 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 jobs credential.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// credentialName - the name of the credential.
+func (client JobCredentialsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string) (result JobCredential, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, credentialName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "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.JobCredentialsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client JobCredentialsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "credentialName": autorest.Encode("path", credentialName),
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "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}/jobAgents/{jobAgentName}/credentials/{credentialName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobCredentialsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client JobCredentialsClient) GetResponder(resp *http.Response) (result JobCredential, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByAgent gets a list of jobs credentials.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+func (client JobCredentialsClient) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobCredentialListResultPage, err error) {
+ result.fn = client.listByAgentNextResults
+ req, err := client.ListByAgentPreparer(ctx, resourceGroupName, serverName, jobAgentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "ListByAgent", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByAgentSender(req)
+ if err != nil {
+ result.jclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "ListByAgent", resp, "Failure sending request")
+ return
+ }
+
+ result.jclr, err = client.ListByAgentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "ListByAgent", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByAgentPreparer prepares the ListByAgent request.
+func (client JobCredentialsClient) ListByAgentPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "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}/jobAgents/{jobAgentName}/credentials", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByAgentSender sends the ListByAgent request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobCredentialsClient) ListByAgentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByAgentResponder handles the response to the ListByAgent request. The method always
+// closes the http.Response Body.
+func (client JobCredentialsClient) ListByAgentResponder(resp *http.Response) (result JobCredentialListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByAgentNextResults retrieves the next set of results, if any.
+func (client JobCredentialsClient) listByAgentNextResults(lastResults JobCredentialListResult) (result JobCredentialListResult, err error) {
+ req, err := lastResults.jobCredentialListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "listByAgentNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByAgentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "listByAgentNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByAgentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobCredentialsClient", "listByAgentNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByAgentComplete enumerates all values, automatically crossing page boundaries as required.
+func (client JobCredentialsClient) ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobCredentialListResultIterator, err error) {
+ result.page, err = client.ListByAgent(ctx, resourceGroupName, serverName, jobAgentName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobexecutions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobexecutions.go
new file mode 100644
index 000000000..23c9f2142
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobexecutions.go
@@ -0,0 +1,599 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// JobExecutionsClient 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 JobExecutionsClient struct {
+ BaseClient
+}
+
+// NewJobExecutionsClient creates an instance of the JobExecutionsClient client.
+func NewJobExecutionsClient(subscriptionID string) JobExecutionsClient {
+ return NewJobExecutionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewJobExecutionsClientWithBaseURI creates an instance of the JobExecutionsClient client.
+func NewJobExecutionsClientWithBaseURI(baseURI string, subscriptionID string) JobExecutionsClient {
+ return JobExecutionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Cancel requests cancellation of a job execution.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job.
+// jobExecutionID - the id of the job execution to cancel.
+func (client JobExecutionsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (result autorest.Response, err error) {
+ req, err := client.CancelPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Cancel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CancelSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Cancel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CancelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Cancel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CancelPreparer prepares the Cancel request.
+func (client JobExecutionsClient) CancelPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobExecutionId": autorest.Encode("path", jobExecutionID),
+ "jobName": autorest.Encode("path", jobName),
+ "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}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CancelSender sends the Cancel request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobExecutionsClient) CancelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CancelResponder handles the response to the Cancel request. The method always
+// closes the http.Response Body.
+func (client JobExecutionsClient) 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
+}
+
+// Create starts an elastic job execution.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to get.
+func (client JobExecutionsClient) Create(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result JobExecutionsCreateFuture, err error) {
+ req, err := client.CreatePreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Create", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client JobExecutionsClient) CreatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobName": autorest.Encode("path", jobName),
+ "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}/jobAgents/{jobAgentName}/jobs/{jobName}/start", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobExecutionsClient) CreateSender(req *http.Request) (future JobExecutionsCreateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client JobExecutionsClient) CreateResponder(resp *http.Response) (result JobExecution, 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 updatess a job execution.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to get.
+// jobExecutionID - the job execution id to create the job execution under.
+func (client JobExecutionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (result JobExecutionsCreateOrUpdateFuture, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client JobExecutionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobExecutionId": autorest.Encode("path", jobExecutionID),
+ "jobName": autorest.Encode("path", jobName),
+ "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.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobExecutionsClient) CreateOrUpdateSender(req *http.Request) (future JobExecutionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client JobExecutionsClient) CreateOrUpdateResponder(resp *http.Response) (result JobExecution, 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 job execution.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job.
+// jobExecutionID - the id of the job execution
+func (client JobExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (result JobExecution, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "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.JobExecutionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client JobExecutionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobExecutionId": autorest.Encode("path", jobExecutionID),
+ "jobName": autorest.Encode("path", jobName),
+ "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}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobExecutionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client JobExecutionsClient) GetResponder(resp *http.Response) (result JobExecution, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByAgent lists all executions in a job agent.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// createTimeMin - if specified, only job executions created at or after the specified time are included.
+// createTimeMax - if specified, only job executions created before the specified time are included.
+// endTimeMin - if specified, only job executions completed at or after the specified time are included.
+// endTimeMax - if specified, only job executions completed before the specified time are included.
+// isActive - if specified, only active or only completed job executions are included.
+// skip - the number of elements in the collection to skip.
+// top - the number of elements to return from the collection.
+func (client JobExecutionsClient) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultPage, err error) {
+ result.fn = client.listByAgentNextResults
+ req, err := client.ListByAgentPreparer(ctx, resourceGroupName, serverName, jobAgentName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "ListByAgent", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByAgentSender(req)
+ if err != nil {
+ result.jelr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "ListByAgent", resp, "Failure sending request")
+ return
+ }
+
+ result.jelr, err = client.ListByAgentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "ListByAgent", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByAgentPreparer prepares the ListByAgent request.
+func (client JobExecutionsClient) ListByAgentPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "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,
+ }
+ if createTimeMin != nil {
+ queryParameters["createTimeMin"] = autorest.Encode("query", *createTimeMin)
+ }
+ if createTimeMax != nil {
+ queryParameters["createTimeMax"] = autorest.Encode("query", *createTimeMax)
+ }
+ if endTimeMin != nil {
+ queryParameters["endTimeMin"] = autorest.Encode("query", *endTimeMin)
+ }
+ if endTimeMax != nil {
+ queryParameters["endTimeMax"] = autorest.Encode("query", *endTimeMax)
+ }
+ if isActive != nil {
+ queryParameters["isActive"] = autorest.Encode("query", *isActive)
+ }
+ if skip != nil {
+ queryParameters["$skip"] = autorest.Encode("query", *skip)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByAgentSender sends the ListByAgent request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobExecutionsClient) ListByAgentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByAgentResponder handles the response to the ListByAgent request. The method always
+// closes the http.Response Body.
+func (client JobExecutionsClient) ListByAgentResponder(resp *http.Response) (result JobExecutionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByAgentNextResults retrieves the next set of results, if any.
+func (client JobExecutionsClient) listByAgentNextResults(lastResults JobExecutionListResult) (result JobExecutionListResult, err error) {
+ req, err := lastResults.jobExecutionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "listByAgentNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByAgentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "listByAgentNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByAgentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "listByAgentNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByAgentComplete enumerates all values, automatically crossing page boundaries as required.
+func (client JobExecutionsClient) ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultIterator, err error) {
+ result.page, err = client.ListByAgent(ctx, resourceGroupName, serverName, jobAgentName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)
+ return
+}
+
+// ListByJob lists a job's executions.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to get.
+// createTimeMin - if specified, only job executions created at or after the specified time are included.
+// createTimeMax - if specified, only job executions created before the specified time are included.
+// endTimeMin - if specified, only job executions completed at or after the specified time are included.
+// endTimeMax - if specified, only job executions completed before the specified time are included.
+// isActive - if specified, only active or only completed job executions are included.
+// skip - the number of elements in the collection to skip.
+// top - the number of elements to return from the collection.
+func (client JobExecutionsClient) ListByJob(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultPage, err error) {
+ result.fn = client.listByJobNextResults
+ req, err := client.ListByJobPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "ListByJob", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByJobSender(req)
+ if err != nil {
+ result.jelr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "ListByJob", resp, "Failure sending request")
+ return
+ }
+
+ result.jelr, err = client.ListByJobResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "ListByJob", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByJobPreparer prepares the ListByJob request.
+func (client JobExecutionsClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobName": autorest.Encode("path", jobName),
+ "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,
+ }
+ if createTimeMin != nil {
+ queryParameters["createTimeMin"] = autorest.Encode("query", *createTimeMin)
+ }
+ if createTimeMax != nil {
+ queryParameters["createTimeMax"] = autorest.Encode("query", *createTimeMax)
+ }
+ if endTimeMin != nil {
+ queryParameters["endTimeMin"] = autorest.Encode("query", *endTimeMin)
+ }
+ if endTimeMax != nil {
+ queryParameters["endTimeMax"] = autorest.Encode("query", *endTimeMax)
+ }
+ if isActive != nil {
+ queryParameters["isActive"] = autorest.Encode("query", *isActive)
+ }
+ if skip != nil {
+ queryParameters["$skip"] = autorest.Encode("query", *skip)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByJobSender sends the ListByJob request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobExecutionsClient) ListByJobSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByJobResponder handles the response to the ListByJob request. The method always
+// closes the http.Response Body.
+func (client JobExecutionsClient) ListByJobResponder(resp *http.Response) (result JobExecutionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByJobNextResults retrieves the next set of results, if any.
+func (client JobExecutionsClient) listByJobNextResults(lastResults JobExecutionListResult) (result JobExecutionListResult, err error) {
+ req, err := lastResults.jobExecutionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "listByJobNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByJobSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "listByJobNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByJobResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsClient", "listByJobNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByJobComplete enumerates all values, automatically crossing page boundaries as required.
+func (client JobExecutionsClient) ListByJobComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultIterator, err error) {
+ result.page, err = client.ListByJob(ctx, resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobs.go
new file mode 100644
index 000000000..ed48706a4
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobs.go
@@ -0,0 +1,358 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// JobsClient 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 JobsClient struct {
+ BaseClient
+}
+
+// NewJobsClient creates an instance of the JobsClient client.
+func NewJobsClient(subscriptionID string) JobsClient {
+ return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewJobsClientWithBaseURI creates an instance of the JobsClient client.
+func NewJobsClientWithBaseURI(baseURI string, subscriptionID string) JobsClient {
+ return JobsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a job.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to get.
+// parameters - the requested job state.
+func (client JobsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, parameters Job) (result Job, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobsClient", "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.JobsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client JobsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, parameters Job) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobName": autorest.Encode("path", jobName),
+ "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.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client JobsClient) CreateOrUpdateResponder(resp *http.Response) (result Job, 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 job.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to delete.
+func (client JobsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "sql.JobsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client JobsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobName": autorest.Encode("path", jobName),
+ "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.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client JobsClient) 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 job.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to get.
+func (client JobsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result Job, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobsClient", "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.JobsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client JobsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobName": autorest.Encode("path", jobName),
+ "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}/jobAgents/{jobAgentName}/jobs/{jobName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client JobsClient) GetResponder(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
+}
+
+// ListByAgent gets a list of jobs.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+func (client JobsClient) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobListResultPage, err error) {
+ result.fn = client.listByAgentNextResults
+ req, err := client.ListByAgentPreparer(ctx, resourceGroupName, serverName, jobAgentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobsClient", "ListByAgent", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByAgentSender(req)
+ if err != nil {
+ result.jlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.JobsClient", "ListByAgent", resp, "Failure sending request")
+ return
+ }
+
+ result.jlr, err = client.ListByAgentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobsClient", "ListByAgent", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByAgentPreparer prepares the ListByAgent request.
+func (client JobsClient) ListByAgentPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "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}/jobAgents/{jobAgentName}/jobs", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByAgentSender sends the ListByAgent request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobsClient) ListByAgentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByAgentResponder handles the response to the ListByAgent request. The method always
+// closes the http.Response Body.
+func (client JobsClient) ListByAgentResponder(resp *http.Response) (result JobListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByAgentNextResults retrieves the next set of results, if any.
+func (client JobsClient) listByAgentNextResults(lastResults JobListResult) (result JobListResult, err error) {
+ req, err := lastResults.jobListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "sql.JobsClient", "listByAgentNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByAgentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "sql.JobsClient", "listByAgentNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByAgentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobsClient", "listByAgentNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByAgentComplete enumerates all values, automatically crossing page boundaries as required.
+func (client JobsClient) ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobListResultIterator, err error) {
+ result.page, err = client.ListByAgent(ctx, resourceGroupName, serverName, jobAgentName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobstepexecutions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobstepexecutions.go
new file mode 100644
index 000000000..3ba9c05e2
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobstepexecutions.go
@@ -0,0 +1,250 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// JobStepExecutionsClient 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 JobStepExecutionsClient struct {
+ BaseClient
+}
+
+// NewJobStepExecutionsClient creates an instance of the JobStepExecutionsClient client.
+func NewJobStepExecutionsClient(subscriptionID string) JobStepExecutionsClient {
+ return NewJobStepExecutionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewJobStepExecutionsClientWithBaseURI creates an instance of the JobStepExecutionsClient client.
+func NewJobStepExecutionsClientWithBaseURI(baseURI string, subscriptionID string) JobStepExecutionsClient {
+ return JobStepExecutionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets a step execution of a job execution.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to get.
+// jobExecutionID - the unique id of the job execution
+// stepName - the name of the step.
+func (client JobStepExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string) (result JobExecution, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, stepName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "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.JobStepExecutionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client JobStepExecutionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobExecutionId": autorest.Encode("path", jobExecutionID),
+ "jobName": autorest.Encode("path", jobName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "stepName": autorest.Encode("path", stepName),
+ "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}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobStepExecutionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client JobStepExecutionsClient) GetResponder(resp *http.Response) (result JobExecution, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByJobExecution lists the step executions of a job execution.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to get.
+// jobExecutionID - the id of the job execution
+// createTimeMin - if specified, only job executions created at or after the specified time are included.
+// createTimeMax - if specified, only job executions created before the specified time are included.
+// endTimeMin - if specified, only job executions completed at or after the specified time are included.
+// endTimeMax - if specified, only job executions completed before the specified time are included.
+// isActive - if specified, only active or only completed job executions are included.
+// skip - the number of elements in the collection to skip.
+// top - the number of elements to return from the collection.
+func (client JobStepExecutionsClient) ListByJobExecution(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultPage, err error) {
+ result.fn = client.listByJobExecutionNextResults
+ req, err := client.ListByJobExecutionPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "ListByJobExecution", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByJobExecutionSender(req)
+ if err != nil {
+ result.jelr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "ListByJobExecution", resp, "Failure sending request")
+ return
+ }
+
+ result.jelr, err = client.ListByJobExecutionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "ListByJobExecution", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByJobExecutionPreparer prepares the ListByJobExecution request.
+func (client JobStepExecutionsClient) ListByJobExecutionPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobExecutionId": autorest.Encode("path", jobExecutionID),
+ "jobName": autorest.Encode("path", jobName),
+ "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,
+ }
+ if createTimeMin != nil {
+ queryParameters["createTimeMin"] = autorest.Encode("query", *createTimeMin)
+ }
+ if createTimeMax != nil {
+ queryParameters["createTimeMax"] = autorest.Encode("query", *createTimeMax)
+ }
+ if endTimeMin != nil {
+ queryParameters["endTimeMin"] = autorest.Encode("query", *endTimeMin)
+ }
+ if endTimeMax != nil {
+ queryParameters["endTimeMax"] = autorest.Encode("query", *endTimeMax)
+ }
+ if isActive != nil {
+ queryParameters["isActive"] = autorest.Encode("query", *isActive)
+ }
+ if skip != nil {
+ queryParameters["$skip"] = autorest.Encode("query", *skip)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByJobExecutionSender sends the ListByJobExecution request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobStepExecutionsClient) ListByJobExecutionSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByJobExecutionResponder handles the response to the ListByJobExecution request. The method always
+// closes the http.Response Body.
+func (client JobStepExecutionsClient) ListByJobExecutionResponder(resp *http.Response) (result JobExecutionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByJobExecutionNextResults retrieves the next set of results, if any.
+func (client JobStepExecutionsClient) listByJobExecutionNextResults(lastResults JobExecutionListResult) (result JobExecutionListResult, err error) {
+ req, err := lastResults.jobExecutionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "listByJobExecutionNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByJobExecutionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "listByJobExecutionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByJobExecutionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepExecutionsClient", "listByJobExecutionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByJobExecutionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client JobStepExecutionsClient) ListByJobExecutionComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultIterator, err error) {
+ result.page, err = client.ListByJobExecution(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobsteps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobsteps.go
new file mode 100644
index 000000000..fb72c4dd9
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobsteps.go
@@ -0,0 +1,562 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// JobStepsClient 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 JobStepsClient struct {
+ BaseClient
+}
+
+// NewJobStepsClient creates an instance of the JobStepsClient client.
+func NewJobStepsClient(subscriptionID string) JobStepsClient {
+ return NewJobStepsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewJobStepsClientWithBaseURI creates an instance of the JobStepsClient client.
+func NewJobStepsClientWithBaseURI(baseURI string, subscriptionID string) JobStepsClient {
+ return JobStepsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a job step. This will implicitly create a new job version.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job.
+// stepName - the name of the job step.
+// parameters - the requested state of the job step.
+func (client JobStepsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string, parameters JobStep) (result JobStep, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.JobStepProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.JobStepProperties.TargetGroup", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.JobStepProperties.Credential", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.JobStepProperties.Action", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.JobStepProperties.Action.Value", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.JobStepProperties.Output", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.JobStepProperties.Output.ServerName", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.JobStepProperties.Output.DatabaseName", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.JobStepProperties.Output.TableName", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.JobStepProperties.Output.Credential", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("sql.JobStepsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, stepName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "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.JobStepsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client JobStepsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string, parameters JobStep) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobName": autorest.Encode("path", jobName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "stepName": autorest.Encode("path", stepName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobStepsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client JobStepsClient) CreateOrUpdateResponder(resp *http.Response) (result JobStep, 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 job step. This will implicitly create a new job version.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job.
+// stepName - the name of the job step to delete.
+func (client JobStepsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, stepName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client JobStepsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobName": autorest.Encode("path", jobName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "stepName": autorest.Encode("path", stepName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-03-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}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobStepsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client JobStepsClient) 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 job step in a job's current version.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job.
+// stepName - the name of the job step.
+func (client JobStepsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string) (result JobStep, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, stepName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "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.JobStepsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client JobStepsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobName": autorest.Encode("path", jobName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "stepName": autorest.Encode("path", stepName),
+ "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}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobStepsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client JobStepsClient) GetResponder(resp *http.Response) (result JobStep, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetByVersion gets the specified version of a job step.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job.
+// jobVersion - the version of the job to get.
+// stepName - the name of the job step.
+func (client JobStepsClient) GetByVersion(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, stepName string) (result JobStep, err error) {
+ req, err := client.GetByVersionPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobVersion, stepName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "GetByVersion", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetByVersionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "GetByVersion", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetByVersionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "GetByVersion", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetByVersionPreparer prepares the GetByVersion request.
+func (client JobStepsClient) GetByVersionPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, stepName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobName": autorest.Encode("path", jobName),
+ "jobVersion": autorest.Encode("path", jobVersion),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "stepName": autorest.Encode("path", stepName),
+ "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}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetByVersionSender sends the GetByVersion request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobStepsClient) GetByVersionSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetByVersionResponder handles the response to the GetByVersion request. The method always
+// closes the http.Response Body.
+func (client JobStepsClient) GetByVersionResponder(resp *http.Response) (result JobStep, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByJob gets all job steps for a job's current version.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to get.
+func (client JobStepsClient) ListByJob(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result JobStepListResultPage, err error) {
+ result.fn = client.listByJobNextResults
+ req, err := client.ListByJobPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "ListByJob", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByJobSender(req)
+ if err != nil {
+ result.jslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "ListByJob", resp, "Failure sending request")
+ return
+ }
+
+ result.jslr, err = client.ListByJobResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "ListByJob", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByJobPreparer prepares the ListByJob request.
+func (client JobStepsClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobName": autorest.Encode("path", jobName),
+ "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}/jobAgents/{jobAgentName}/jobs/{jobName}/steps", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByJobSender sends the ListByJob request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobStepsClient) ListByJobSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByJobResponder handles the response to the ListByJob request. The method always
+// closes the http.Response Body.
+func (client JobStepsClient) ListByJobResponder(resp *http.Response) (result JobStepListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByJobNextResults retrieves the next set of results, if any.
+func (client JobStepsClient) listByJobNextResults(lastResults JobStepListResult) (result JobStepListResult, err error) {
+ req, err := lastResults.jobStepListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "sql.JobStepsClient", "listByJobNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByJobSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "sql.JobStepsClient", "listByJobNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByJobResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "listByJobNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByJobComplete enumerates all values, automatically crossing page boundaries as required.
+func (client JobStepsClient) ListByJobComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result JobStepListResultIterator, err error) {
+ result.page, err = client.ListByJob(ctx, resourceGroupName, serverName, jobAgentName, jobName)
+ return
+}
+
+// ListByVersion gets all job steps in the specified job version.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to get.
+// jobVersion - the version of the job to get.
+func (client JobStepsClient) ListByVersion(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (result JobStepListResultPage, err error) {
+ result.fn = client.listByVersionNextResults
+ req, err := client.ListByVersionPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "ListByVersion", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByVersionSender(req)
+ if err != nil {
+ result.jslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "ListByVersion", resp, "Failure sending request")
+ return
+ }
+
+ result.jslr, err = client.ListByVersionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "ListByVersion", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByVersionPreparer prepares the ListByVersion request.
+func (client JobStepsClient) ListByVersionPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobName": autorest.Encode("path", jobName),
+ "jobVersion": autorest.Encode("path", jobVersion),
+ "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}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByVersionSender sends the ListByVersion request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobStepsClient) ListByVersionSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByVersionResponder handles the response to the ListByVersion request. The method always
+// closes the http.Response Body.
+func (client JobStepsClient) ListByVersionResponder(resp *http.Response) (result JobStepListResult, 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 JobStepsClient) listByVersionNextResults(lastResults JobStepListResult) (result JobStepListResult, err error) {
+ req, err := lastResults.jobStepListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "sql.JobStepsClient", "listByVersionNextResults", 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, "sql.JobStepsClient", "listByVersionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByVersionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobStepsClient", "listByVersionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByVersionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client JobStepsClient) ListByVersionComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (result JobStepListResultIterator, err error) {
+ result.page, err = client.ListByVersion(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobVersion)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetexecutions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetexecutions.go
new file mode 100644
index 000000000..3bf22f3fa
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetexecutions.go
@@ -0,0 +1,384 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/satori/go.uuid"
+ "net/http"
+)
+
+// JobTargetExecutionsClient 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 JobTargetExecutionsClient struct {
+ BaseClient
+}
+
+// NewJobTargetExecutionsClient creates an instance of the JobTargetExecutionsClient client.
+func NewJobTargetExecutionsClient(subscriptionID string) JobTargetExecutionsClient {
+ return NewJobTargetExecutionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewJobTargetExecutionsClientWithBaseURI creates an instance of the JobTargetExecutionsClient client.
+func NewJobTargetExecutionsClientWithBaseURI(baseURI string, subscriptionID string) JobTargetExecutionsClient {
+ return JobTargetExecutionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets a target execution.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to get.
+// jobExecutionID - the unique id of the job execution
+// stepName - the name of the step.
+// targetID - the target id.
+func (client JobTargetExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, targetID uuid.UUID) (result JobExecution, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, stepName, targetID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "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.JobTargetExecutionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client JobTargetExecutionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, targetID uuid.UUID) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobExecutionId": autorest.Encode("path", jobExecutionID),
+ "jobName": autorest.Encode("path", jobName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "stepName": autorest.Encode("path", stepName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "targetId": autorest.Encode("path", targetID),
+ }
+
+ 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}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobTargetExecutionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client JobTargetExecutionsClient) GetResponder(resp *http.Response) (result JobExecution, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByJobExecution lists target executions for all steps of a job execution.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to get.
+// jobExecutionID - the id of the job execution
+// createTimeMin - if specified, only job executions created at or after the specified time are included.
+// createTimeMax - if specified, only job executions created before the specified time are included.
+// endTimeMin - if specified, only job executions completed at or after the specified time are included.
+// endTimeMax - if specified, only job executions completed before the specified time are included.
+// isActive - if specified, only active or only completed job executions are included.
+// skip - the number of elements in the collection to skip.
+// top - the number of elements to return from the collection.
+func (client JobTargetExecutionsClient) ListByJobExecution(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultPage, err error) {
+ result.fn = client.listByJobExecutionNextResults
+ req, err := client.ListByJobExecutionPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "ListByJobExecution", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByJobExecutionSender(req)
+ if err != nil {
+ result.jelr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "ListByJobExecution", resp, "Failure sending request")
+ return
+ }
+
+ result.jelr, err = client.ListByJobExecutionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "ListByJobExecution", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByJobExecutionPreparer prepares the ListByJobExecution request.
+func (client JobTargetExecutionsClient) ListByJobExecutionPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobExecutionId": autorest.Encode("path", jobExecutionID),
+ "jobName": autorest.Encode("path", jobName),
+ "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,
+ }
+ if createTimeMin != nil {
+ queryParameters["createTimeMin"] = autorest.Encode("query", *createTimeMin)
+ }
+ if createTimeMax != nil {
+ queryParameters["createTimeMax"] = autorest.Encode("query", *createTimeMax)
+ }
+ if endTimeMin != nil {
+ queryParameters["endTimeMin"] = autorest.Encode("query", *endTimeMin)
+ }
+ if endTimeMax != nil {
+ queryParameters["endTimeMax"] = autorest.Encode("query", *endTimeMax)
+ }
+ if isActive != nil {
+ queryParameters["isActive"] = autorest.Encode("query", *isActive)
+ }
+ if skip != nil {
+ queryParameters["$skip"] = autorest.Encode("query", *skip)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByJobExecutionSender sends the ListByJobExecution request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobTargetExecutionsClient) ListByJobExecutionSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByJobExecutionResponder handles the response to the ListByJobExecution request. The method always
+// closes the http.Response Body.
+func (client JobTargetExecutionsClient) ListByJobExecutionResponder(resp *http.Response) (result JobExecutionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByJobExecutionNextResults retrieves the next set of results, if any.
+func (client JobTargetExecutionsClient) listByJobExecutionNextResults(lastResults JobExecutionListResult) (result JobExecutionListResult, err error) {
+ req, err := lastResults.jobExecutionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "listByJobExecutionNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByJobExecutionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "listByJobExecutionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByJobExecutionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "listByJobExecutionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByJobExecutionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client JobTargetExecutionsClient) ListByJobExecutionComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultIterator, err error) {
+ result.page, err = client.ListByJobExecution(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)
+ return
+}
+
+// ListByStep lists the target executions of a job step execution.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to get.
+// jobExecutionID - the id of the job execution
+// stepName - the name of the step.
+// createTimeMin - if specified, only job executions created at or after the specified time are included.
+// createTimeMax - if specified, only job executions created before the specified time are included.
+// endTimeMin - if specified, only job executions completed at or after the specified time are included.
+// endTimeMax - if specified, only job executions completed before the specified time are included.
+// isActive - if specified, only active or only completed job executions are included.
+// skip - the number of elements in the collection to skip.
+// top - the number of elements to return from the collection.
+func (client JobTargetExecutionsClient) ListByStep(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultPage, err error) {
+ result.fn = client.listByStepNextResults
+ req, err := client.ListByStepPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "ListByStep", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByStepSender(req)
+ if err != nil {
+ result.jelr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "ListByStep", resp, "Failure sending request")
+ return
+ }
+
+ result.jelr, err = client.ListByStepResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "ListByStep", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByStepPreparer prepares the ListByStep request.
+func (client JobTargetExecutionsClient) ListByStepPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobExecutionId": autorest.Encode("path", jobExecutionID),
+ "jobName": autorest.Encode("path", jobName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "stepName": autorest.Encode("path", stepName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if createTimeMin != nil {
+ queryParameters["createTimeMin"] = autorest.Encode("query", *createTimeMin)
+ }
+ if createTimeMax != nil {
+ queryParameters["createTimeMax"] = autorest.Encode("query", *createTimeMax)
+ }
+ if endTimeMin != nil {
+ queryParameters["endTimeMin"] = autorest.Encode("query", *endTimeMin)
+ }
+ if endTimeMax != nil {
+ queryParameters["endTimeMax"] = autorest.Encode("query", *endTimeMax)
+ }
+ if isActive != nil {
+ queryParameters["isActive"] = autorest.Encode("query", *isActive)
+ }
+ if skip != nil {
+ queryParameters["$skip"] = autorest.Encode("query", *skip)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByStepSender sends the ListByStep request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobTargetExecutionsClient) ListByStepSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByStepResponder handles the response to the ListByStep request. The method always
+// closes the http.Response Body.
+func (client JobTargetExecutionsClient) ListByStepResponder(resp *http.Response) (result JobExecutionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByStepNextResults retrieves the next set of results, if any.
+func (client JobTargetExecutionsClient) listByStepNextResults(lastResults JobExecutionListResult) (result JobExecutionListResult, err error) {
+ req, err := lastResults.jobExecutionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "listByStepNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByStepSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "listByStepNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByStepResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetExecutionsClient", "listByStepNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByStepComplete enumerates all values, automatically crossing page boundaries as required.
+func (client JobTargetExecutionsClient) ListByStepComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result JobExecutionListResultIterator, err error) {
+ result.page, err = client.ListByStep(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobExecutionID, stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetgroups.go
new file mode 100644
index 000000000..90f7323de
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetgroups.go
@@ -0,0 +1,366 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// JobTargetGroupsClient 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 JobTargetGroupsClient struct {
+ BaseClient
+}
+
+// NewJobTargetGroupsClient creates an instance of the JobTargetGroupsClient client.
+func NewJobTargetGroupsClient(subscriptionID string) JobTargetGroupsClient {
+ return NewJobTargetGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewJobTargetGroupsClientWithBaseURI creates an instance of the JobTargetGroupsClient client.
+func NewJobTargetGroupsClientWithBaseURI(baseURI string, subscriptionID string) JobTargetGroupsClient {
+ return JobTargetGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a target group.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// targetGroupName - the name of the target group.
+// parameters - the requested state of the target group.
+func (client JobTargetGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string, parameters JobTargetGroup) (result JobTargetGroup, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.JobTargetGroupProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.JobTargetGroupProperties.Members", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("sql.JobTargetGroupsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, jobAgentName, targetGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "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.JobTargetGroupsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client JobTargetGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string, parameters JobTargetGroup) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "targetGroupName": autorest.Encode("path", targetGroupName),
+ }
+
+ const APIVersion = "2017-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobTargetGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client JobTargetGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result JobTargetGroup, 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 target group.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// targetGroupName - the name of the target group.
+func (client JobTargetGroupsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, jobAgentName, targetGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client JobTargetGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "targetGroupName": autorest.Encode("path", targetGroupName),
+ }
+
+ const APIVersion = "2017-03-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}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobTargetGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client JobTargetGroupsClient) 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 target group.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// targetGroupName - the name of the target group.
+func (client JobTargetGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string) (result JobTargetGroup, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, targetGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "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.JobTargetGroupsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client JobTargetGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "targetGroupName": autorest.Encode("path", targetGroupName),
+ }
+
+ 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}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobTargetGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client JobTargetGroupsClient) GetResponder(resp *http.Response) (result JobTargetGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByAgent gets all target groups in an agent.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+func (client JobTargetGroupsClient) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobTargetGroupListResultPage, err error) {
+ result.fn = client.listByAgentNextResults
+ req, err := client.ListByAgentPreparer(ctx, resourceGroupName, serverName, jobAgentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "ListByAgent", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByAgentSender(req)
+ if err != nil {
+ result.jtglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "ListByAgent", resp, "Failure sending request")
+ return
+ }
+
+ result.jtglr, err = client.ListByAgentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "ListByAgent", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByAgentPreparer prepares the ListByAgent request.
+func (client JobTargetGroupsClient) ListByAgentPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "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}/jobAgents/{jobAgentName}/targetGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByAgentSender sends the ListByAgent request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobTargetGroupsClient) ListByAgentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByAgentResponder handles the response to the ListByAgent request. The method always
+// closes the http.Response Body.
+func (client JobTargetGroupsClient) ListByAgentResponder(resp *http.Response) (result JobTargetGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByAgentNextResults retrieves the next set of results, if any.
+func (client JobTargetGroupsClient) listByAgentNextResults(lastResults JobTargetGroupListResult) (result JobTargetGroupListResult, err error) {
+ req, err := lastResults.jobTargetGroupListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "listByAgentNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByAgentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "listByAgentNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByAgentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobTargetGroupsClient", "listByAgentNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByAgentComplete enumerates all values, automatically crossing page boundaries as required.
+func (client JobTargetGroupsClient) ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result JobTargetGroupListResultIterator, err error) {
+ result.page, err = client.ListByAgent(ctx, resourceGroupName, serverName, jobAgentName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobversions.go
new file mode 100644
index 000000000..b238fea76
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/jobversions.go
@@ -0,0 +1,216 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// JobVersionsClient 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 JobVersionsClient struct {
+ BaseClient
+}
+
+// NewJobVersionsClient creates an instance of the JobVersionsClient client.
+func NewJobVersionsClient(subscriptionID string) JobVersionsClient {
+ return NewJobVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewJobVersionsClientWithBaseURI creates an instance of the JobVersionsClient client.
+func NewJobVersionsClientWithBaseURI(baseURI string, subscriptionID string) JobVersionsClient {
+ return JobVersionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets a job version.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job.
+// jobVersion - the version of the job to get.
+func (client JobVersionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (result JobVersion, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName, jobVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobVersionsClient", "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.JobVersionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobVersionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client JobVersionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobName": autorest.Encode("path", jobName),
+ "jobVersion": autorest.Encode("path", jobVersion),
+ "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}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobVersionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client JobVersionsClient) GetResponder(resp *http.Response) (result JobVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByJob gets all versions of a job.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// jobAgentName - the name of the job agent.
+// jobName - the name of the job to get.
+func (client JobVersionsClient) ListByJob(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result JobVersionListResultPage, err error) {
+ result.fn = client.listByJobNextResults
+ req, err := client.ListByJobPreparer(ctx, resourceGroupName, serverName, jobAgentName, jobName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobVersionsClient", "ListByJob", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByJobSender(req)
+ if err != nil {
+ result.jvlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.JobVersionsClient", "ListByJob", resp, "Failure sending request")
+ return
+ }
+
+ result.jvlr, err = client.ListByJobResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobVersionsClient", "ListByJob", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByJobPreparer prepares the ListByJob request.
+func (client JobVersionsClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "jobAgentName": autorest.Encode("path", jobAgentName),
+ "jobName": autorest.Encode("path", jobName),
+ "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}/jobAgents/{jobAgentName}/jobs/{jobName}/versions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByJobSender sends the ListByJob request. The method will close the
+// http.Response Body if it receives an error.
+func (client JobVersionsClient) ListByJobSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByJobResponder handles the response to the ListByJob request. The method always
+// closes the http.Response Body.
+func (client JobVersionsClient) ListByJobResponder(resp *http.Response) (result JobVersionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByJobNextResults retrieves the next set of results, if any.
+func (client JobVersionsClient) listByJobNextResults(lastResults JobVersionListResult) (result JobVersionListResult, err error) {
+ req, err := lastResults.jobVersionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "sql.JobVersionsClient", "listByJobNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByJobSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "sql.JobVersionsClient", "listByJobNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByJobResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobVersionsClient", "listByJobNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByJobComplete enumerates all values, automatically crossing page boundaries as required.
+func (client JobVersionsClient) ListByJobComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result JobVersionListResultIterator, err error) {
+ result.page, err = client.ListByJob(ctx, resourceGroupName, serverName, jobAgentName, jobName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/manageddatabases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/manageddatabases.go
index cc7cafd37..141cfa598 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/manageddatabases.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/manageddatabases.go
@@ -96,15 +96,17 @@ func (client ManagedDatabasesClient) CompleteRestorePreparer(ctx context.Context
// CompleteRestoreSender sends the CompleteRestore request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedDatabasesClient) CompleteRestoreSender(req *http.Request) (future ManagedDatabasesCompleteRestoreFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client ManagedDatabasesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedDatabasesClient) CreateOrUpdateSender(req *http.Request) (future ManagedDatabasesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -242,15 +246,17 @@ func (client ManagedDatabasesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedDatabasesClient) DeleteSender(req *http.Request) (future ManagedDatabasesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -482,15 +488,17 @@ func (client ManagedDatabasesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedDatabasesClient) UpdateSender(req *http.Request) (future ManagedDatabasesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstances.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstances.go
index 974afbfb3..64efddd7e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstances.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstances.go
@@ -97,15 +97,17 @@ func (client ManagedInstancesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedInstancesClient) CreateOrUpdateSender(req *http.Request) (future ManagedInstancesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client ManagedInstancesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedInstancesClient) DeleteSender(req *http.Request) (future ManagedInstancesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -491,15 +495,17 @@ func (client ManagedInstancesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedInstancesClient) UpdateSender(req *http.Request) (future ManagedInstancesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go
index 7328036c0..72c25cf06 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go
@@ -421,6 +421,148 @@ func PossibleIdentityTypeValues() []IdentityType {
return []IdentityType{SystemAssigned}
}
+// JobAgentState enumerates the values for job agent state.
+type JobAgentState string
+
+const (
+ // JobAgentStateCreating ...
+ JobAgentStateCreating JobAgentState = "Creating"
+ // JobAgentStateDeleting ...
+ JobAgentStateDeleting JobAgentState = "Deleting"
+ // JobAgentStateDisabled ...
+ JobAgentStateDisabled JobAgentState = "Disabled"
+ // JobAgentStateReady ...
+ JobAgentStateReady JobAgentState = "Ready"
+ // JobAgentStateUpdating ...
+ JobAgentStateUpdating JobAgentState = "Updating"
+)
+
+// PossibleJobAgentStateValues returns an array of possible values for the JobAgentState const type.
+func PossibleJobAgentStateValues() []JobAgentState {
+ return []JobAgentState{JobAgentStateCreating, JobAgentStateDeleting, JobAgentStateDisabled, JobAgentStateReady, JobAgentStateUpdating}
+}
+
+// JobExecutionLifecycle enumerates the values for job execution lifecycle.
+type JobExecutionLifecycle string
+
+const (
+ // Canceled ...
+ Canceled JobExecutionLifecycle = "Canceled"
+ // Created ...
+ Created JobExecutionLifecycle = "Created"
+ // Failed ...
+ Failed JobExecutionLifecycle = "Failed"
+ // InProgress ...
+ InProgress JobExecutionLifecycle = "InProgress"
+ // Skipped ...
+ Skipped JobExecutionLifecycle = "Skipped"
+ // Succeeded ...
+ Succeeded JobExecutionLifecycle = "Succeeded"
+ // SucceededWithSkipped ...
+ SucceededWithSkipped JobExecutionLifecycle = "SucceededWithSkipped"
+ // TimedOut ...
+ TimedOut JobExecutionLifecycle = "TimedOut"
+ // WaitingForChildJobExecutions ...
+ WaitingForChildJobExecutions JobExecutionLifecycle = "WaitingForChildJobExecutions"
+ // WaitingForRetry ...
+ WaitingForRetry JobExecutionLifecycle = "WaitingForRetry"
+)
+
+// PossibleJobExecutionLifecycleValues returns an array of possible values for the JobExecutionLifecycle const type.
+func PossibleJobExecutionLifecycleValues() []JobExecutionLifecycle {
+ return []JobExecutionLifecycle{Canceled, Created, Failed, InProgress, Skipped, Succeeded, SucceededWithSkipped, TimedOut, WaitingForChildJobExecutions, WaitingForRetry}
+}
+
+// JobScheduleType enumerates the values for job schedule type.
+type JobScheduleType string
+
+const (
+ // Once ...
+ Once JobScheduleType = "Once"
+ // Recurring ...
+ Recurring JobScheduleType = "Recurring"
+)
+
+// PossibleJobScheduleTypeValues returns an array of possible values for the JobScheduleType const type.
+func PossibleJobScheduleTypeValues() []JobScheduleType {
+ return []JobScheduleType{Once, Recurring}
+}
+
+// JobStepActionSource enumerates the values for job step action source.
+type JobStepActionSource string
+
+const (
+ // Inline ...
+ Inline JobStepActionSource = "Inline"
+)
+
+// PossibleJobStepActionSourceValues returns an array of possible values for the JobStepActionSource const type.
+func PossibleJobStepActionSourceValues() []JobStepActionSource {
+ return []JobStepActionSource{Inline}
+}
+
+// JobStepActionType enumerates the values for job step action type.
+type JobStepActionType string
+
+const (
+ // TSQL ...
+ TSQL JobStepActionType = "TSql"
+)
+
+// PossibleJobStepActionTypeValues returns an array of possible values for the JobStepActionType const type.
+func PossibleJobStepActionTypeValues() []JobStepActionType {
+ return []JobStepActionType{TSQL}
+}
+
+// JobStepOutputType enumerates the values for job step output type.
+type JobStepOutputType string
+
+const (
+ // SQLDatabase ...
+ SQLDatabase JobStepOutputType = "SqlDatabase"
+)
+
+// PossibleJobStepOutputTypeValues returns an array of possible values for the JobStepOutputType const type.
+func PossibleJobStepOutputTypeValues() []JobStepOutputType {
+ return []JobStepOutputType{SQLDatabase}
+}
+
+// JobTargetGroupMembershipType enumerates the values for job target group membership type.
+type JobTargetGroupMembershipType string
+
+const (
+ // Exclude ...
+ Exclude JobTargetGroupMembershipType = "Exclude"
+ // Include ...
+ Include JobTargetGroupMembershipType = "Include"
+)
+
+// PossibleJobTargetGroupMembershipTypeValues returns an array of possible values for the JobTargetGroupMembershipType const type.
+func PossibleJobTargetGroupMembershipTypeValues() []JobTargetGroupMembershipType {
+ return []JobTargetGroupMembershipType{Exclude, Include}
+}
+
+// JobTargetType enumerates the values for job target type.
+type JobTargetType string
+
+const (
+ // JobTargetTypeSQLDatabase ...
+ JobTargetTypeSQLDatabase JobTargetType = "SqlDatabase"
+ // JobTargetTypeSQLElasticPool ...
+ JobTargetTypeSQLElasticPool JobTargetType = "SqlElasticPool"
+ // JobTargetTypeSQLServer ...
+ JobTargetTypeSQLServer JobTargetType = "SqlServer"
+ // JobTargetTypeSQLShardMap ...
+ JobTargetTypeSQLShardMap JobTargetType = "SqlShardMap"
+ // JobTargetTypeTargetGroup ...
+ JobTargetTypeTargetGroup JobTargetType = "TargetGroup"
+)
+
+// PossibleJobTargetTypeValues returns an array of possible values for the JobTargetType const type.
+func PossibleJobTargetTypeValues() []JobTargetType {
+ return []JobTargetType{JobTargetTypeSQLDatabase, JobTargetTypeSQLElasticPool, JobTargetTypeSQLServer, JobTargetTypeSQLShardMap, JobTargetTypeTargetGroup}
+}
+
// ManagedDatabaseCreateMode enumerates the values for managed database create mode.
type ManagedDatabaseCreateMode string
@@ -463,23 +605,23 @@ func PossibleManagedDatabaseStatusValues() []ManagedDatabaseStatus {
type ManagementOperationState string
const (
- // CancelInProgress ...
- CancelInProgress ManagementOperationState = "CancelInProgress"
- // Cancelled ...
- Cancelled ManagementOperationState = "Cancelled"
- // Failed ...
- Failed ManagementOperationState = "Failed"
- // InProgress ...
- InProgress ManagementOperationState = "InProgress"
- // Pending ...
- Pending ManagementOperationState = "Pending"
- // Succeeded ...
- Succeeded ManagementOperationState = "Succeeded"
+ // ManagementOperationStateCancelInProgress ...
+ ManagementOperationStateCancelInProgress ManagementOperationState = "CancelInProgress"
+ // ManagementOperationStateCancelled ...
+ ManagementOperationStateCancelled ManagementOperationState = "Cancelled"
+ // ManagementOperationStateFailed ...
+ ManagementOperationStateFailed ManagementOperationState = "Failed"
+ // ManagementOperationStateInProgress ...
+ ManagementOperationStateInProgress ManagementOperationState = "InProgress"
+ // ManagementOperationStatePending ...
+ ManagementOperationStatePending ManagementOperationState = "Pending"
+ // ManagementOperationStateSucceeded ...
+ ManagementOperationStateSucceeded ManagementOperationState = "Succeeded"
)
// PossibleManagementOperationStateValues returns an array of possible values for the ManagementOperationState const type.
func PossibleManagementOperationStateValues() []ManagementOperationState {
- return []ManagementOperationState{CancelInProgress, Cancelled, Failed, InProgress, Pending, Succeeded}
+ return []ManagementOperationState{ManagementOperationStateCancelInProgress, ManagementOperationStateCancelled, ManagementOperationStateFailed, ManagementOperationStateInProgress, ManagementOperationStatePending, ManagementOperationStateSucceeded}
}
// MaxSizeUnits enumerates the values for max size units.
@@ -552,6 +694,27 @@ func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType {
return []PrimaryAggregationType{Average, Count, Maximum, Minimum, None, Total}
}
+// ProvisioningState enumerates the values for provisioning state.
+type ProvisioningState string
+
+const (
+ // ProvisioningStateCanceled ...
+ ProvisioningStateCanceled ProvisioningState = "Canceled"
+ // ProvisioningStateCreated ...
+ ProvisioningStateCreated ProvisioningState = "Created"
+ // ProvisioningStateFailed ...
+ ProvisioningStateFailed ProvisioningState = "Failed"
+ // ProvisioningStateInProgress ...
+ ProvisioningStateInProgress ProvisioningState = "InProgress"
+ // ProvisioningStateSucceeded ...
+ ProvisioningStateSucceeded ProvisioningState = "Succeeded"
+)
+
+// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
+func PossibleProvisioningStateValues() []ProvisioningState {
+ return []ProvisioningState{ProvisioningStateCanceled, ProvisioningStateCreated, ProvisioningStateFailed, ProvisioningStateInProgress, ProvisioningStateSucceeded}
+}
+
// ReadOnlyEndpointFailoverPolicy enumerates the values for read only endpoint failover policy.
type ReadOnlyEndpointFailoverPolicy string
@@ -618,33 +781,33 @@ func PossibleRecommendedIndexActionValues() []RecommendedIndexAction {
type RecommendedIndexState string
const (
- // RecommendedIndexStateActive ...
- RecommendedIndexStateActive RecommendedIndexState = "Active"
- // RecommendedIndexStateBlocked ...
- RecommendedIndexStateBlocked RecommendedIndexState = "Blocked"
- // RecommendedIndexStateExecuting ...
- RecommendedIndexStateExecuting RecommendedIndexState = "Executing"
- // RecommendedIndexStateExpired ...
- RecommendedIndexStateExpired RecommendedIndexState = "Expired"
- // RecommendedIndexStateIgnored ...
- RecommendedIndexStateIgnored RecommendedIndexState = "Ignored"
- // RecommendedIndexStatePending ...
- RecommendedIndexStatePending RecommendedIndexState = "Pending"
- // RecommendedIndexStatePendingRevert ...
- RecommendedIndexStatePendingRevert RecommendedIndexState = "Pending Revert"
- // RecommendedIndexStateReverted ...
- RecommendedIndexStateReverted RecommendedIndexState = "Reverted"
- // RecommendedIndexStateReverting ...
- RecommendedIndexStateReverting RecommendedIndexState = "Reverting"
- // RecommendedIndexStateSuccess ...
- RecommendedIndexStateSuccess RecommendedIndexState = "Success"
- // RecommendedIndexStateVerifying ...
- RecommendedIndexStateVerifying RecommendedIndexState = "Verifying"
+ // Active ...
+ Active RecommendedIndexState = "Active"
+ // Blocked ...
+ Blocked RecommendedIndexState = "Blocked"
+ // Executing ...
+ Executing RecommendedIndexState = "Executing"
+ // Expired ...
+ Expired RecommendedIndexState = "Expired"
+ // Ignored ...
+ Ignored RecommendedIndexState = "Ignored"
+ // Pending ...
+ Pending RecommendedIndexState = "Pending"
+ // PendingRevert ...
+ PendingRevert RecommendedIndexState = "Pending Revert"
+ // Reverted ...
+ Reverted RecommendedIndexState = "Reverted"
+ // Reverting ...
+ Reverting RecommendedIndexState = "Reverting"
+ // Success ...
+ Success RecommendedIndexState = "Success"
+ // Verifying ...
+ Verifying RecommendedIndexState = "Verifying"
)
// PossibleRecommendedIndexStateValues returns an array of possible values for the RecommendedIndexState const type.
func PossibleRecommendedIndexStateValues() []RecommendedIndexState {
- return []RecommendedIndexState{RecommendedIndexStateActive, RecommendedIndexStateBlocked, RecommendedIndexStateExecuting, RecommendedIndexStateExpired, RecommendedIndexStateIgnored, RecommendedIndexStatePending, RecommendedIndexStatePendingRevert, RecommendedIndexStateReverted, RecommendedIndexStateReverting, RecommendedIndexStateSuccess, RecommendedIndexStateVerifying}
+ return []RecommendedIndexState{Active, Blocked, Executing, Expired, Ignored, Pending, PendingRevert, Reverted, Reverting, Success, Verifying}
}
// RecommendedIndexType enumerates the values for recommended index type.
@@ -1022,40 +1185,40 @@ func PossibleSyncDirectionValues() []SyncDirection {
type SyncGroupLogType string
const (
- // All ...
- All SyncGroupLogType = "All"
- // Error ...
- Error SyncGroupLogType = "Error"
- // Success ...
- Success SyncGroupLogType = "Success"
- // Warning ...
- Warning SyncGroupLogType = "Warning"
+ // SyncGroupLogTypeAll ...
+ SyncGroupLogTypeAll SyncGroupLogType = "All"
+ // SyncGroupLogTypeError ...
+ SyncGroupLogTypeError SyncGroupLogType = "Error"
+ // SyncGroupLogTypeSuccess ...
+ SyncGroupLogTypeSuccess SyncGroupLogType = "Success"
+ // SyncGroupLogTypeWarning ...
+ SyncGroupLogTypeWarning SyncGroupLogType = "Warning"
)
// PossibleSyncGroupLogTypeValues returns an array of possible values for the SyncGroupLogType const type.
func PossibleSyncGroupLogTypeValues() []SyncGroupLogType {
- return []SyncGroupLogType{All, Error, Success, Warning}
+ return []SyncGroupLogType{SyncGroupLogTypeAll, SyncGroupLogTypeError, SyncGroupLogTypeSuccess, SyncGroupLogTypeWarning}
}
// SyncGroupState enumerates the values for sync group state.
type SyncGroupState string
const (
- // SyncGroupStateError ...
- SyncGroupStateError SyncGroupState = "Error"
- // SyncGroupStateGood ...
- SyncGroupStateGood SyncGroupState = "Good"
- // SyncGroupStateNotReady ...
- SyncGroupStateNotReady SyncGroupState = "NotReady"
- // SyncGroupStateProgressing ...
- SyncGroupStateProgressing SyncGroupState = "Progressing"
- // SyncGroupStateWarning ...
- SyncGroupStateWarning SyncGroupState = "Warning"
+ // Error ...
+ Error SyncGroupState = "Error"
+ // Good ...
+ Good SyncGroupState = "Good"
+ // NotReady ...
+ NotReady SyncGroupState = "NotReady"
+ // Progressing ...
+ Progressing SyncGroupState = "Progressing"
+ // Warning ...
+ Warning SyncGroupState = "Warning"
)
// PossibleSyncGroupStateValues returns an array of possible values for the SyncGroupState const type.
func PossibleSyncGroupStateValues() []SyncGroupState {
- return []SyncGroupState{SyncGroupStateError, SyncGroupStateGood, SyncGroupStateNotReady, SyncGroupStateProgressing, SyncGroupStateWarning}
+ return []SyncGroupState{Error, Good, NotReady, Progressing, Warning}
}
// SyncMemberDbType enumerates the values for sync member db type.
@@ -1218,6 +1381,22 @@ func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState {
return []VirtualNetworkRuleState{VirtualNetworkRuleStateDeleting, VirtualNetworkRuleStateInitializing, VirtualNetworkRuleStateInProgress, VirtualNetworkRuleStateReady, VirtualNetworkRuleStateUnknown}
}
+// VulnerabilityAssessmentPolicyBaselineName enumerates the values for vulnerability assessment policy baseline
+// name.
+type VulnerabilityAssessmentPolicyBaselineName string
+
+const (
+ // VulnerabilityAssessmentPolicyBaselineNameDefault ...
+ VulnerabilityAssessmentPolicyBaselineNameDefault VulnerabilityAssessmentPolicyBaselineName = "default"
+ // VulnerabilityAssessmentPolicyBaselineNameMaster ...
+ VulnerabilityAssessmentPolicyBaselineNameMaster VulnerabilityAssessmentPolicyBaselineName = "master"
+)
+
+// PossibleVulnerabilityAssessmentPolicyBaselineNameValues returns an array of possible values for the VulnerabilityAssessmentPolicyBaselineName const type.
+func PossibleVulnerabilityAssessmentPolicyBaselineNameValues() []VulnerabilityAssessmentPolicyBaselineName {
+ return []VulnerabilityAssessmentPolicyBaselineName{VulnerabilityAssessmentPolicyBaselineNameDefault, VulnerabilityAssessmentPolicyBaselineNameMaster}
+}
+
// AutomaticTuningOptions automatic tuning properties for individual advisors.
type AutomaticTuningOptions struct {
// DesiredState - Automatic tuning option desired state. Possible values include: 'AutomaticTuningOptionModeDesiredOff', 'AutomaticTuningOptionModeDesiredOn', 'AutomaticTuningOptionModeDesiredDefault'
@@ -1271,12 +1450,11 @@ func (atsp AutomaticTuningServerProperties) MarshalJSON() ([]byte, error) {
// a long-running operation.
type BackupLongTermRetentionPoliciesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BackupLongTermRetentionPoliciesCreateOrUpdateFuture) Result(client BackupLongTermRetentionPoliciesClient) (bltrp BackupLongTermRetentionPolicy, err error) {
+func (future *BackupLongTermRetentionPoliciesCreateOrUpdateFuture) Result(client BackupLongTermRetentionPoliciesClient) (bltrp BackupLongTermRetentionPolicy, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1284,34 +1462,15 @@ func (future BackupLongTermRetentionPoliciesCreateOrUpdateFuture) Result(client
return
}
if !done {
- return bltrp, azure.NewAsyncOpIncompleteError("sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bltrp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bltrp.Response.Response, err = future.GetResult(sender); err == nil && bltrp.Response.Response.StatusCode != http.StatusNoContent {
+ bltrp, err = client.CreateOrUpdateResponder(bltrp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", bltrp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- bltrp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1540,12 +1699,11 @@ type BackupLongTermRetentionVaultProperties struct {
// long-running operation.
type BackupLongTermRetentionVaultsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BackupLongTermRetentionVaultsCreateOrUpdateFuture) Result(client BackupLongTermRetentionVaultsClient) (bltrv BackupLongTermRetentionVault, err error) {
+func (future *BackupLongTermRetentionVaultsCreateOrUpdateFuture) Result(client BackupLongTermRetentionVaultsClient) (bltrv BackupLongTermRetentionVault, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1553,34 +1711,15 @@ func (future BackupLongTermRetentionVaultsCreateOrUpdateFuture) Result(client Ba
return
}
if !done {
- return bltrv, azure.NewAsyncOpIncompleteError("sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bltrv, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bltrv.Response.Response, err = future.GetResult(sender); err == nil && bltrv.Response.Response.StatusCode != http.StatusNoContent {
+ bltrv, err = client.CreateOrUpdateResponder(bltrv.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture", "Result", bltrv.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- bltrv, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1627,10 +1766,10 @@ type Database struct {
Kind *string `json:"kind,omitempty"`
// DatabaseProperties - The properties representing the resource.
*DatabaseProperties `json:"properties,omitempty"`
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -1648,12 +1787,12 @@ func (d Database) MarshalJSON() ([]byte, error) {
if d.DatabaseProperties != nil {
objectMap["properties"] = d.DatabaseProperties
}
- if d.Tags != nil {
- objectMap["tags"] = d.Tags
- }
if d.Location != nil {
objectMap["location"] = d.Location
}
+ if d.Tags != nil {
+ objectMap["tags"] = d.Tags
+ }
if d.ID != nil {
objectMap["id"] = d.ID
}
@@ -1693,15 +1832,6 @@ func (d *Database) UnmarshalJSON(body []byte) error {
}
d.DatabaseProperties = &databaseProperties
}
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- d.Tags = tags
- }
case "location":
if v != nil {
var location string
@@ -1711,6 +1841,15 @@ func (d *Database) UnmarshalJSON(body []byte) error {
}
d.Location = &location
}
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ d.Tags = tags
+ }
case "id":
if v != nil {
var ID string
@@ -2169,7 +2308,7 @@ type DatabaseOperationProperties struct {
ServerName *string `json:"serverName,omitempty"`
// StartTime - The operation start time.
StartTime *date.Time `json:"startTime,omitempty"`
- // State - The operation state. Possible values include: 'Pending', 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled'
+ // State - The operation state. Possible values include: 'ManagementOperationStatePending', 'ManagementOperationStateInProgress', 'ManagementOperationStateSucceeded', 'ManagementOperationStateFailed', 'ManagementOperationStateCancelInProgress', 'ManagementOperationStateCancelled'
State ManagementOperationState `json:"state,omitempty"`
// ErrorCode - The operation error code.
ErrorCode *int32 `json:"errorCode,omitempty"`
@@ -2255,12 +2394,11 @@ type DatabaseProperties struct {
// operation.
type DatabasesCreateImportOperationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesCreateImportOperationFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
+func (future *DatabasesCreateImportOperationFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2268,34 +2406,15 @@ func (future DatabasesCreateImportOperationFuture) Result(client DatabasesClient
return
}
if !done {
- return ier, azure.NewAsyncOpIncompleteError("sql.DatabasesCreateImportOperationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ier, err = client.CreateImportOperationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesCreateImportOperationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent {
+ ier, err = client.CreateImportOperationResponder(ier.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", ier.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", resp, "Failure sending request")
- return
- }
- ier, err = client.CreateImportOperationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2304,12 +2423,11 @@ func (future DatabasesCreateImportOperationFuture) Result(client DatabasesClient
// operation.
type DatabasesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
+func (future *DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2317,34 +2435,15 @@ func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Da
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("sql.DatabasesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2482,12 +2581,11 @@ type DatabaseSecurityAlertPolicyProperties struct {
// DatabasesExportFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesExportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesExportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
+func (future *DatabasesExportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2495,34 +2593,15 @@ func (future DatabasesExportFuture) Result(client DatabasesClient) (ier ImportEx
return
}
if !done {
- return ier, azure.NewAsyncOpIncompleteError("sql.DatabasesExportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ier, err = client.ExportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesExportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent {
+ ier, err = client.ExportResponder(ier.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", ier.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", resp, "Failure sending request")
- return
- }
- ier, err = client.ExportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2530,12 +2609,11 @@ func (future DatabasesExportFuture) Result(client DatabasesClient) (ier ImportEx
// DatabasesImportFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesImportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesImportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
+func (future *DatabasesImportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2543,34 +2621,15 @@ func (future DatabasesImportFuture) Result(client DatabasesClient) (ier ImportEx
return
}
if !done {
- return ier, azure.NewAsyncOpIncompleteError("sql.DatabasesImportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ier, err = client.ImportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesImportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent {
+ ier, err = client.ImportResponder(ier.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", ier.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", resp, "Failure sending request")
- return
- }
- ier, err = client.ImportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2578,12 +2637,11 @@ func (future DatabasesImportFuture) Result(client DatabasesClient) (ier ImportEx
// DatabasesPauseFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesPauseFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesPauseFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
+func (future *DatabasesPauseFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2591,47 +2649,21 @@ func (future DatabasesPauseFuture) Result(client DatabasesClient) (ar autorest.R
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.DatabasesPauseFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PauseResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesPauseFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PauseResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DatabasesResumeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesResumeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesResumeFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
+func (future *DatabasesResumeFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2639,47 +2671,21 @@ func (future DatabasesResumeFuture) Result(client DatabasesClient) (ar autorest.
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.DatabasesResumeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesResumeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
+func (future *DatabasesUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2687,34 +2693,15 @@ func (future DatabasesUpdateFuture) Result(client DatabasesClient) (d Database,
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("sql.DatabasesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.UpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2839,6 +2826,194 @@ type DatabaseUsageListResult struct {
Value *[]DatabaseUsage `json:"value,omitempty"`
}
+// DatabaseVulnerabilityAssessment a database vulnerability assessment.
+type DatabaseVulnerabilityAssessment struct {
+ autorest.Response `json:"-"`
+ // DatabaseVulnerabilityAssessmentProperties - Resource properties.
+ *DatabaseVulnerabilityAssessmentProperties `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DatabaseVulnerabilityAssessment.
+func (dva DatabaseVulnerabilityAssessment) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dva.DatabaseVulnerabilityAssessmentProperties != nil {
+ objectMap["properties"] = dva.DatabaseVulnerabilityAssessmentProperties
+ }
+ if dva.ID != nil {
+ objectMap["id"] = dva.ID
+ }
+ if dva.Name != nil {
+ objectMap["name"] = dva.Name
+ }
+ if dva.Type != nil {
+ objectMap["type"] = dva.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DatabaseVulnerabilityAssessment struct.
+func (dva *DatabaseVulnerabilityAssessment) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var databaseVulnerabilityAssessmentProperties DatabaseVulnerabilityAssessmentProperties
+ err = json.Unmarshal(*v, &databaseVulnerabilityAssessmentProperties)
+ if err != nil {
+ return err
+ }
+ dva.DatabaseVulnerabilityAssessmentProperties = &databaseVulnerabilityAssessmentProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ dva.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ dva.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ dva.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// DatabaseVulnerabilityAssessmentProperties properties of a database Vulnerability Assessment.
+type DatabaseVulnerabilityAssessmentProperties struct {
+ // StorageContainerPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
+ StorageContainerPath *string `json:"storageContainerPath,omitempty"`
+ // StorageContainerSasKey - A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter.
+ StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"`
+ // RecurringScans - The recurring scans settings
+ RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"`
+}
+
+// DatabaseVulnerabilityAssessmentRuleBaseline a database vulnerability assessment rule baseline.
+type DatabaseVulnerabilityAssessmentRuleBaseline struct {
+ autorest.Response `json:"-"`
+ // DatabaseVulnerabilityAssessmentRuleBaselineProperties - Resource properties.
+ *DatabaseVulnerabilityAssessmentRuleBaselineProperties `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DatabaseVulnerabilityAssessmentRuleBaseline.
+func (dvarb DatabaseVulnerabilityAssessmentRuleBaseline) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dvarb.DatabaseVulnerabilityAssessmentRuleBaselineProperties != nil {
+ objectMap["properties"] = dvarb.DatabaseVulnerabilityAssessmentRuleBaselineProperties
+ }
+ if dvarb.ID != nil {
+ objectMap["id"] = dvarb.ID
+ }
+ if dvarb.Name != nil {
+ objectMap["name"] = dvarb.Name
+ }
+ if dvarb.Type != nil {
+ objectMap["type"] = dvarb.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DatabaseVulnerabilityAssessmentRuleBaseline struct.
+func (dvarb *DatabaseVulnerabilityAssessmentRuleBaseline) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var databaseVulnerabilityAssessmentRuleBaselineProperties DatabaseVulnerabilityAssessmentRuleBaselineProperties
+ err = json.Unmarshal(*v, &databaseVulnerabilityAssessmentRuleBaselineProperties)
+ if err != nil {
+ return err
+ }
+ dvarb.DatabaseVulnerabilityAssessmentRuleBaselineProperties = &databaseVulnerabilityAssessmentRuleBaselineProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ dvarb.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ dvarb.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ dvarb.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// DatabaseVulnerabilityAssessmentRuleBaselineItem properties for an Azure SQL Database Vulnerability Assessment
+// rule baseline's result.
+type DatabaseVulnerabilityAssessmentRuleBaselineItem struct {
+ // Result - The rule baseline result
+ Result *[]string `json:"result,omitempty"`
+}
+
+// DatabaseVulnerabilityAssessmentRuleBaselineProperties properties of a database Vulnerability Assessment rule
+// baseline.
+type DatabaseVulnerabilityAssessmentRuleBaselineProperties struct {
+ // BaselineResults - The rule baseline result
+ BaselineResults *[]DatabaseVulnerabilityAssessmentRuleBaselineItem `json:"baselineResults,omitempty"`
+}
+
// DataMaskingPolicy represents a database data masking policy.
type DataMaskingPolicy struct {
autorest.Response `json:"-"`
@@ -3215,10 +3390,10 @@ type ElasticPool struct {
*ElasticPoolProperties `json:"properties,omitempty"`
// Kind - Kind of elastic pool. This is metadata used for the Azure portal experience.
Kind *string `json:"kind,omitempty"`
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -3236,12 +3411,12 @@ func (ep ElasticPool) MarshalJSON() ([]byte, error) {
if ep.Kind != nil {
objectMap["kind"] = ep.Kind
}
- if ep.Tags != nil {
- objectMap["tags"] = ep.Tags
- }
if ep.Location != nil {
objectMap["location"] = ep.Location
}
+ if ep.Tags != nil {
+ objectMap["tags"] = ep.Tags
+ }
if ep.ID != nil {
objectMap["id"] = ep.ID
}
@@ -3281,15 +3456,6 @@ func (ep *ElasticPool) UnmarshalJSON(body []byte) error {
}
ep.Kind = &kind
}
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- ep.Tags = tags
- }
case "location":
if v != nil {
var location string
@@ -3299,6 +3465,15 @@ func (ep *ElasticPool) UnmarshalJSON(body []byte) error {
}
ep.Location = &location
}
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ep.Tags = tags
+ }
case "id":
if v != nil {
var ID string
@@ -3693,12 +3868,11 @@ type ElasticPoolProperties struct {
// operation.
type ElasticPoolsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
+func (future *ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3706,34 +3880,15 @@ func (future ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient)
return
}
if !done {
- return ep, azure.NewAsyncOpIncompleteError("sql.ElasticPoolsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ep, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent {
+ ep, err = client.CreateOrUpdateResponder(ep.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", ep.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ep, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3741,12 +3896,11 @@ func (future ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient)
// ElasticPoolsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ElasticPoolsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ElasticPoolsUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
+func (future *ElasticPoolsUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3754,34 +3908,15 @@ func (future ElasticPoolsUpdateFuture) Result(client ElasticPoolsClient) (ep Ela
return
}
if !done {
- return ep, azure.NewAsyncOpIncompleteError("sql.ElasticPoolsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ep, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent {
+ ep, err = client.UpdateResponder(ep.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", ep.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ep, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4111,12 +4246,11 @@ type EncryptionProtectorProperties struct {
// long-running operation.
type EncryptionProtectorsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EncryptionProtectorsCreateOrUpdateFuture) Result(client EncryptionProtectorsClient) (ep EncryptionProtector, err error) {
+func (future *EncryptionProtectorsCreateOrUpdateFuture) Result(client EncryptionProtectorsClient) (ep EncryptionProtector, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4124,34 +4258,15 @@ func (future EncryptionProtectorsCreateOrUpdateFuture) Result(client EncryptionP
return
}
if !done {
- return ep, azure.NewAsyncOpIncompleteError("sql.EncryptionProtectorsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ep, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.EncryptionProtectorsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent {
+ ep, err = client.CreateOrUpdateResponder(ep.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsCreateOrUpdateFuture", "Result", ep.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ep, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4418,12 +4533,11 @@ type FailoverGroupReadWriteEndpoint struct {
// operation.
type FailoverGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FailoverGroupsCreateOrUpdateFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
+func (future *FailoverGroupsCreateOrUpdateFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4431,34 +4545,15 @@ func (future FailoverGroupsCreateOrUpdateFuture) Result(client FailoverGroupsCli
return
}
if !done {
- return fg, azure.NewAsyncOpIncompleteError("sql.FailoverGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent {
+ fg, err = client.CreateOrUpdateResponder(fg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.FailoverGroupsCreateOrUpdateFuture", "Result", fg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- fg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4466,12 +4561,11 @@ func (future FailoverGroupsCreateOrUpdateFuture) Result(client FailoverGroupsCli
// FailoverGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type FailoverGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FailoverGroupsDeleteFuture) Result(client FailoverGroupsClient) (ar autorest.Response, err error) {
+func (future *FailoverGroupsDeleteFuture) Result(client FailoverGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4479,35 +4573,10 @@ func (future FailoverGroupsDeleteFuture) Result(client FailoverGroupsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.FailoverGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4515,12 +4584,11 @@ func (future FailoverGroupsDeleteFuture) Result(client FailoverGroupsClient) (ar
// operation.
type FailoverGroupsFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FailoverGroupsFailoverFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
+func (future *FailoverGroupsFailoverFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4528,34 +4596,15 @@ func (future FailoverGroupsFailoverFuture) Result(client FailoverGroupsClient) (
return
}
if !done {
- return fg, azure.NewAsyncOpIncompleteError("sql.FailoverGroupsFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fg, err = client.FailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent {
+ fg, err = client.FailoverResponder(fg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.FailoverGroupsFailoverFuture", "Result", fg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- fg, err = client.FailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4564,12 +4613,11 @@ func (future FailoverGroupsFailoverFuture) Result(client FailoverGroupsClient) (
// long-running operation.
type FailoverGroupsForceFailoverAllowDataLossFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FailoverGroupsForceFailoverAllowDataLossFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
+func (future *FailoverGroupsForceFailoverAllowDataLossFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4577,34 +4625,15 @@ func (future FailoverGroupsForceFailoverAllowDataLossFuture) Result(client Failo
return
}
if !done {
- return fg, azure.NewAsyncOpIncompleteError("sql.FailoverGroupsForceFailoverAllowDataLossFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fg, err = client.ForceFailoverAllowDataLossResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsForceFailoverAllowDataLossFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsForceFailoverAllowDataLossFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent {
+ fg, err = client.ForceFailoverAllowDataLossResponder(fg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.FailoverGroupsForceFailoverAllowDataLossFuture", "Result", fg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsForceFailoverAllowDataLossFuture", "Result", resp, "Failure sending request")
- return
- }
- fg, err = client.ForceFailoverAllowDataLossResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsForceFailoverAllowDataLossFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4612,12 +4641,11 @@ func (future FailoverGroupsForceFailoverAllowDataLossFuture) Result(client Failo
// FailoverGroupsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type FailoverGroupsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FailoverGroupsUpdateFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
+func (future *FailoverGroupsUpdateFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4625,34 +4653,15 @@ func (future FailoverGroupsUpdateFuture) Result(client FailoverGroupsClient) (fg
return
}
if !done {
- return fg, azure.NewAsyncOpIncompleteError("sql.FailoverGroupsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fg, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent {
+ fg, err = client.UpdateResponder(fg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.FailoverGroupsUpdateFuture", "Result", fg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- fg, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.FailoverGroupsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5183,6 +5192,1581 @@ type ImportRequest struct {
AuthenticationType AuthenticationType `json:"authenticationType,omitempty"`
}
+// Job a job.
+type Job struct {
+ autorest.Response `json:"-"`
+ // JobProperties - Resource properties.
+ *JobProperties `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Job.
+func (j Job) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if j.JobProperties != nil {
+ objectMap["properties"] = j.JobProperties
+ }
+ if j.ID != nil {
+ objectMap["id"] = j.ID
+ }
+ if j.Name != nil {
+ objectMap["name"] = j.Name
+ }
+ if j.Type != nil {
+ objectMap["type"] = j.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Job struct.
+func (j *Job) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var jobProperties JobProperties
+ err = json.Unmarshal(*v, &jobProperties)
+ if err != nil {
+ return err
+ }
+ j.JobProperties = &jobProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ j.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ j.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ j.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// JobAgent an Azure SQL job agent.
+type JobAgent struct {
+ autorest.Response `json:"-"`
+ // Sku - The name and tier of the SKU.
+ Sku *Sku `json:"sku,omitempty"`
+ // JobAgentProperties - Resource properties.
+ *JobAgentProperties `json:"properties,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for JobAgent.
+func (ja JobAgent) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ja.Sku != nil {
+ objectMap["sku"] = ja.Sku
+ }
+ if ja.JobAgentProperties != nil {
+ objectMap["properties"] = ja.JobAgentProperties
+ }
+ if ja.Location != nil {
+ objectMap["location"] = ja.Location
+ }
+ if ja.Tags != nil {
+ objectMap["tags"] = ja.Tags
+ }
+ if ja.ID != nil {
+ objectMap["id"] = ja.ID
+ }
+ if ja.Name != nil {
+ objectMap["name"] = ja.Name
+ }
+ if ja.Type != nil {
+ objectMap["type"] = ja.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for JobAgent struct.
+func (ja *JobAgent) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ ja.Sku = &sku
+ }
+ case "properties":
+ if v != nil {
+ var jobAgentProperties JobAgentProperties
+ err = json.Unmarshal(*v, &jobAgentProperties)
+ if err != nil {
+ return err
+ }
+ ja.JobAgentProperties = &jobAgentProperties
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ ja.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ja.Tags = tags
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ja.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ja.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ja.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// JobAgentListResult a list of Azure SQL job agents.
+type JobAgentListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of results.
+ Value *[]JobAgent `json:"value,omitempty"`
+ // NextLink - Link to retrieve next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// JobAgentListResultIterator provides access to a complete listing of JobAgent values.
+type JobAgentListResultIterator struct {
+ i int
+ page JobAgentListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *JobAgentListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter JobAgentListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter JobAgentListResultIterator) Response() JobAgentListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter JobAgentListResultIterator) Value() JobAgent {
+ if !iter.page.NotDone() {
+ return JobAgent{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (jalr JobAgentListResult) IsEmpty() bool {
+ return jalr.Value == nil || len(*jalr.Value) == 0
+}
+
+// jobAgentListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (jalr JobAgentListResult) jobAgentListResultPreparer() (*http.Request, error) {
+ if jalr.NextLink == nil || len(to.String(jalr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(jalr.NextLink)))
+}
+
+// JobAgentListResultPage contains a page of JobAgent values.
+type JobAgentListResultPage struct {
+ fn func(JobAgentListResult) (JobAgentListResult, error)
+ jalr JobAgentListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *JobAgentListResultPage) Next() error {
+ next, err := page.fn(page.jalr)
+ if err != nil {
+ return err
+ }
+ page.jalr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page JobAgentListResultPage) NotDone() bool {
+ return !page.jalr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page JobAgentListResultPage) Response() JobAgentListResult {
+ return page.jalr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page JobAgentListResultPage) Values() []JobAgent {
+ if page.jalr.IsEmpty() {
+ return nil
+ }
+ return *page.jalr.Value
+}
+
+// JobAgentProperties properties of a job agent.
+type JobAgentProperties struct {
+ // DatabaseID - Resource ID of the database to store job metadata in.
+ DatabaseID *string `json:"databaseId,omitempty"`
+ // State - The state of the job agent. Possible values include: 'JobAgentStateCreating', 'JobAgentStateReady', 'JobAgentStateUpdating', 'JobAgentStateDeleting', 'JobAgentStateDisabled'
+ State JobAgentState `json:"state,omitempty"`
+}
+
+// JobAgentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type JobAgentsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *JobAgentsCreateOrUpdateFuture) Result(client JobAgentsClient) (ja JobAgent, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("sql.JobAgentsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ja.Response.Response, err = future.GetResult(sender); err == nil && ja.Response.Response.StatusCode != http.StatusNoContent {
+ ja, err = client.CreateOrUpdateResponder(ja.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsCreateOrUpdateFuture", "Result", ja.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// JobAgentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type JobAgentsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *JobAgentsDeleteFuture) Result(client JobAgentsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("sql.JobAgentsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// JobAgentsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type JobAgentsUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *JobAgentsUpdateFuture) Result(client JobAgentsClient) (ja JobAgent, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("sql.JobAgentsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ja.Response.Response, err = future.GetResult(sender); err == nil && ja.Response.Response.StatusCode != http.StatusNoContent {
+ ja, err = client.UpdateResponder(ja.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobAgentsUpdateFuture", "Result", ja.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// JobAgentUpdate an update to an Azure SQL job agent.
+type JobAgentUpdate struct {
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for JobAgentUpdate.
+func (jau JobAgentUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if jau.Tags != nil {
+ objectMap["tags"] = jau.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// JobCredential a stored credential that can be used by a job to connect to target databases.
+type JobCredential struct {
+ autorest.Response `json:"-"`
+ // JobCredentialProperties - Resource properties.
+ *JobCredentialProperties `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for JobCredential.
+func (jc JobCredential) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if jc.JobCredentialProperties != nil {
+ objectMap["properties"] = jc.JobCredentialProperties
+ }
+ if jc.ID != nil {
+ objectMap["id"] = jc.ID
+ }
+ if jc.Name != nil {
+ objectMap["name"] = jc.Name
+ }
+ if jc.Type != nil {
+ objectMap["type"] = jc.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for JobCredential struct.
+func (jc *JobCredential) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var jobCredentialProperties JobCredentialProperties
+ err = json.Unmarshal(*v, &jobCredentialProperties)
+ if err != nil {
+ return err
+ }
+ jc.JobCredentialProperties = &jobCredentialProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ jc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ jc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ jc.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// JobCredentialListResult a list of job credentials.
+type JobCredentialListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of results.
+ Value *[]JobCredential `json:"value,omitempty"`
+ // NextLink - Link to retrieve next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// JobCredentialListResultIterator provides access to a complete listing of JobCredential values.
+type JobCredentialListResultIterator struct {
+ i int
+ page JobCredentialListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *JobCredentialListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter JobCredentialListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter JobCredentialListResultIterator) Response() JobCredentialListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter JobCredentialListResultIterator) Value() JobCredential {
+ if !iter.page.NotDone() {
+ return JobCredential{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (jclr JobCredentialListResult) IsEmpty() bool {
+ return jclr.Value == nil || len(*jclr.Value) == 0
+}
+
+// jobCredentialListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (jclr JobCredentialListResult) jobCredentialListResultPreparer() (*http.Request, error) {
+ if jclr.NextLink == nil || len(to.String(jclr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(jclr.NextLink)))
+}
+
+// JobCredentialListResultPage contains a page of JobCredential values.
+type JobCredentialListResultPage struct {
+ fn func(JobCredentialListResult) (JobCredentialListResult, error)
+ jclr JobCredentialListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *JobCredentialListResultPage) Next() error {
+ next, err := page.fn(page.jclr)
+ if err != nil {
+ return err
+ }
+ page.jclr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page JobCredentialListResultPage) NotDone() bool {
+ return !page.jclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page JobCredentialListResultPage) Response() JobCredentialListResult {
+ return page.jclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page JobCredentialListResultPage) Values() []JobCredential {
+ if page.jclr.IsEmpty() {
+ return nil
+ }
+ return *page.jclr.Value
+}
+
+// JobCredentialProperties properties of a job credential.
+type JobCredentialProperties struct {
+ // Username - The credential user name.
+ Username *string `json:"username,omitempty"`
+ // Password - The credential password.
+ Password *string `json:"password,omitempty"`
+}
+
+// JobExecution an execution of a job
+type JobExecution struct {
+ autorest.Response `json:"-"`
+ // JobExecutionProperties - Resource properties.
+ *JobExecutionProperties `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for JobExecution.
+func (je JobExecution) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if je.JobExecutionProperties != nil {
+ objectMap["properties"] = je.JobExecutionProperties
+ }
+ if je.ID != nil {
+ objectMap["id"] = je.ID
+ }
+ if je.Name != nil {
+ objectMap["name"] = je.Name
+ }
+ if je.Type != nil {
+ objectMap["type"] = je.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for JobExecution struct.
+func (je *JobExecution) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var jobExecutionProperties JobExecutionProperties
+ err = json.Unmarshal(*v, &jobExecutionProperties)
+ if err != nil {
+ return err
+ }
+ je.JobExecutionProperties = &jobExecutionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ je.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ je.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ je.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// JobExecutionListResult a list of job executions.
+type JobExecutionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of results.
+ Value *[]JobExecution `json:"value,omitempty"`
+ // NextLink - Link to retrieve next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// JobExecutionListResultIterator provides access to a complete listing of JobExecution values.
+type JobExecutionListResultIterator struct {
+ i int
+ page JobExecutionListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *JobExecutionListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter JobExecutionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter JobExecutionListResultIterator) Response() JobExecutionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter JobExecutionListResultIterator) Value() JobExecution {
+ if !iter.page.NotDone() {
+ return JobExecution{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (jelr JobExecutionListResult) IsEmpty() bool {
+ return jelr.Value == nil || len(*jelr.Value) == 0
+}
+
+// jobExecutionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (jelr JobExecutionListResult) jobExecutionListResultPreparer() (*http.Request, error) {
+ if jelr.NextLink == nil || len(to.String(jelr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(jelr.NextLink)))
+}
+
+// JobExecutionListResultPage contains a page of JobExecution values.
+type JobExecutionListResultPage struct {
+ fn func(JobExecutionListResult) (JobExecutionListResult, error)
+ jelr JobExecutionListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *JobExecutionListResultPage) Next() error {
+ next, err := page.fn(page.jelr)
+ if err != nil {
+ return err
+ }
+ page.jelr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page JobExecutionListResultPage) NotDone() bool {
+ return !page.jelr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page JobExecutionListResultPage) Response() JobExecutionListResult {
+ return page.jelr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page JobExecutionListResultPage) Values() []JobExecution {
+ if page.jelr.IsEmpty() {
+ return nil
+ }
+ return *page.jelr.Value
+}
+
+// JobExecutionProperties properties for an Azure SQL Database Elastic job execution.
+type JobExecutionProperties struct {
+ // JobVersion - The job version number.
+ JobVersion *int32 `json:"jobVersion,omitempty"`
+ // StepName - The job step name.
+ StepName *string `json:"stepName,omitempty"`
+ // StepID - The job step id.
+ StepID *int32 `json:"stepId,omitempty"`
+ // JobExecutionID - The unique identifier of the job execution.
+ JobExecutionID *uuid.UUID `json:"jobExecutionId,omitempty"`
+ // Lifecycle - The detailed state of the job execution. Possible values include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', 'TimedOut', 'Canceled', 'Skipped'
+ Lifecycle JobExecutionLifecycle `json:"lifecycle,omitempty"`
+ // ProvisioningState - The ARM provisioning state of the job execution. Possible values include: 'ProvisioningStateCreated', 'ProvisioningStateInProgress', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // CreateTime - The time that the job execution was created.
+ CreateTime *date.Time `json:"createTime,omitempty"`
+ // StartTime - The time that the job execution started.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - The time that the job execution completed.
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // CurrentAttempts - Number of times the job execution has been attempted.
+ CurrentAttempts *int32 `json:"currentAttempts,omitempty"`
+ // CurrentAttemptStartTime - Start time of the current attempt.
+ CurrentAttemptStartTime *date.Time `json:"currentAttemptStartTime,omitempty"`
+ // LastMessage - The last status or error message.
+ LastMessage *string `json:"lastMessage,omitempty"`
+ // Target - The target that this execution is executed on.
+ Target *JobExecutionTarget `json:"target,omitempty"`
+}
+
+// JobExecutionsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type JobExecutionsCreateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *JobExecutionsCreateFuture) Result(client JobExecutionsClient) (je JobExecution, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsCreateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("sql.JobExecutionsCreateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if je.Response.Response, err = future.GetResult(sender); err == nil && je.Response.Response.StatusCode != http.StatusNoContent {
+ je, err = client.CreateResponder(je.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsCreateFuture", "Result", je.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// JobExecutionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type JobExecutionsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *JobExecutionsCreateOrUpdateFuture) Result(client JobExecutionsClient) (je JobExecution, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("sql.JobExecutionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if je.Response.Response, err = future.GetResult(sender); err == nil && je.Response.Response.StatusCode != http.StatusNoContent {
+ je, err = client.CreateOrUpdateResponder(je.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.JobExecutionsCreateOrUpdateFuture", "Result", je.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// JobExecutionTarget the target that a job execution is executed on.
+type JobExecutionTarget struct {
+ // Type - The type of the target. Possible values include: 'JobTargetTypeTargetGroup', 'JobTargetTypeSQLDatabase', 'JobTargetTypeSQLElasticPool', 'JobTargetTypeSQLShardMap', 'JobTargetTypeSQLServer'
+ Type JobTargetType `json:"type,omitempty"`
+ // ServerName - The server name.
+ ServerName *string `json:"serverName,omitempty"`
+ // DatabaseName - The database name.
+ DatabaseName *string `json:"databaseName,omitempty"`
+}
+
+// JobListResult a list of jobs.
+type JobListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of results.
+ Value *[]Job `json:"value,omitempty"`
+ // NextLink - Link to retrieve next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// JobListResultIterator provides access to a complete listing of Job values.
+type JobListResultIterator struct {
+ i int
+ page JobListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *JobListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter JobListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter JobListResultIterator) Response() JobListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter JobListResultIterator) Value() Job {
+ if !iter.page.NotDone() {
+ return Job{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (jlr JobListResult) IsEmpty() bool {
+ return jlr.Value == nil || len(*jlr.Value) == 0
+}
+
+// jobListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (jlr JobListResult) jobListResultPreparer() (*http.Request, error) {
+ if jlr.NextLink == nil || len(to.String(jlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(jlr.NextLink)))
+}
+
+// JobListResultPage contains a page of Job values.
+type JobListResultPage struct {
+ fn func(JobListResult) (JobListResult, error)
+ jlr JobListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *JobListResultPage) Next() error {
+ next, err := page.fn(page.jlr)
+ if err != nil {
+ return err
+ }
+ page.jlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page JobListResultPage) NotDone() bool {
+ return !page.jlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page JobListResultPage) Response() JobListResult {
+ return page.jlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page JobListResultPage) Values() []Job {
+ if page.jlr.IsEmpty() {
+ return nil
+ }
+ return *page.jlr.Value
+}
+
+// JobProperties properties of a job.
+type JobProperties struct {
+ // Description - User-defined description of the job.
+ Description *string `json:"description,omitempty"`
+ // Version - The job version number.
+ Version *int32 `json:"version,omitempty"`
+ // Schedule - Schedule properties of the job.
+ Schedule *JobSchedule `json:"schedule,omitempty"`
+}
+
+// JobSchedule scheduling properties of a job.
+type JobSchedule struct {
+ // StartTime - Schedule start time.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - Schedule end time.
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // Type - Schedule interval type. Possible values include: 'Once', 'Recurring'
+ Type JobScheduleType `json:"type,omitempty"`
+ // Enabled - Whether or not the schedule is enabled.
+ Enabled *bool `json:"enabled,omitempty"`
+ // Interval - Value of the schedule's recurring interval, if the scheduletype is recurring. ISO8601 duration format.
+ Interval *string `json:"interval,omitempty"`
+}
+
+// JobStep a job step.
+type JobStep struct {
+ autorest.Response `json:"-"`
+ // JobStepProperties - Resource properties.
+ *JobStepProperties `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for JobStep.
+func (js JobStep) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if js.JobStepProperties != nil {
+ objectMap["properties"] = js.JobStepProperties
+ }
+ if js.ID != nil {
+ objectMap["id"] = js.ID
+ }
+ if js.Name != nil {
+ objectMap["name"] = js.Name
+ }
+ if js.Type != nil {
+ objectMap["type"] = js.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for JobStep struct.
+func (js *JobStep) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var jobStepProperties JobStepProperties
+ err = json.Unmarshal(*v, &jobStepProperties)
+ if err != nil {
+ return err
+ }
+ js.JobStepProperties = &jobStepProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ js.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ js.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ js.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// JobStepAction the action to be executed by a job step.
+type JobStepAction struct {
+ // Type - Type of action being executed by the job step. Possible values include: 'TSQL'
+ Type JobStepActionType `json:"type,omitempty"`
+ // Source - The source of the action to execute. Possible values include: 'Inline'
+ Source JobStepActionSource `json:"source,omitempty"`
+ // Value - The action value, for example the text of the T-SQL script to execute.
+ Value *string `json:"value,omitempty"`
+}
+
+// JobStepExecutionOptions the execution options of a job step.
+type JobStepExecutionOptions struct {
+ // TimeoutSeconds - Execution timeout for the job step.
+ TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
+ // RetryAttempts - Maximum number of times the job step will be reattempted if the first attempt fails.
+ RetryAttempts *int32 `json:"retryAttempts,omitempty"`
+ // InitialRetryIntervalSeconds - Initial delay between retries for job step execution.
+ InitialRetryIntervalSeconds *int32 `json:"initialRetryIntervalSeconds,omitempty"`
+ // MaximumRetryIntervalSeconds - The maximum amount of time to wait between retries for job step execution.
+ MaximumRetryIntervalSeconds *int32 `json:"maximumRetryIntervalSeconds,omitempty"`
+ // RetryIntervalBackoffMultiplier - The backoff multiplier for the time between retries.
+ RetryIntervalBackoffMultiplier *float64 `json:"retryIntervalBackoffMultiplier,omitempty"`
+}
+
+// JobStepListResult a list of job steps.
+type JobStepListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of results.
+ Value *[]JobStep `json:"value,omitempty"`
+ // NextLink - Link to retrieve next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// JobStepListResultIterator provides access to a complete listing of JobStep values.
+type JobStepListResultIterator struct {
+ i int
+ page JobStepListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *JobStepListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter JobStepListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter JobStepListResultIterator) Response() JobStepListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter JobStepListResultIterator) Value() JobStep {
+ if !iter.page.NotDone() {
+ return JobStep{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (jslr JobStepListResult) IsEmpty() bool {
+ return jslr.Value == nil || len(*jslr.Value) == 0
+}
+
+// jobStepListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (jslr JobStepListResult) jobStepListResultPreparer() (*http.Request, error) {
+ if jslr.NextLink == nil || len(to.String(jslr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(jslr.NextLink)))
+}
+
+// JobStepListResultPage contains a page of JobStep values.
+type JobStepListResultPage struct {
+ fn func(JobStepListResult) (JobStepListResult, error)
+ jslr JobStepListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *JobStepListResultPage) Next() error {
+ next, err := page.fn(page.jslr)
+ if err != nil {
+ return err
+ }
+ page.jslr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page JobStepListResultPage) NotDone() bool {
+ return !page.jslr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page JobStepListResultPage) Response() JobStepListResult {
+ return page.jslr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page JobStepListResultPage) Values() []JobStep {
+ if page.jslr.IsEmpty() {
+ return nil
+ }
+ return *page.jslr.Value
+}
+
+// JobStepOutput the output configuration of a job step.
+type JobStepOutput struct {
+ // Type - The output destination type. Possible values include: 'SQLDatabase'
+ Type JobStepOutputType `json:"type,omitempty"`
+ // SubscriptionID - The output destination subscription id.
+ SubscriptionID *uuid.UUID `json:"subscriptionId,omitempty"`
+ // ResourceGroupName - The output destination resource group.
+ ResourceGroupName *string `json:"resourceGroupName,omitempty"`
+ // ServerName - The output destination server name.
+ ServerName *string `json:"serverName,omitempty"`
+ // DatabaseName - The output destination database.
+ DatabaseName *string `json:"databaseName,omitempty"`
+ // SchemaName - The output destination schema.
+ SchemaName *string `json:"schemaName,omitempty"`
+ // TableName - The output destination table.
+ TableName *string `json:"tableName,omitempty"`
+ // Credential - The resource ID of the credential to use to connect to the output destination.
+ Credential *string `json:"credential,omitempty"`
+}
+
+// JobStepProperties properties of a job step.
+type JobStepProperties struct {
+ // StepID - The job step's index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified.
+ StepID *int32 `json:"stepId,omitempty"`
+ // TargetGroup - The resource ID of the target group that the job step will be executed on.
+ TargetGroup *string `json:"targetGroup,omitempty"`
+ // Credential - The resource ID of the job credential that will be used to connect to the targets.
+ Credential *string `json:"credential,omitempty"`
+ // Action - The action payload of the job step.
+ Action *JobStepAction `json:"action,omitempty"`
+ // Output - Output destination properties of the job step.
+ Output *JobStepOutput `json:"output,omitempty"`
+ // ExecutionOptions - Execution options for the job step.
+ ExecutionOptions *JobStepExecutionOptions `json:"executionOptions,omitempty"`
+}
+
+// JobTarget a job target, for example a specific database or a container of databases that is evaluated during job
+// execution.
+type JobTarget struct {
+ // MembershipType - Whether the target is included or excluded from the group. Possible values include: 'Include', 'Exclude'
+ MembershipType JobTargetGroupMembershipType `json:"membershipType,omitempty"`
+ // Type - The target type. Possible values include: 'JobTargetTypeTargetGroup', 'JobTargetTypeSQLDatabase', 'JobTargetTypeSQLElasticPool', 'JobTargetTypeSQLShardMap', 'JobTargetTypeSQLServer'
+ Type JobTargetType `json:"type,omitempty"`
+ // ServerName - The target server name.
+ ServerName *string `json:"serverName,omitempty"`
+ // DatabaseName - The target database name.
+ DatabaseName *string `json:"databaseName,omitempty"`
+ // ElasticPoolName - The target elastic pool name.
+ ElasticPoolName *string `json:"elasticPoolName,omitempty"`
+ // ShardMapName - The target shard map.
+ ShardMapName *string `json:"shardMapName,omitempty"`
+ // RefreshCredential - The resource ID of the credential that is used during job execution to connect to the target and determine the list of databases inside the target.
+ RefreshCredential *string `json:"refreshCredential,omitempty"`
+}
+
+// JobTargetGroup a group of job targets.
+type JobTargetGroup struct {
+ autorest.Response `json:"-"`
+ // JobTargetGroupProperties - Resource properties.
+ *JobTargetGroupProperties `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for JobTargetGroup.
+func (jtg JobTargetGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if jtg.JobTargetGroupProperties != nil {
+ objectMap["properties"] = jtg.JobTargetGroupProperties
+ }
+ if jtg.ID != nil {
+ objectMap["id"] = jtg.ID
+ }
+ if jtg.Name != nil {
+ objectMap["name"] = jtg.Name
+ }
+ if jtg.Type != nil {
+ objectMap["type"] = jtg.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for JobTargetGroup struct.
+func (jtg *JobTargetGroup) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var jobTargetGroupProperties JobTargetGroupProperties
+ err = json.Unmarshal(*v, &jobTargetGroupProperties)
+ if err != nil {
+ return err
+ }
+ jtg.JobTargetGroupProperties = &jobTargetGroupProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ jtg.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ jtg.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ jtg.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// JobTargetGroupListResult a list of target groups.
+type JobTargetGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of results.
+ Value *[]JobTargetGroup `json:"value,omitempty"`
+ // NextLink - Link to retrieve next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// JobTargetGroupListResultIterator provides access to a complete listing of JobTargetGroup values.
+type JobTargetGroupListResultIterator struct {
+ i int
+ page JobTargetGroupListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *JobTargetGroupListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter JobTargetGroupListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter JobTargetGroupListResultIterator) Response() JobTargetGroupListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter JobTargetGroupListResultIterator) Value() JobTargetGroup {
+ if !iter.page.NotDone() {
+ return JobTargetGroup{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (jtglr JobTargetGroupListResult) IsEmpty() bool {
+ return jtglr.Value == nil || len(*jtglr.Value) == 0
+}
+
+// jobTargetGroupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (jtglr JobTargetGroupListResult) jobTargetGroupListResultPreparer() (*http.Request, error) {
+ if jtglr.NextLink == nil || len(to.String(jtglr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(jtglr.NextLink)))
+}
+
+// JobTargetGroupListResultPage contains a page of JobTargetGroup values.
+type JobTargetGroupListResultPage struct {
+ fn func(JobTargetGroupListResult) (JobTargetGroupListResult, error)
+ jtglr JobTargetGroupListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *JobTargetGroupListResultPage) Next() error {
+ next, err := page.fn(page.jtglr)
+ if err != nil {
+ return err
+ }
+ page.jtglr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page JobTargetGroupListResultPage) NotDone() bool {
+ return !page.jtglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page JobTargetGroupListResultPage) Response() JobTargetGroupListResult {
+ return page.jtglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page JobTargetGroupListResultPage) Values() []JobTargetGroup {
+ if page.jtglr.IsEmpty() {
+ return nil
+ }
+ return *page.jtglr.Value
+}
+
+// JobTargetGroupProperties properties of job target group.
+type JobTargetGroupProperties struct {
+ // Members - Members of the target group.
+ Members *[]JobTarget `json:"members,omitempty"`
+}
+
+// JobVersion a job version.
+type JobVersion struct {
+ autorest.Response `json:"-"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// JobVersionListResult a list of job versions.
+type JobVersionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of results.
+ Value *[]JobVersion `json:"value,omitempty"`
+ // NextLink - Link to retrieve next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// JobVersionListResultIterator provides access to a complete listing of JobVersion values.
+type JobVersionListResultIterator struct {
+ i int
+ page JobVersionListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *JobVersionListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter JobVersionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter JobVersionListResultIterator) Response() JobVersionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter JobVersionListResultIterator) Value() JobVersion {
+ if !iter.page.NotDone() {
+ return JobVersion{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (jvlr JobVersionListResult) IsEmpty() bool {
+ return jvlr.Value == nil || len(*jvlr.Value) == 0
+}
+
+// jobVersionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (jvlr JobVersionListResult) jobVersionListResultPreparer() (*http.Request, error) {
+ if jvlr.NextLink == nil || len(to.String(jvlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(jvlr.NextLink)))
+}
+
+// JobVersionListResultPage contains a page of JobVersion values.
+type JobVersionListResultPage struct {
+ fn func(JobVersionListResult) (JobVersionListResult, error)
+ jvlr JobVersionListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *JobVersionListResultPage) Next() error {
+ next, err := page.fn(page.jvlr)
+ if err != nil {
+ return err
+ }
+ page.jvlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page JobVersionListResultPage) NotDone() bool {
+ return !page.jvlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page JobVersionListResultPage) Response() JobVersionListResult {
+ return page.jvlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page JobVersionListResultPage) Values() []JobVersion {
+ if page.jvlr.IsEmpty() {
+ return nil
+ }
+ return *page.jvlr.Value
+}
+
// LocationCapabilities the capabilities for a location.
type LocationCapabilities struct {
autorest.Response `json:"-"`
@@ -5199,10 +6783,10 @@ type ManagedDatabase struct {
autorest.Response `json:"-"`
// ManagedDatabaseProperties - Resource properties.
*ManagedDatabaseProperties `json:"properties,omitempty"`
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -5217,12 +6801,12 @@ func (md ManagedDatabase) MarshalJSON() ([]byte, error) {
if md.ManagedDatabaseProperties != nil {
objectMap["properties"] = md.ManagedDatabaseProperties
}
- if md.Tags != nil {
- objectMap["tags"] = md.Tags
- }
if md.Location != nil {
objectMap["location"] = md.Location
}
+ if md.Tags != nil {
+ objectMap["tags"] = md.Tags
+ }
if md.ID != nil {
objectMap["id"] = md.ID
}
@@ -5253,15 +6837,6 @@ func (md *ManagedDatabase) UnmarshalJSON(body []byte) error {
}
md.ManagedDatabaseProperties = &managedDatabaseProperties
}
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- md.Tags = tags
- }
case "location":
if v != nil {
var location string
@@ -5271,6 +6846,15 @@ func (md *ManagedDatabase) UnmarshalJSON(body []byte) error {
}
md.Location = &location
}
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ md.Tags = tags
+ }
case "id":
if v != nil {
var ID string
@@ -5438,12 +7022,11 @@ type ManagedDatabaseProperties struct {
// operation.
type ManagedDatabasesCompleteRestoreFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedDatabasesCompleteRestoreFuture) Result(client ManagedDatabasesClient) (ar autorest.Response, err error) {
+func (future *ManagedDatabasesCompleteRestoreFuture) Result(client ManagedDatabasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5451,35 +7034,10 @@ func (future ManagedDatabasesCompleteRestoreFuture) Result(client ManagedDatabas
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesCompleteRestoreFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.CompleteRestoreResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesCompleteRestoreFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesCompleteRestoreFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesCompleteRestoreFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.CompleteRestoreResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesCompleteRestoreFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5487,12 +7045,11 @@ func (future ManagedDatabasesCompleteRestoreFuture) Result(client ManagedDatabas
// operation.
type ManagedDatabasesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedDatabasesCreateOrUpdateFuture) Result(client ManagedDatabasesClient) (md ManagedDatabase, err error) {
+func (future *ManagedDatabasesCreateOrUpdateFuture) Result(client ManagedDatabasesClient) (md ManagedDatabase, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5500,34 +7057,15 @@ func (future ManagedDatabasesCreateOrUpdateFuture) Result(client ManagedDatabase
return
}
if !done {
- return md, azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- md, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if md.Response.Response, err = future.GetResult(sender); err == nil && md.Response.Response.StatusCode != http.StatusNoContent {
+ md, err = client.CreateOrUpdateResponder(md.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesCreateOrUpdateFuture", "Result", md.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- md, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5536,12 +7074,11 @@ func (future ManagedDatabasesCreateOrUpdateFuture) Result(client ManagedDatabase
// operation.
type ManagedDatabasesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedDatabasesDeleteFuture) Result(client ManagedDatabasesClient) (ar autorest.Response, err error) {
+func (future *ManagedDatabasesDeleteFuture) Result(client ManagedDatabasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5549,35 +7086,10 @@ func (future ManagedDatabasesDeleteFuture) Result(client ManagedDatabasesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5585,12 +7097,11 @@ func (future ManagedDatabasesDeleteFuture) Result(client ManagedDatabasesClient)
// operation.
type ManagedDatabasesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedDatabasesUpdateFuture) Result(client ManagedDatabasesClient) (md ManagedDatabase, err error) {
+func (future *ManagedDatabasesUpdateFuture) Result(client ManagedDatabasesClient) (md ManagedDatabase, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5598,34 +7109,15 @@ func (future ManagedDatabasesUpdateFuture) Result(client ManagedDatabasesClient)
return
}
if !done {
- return md, azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- md, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ManagedDatabasesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if md.Response.Response, err = future.GetResult(sender); err == nil && md.Response.Response.StatusCode != http.StatusNoContent {
+ md, err = client.UpdateResponder(md.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesUpdateFuture", "Result", md.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- md, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedDatabasesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5692,10 +7184,10 @@ type ManagedInstance struct {
Sku *Sku `json:"sku,omitempty"`
// ManagedInstanceProperties - Resource properties.
*ManagedInstanceProperties `json:"properties,omitempty"`
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -5716,12 +7208,12 @@ func (mi ManagedInstance) MarshalJSON() ([]byte, error) {
if mi.ManagedInstanceProperties != nil {
objectMap["properties"] = mi.ManagedInstanceProperties
}
- if mi.Tags != nil {
- objectMap["tags"] = mi.Tags
- }
if mi.Location != nil {
objectMap["location"] = mi.Location
}
+ if mi.Tags != nil {
+ objectMap["tags"] = mi.Tags
+ }
if mi.ID != nil {
objectMap["id"] = mi.ID
}
@@ -5770,15 +7262,6 @@ func (mi *ManagedInstance) UnmarshalJSON(body []byte) error {
}
mi.ManagedInstanceProperties = &managedInstanceProperties
}
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- mi.Tags = tags
- }
case "location":
if v != nil {
var location string
@@ -5788,6 +7271,15 @@ func (mi *ManagedInstance) UnmarshalJSON(body []byte) error {
}
mi.Location = &location
}
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ mi.Tags = tags
+ }
case "id":
if v != nil {
var ID string
@@ -5947,12 +7439,11 @@ type ManagedInstanceProperties struct {
// operation.
type ManagedInstancesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedInstancesCreateOrUpdateFuture) Result(client ManagedInstancesClient) (mi ManagedInstance, err error) {
+func (future *ManagedInstancesCreateOrUpdateFuture) Result(client ManagedInstancesClient) (mi ManagedInstance, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5960,34 +7451,15 @@ func (future ManagedInstancesCreateOrUpdateFuture) Result(client ManagedInstance
return
}
if !done {
- return mi, azure.NewAsyncOpIncompleteError("sql.ManagedInstancesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mi, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
+ mi, err = client.CreateOrUpdateResponder(mi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", mi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- mi, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5996,12 +7468,11 @@ func (future ManagedInstancesCreateOrUpdateFuture) Result(client ManagedInstance
// operation.
type ManagedInstancesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedInstancesDeleteFuture) Result(client ManagedInstancesClient) (ar autorest.Response, err error) {
+func (future *ManagedInstancesDeleteFuture) Result(client ManagedInstancesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6009,35 +7480,10 @@ func (future ManagedInstancesDeleteFuture) Result(client ManagedInstancesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ManagedInstancesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6045,12 +7491,11 @@ func (future ManagedInstancesDeleteFuture) Result(client ManagedInstancesClient)
// operation.
type ManagedInstancesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedInstancesUpdateFuture) Result(client ManagedInstancesClient) (mi ManagedInstance, err error) {
+func (future *ManagedInstancesUpdateFuture) Result(client ManagedInstancesClient) (mi ManagedInstance, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6058,34 +7503,15 @@ func (future ManagedInstancesUpdateFuture) Result(client ManagedInstancesClient)
return
}
if !done {
- return mi, azure.NewAsyncOpIncompleteError("sql.ManagedInstancesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mi, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
+ mi, err = client.UpdateResponder(mi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", mi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- mi, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6512,7 +7938,7 @@ func (ri *RecommendedIndex) UnmarshalJSON(body []byte) error {
type RecommendedIndexProperties struct {
// Action - The proposed index action. You can create a missing index, drop an unused index, or rebuild an existing index to improve its performance. Possible values include: 'Create', 'Drop', 'Rebuild'
Action RecommendedIndexAction `json:"action,omitempty"`
- // State - The current recommendation state. Possible values include: 'RecommendedIndexStateActive', 'RecommendedIndexStatePending', 'RecommendedIndexStateExecuting', 'RecommendedIndexStateVerifying', 'RecommendedIndexStatePendingRevert', 'RecommendedIndexStateReverting', 'RecommendedIndexStateReverted', 'RecommendedIndexStateIgnored', 'RecommendedIndexStateExpired', 'RecommendedIndexStateBlocked', 'RecommendedIndexStateSuccess'
+ // State - The current recommendation state. Possible values include: 'Active', 'Pending', 'Executing', 'Verifying', 'PendingRevert', 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success'
State RecommendedIndexState `json:"state,omitempty"`
// Created - The UTC datetime showing when this resource was created (ISO8601 format).
Created *date.Time `json:"created,omitempty"`
@@ -6768,12 +8194,11 @@ type ReplicationLinkProperties struct {
// long-running operation.
type ReplicationLinksFailoverAllowDataLossFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationLinksFailoverAllowDataLossFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
+func (future *ReplicationLinksFailoverAllowDataLossFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6781,35 +8206,10 @@ func (future ReplicationLinksFailoverAllowDataLossFuture) Result(client Replicat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverAllowDataLossFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.FailoverAllowDataLossResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverAllowDataLossFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverAllowDataLossFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverAllowDataLossFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.FailoverAllowDataLossResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverAllowDataLossFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6817,12 +8217,11 @@ func (future ReplicationLinksFailoverAllowDataLossFuture) Result(client Replicat
// operation.
type ReplicationLinksFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationLinksFailoverFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
+func (future *ReplicationLinksFailoverFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6830,35 +8229,10 @@ func (future ReplicationLinksFailoverFuture) Result(client ReplicationLinksClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.FailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.FailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7131,12 +8505,11 @@ type RestorePointProperties struct {
// RestorePointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RestorePointsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future RestorePointsCreateFuture) Result(client RestorePointsClient) (rp RestorePoint, err error) {
+func (future *RestorePointsCreateFuture) Result(client RestorePointsClient) (rp RestorePoint, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7144,34 +8517,15 @@ func (future RestorePointsCreateFuture) Result(client RestorePointsClient) (rp R
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("sql.RestorePointsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.RestorePointsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.RestorePointsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.CreateResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.RestorePointsCreateFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.RestorePointsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.RestorePointsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7185,10 +8539,10 @@ type Server struct {
Kind *string `json:"kind,omitempty"`
// ServerProperties - Resource properties.
*ServerProperties `json:"properties,omitempty"`
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -7209,12 +8563,12 @@ func (s Server) MarshalJSON() ([]byte, error) {
if s.ServerProperties != nil {
objectMap["properties"] = s.ServerProperties
}
- if s.Tags != nil {
- objectMap["tags"] = s.Tags
- }
if s.Location != nil {
objectMap["location"] = s.Location
}
+ if s.Tags != nil {
+ objectMap["tags"] = s.Tags
+ }
if s.ID != nil {
objectMap["id"] = s.ID
}
@@ -7263,15 +8617,6 @@ func (s *Server) UnmarshalJSON(body []byte) error {
}
s.ServerProperties = &serverProperties
}
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- s.Tags = tags
- }
case "location":
if v != nil {
var location string
@@ -7281,6 +8626,15 @@ func (s *Server) UnmarshalJSON(body []byte) error {
}
s.Location = &location
}
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ s.Tags = tags
+ }
case "id":
if v != nil {
var ID string
@@ -7501,12 +8855,11 @@ func (saaa *ServerAzureADAdministrator) UnmarshalJSON(body []byte) error {
// long-running operation.
type ServerAzureADAdministratorsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerAzureADAdministratorsCreateOrUpdateFuture) Result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) {
+func (future *ServerAzureADAdministratorsCreateOrUpdateFuture) Result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7514,34 +8867,15 @@ func (future ServerAzureADAdministratorsCreateOrUpdateFuture) Result(client Serv
return
}
if !done {
- return saaa, azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- saaa, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if saaa.Response.Response, err = future.GetResult(sender); err == nil && saaa.Response.Response.StatusCode != http.StatusNoContent {
+ saaa, err = client.CreateOrUpdateResponder(saaa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", saaa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- saaa, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7550,12 +8884,11 @@ func (future ServerAzureADAdministratorsCreateOrUpdateFuture) Result(client Serv
// long-running operation.
type ServerAzureADAdministratorsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerAzureADAdministratorsDeleteFuture) Result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) {
+func (future *ServerAzureADAdministratorsDeleteFuture) Result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7563,34 +8896,15 @@ func (future ServerAzureADAdministratorsDeleteFuture) Result(client ServerAzureA
return
}
if !done {
- return saaa, azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- saaa, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if saaa.Response.Response, err = future.GetResult(sender); err == nil && saaa.Response.Response.StatusCode != http.StatusNoContent {
+ saaa, err = client.DeleteResponder(saaa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", saaa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- saaa, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7724,12 +9038,11 @@ type ServerCommunicationLinkProperties struct {
// long-running operation.
type ServerCommunicationLinksCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerCommunicationLinksCreateOrUpdateFuture) Result(client ServerCommunicationLinksClient) (scl ServerCommunicationLink, err error) {
+func (future *ServerCommunicationLinksCreateOrUpdateFuture) Result(client ServerCommunicationLinksClient) (scl ServerCommunicationLink, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7737,34 +9050,15 @@ func (future ServerCommunicationLinksCreateOrUpdateFuture) Result(client ServerC
return
}
if !done {
- return scl, azure.NewAsyncOpIncompleteError("sql.ServerCommunicationLinksCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- scl, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServerCommunicationLinksCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if scl.Response.Response, err = future.GetResult(sender); err == nil && scl.Response.Response.StatusCode != http.StatusNoContent {
+ scl, err = client.CreateOrUpdateResponder(scl.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksCreateOrUpdateFuture", "Result", scl.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- scl, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7977,12 +9271,11 @@ type ServerDNSAliasAcquisition struct {
// operation.
type ServerDNSAliasesAcquireFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerDNSAliasesAcquireFuture) Result(client ServerDNSAliasesClient) (ar autorest.Response, err error) {
+func (future *ServerDNSAliasesAcquireFuture) Result(client ServerDNSAliasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7990,35 +9283,10 @@ func (future ServerDNSAliasesAcquireFuture) Result(client ServerDNSAliasesClient
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ServerDNSAliasesAcquireFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.AcquireResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesAcquireFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServerDNSAliasesAcquireFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesAcquireFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.AcquireResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesAcquireFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8026,12 +9294,11 @@ func (future ServerDNSAliasesAcquireFuture) Result(client ServerDNSAliasesClient
// operation.
type ServerDNSAliasesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerDNSAliasesCreateOrUpdateFuture) Result(client ServerDNSAliasesClient) (sda ServerDNSAlias, err error) {
+func (future *ServerDNSAliasesCreateOrUpdateFuture) Result(client ServerDNSAliasesClient) (sda ServerDNSAlias, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8039,34 +9306,15 @@ func (future ServerDNSAliasesCreateOrUpdateFuture) Result(client ServerDNSAliase
return
}
if !done {
- return sda, azure.NewAsyncOpIncompleteError("sql.ServerDNSAliasesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sda, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServerDNSAliasesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sda.Response.Response, err = future.GetResult(sender); err == nil && sda.Response.Response.StatusCode != http.StatusNoContent {
+ sda, err = client.CreateOrUpdateResponder(sda.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesCreateOrUpdateFuture", "Result", sda.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sda, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8075,12 +9323,11 @@ func (future ServerDNSAliasesCreateOrUpdateFuture) Result(client ServerDNSAliase
// operation.
type ServerDNSAliasesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerDNSAliasesDeleteFuture) Result(client ServerDNSAliasesClient) (ar autorest.Response, err error) {
+func (future *ServerDNSAliasesDeleteFuture) Result(client ServerDNSAliasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8088,35 +9335,10 @@ func (future ServerDNSAliasesDeleteFuture) Result(client ServerDNSAliasesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ServerDNSAliasesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServerDNSAliasesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerDNSAliasesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8458,12 +9680,11 @@ type ServerKeyProperties struct {
// operation.
type ServerKeysCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerKeysCreateOrUpdateFuture) Result(client ServerKeysClient) (sk ServerKey, err error) {
+func (future *ServerKeysCreateOrUpdateFuture) Result(client ServerKeysClient) (sk ServerKey, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8471,34 +9692,15 @@ func (future ServerKeysCreateOrUpdateFuture) Result(client ServerKeysClient) (sk
return
}
if !done {
- return sk, azure.NewAsyncOpIncompleteError("sql.ServerKeysCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sk, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerKeysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServerKeysCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sk.Response.Response, err = future.GetResult(sender); err == nil && sk.Response.Response.StatusCode != http.StatusNoContent {
+ sk, err = client.CreateOrUpdateResponder(sk.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ServerKeysCreateOrUpdateFuture", "Result", sk.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerKeysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sk, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerKeysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8506,12 +9708,11 @@ func (future ServerKeysCreateOrUpdateFuture) Result(client ServerKeysClient) (sk
// ServerKeysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServerKeysDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerKeysDeleteFuture) Result(client ServerKeysClient) (ar autorest.Response, err error) {
+func (future *ServerKeysDeleteFuture) Result(client ServerKeysClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8519,35 +9720,10 @@ func (future ServerKeysDeleteFuture) Result(client ServerKeysClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ServerKeysDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerKeysDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServerKeysDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerKeysDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServerKeysDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -8671,12 +9847,11 @@ type ServerProperties struct {
// operation.
type ServersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersCreateOrUpdateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersCreateOrUpdateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8684,34 +9859,15 @@ func (future ServersCreateOrUpdateFuture) Result(client ServersClient) (s Server
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("sql.ServersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ServersCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -8719,12 +9875,11 @@ func (future ServersCreateOrUpdateFuture) Result(client ServersClient) (s Server
// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
+func (future *ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8732,47 +9887,21 @@ func (future ServersDeleteFuture) Result(client ServersClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ServersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ServersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
+func (future *ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -8780,34 +9909,15 @@ func (future ServersUpdateFuture) Result(client ServersClient) (s Server, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("sql.ServersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ServersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ServersUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ServersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9245,17 +10355,17 @@ type ServiceTierAdvisorProperties struct {
Confidence *float64 `json:"confidence,omitempty"`
}
-// Sku an ARM Resource SKU.
+// Sku the resource model definition representing SKU
type Sku struct {
- // Name - The name of the SKU, typically, a letter + Number code, e.g. P3.
+ // Name - The name of the SKU. Ex - P3. It is typically a letter+number code
Name *string `json:"name,omitempty"`
- // Tier - The tier of the particular SKU, e.g. Basic, Premium.
+ // Tier - This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.
Tier *string `json:"tier,omitempty"`
- // Size - Size of the particular SKU
+ // Size - The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.
Size *string `json:"size,omitempty"`
// Family - If the service has different generations of hardware, for the same SKU, then that can be captured here.
Family *string `json:"family,omitempty"`
- // Capacity - Capacity of the particular SKU.
+ // Capacity - If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.
Capacity *int32 `json:"capacity,omitempty"`
}
@@ -9878,12 +10988,11 @@ type SyncAgentProperties struct {
// operation.
type SyncAgentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncAgentsCreateOrUpdateFuture) Result(client SyncAgentsClient) (sa SyncAgent, err error) {
+func (future *SyncAgentsCreateOrUpdateFuture) Result(client SyncAgentsClient) (sa SyncAgent, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9891,34 +11000,15 @@ func (future SyncAgentsCreateOrUpdateFuture) Result(client SyncAgentsClient) (sa
return
}
if !done {
- return sa, azure.NewAsyncOpIncompleteError("sql.SyncAgentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sa, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncAgentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncAgentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sa.Response.Response, err = future.GetResult(sender); err == nil && sa.Response.Response.StatusCode != http.StatusNoContent {
+ sa, err = client.CreateOrUpdateResponder(sa.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.SyncAgentsCreateOrUpdateFuture", "Result", sa.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncAgentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sa, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncAgentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9926,12 +11016,11 @@ func (future SyncAgentsCreateOrUpdateFuture) Result(client SyncAgentsClient) (sa
// SyncAgentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SyncAgentsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncAgentsDeleteFuture) Result(client SyncAgentsClient) (ar autorest.Response, err error) {
+func (future *SyncAgentsDeleteFuture) Result(client SyncAgentsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9939,35 +11028,10 @@ func (future SyncAgentsDeleteFuture) Result(client SyncAgentsClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.SyncAgentsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncAgentsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncAgentsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncAgentsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncAgentsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10512,7 +11576,7 @@ func (page SyncGroupLogListResultPage) Values() []SyncGroupLogProperties {
type SyncGroupLogProperties struct {
// Timestamp - Timestamp of the sync group log.
Timestamp *date.Time `json:"timestamp,omitempty"`
- // Type - Type of the sync group log. Possible values include: 'All', 'Error', 'Warning', 'Success'
+ // Type - Type of the sync group log. Possible values include: 'SyncGroupLogTypeAll', 'SyncGroupLogTypeError', 'SyncGroupLogTypeWarning', 'SyncGroupLogTypeSuccess'
Type SyncGroupLogType `json:"type,omitempty"`
// Source - Source of the sync group log.
Source *string `json:"source,omitempty"`
@@ -10538,7 +11602,7 @@ type SyncGroupProperties struct {
HubDatabaseUserName *string `json:"hubDatabaseUserName,omitempty"`
// HubDatabasePassword - Password for the sync group hub database credential.
HubDatabasePassword *string `json:"hubDatabasePassword,omitempty"`
- // SyncState - Sync state of the sync group. Possible values include: 'SyncGroupStateNotReady', 'SyncGroupStateError', 'SyncGroupStateWarning', 'SyncGroupStateProgressing', 'SyncGroupStateGood'
+ // SyncState - Sync state of the sync group. Possible values include: 'NotReady', 'Error', 'Warning', 'Progressing', 'Good'
SyncState SyncGroupState `json:"syncState,omitempty"`
// Schema - Sync schema of the sync group.
Schema *SyncGroupSchema `json:"schema,omitempty"`
@@ -10574,12 +11638,11 @@ type SyncGroupSchemaTableColumn struct {
// operation.
type SyncGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncGroupsCreateOrUpdateFuture) Result(client SyncGroupsClient) (sg SyncGroup, err error) {
+func (future *SyncGroupsCreateOrUpdateFuture) Result(client SyncGroupsClient) (sg SyncGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10587,34 +11650,15 @@ func (future SyncGroupsCreateOrUpdateFuture) Result(client SyncGroupsClient) (sg
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("sql.SyncGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.SyncGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10622,12 +11666,11 @@ func (future SyncGroupsCreateOrUpdateFuture) Result(client SyncGroupsClient) (sg
// SyncGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SyncGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncGroupsDeleteFuture) Result(client SyncGroupsClient) (ar autorest.Response, err error) {
+func (future *SyncGroupsDeleteFuture) Result(client SyncGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10635,35 +11678,10 @@ func (future SyncGroupsDeleteFuture) Result(client SyncGroupsClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.SyncGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -10671,12 +11689,11 @@ func (future SyncGroupsDeleteFuture) Result(client SyncGroupsClient) (ar autores
// operation.
type SyncGroupsRefreshHubSchemaFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncGroupsRefreshHubSchemaFuture) Result(client SyncGroupsClient) (ar autorest.Response, err error) {
+func (future *SyncGroupsRefreshHubSchemaFuture) Result(client SyncGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10684,47 +11701,21 @@ func (future SyncGroupsRefreshHubSchemaFuture) Result(client SyncGroupsClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.SyncGroupsRefreshHubSchemaFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RefreshHubSchemaResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsRefreshHubSchemaFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsRefreshHubSchemaFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsRefreshHubSchemaFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RefreshHubSchemaResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsRefreshHubSchemaFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// SyncGroupsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SyncGroupsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncGroupsUpdateFuture) Result(client SyncGroupsClient) (sg SyncGroup, err error) {
+func (future *SyncGroupsUpdateFuture) Result(client SyncGroupsClient) (sg SyncGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10732,34 +11723,15 @@ func (future SyncGroupsUpdateFuture) Result(client SyncGroupsClient) (sg SyncGro
return
}
if !done {
- return sg, azure.NewAsyncOpIncompleteError("sql.SyncGroupsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sg, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.UpdateResponder(sg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.SyncGroupsUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sg, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncGroupsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10974,12 +11946,11 @@ type SyncMemberProperties struct {
// operation.
type SyncMembersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncMembersCreateOrUpdateFuture) Result(client SyncMembersClient) (sm SyncMember, err error) {
+func (future *SyncMembersCreateOrUpdateFuture) Result(client SyncMembersClient) (sm SyncMember, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10987,34 +11958,15 @@ func (future SyncMembersCreateOrUpdateFuture) Result(client SyncMembersClient) (
return
}
if !done {
- return sm, azure.NewAsyncOpIncompleteError("sql.SyncMembersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sm, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncMembersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sm.Response.Response, err = future.GetResult(sender); err == nil && sm.Response.Response.StatusCode != http.StatusNoContent {
+ sm, err = client.CreateOrUpdateResponder(sm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.SyncMembersCreateOrUpdateFuture", "Result", sm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sm, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11022,12 +11974,11 @@ func (future SyncMembersCreateOrUpdateFuture) Result(client SyncMembersClient) (
// SyncMembersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SyncMembersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncMembersDeleteFuture) Result(client SyncMembersClient) (ar autorest.Response, err error) {
+func (future *SyncMembersDeleteFuture) Result(client SyncMembersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11035,35 +11986,10 @@ func (future SyncMembersDeleteFuture) Result(client SyncMembersClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.SyncMembersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncMembersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -11071,12 +11997,11 @@ func (future SyncMembersDeleteFuture) Result(client SyncMembersClient) (ar autor
// operation.
type SyncMembersRefreshMemberSchemaFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncMembersRefreshMemberSchemaFuture) Result(client SyncMembersClient) (ar autorest.Response, err error) {
+func (future *SyncMembersRefreshMemberSchemaFuture) Result(client SyncMembersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11084,47 +12009,21 @@ func (future SyncMembersRefreshMemberSchemaFuture) Result(client SyncMembersClie
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.SyncMembersRefreshMemberSchemaFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RefreshMemberSchemaResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersRefreshMemberSchemaFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncMembersRefreshMemberSchemaFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersRefreshMemberSchemaFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RefreshMemberSchemaResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersRefreshMemberSchemaFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// SyncMembersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SyncMembersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SyncMembersUpdateFuture) Result(client SyncMembersClient) (sm SyncMember, err error) {
+func (future *SyncMembersUpdateFuture) Result(client SyncMembersClient) (sm SyncMember, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11132,44 +12031,25 @@ func (future SyncMembersUpdateFuture) Result(client SyncMembersClient) (sm SyncM
return
}
if !done {
- return sm, azure.NewAsyncOpIncompleteError("sql.SyncMembersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sm, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.SyncMembersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sm.Response.Response, err = future.GetResult(sender); err == nil && sm.Response.Response.StatusCode != http.StatusNoContent {
+ sm, err = client.UpdateResponder(sm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.SyncMembersUpdateFuture", "Result", sm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sm, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.SyncMembersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
// TrackedResource ARM tracked top level resource.
type TrackedResource struct {
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -11181,12 +12061,12 @@ type TrackedResource struct {
// MarshalJSON is the custom marshaler for TrackedResource.
func (tr TrackedResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
- if tr.Tags != nil {
- objectMap["tags"] = tr.Tags
- }
if tr.Location != nil {
objectMap["location"] = tr.Location
}
+ if tr.Tags != nil {
+ objectMap["tags"] = tr.Tags
+ }
if tr.ID != nil {
objectMap["id"] = tr.ID
}
@@ -11611,12 +12491,11 @@ type VirtualNetworkRuleProperties struct {
// long-running operation.
type VirtualNetworkRulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetworkRulesClient) (vnr VirtualNetworkRule, err error) {
+func (future *VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetworkRulesClient) (vnr VirtualNetworkRule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11624,34 +12503,15 @@ func (future VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetwo
return
}
if !done {
- return vnr, azure.NewAsyncOpIncompleteError("sql.VirtualNetworkRulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vnr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.VirtualNetworkRulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnr.Response.Response, err = future.GetResult(sender); err == nil && vnr.Response.Response.StatusCode != http.StatusNoContent {
+ vnr, err = client.CreateOrUpdateResponder(vnr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", vnr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vnr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11660,12 +12520,11 @@ func (future VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetwo
// operation.
type VirtualNetworkRulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VirtualNetworkRulesDeleteFuture) Result(client VirtualNetworkRulesClient) (ar autorest.Response, err error) {
+func (future *VirtualNetworkRulesDeleteFuture) Result(client VirtualNetworkRulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11673,34 +12532,19 @@ func (future VirtualNetworkRulesDeleteFuture) Result(client VirtualNetworkRulesC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.VirtualNetworkRulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.VirtualNetworkRulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
+
+// VulnerabilityAssessmentRecurringScansProperties properties of a Vulnerability Assessment recurring scans.
+type VulnerabilityAssessmentRecurringScansProperties struct {
+ // IsEnabled - Recurring scans state.
+ IsEnabled *bool `json:"isEnabled,omitempty"`
+ // EmailSubscriptionAdmins - Specifies that the schedule scan notification will be is sent to the subscription administrators.
+ EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty"`
+ // Emails - Specifies an array of e-mail addresses to which the scan notification is sent.
+ Emails *[]string `json:"emails,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/replicationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/replicationlinks.go
index 38dd9bdad..d4560b265 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/replicationlinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/replicationlinks.go
@@ -161,15 +161,17 @@ func (client ReplicationLinksClient) FailoverPreparer(ctx context.Context, resou
// 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) (future ReplicationLinksFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -235,15 +237,17 @@ func (client ReplicationLinksClient) FailoverAllowDataLossPreparer(ctx context.C
// 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) (future ReplicationLinksFailoverAllowDataLossFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/restorepoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/restorepoints.go
index 848d6cc3d..ed9639517 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/restorepoints.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/restorepoints.go
@@ -98,15 +98,17 @@ func (client RestorePointsClient) CreatePreparer(ctx context.Context, resourceGr
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client RestorePointsClient) CreateSender(req *http.Request) (future RestorePointsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverazureadadministrators.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverazureadadministrators.go
index 9d0595fc7..21b4055b1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverazureadadministrators.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverazureadadministrators.go
@@ -103,15 +103,17 @@ func (client ServerAzureADAdministratorsClient) CreateOrUpdatePreparer(ctx conte
// 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) (future ServerAzureADAdministratorsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -174,15 +176,17 @@ func (client ServerAzureADAdministratorsClient) DeletePreparer(ctx context.Conte
// 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) (future ServerAzureADAdministratorsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servercommunicationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servercommunicationlinks.go
index 9c619b85b..d59823088 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servercommunicationlinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servercommunicationlinks.go
@@ -99,15 +99,17 @@ func (client ServerCommunicationLinksClient) CreateOrUpdatePreparer(ctx context.
// 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) (future ServerCommunicationLinksCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverdnsaliases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverdnsaliases.go
index 6c64749d0..b93c5fcea 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverdnsaliases.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverdnsaliases.go
@@ -90,15 +90,17 @@ func (client ServerDNSAliasesClient) AcquirePreparer(ctx context.Context, resour
// AcquireSender sends the Acquire request. The method will close the
// http.Response Body if it receives an error.
func (client ServerDNSAliasesClient) AcquireSender(req *http.Request) (future ServerDNSAliasesAcquireFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -161,15 +163,17 @@ func (client ServerDNSAliasesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ServerDNSAliasesClient) CreateOrUpdateSender(req *http.Request) (future ServerDNSAliasesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -233,15 +237,17 @@ func (client ServerDNSAliasesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ServerDNSAliasesClient) DeleteSender(req *http.Request) (future ServerDNSAliasesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverkeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverkeys.go
index 81086a048..a70e07c85 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverkeys.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/serverkeys.go
@@ -94,15 +94,17 @@ func (client ServerKeysClient) CreateOrUpdatePreparer(ctx context.Context, resou
// 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) (future ServerKeysCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -166,15 +168,17 @@ func (client ServerKeysClient) DeletePreparer(ctx context.Context, resourceGroup
// 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) (future ServerKeysDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servers.go
index b3a35b00d..78d1a37f6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/servers.go
@@ -163,15 +163,17 @@ func (client ServersClient) CreateOrUpdatePreparer(ctx context.Context, resource
// 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) (future ServersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -233,15 +235,17 @@ func (client ServersClient) DeletePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -557,15 +561,17 @@ func (client ServersClient) UpdatePreparer(ctx context.Context, resourceGroupNam
// 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) (future ServersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncagents.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncagents.go
index 6b587e738..83be0b22b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncagents.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncagents.go
@@ -91,15 +91,17 @@ func (client SyncAgentsClient) CreateOrUpdatePreparer(ctx context.Context, resou
// 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) (future SyncAgentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -163,15 +165,17 @@ func (client SyncAgentsClient) DeletePreparer(ctx context.Context, resourceGroup
// 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) (future SyncAgentsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncgroups.go
index 5b405d5c9..e1d7d2209 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncgroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncgroups.go
@@ -164,15 +164,17 @@ func (client SyncGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resou
// 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) (future SyncGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -238,15 +240,17 @@ func (client SyncGroupsClient) DeletePreparer(ctx context.Context, resourceGroup
// 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) (future SyncGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -784,15 +788,17 @@ func (client SyncGroupsClient) RefreshHubSchemaPreparer(ctx context.Context, res
// 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) (future SyncGroupsRefreshHubSchemaFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -931,15 +937,17 @@ func (client SyncGroupsClient) UpdatePreparer(ctx context.Context, resourceGroup
// 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) (future SyncGroupsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncmembers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncmembers.go
index 01e211f11..28c36fba4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncmembers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/syncmembers.go
@@ -95,15 +95,17 @@ func (client SyncMembersClient) CreateOrUpdatePreparer(ctx context.Context, reso
// 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) (future SyncMembersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -171,15 +173,17 @@ func (client SyncMembersClient) DeletePreparer(ctx context.Context, resourceGrou
// 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) (future SyncMembersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -522,15 +526,17 @@ func (client SyncMembersClient) RefreshMemberSchemaPreparer(ctx context.Context,
// 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) (future SyncMembersRefreshMemberSchemaFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -600,15 +606,17 @@ func (client SyncMembersClient) UpdatePreparer(ctx context.Context, resourceGrou
// 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) (future SyncMembersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualnetworkrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualnetworkrules.go
index ab735d07f..957b02b25 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualnetworkrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualnetworkrules.go
@@ -99,15 +99,17 @@ func (client VirtualNetworkRulesClient) CreateOrUpdatePreparer(ctx context.Conte
// 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) (future VirtualNetworkRulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -171,15 +173,17 @@ func (client VirtualNetworkRulesClient) DeletePreparer(ctx context.Context, reso
// 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) (future VirtualNetworkRulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/shorttermretentionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/backupshorttermretentionpolicies.go
similarity index 61%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/shorttermretentionpolicies.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/backupshorttermretentionpolicies.go
index 6aa1d5bb5..158209f2a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/shorttermretentionpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/backupshorttermretentionpolicies.go
@@ -24,21 +24,22 @@ import (
"net/http"
)
-// ShortTermRetentionPoliciesClient 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 ShortTermRetentionPoliciesClient struct {
+// BackupShortTermRetentionPoliciesClient 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 BackupShortTermRetentionPoliciesClient struct {
BaseClient
}
-// NewShortTermRetentionPoliciesClient creates an instance of the ShortTermRetentionPoliciesClient client.
-func NewShortTermRetentionPoliciesClient(subscriptionID string) ShortTermRetentionPoliciesClient {
- return NewShortTermRetentionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+// NewBackupShortTermRetentionPoliciesClient creates an instance of the BackupShortTermRetentionPoliciesClient client.
+func NewBackupShortTermRetentionPoliciesClient(subscriptionID string) BackupShortTermRetentionPoliciesClient {
+ return NewBackupShortTermRetentionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewShortTermRetentionPoliciesClientWithBaseURI creates an instance of the ShortTermRetentionPoliciesClient client.
-func NewShortTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ShortTermRetentionPoliciesClient {
- return ShortTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
+// NewBackupShortTermRetentionPoliciesClientWithBaseURI creates an instance of the
+// BackupShortTermRetentionPoliciesClient client.
+func NewBackupShortTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupShortTermRetentionPoliciesClient {
+ return BackupShortTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate updates a database's short term retention policy.
@@ -48,16 +49,16 @@ func NewShortTermRetentionPoliciesClientWithBaseURI(baseURI string, subscription
// serverName - the name of the server.
// databaseName - the name of the database.
// parameters - the short term retention policy info.
-func (client ShortTermRetentionPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ShortTermRetentionPolicy) (result ShortTermRetentionPoliciesCreateOrUpdateFuture, err error) {
+func (client BackupShortTermRetentionPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters BackupShortTermRetentionPolicy) (result BackupShortTermRetentionPoliciesCreateOrUpdateFuture, err error) {
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters)
if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ err = autorest.NewErrorWithError(err, "sql.BackupShortTermRetentionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
return
}
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "sql.BackupShortTermRetentionPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -65,7 +66,7 @@ func (client ShortTermRetentionPoliciesClient) CreateOrUpdate(ctx context.Contex
}
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client ShortTermRetentionPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ShortTermRetentionPolicy) (*http.Request, error) {
+func (client BackupShortTermRetentionPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters BackupShortTermRetentionPolicy) (*http.Request, error) {
pathParameters := map[string]interface{}{
"databaseName": autorest.Encode("path", databaseName),
"policyName": autorest.Encode("path", "default"),
@@ -91,22 +92,24 @@ func (client ShortTermRetentionPoliciesClient) CreateOrUpdatePreparer(ctx contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
-func (client ShortTermRetentionPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ShortTermRetentionPoliciesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+func (client BackupShortTermRetentionPoliciesClient) CreateOrUpdateSender(req *http.Request) (future BackupShortTermRetentionPoliciesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
-func (client ShortTermRetentionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ShortTermRetentionPolicy, err error) {
+func (client BackupShortTermRetentionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result BackupShortTermRetentionPolicy, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -123,30 +126,30 @@ func (client ShortTermRetentionPoliciesClient) CreateOrUpdateResponder(resp *htt
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
// databaseName - the name of the database.
-func (client ShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result ShortTermRetentionPolicy, err error) {
+func (client BackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result BackupShortTermRetentionPolicy, err error) {
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesClient", "Get", nil, "Failure preparing request")
+ err = autorest.NewErrorWithError(err, "sql.BackupShortTermRetentionPoliciesClient", "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.ShortTermRetentionPoliciesClient", "Get", resp, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "sql.BackupShortTermRetentionPoliciesClient", "Get", resp, "Failure sending request")
return
}
result, err = client.GetResponder(resp)
if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesClient", "Get", resp, "Failure responding to request")
+ err = autorest.NewErrorWithError(err, "sql.BackupShortTermRetentionPoliciesClient", "Get", resp, "Failure responding to request")
}
return
}
// GetPreparer prepares the Get request.
-func (client ShortTermRetentionPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) {
+func (client BackupShortTermRetentionPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"databaseName": autorest.Encode("path", databaseName),
"policyName": autorest.Encode("path", "default"),
@@ -170,14 +173,14 @@ func (client ShortTermRetentionPoliciesClient) GetPreparer(ctx context.Context,
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
-func (client ShortTermRetentionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) {
+func (client BackupShortTermRetentionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req,
azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
-func (client ShortTermRetentionPoliciesClient) GetResponder(resp *http.Response) (result ShortTermRetentionPolicy, err error) {
+func (client BackupShortTermRetentionPoliciesClient) GetResponder(resp *http.Response) (result BackupShortTermRetentionPolicy, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -195,16 +198,16 @@ func (client ShortTermRetentionPoliciesClient) GetResponder(resp *http.Response)
// serverName - the name of the server.
// databaseName - the name of the database.
// parameters - the short term retention policy info.
-func (client ShortTermRetentionPoliciesClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ShortTermRetentionPolicy) (result ShortTermRetentionPoliciesUpdateFuture, err error) {
+func (client BackupShortTermRetentionPoliciesClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters BackupShortTermRetentionPolicy) (result BackupShortTermRetentionPoliciesUpdateFuture, err error) {
req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters)
if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesClient", "Update", nil, "Failure preparing request")
+ err = autorest.NewErrorWithError(err, "sql.BackupShortTermRetentionPoliciesClient", "Update", nil, "Failure preparing request")
return
}
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "sql.BackupShortTermRetentionPoliciesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -212,7 +215,7 @@ func (client ShortTermRetentionPoliciesClient) Update(ctx context.Context, resou
}
// UpdatePreparer prepares the Update request.
-func (client ShortTermRetentionPoliciesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ShortTermRetentionPolicy) (*http.Request, error) {
+func (client BackupShortTermRetentionPoliciesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters BackupShortTermRetentionPolicy) (*http.Request, error) {
pathParameters := map[string]interface{}{
"databaseName": autorest.Encode("path", databaseName),
"policyName": autorest.Encode("path", "default"),
@@ -238,22 +241,24 @@ func (client ShortTermRetentionPoliciesClient) UpdatePreparer(ctx context.Contex
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
-func (client ShortTermRetentionPoliciesClient) UpdateSender(req *http.Request) (future ShortTermRetentionPoliciesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+func (client BackupShortTermRetentionPoliciesClient) UpdateSender(req *http.Request) (future BackupShortTermRetentionPoliciesUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
-func (client ShortTermRetentionPoliciesClient) UpdateResponder(resp *http.Response) (result ShortTermRetentionPolicy, err error) {
+func (client BackupShortTermRetentionPoliciesClient) UpdateResponder(resp *http.Response) (result BackupShortTermRetentionPolicy, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/databases.go
index d1e06c861..16347e571 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/databases.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/databases.go
@@ -103,15 +103,17 @@ func (client DatabasesClient) CreateOrUpdatePreparer(ctx context.Context, resour
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future DatabasesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -175,15 +177,17 @@ func (client DatabasesClient) DeletePreparer(ctx context.Context, resourceGroupN
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) DeleteSender(req *http.Request) (future DatabasesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -510,15 +514,17 @@ func (client DatabasesClient) PausePreparer(ctx context.Context, resourceGroupNa
// PauseSender sends the Pause request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) PauseSender(req *http.Request) (future DatabasesPauseFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -660,15 +666,17 @@ func (client DatabasesClient) ResumePreparer(ctx context.Context, resourceGroupN
// ResumeSender sends the Resume request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) ResumeSender(req *http.Request) (future DatabasesResumeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -735,15 +743,17 @@ func (client DatabasesClient) UpdatePreparer(ctx context.Context, resourceGroupN
// 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) (future DatabasesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -807,15 +817,17 @@ func (client DatabasesClient) UpgradeDataWarehousePreparer(ctx context.Context,
// UpgradeDataWarehouseSender sends the UpgradeDataWarehouse request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) UpgradeDataWarehouseSender(req *http.Request) (future DatabasesUpgradeDataWarehouseFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/databasevulnerabilityassessmentscans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/databasevulnerabilityassessmentscans.go
new file mode 100644
index 000000000..9fa9dc2ec
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/databasevulnerabilityassessmentscans.go
@@ -0,0 +1,365 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// DatabaseVulnerabilityAssessmentScansClient 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 DatabaseVulnerabilityAssessmentScansClient struct {
+ BaseClient
+}
+
+// NewDatabaseVulnerabilityAssessmentScansClient creates an instance of the DatabaseVulnerabilityAssessmentScansClient
+// client.
+func NewDatabaseVulnerabilityAssessmentScansClient(subscriptionID string) DatabaseVulnerabilityAssessmentScansClient {
+ return NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI creates an instance of the
+// DatabaseVulnerabilityAssessmentScansClient client.
+func NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI(baseURI string, subscriptionID string) DatabaseVulnerabilityAssessmentScansClient {
+ return DatabaseVulnerabilityAssessmentScansClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Export convert an existing scan result to a human readable format. If already exists nothing happens
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// databaseName - the name of the scanned database.
+// scanID - the vulnerability assessment scan Id.
+func (client DatabaseVulnerabilityAssessmentScansClient) Export(ctx context.Context, resourceGroupName string, serverName string, databaseName string, scanID string) (result DatabaseVulnerabilityAssessmentScansExport, err error) {
+ req, err := client.ExportPreparer(ctx, resourceGroupName, serverName, databaseName, scanID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentScansClient", "Export", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ExportSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentScansClient", "Export", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ExportResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentScansClient", "Export", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ExportPreparer prepares the Export request.
+func (client DatabaseVulnerabilityAssessmentScansClient) ExportPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, scanID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "databaseName": autorest.Encode("path", databaseName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "scanId": autorest.Encode("path", scanID),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vulnerabilityAssessmentName": autorest.Encode("path", "default"),
+ }
+
+ const APIVersion = "2017-10-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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ExportSender sends the Export request. The method will close the
+// http.Response Body if it receives an error.
+func (client DatabaseVulnerabilityAssessmentScansClient) ExportSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ExportResponder handles the response to the Export request. The method always
+// closes the http.Response Body.
+func (client DatabaseVulnerabilityAssessmentScansClient) ExportResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentScansExport, 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 vulnerability assessment scan record of a database.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// databaseName - the name of the database.
+// scanID - the vulnerability assessment scan Id of the scan to retrieve.
+func (client DatabaseVulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, scanID string) (result VulnerabilityAssessmentScanRecord, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName, scanID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentScansClient", "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.DatabaseVulnerabilityAssessmentScansClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentScansClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DatabaseVulnerabilityAssessmentScansClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, scanID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "databaseName": autorest.Encode("path", databaseName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "scanId": autorest.Encode("path", scanID),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vulnerabilityAssessmentName": autorest.Encode("path", "default"),
+ }
+
+ const APIVersion = "2017-10-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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DatabaseVulnerabilityAssessmentScansClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DatabaseVulnerabilityAssessmentScansClient) GetResponder(resp *http.Response) (result VulnerabilityAssessmentScanRecord, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// InitiateScan executes a Vulnerability Assessment database scan.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// databaseName - the name of the database.
+// scanID - the vulnerability assessment scan Id of the scan to retrieve.
+func (client DatabaseVulnerabilityAssessmentScansClient) InitiateScan(ctx context.Context, resourceGroupName string, serverName string, databaseName string, scanID string) (result DatabaseVulnerabilityAssessmentScansInitiateScanFuture, err error) {
+ req, err := client.InitiateScanPreparer(ctx, resourceGroupName, serverName, databaseName, scanID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentScansClient", "InitiateScan", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.InitiateScanSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentScansClient", "InitiateScan", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// InitiateScanPreparer prepares the InitiateScan request.
+func (client DatabaseVulnerabilityAssessmentScansClient) InitiateScanPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, scanID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "databaseName": autorest.Encode("path", databaseName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "scanId": autorest.Encode("path", scanID),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vulnerabilityAssessmentName": autorest.Encode("path", "default"),
+ }
+
+ const APIVersion = "2017-10-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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// InitiateScanSender sends the InitiateScan request. The method will close the
+// http.Response Body if it receives an error.
+func (client DatabaseVulnerabilityAssessmentScansClient) InitiateScanSender(req *http.Request) (future DatabaseVulnerabilityAssessmentScansInitiateScanFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// InitiateScanResponder handles the response to the InitiateScan request. The method always
+// closes the http.Response Body.
+func (client DatabaseVulnerabilityAssessmentScansClient) InitiateScanResponder(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
+}
+
+// ListByDatabase lists the vulnerability assessment scans of a database.
+// Parameters:
+// resourceGroupName - 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 - the name of the server.
+// databaseName - the name of the database.
+func (client DatabaseVulnerabilityAssessmentScansClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result VulnerabilityAssessmentScanRecordListResultPage, err error) {
+ result.fn = client.listByDatabaseNextResults
+ req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentScansClient", "ListByDatabase", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByDatabaseSender(req)
+ if err != nil {
+ result.vasrlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentScansClient", "ListByDatabase", resp, "Failure sending request")
+ return
+ }
+
+ result.vasrlr, err = client.ListByDatabaseResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentScansClient", "ListByDatabase", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByDatabasePreparer prepares the ListByDatabase request.
+func (client DatabaseVulnerabilityAssessmentScansClient) ListByDatabasePreparer(ctx context.Context, 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),
+ "vulnerabilityAssessmentName": autorest.Encode("path", "default"),
+ }
+
+ const APIVersion = "2017-10-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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByDatabaseSender sends the ListByDatabase request. The method will close the
+// http.Response Body if it receives an error.
+func (client DatabaseVulnerabilityAssessmentScansClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always
+// closes the http.Response Body.
+func (client DatabaseVulnerabilityAssessmentScansClient) ListByDatabaseResponder(resp *http.Response) (result VulnerabilityAssessmentScanRecordListResult, 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 DatabaseVulnerabilityAssessmentScansClient) listByDatabaseNextResults(lastResults VulnerabilityAssessmentScanRecordListResult) (result VulnerabilityAssessmentScanRecordListResult, err error) {
+ req, err := lastResults.vulnerabilityAssessmentScanRecordListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentScansClient", "listByDatabaseNextResults", 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.DatabaseVulnerabilityAssessmentScansClient", "listByDatabaseNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByDatabaseResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentScansClient", "listByDatabaseNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByDatabaseComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DatabaseVulnerabilityAssessmentScansClient) ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result VulnerabilityAssessmentScanRecordListResultIterator, err error) {
+ result.page, err = client.ListByDatabase(ctx, resourceGroupName, serverName, databaseName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/elasticpools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/elasticpools.go
index 0320c7cc5..aad6cb0e1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/elasticpools.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/elasticpools.go
@@ -99,15 +99,17 @@ func (client ElasticPoolsClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) CreateOrUpdateSender(req *http.Request) (future ElasticPoolsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -171,15 +173,17 @@ func (client ElasticPoolsClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) DeleteSender(req *http.Request) (future ElasticPoolsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -415,15 +419,17 @@ func (client ElasticPoolsClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) UpdateSender(req *http.Request) (future ElasticPoolsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/instancefailovergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/instancefailovergroups.go
index 5a2752195..668be475c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/instancefailovergroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/instancefailovergroups.go
@@ -102,15 +102,17 @@ func (client InstanceFailoverGroupsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InstanceFailoverGroupsClient) CreateOrUpdateSender(req *http.Request) (future InstanceFailoverGroupsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -174,15 +176,17 @@ func (client InstanceFailoverGroupsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InstanceFailoverGroupsClient) DeleteSender(req *http.Request) (future InstanceFailoverGroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -245,15 +249,17 @@ func (client InstanceFailoverGroupsClient) FailoverPreparer(ctx context.Context,
// FailoverSender sends the Failover request. The method will close the
// http.Response Body if it receives an error.
func (client InstanceFailoverGroupsClient) FailoverSender(req *http.Request) (future InstanceFailoverGroupsFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -318,15 +324,17 @@ func (client InstanceFailoverGroupsClient) ForceFailoverAllowDataLossPreparer(ct
// ForceFailoverAllowDataLossSender sends the ForceFailoverAllowDataLoss request. The method will close the
// http.Response Body if it receives an error.
func (client InstanceFailoverGroupsClient) ForceFailoverAllowDataLossSender(req *http.Request) (future InstanceFailoverGroupsForceFailoverAllowDataLossFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/models.go
index 5079f31b7..d95d16692 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql/models.go
@@ -358,6 +358,186 @@ func PossibleSampleNameValues() []SampleName {
return []SampleName{AdventureWorksLT, WideWorldImportersFull, WideWorldImportersStd}
}
+// VulnerabilityAssessmentScanState enumerates the values for vulnerability assessment scan state.
+type VulnerabilityAssessmentScanState string
+
+const (
+ // VulnerabilityAssessmentScanStateFailed ...
+ VulnerabilityAssessmentScanStateFailed VulnerabilityAssessmentScanState = "Failed"
+ // VulnerabilityAssessmentScanStateFailedToRun ...
+ VulnerabilityAssessmentScanStateFailedToRun VulnerabilityAssessmentScanState = "FailedToRun"
+ // VulnerabilityAssessmentScanStateInProgress ...
+ VulnerabilityAssessmentScanStateInProgress VulnerabilityAssessmentScanState = "InProgress"
+ // VulnerabilityAssessmentScanStatePassed ...
+ VulnerabilityAssessmentScanStatePassed VulnerabilityAssessmentScanState = "Passed"
+)
+
+// PossibleVulnerabilityAssessmentScanStateValues returns an array of possible values for the VulnerabilityAssessmentScanState const type.
+func PossibleVulnerabilityAssessmentScanStateValues() []VulnerabilityAssessmentScanState {
+ return []VulnerabilityAssessmentScanState{VulnerabilityAssessmentScanStateFailed, VulnerabilityAssessmentScanStateFailedToRun, VulnerabilityAssessmentScanStateInProgress, VulnerabilityAssessmentScanStatePassed}
+}
+
+// VulnerabilityAssessmentScanTriggerType enumerates the values for vulnerability assessment scan trigger type.
+type VulnerabilityAssessmentScanTriggerType string
+
+const (
+ // OnDemand ...
+ OnDemand VulnerabilityAssessmentScanTriggerType = "OnDemand"
+ // Recurring ...
+ Recurring VulnerabilityAssessmentScanTriggerType = "Recurring"
+)
+
+// PossibleVulnerabilityAssessmentScanTriggerTypeValues returns an array of possible values for the VulnerabilityAssessmentScanTriggerType const type.
+func PossibleVulnerabilityAssessmentScanTriggerTypeValues() []VulnerabilityAssessmentScanTriggerType {
+ return []VulnerabilityAssessmentScanTriggerType{OnDemand, Recurring}
+}
+
+// BackupShortTermRetentionPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type BackupShortTermRetentionPoliciesCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *BackupShortTermRetentionPoliciesCreateOrUpdateFuture) Result(client BackupShortTermRetentionPoliciesClient) (bstrp BackupShortTermRetentionPolicy, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.BackupShortTermRetentionPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("sql.BackupShortTermRetentionPoliciesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bstrp.Response.Response, err = future.GetResult(sender); err == nil && bstrp.Response.Response.StatusCode != http.StatusNoContent {
+ bstrp, err = client.CreateOrUpdateResponder(bstrp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.BackupShortTermRetentionPoliciesCreateOrUpdateFuture", "Result", bstrp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// BackupShortTermRetentionPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type BackupShortTermRetentionPoliciesUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *BackupShortTermRetentionPoliciesUpdateFuture) Result(client BackupShortTermRetentionPoliciesClient) (bstrp BackupShortTermRetentionPolicy, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.BackupShortTermRetentionPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("sql.BackupShortTermRetentionPoliciesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bstrp.Response.Response, err = future.GetResult(sender); err == nil && bstrp.Response.Response.StatusCode != http.StatusNoContent {
+ bstrp, err = client.UpdateResponder(bstrp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.BackupShortTermRetentionPoliciesUpdateFuture", "Result", bstrp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// BackupShortTermRetentionPolicy a short term retention policy.
+type BackupShortTermRetentionPolicy struct {
+ autorest.Response `json:"-"`
+ // BackupShortTermRetentionPolicyProperties - Resource properties.
+ *BackupShortTermRetentionPolicyProperties `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for BackupShortTermRetentionPolicy.
+func (bstrp BackupShortTermRetentionPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if bstrp.BackupShortTermRetentionPolicyProperties != nil {
+ objectMap["properties"] = bstrp.BackupShortTermRetentionPolicyProperties
+ }
+ if bstrp.ID != nil {
+ objectMap["id"] = bstrp.ID
+ }
+ if bstrp.Name != nil {
+ objectMap["name"] = bstrp.Name
+ }
+ if bstrp.Type != nil {
+ objectMap["type"] = bstrp.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for BackupShortTermRetentionPolicy struct.
+func (bstrp *BackupShortTermRetentionPolicy) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var backupShortTermRetentionPolicyProperties BackupShortTermRetentionPolicyProperties
+ err = json.Unmarshal(*v, &backupShortTermRetentionPolicyProperties)
+ if err != nil {
+ return err
+ }
+ bstrp.BackupShortTermRetentionPolicyProperties = &backupShortTermRetentionPolicyProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ bstrp.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ bstrp.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ bstrp.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// BackupShortTermRetentionPolicyProperties properties of a short term retention policy
+type BackupShortTermRetentionPolicyProperties struct {
+ // RetentionDays - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
+ RetentionDays *int32 `json:"retentionDays,omitempty"`
+}
+
// Database a database resource.
type Database struct {
autorest.Response `json:"-"`
@@ -903,12 +1083,11 @@ type DatabaseProperties struct {
// operation.
type DatabasesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
+func (future *DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -916,34 +1095,15 @@ func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Da
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("sql.DatabasesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -951,12 +1111,11 @@ func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Da
// DatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesDeleteFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
+func (future *DatabasesDeleteFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -964,47 +1123,21 @@ func (future DatabasesDeleteFuture) Result(client DatabasesClient) (ar autorest.
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.DatabasesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DatabasesPauseFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesPauseFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesPauseFuture) Result(client DatabasesClient) (d Database, err error) {
+func (future *DatabasesPauseFuture) Result(client DatabasesClient) (d Database, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1012,34 +1145,15 @@ func (future DatabasesPauseFuture) Result(client DatabasesClient) (d Database, e
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("sql.DatabasesPauseFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.PauseResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesPauseFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.PauseResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.PauseResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1047,12 +1161,11 @@ func (future DatabasesPauseFuture) Result(client DatabasesClient) (d Database, e
// DatabasesResumeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesResumeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesResumeFuture) Result(client DatabasesClient) (d Database, err error) {
+func (future *DatabasesResumeFuture) Result(client DatabasesClient) (d Database, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1060,34 +1173,15 @@ func (future DatabasesResumeFuture) Result(client DatabasesClient) (d Database,
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("sql.DatabasesResumeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesResumeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.ResumeResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1095,12 +1189,11 @@ func (future DatabasesResumeFuture) Result(client DatabasesClient) (d Database,
// DatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
+func (future *DatabasesUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1108,34 +1201,15 @@ func (future DatabasesUpdateFuture) Result(client DatabasesClient) (d Database,
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("sql.DatabasesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.UpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1144,12 +1218,11 @@ func (future DatabasesUpdateFuture) Result(client DatabasesClient) (d Database,
// operation.
type DatabasesUpgradeDataWarehouseFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesUpgradeDataWarehouseFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
+func (future *DatabasesUpgradeDataWarehouseFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1157,35 +1230,10 @@ func (future DatabasesUpgradeDataWarehouseFuture) Result(client DatabasesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.DatabasesUpgradeDataWarehouseFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.UpgradeDataWarehouseResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpgradeDataWarehouseFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesUpgradeDataWarehouseFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpgradeDataWarehouseFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.UpgradeDataWarehouseResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpgradeDataWarehouseFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1256,6 +1304,208 @@ func (du *DatabaseUpdate) UnmarshalJSON(body []byte) error {
return nil
}
+// DatabaseVulnerabilityAssessment a database vulnerability assessment.
+type DatabaseVulnerabilityAssessment struct {
+ // DatabaseVulnerabilityAssessmentProperties - Resource properties.
+ *DatabaseVulnerabilityAssessmentProperties `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DatabaseVulnerabilityAssessment.
+func (dva DatabaseVulnerabilityAssessment) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dva.DatabaseVulnerabilityAssessmentProperties != nil {
+ objectMap["properties"] = dva.DatabaseVulnerabilityAssessmentProperties
+ }
+ if dva.ID != nil {
+ objectMap["id"] = dva.ID
+ }
+ if dva.Name != nil {
+ objectMap["name"] = dva.Name
+ }
+ if dva.Type != nil {
+ objectMap["type"] = dva.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DatabaseVulnerabilityAssessment struct.
+func (dva *DatabaseVulnerabilityAssessment) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var databaseVulnerabilityAssessmentProperties DatabaseVulnerabilityAssessmentProperties
+ err = json.Unmarshal(*v, &databaseVulnerabilityAssessmentProperties)
+ if err != nil {
+ return err
+ }
+ dva.DatabaseVulnerabilityAssessmentProperties = &databaseVulnerabilityAssessmentProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ dva.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ dva.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ dva.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// DatabaseVulnerabilityAssessmentProperties properties of a database Vulnerability Assessment.
+type DatabaseVulnerabilityAssessmentProperties struct {
+ // StorageContainerPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
+ StorageContainerPath *string `json:"storageContainerPath,omitempty"`
+ // StorageContainerSasKey - A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter.
+ StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"`
+ // RecurringScans - The recurring scans settings
+ RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"`
+}
+
+// DatabaseVulnerabilityAssessmentScanExportProperties properties of the export operation's result.
+type DatabaseVulnerabilityAssessmentScanExportProperties struct {
+ // ExportedReportLocation - Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx).
+ ExportedReportLocation *string `json:"exportedReportLocation,omitempty"`
+}
+
+// DatabaseVulnerabilityAssessmentScansExport a database Vulnerability Assessment scan export resource.
+type DatabaseVulnerabilityAssessmentScansExport struct {
+ autorest.Response `json:"-"`
+ // DatabaseVulnerabilityAssessmentScanExportProperties - Resource properties.
+ *DatabaseVulnerabilityAssessmentScanExportProperties `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DatabaseVulnerabilityAssessmentScansExport.
+func (dvase DatabaseVulnerabilityAssessmentScansExport) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dvase.DatabaseVulnerabilityAssessmentScanExportProperties != nil {
+ objectMap["properties"] = dvase.DatabaseVulnerabilityAssessmentScanExportProperties
+ }
+ if dvase.ID != nil {
+ objectMap["id"] = dvase.ID
+ }
+ if dvase.Name != nil {
+ objectMap["name"] = dvase.Name
+ }
+ if dvase.Type != nil {
+ objectMap["type"] = dvase.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DatabaseVulnerabilityAssessmentScansExport struct.
+func (dvase *DatabaseVulnerabilityAssessmentScansExport) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var databaseVulnerabilityAssessmentScanExportProperties DatabaseVulnerabilityAssessmentScanExportProperties
+ err = json.Unmarshal(*v, &databaseVulnerabilityAssessmentScanExportProperties)
+ if err != nil {
+ return err
+ }
+ dvase.DatabaseVulnerabilityAssessmentScanExportProperties = &databaseVulnerabilityAssessmentScanExportProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ dvase.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ dvase.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ dvase.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// DatabaseVulnerabilityAssessmentScansInitiateScanFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type DatabaseVulnerabilityAssessmentScansInitiateScanFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *DatabaseVulnerabilityAssessmentScansInitiateScanFuture) Result(client DatabaseVulnerabilityAssessmentScansClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "sql.DatabaseVulnerabilityAssessmentScansInitiateScanFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("sql.DatabaseVulnerabilityAssessmentScansInitiateScanFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// EditionCapability the edition capability.
type EditionCapability struct {
// Name - The database edition name.
@@ -1816,12 +2066,11 @@ type ElasticPoolProperties struct {
// operation.
type ElasticPoolsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
+func (future *ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1829,34 +2078,15 @@ func (future ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient)
return
}
if !done {
- return ep, azure.NewAsyncOpIncompleteError("sql.ElasticPoolsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ep, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent {
+ ep, err = client.CreateOrUpdateResponder(ep.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", ep.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ep, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1864,12 +2094,11 @@ func (future ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient)
// ElasticPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ElasticPoolsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ElasticPoolsDeleteFuture) Result(client ElasticPoolsClient) (ar autorest.Response, err error) {
+func (future *ElasticPoolsDeleteFuture) Result(client ElasticPoolsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1877,47 +2106,21 @@ func (future ElasticPoolsDeleteFuture) Result(client ElasticPoolsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ElasticPoolsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ElasticPoolsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ElasticPoolsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ElasticPoolsUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
+func (future *ElasticPoolsUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1925,34 +2128,15 @@ func (future ElasticPoolsUpdateFuture) Result(client ElasticPoolsClient) (ep Ela
return
}
if !done {
- return ep, azure.NewAsyncOpIncompleteError("sql.ElasticPoolsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ep, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent {
+ ep, err = client.UpdateResponder(ep.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", ep.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ep, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2253,12 +2437,11 @@ type InstanceFailoverGroupReadWriteEndpoint struct {
// long-running operation.
type InstanceFailoverGroupsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InstanceFailoverGroupsCreateOrUpdateFuture) Result(client InstanceFailoverGroupsClient) (ifg InstanceFailoverGroup, err error) {
+func (future *InstanceFailoverGroupsCreateOrUpdateFuture) Result(client InstanceFailoverGroupsClient) (ifg InstanceFailoverGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2266,34 +2449,15 @@ func (future InstanceFailoverGroupsCreateOrUpdateFuture) Result(client InstanceF
return
}
if !done {
- return ifg, azure.NewAsyncOpIncompleteError("sql.InstanceFailoverGroupsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ifg, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.InstanceFailoverGroupsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ifg.Response.Response, err = future.GetResult(sender); err == nil && ifg.Response.Response.StatusCode != http.StatusNoContent {
+ ifg, err = client.CreateOrUpdateResponder(ifg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsCreateOrUpdateFuture", "Result", ifg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ifg, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2302,12 +2466,11 @@ func (future InstanceFailoverGroupsCreateOrUpdateFuture) Result(client InstanceF
// operation.
type InstanceFailoverGroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InstanceFailoverGroupsDeleteFuture) Result(client InstanceFailoverGroupsClient) (ar autorest.Response, err error) {
+func (future *InstanceFailoverGroupsDeleteFuture) Result(client InstanceFailoverGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2315,35 +2478,10 @@ func (future InstanceFailoverGroupsDeleteFuture) Result(client InstanceFailoverG
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.InstanceFailoverGroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.InstanceFailoverGroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2351,12 +2489,11 @@ func (future InstanceFailoverGroupsDeleteFuture) Result(client InstanceFailoverG
// operation.
type InstanceFailoverGroupsFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InstanceFailoverGroupsFailoverFuture) Result(client InstanceFailoverGroupsClient) (ifg InstanceFailoverGroup, err error) {
+func (future *InstanceFailoverGroupsFailoverFuture) Result(client InstanceFailoverGroupsClient) (ifg InstanceFailoverGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2364,34 +2501,15 @@ func (future InstanceFailoverGroupsFailoverFuture) Result(client InstanceFailove
return
}
if !done {
- return ifg, azure.NewAsyncOpIncompleteError("sql.InstanceFailoverGroupsFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ifg, err = client.FailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.InstanceFailoverGroupsFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ifg.Response.Response, err = future.GetResult(sender); err == nil && ifg.Response.Response.StatusCode != http.StatusNoContent {
+ ifg, err = client.FailoverResponder(ifg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsFailoverFuture", "Result", ifg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- ifg, err = client.FailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2400,12 +2518,11 @@ func (future InstanceFailoverGroupsFailoverFuture) Result(client InstanceFailove
// of a long-running operation.
type InstanceFailoverGroupsForceFailoverAllowDataLossFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InstanceFailoverGroupsForceFailoverAllowDataLossFuture) Result(client InstanceFailoverGroupsClient) (ifg InstanceFailoverGroup, err error) {
+func (future *InstanceFailoverGroupsForceFailoverAllowDataLossFuture) Result(client InstanceFailoverGroupsClient) (ifg InstanceFailoverGroup, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2413,34 +2530,15 @@ func (future InstanceFailoverGroupsForceFailoverAllowDataLossFuture) Result(clie
return
}
if !done {
- return ifg, azure.NewAsyncOpIncompleteError("sql.InstanceFailoverGroupsForceFailoverAllowDataLossFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ifg, err = client.ForceFailoverAllowDataLossResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsForceFailoverAllowDataLossFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.InstanceFailoverGroupsForceFailoverAllowDataLossFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ifg.Response.Response, err = future.GetResult(sender); err == nil && ifg.Response.Response.StatusCode != http.StatusNoContent {
+ ifg, err = client.ForceFailoverAllowDataLossResponder(ifg.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsForceFailoverAllowDataLossFuture", "Result", ifg.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsForceFailoverAllowDataLossFuture", "Result", resp, "Failure sending request")
- return
- }
- ifg, err = client.ForceFailoverAllowDataLossResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.InstanceFailoverGroupsForceFailoverAllowDataLossFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2644,203 +2742,17 @@ type ServiceObjectiveCapability struct {
Reason *string `json:"reason,omitempty"`
}
-// ShortTermRetentionPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ShortTermRetentionPoliciesCreateOrUpdateFuture struct {
- azure.Future
- req *http.Request
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future ShortTermRetentionPoliciesCreateOrUpdateFuture) Result(client ShortTermRetentionPoliciesClient) (strp ShortTermRetentionPolicy, err error) {
- var done bool
- done, err = future.Done(client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- return strp, azure.NewAsyncOpIncompleteError("sql.ShortTermRetentionPoliciesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- strp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
- return
- }
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- strp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
- }
- return
-}
-
-// ShortTermRetentionPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ShortTermRetentionPoliciesUpdateFuture struct {
- azure.Future
- req *http.Request
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future ShortTermRetentionPoliciesUpdateFuture) Result(client ShortTermRetentionPoliciesClient) (strp ShortTermRetentionPolicy, err error) {
- var done bool
- done, err = future.Done(client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- return strp, azure.NewAsyncOpIncompleteError("sql.ShortTermRetentionPoliciesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- strp, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
- return
- }
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- strp, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ShortTermRetentionPoliciesUpdateFuture", "Result", resp, "Failure responding to request")
- }
- return
-}
-
-// ShortTermRetentionPolicy a short term retention policy resource.
-type ShortTermRetentionPolicy struct {
- autorest.Response `json:"-"`
- // ShortTermRetentionPolicyProperties - Resource properties.
- *ShortTermRetentionPolicyProperties `json:"properties,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
- // Name - Resource name.
- Name *string `json:"name,omitempty"`
- // Type - Resource type.
- Type *string `json:"type,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ShortTermRetentionPolicy.
-func (strp ShortTermRetentionPolicy) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if strp.ShortTermRetentionPolicyProperties != nil {
- objectMap["properties"] = strp.ShortTermRetentionPolicyProperties
- }
- if strp.ID != nil {
- objectMap["id"] = strp.ID
- }
- if strp.Name != nil {
- objectMap["name"] = strp.Name
- }
- if strp.Type != nil {
- objectMap["type"] = strp.Type
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ShortTermRetentionPolicy struct.
-func (strp *ShortTermRetentionPolicy) UnmarshalJSON(body []byte) error {
- var m map[string]*json.RawMessage
- err := json.Unmarshal(body, &m)
- if err != nil {
- return err
- }
- for k, v := range m {
- switch k {
- case "properties":
- if v != nil {
- var shortTermRetentionPolicyProperties ShortTermRetentionPolicyProperties
- err = json.Unmarshal(*v, &shortTermRetentionPolicyProperties)
- if err != nil {
- return err
- }
- strp.ShortTermRetentionPolicyProperties = &shortTermRetentionPolicyProperties
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- strp.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- strp.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- strp.Type = &typeVar
- }
- }
- }
-
- return nil
-}
-
-// ShortTermRetentionPolicyProperties properties of a short term retention policy
-type ShortTermRetentionPolicyProperties struct {
- // RetentionDays - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- RetentionDays *int32 `json:"retentionDays,omitempty"`
-}
-
-// Sku an ARM Resource SKU.
+// Sku the resource model definition representing SKU
type Sku struct {
- // Name - The name of the SKU, typically, a letter + Number code, e.g. P3.
+ // Name - The name of the SKU. Ex - P3. It is typically a letter+number code
Name *string `json:"name,omitempty"`
- // Tier - The tier of the particular SKU, e.g. Basic, Premium.
+ // Tier - This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.
Tier *string `json:"tier,omitempty"`
- // Size - Size of the particular SKU
+ // Size - The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.
Size *string `json:"size,omitempty"`
// Family - If the service has different generations of hardware, for the same SKU, then that can be captured here.
Family *string `json:"family,omitempty"`
- // Capacity - Capacity of the particular SKU.
+ // Capacity - If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.
Capacity *int32 `json:"capacity,omitempty"`
}
@@ -2878,3 +2790,226 @@ func (tr TrackedResource) MarshalJSON() ([]byte, error) {
}
return json.Marshal(objectMap)
}
+
+// VulnerabilityAssessmentRecurringScansProperties properties of a Vulnerability Assessment recurring scans.
+type VulnerabilityAssessmentRecurringScansProperties struct {
+ // IsEnabled - Recurring scans state.
+ IsEnabled *bool `json:"isEnabled,omitempty"`
+ // EmailSubscriptionAdmins - Specifies that the schedule scan notification will be is sent to the subscription administrators.
+ EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty"`
+ // Emails - Specifies an array of e-mail addresses to which the scan notification is sent.
+ Emails *[]string `json:"emails,omitempty"`
+}
+
+// VulnerabilityAssessmentScanError properties of a vulnerability assessment scan error.
+type VulnerabilityAssessmentScanError struct {
+ // Code - The error code.
+ Code *string `json:"code,omitempty"`
+ // Message - The error message.
+ Message *string `json:"message,omitempty"`
+}
+
+// VulnerabilityAssessmentScanRecord a vulnerability assessment scan record.
+type VulnerabilityAssessmentScanRecord struct {
+ autorest.Response `json:"-"`
+ // VulnerabilityAssessmentScanRecordProperties - Resource properties.
+ *VulnerabilityAssessmentScanRecordProperties `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VulnerabilityAssessmentScanRecord.
+func (vasr VulnerabilityAssessmentScanRecord) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vasr.VulnerabilityAssessmentScanRecordProperties != nil {
+ objectMap["properties"] = vasr.VulnerabilityAssessmentScanRecordProperties
+ }
+ if vasr.ID != nil {
+ objectMap["id"] = vasr.ID
+ }
+ if vasr.Name != nil {
+ objectMap["name"] = vasr.Name
+ }
+ if vasr.Type != nil {
+ objectMap["type"] = vasr.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VulnerabilityAssessmentScanRecord struct.
+func (vasr *VulnerabilityAssessmentScanRecord) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var vulnerabilityAssessmentScanRecordProperties VulnerabilityAssessmentScanRecordProperties
+ err = json.Unmarshal(*v, &vulnerabilityAssessmentScanRecordProperties)
+ if err != nil {
+ return err
+ }
+ vasr.VulnerabilityAssessmentScanRecordProperties = &vulnerabilityAssessmentScanRecordProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vasr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vasr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vasr.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// VulnerabilityAssessmentScanRecordListResult a list of vulnerability assessment scan records.
+type VulnerabilityAssessmentScanRecordListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of results.
+ Value *[]VulnerabilityAssessmentScanRecord `json:"value,omitempty"`
+ // NextLink - Link to retrieve next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VulnerabilityAssessmentScanRecordListResultIterator provides access to a complete listing of
+// VulnerabilityAssessmentScanRecord values.
+type VulnerabilityAssessmentScanRecordListResultIterator struct {
+ i int
+ page VulnerabilityAssessmentScanRecordListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VulnerabilityAssessmentScanRecordListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VulnerabilityAssessmentScanRecordListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VulnerabilityAssessmentScanRecordListResultIterator) Response() VulnerabilityAssessmentScanRecordListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VulnerabilityAssessmentScanRecordListResultIterator) Value() VulnerabilityAssessmentScanRecord {
+ if !iter.page.NotDone() {
+ return VulnerabilityAssessmentScanRecord{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vasrlr VulnerabilityAssessmentScanRecordListResult) IsEmpty() bool {
+ return vasrlr.Value == nil || len(*vasrlr.Value) == 0
+}
+
+// vulnerabilityAssessmentScanRecordListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vasrlr VulnerabilityAssessmentScanRecordListResult) vulnerabilityAssessmentScanRecordListResultPreparer() (*http.Request, error) {
+ if vasrlr.NextLink == nil || len(to.String(vasrlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vasrlr.NextLink)))
+}
+
+// VulnerabilityAssessmentScanRecordListResultPage contains a page of VulnerabilityAssessmentScanRecord values.
+type VulnerabilityAssessmentScanRecordListResultPage struct {
+ fn func(VulnerabilityAssessmentScanRecordListResult) (VulnerabilityAssessmentScanRecordListResult, error)
+ vasrlr VulnerabilityAssessmentScanRecordListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VulnerabilityAssessmentScanRecordListResultPage) Next() error {
+ next, err := page.fn(page.vasrlr)
+ if err != nil {
+ return err
+ }
+ page.vasrlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VulnerabilityAssessmentScanRecordListResultPage) NotDone() bool {
+ return !page.vasrlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VulnerabilityAssessmentScanRecordListResultPage) Response() VulnerabilityAssessmentScanRecordListResult {
+ return page.vasrlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VulnerabilityAssessmentScanRecordListResultPage) Values() []VulnerabilityAssessmentScanRecord {
+ if page.vasrlr.IsEmpty() {
+ return nil
+ }
+ return *page.vasrlr.Value
+}
+
+// VulnerabilityAssessmentScanRecordProperties properties of a vulnerability assessment scan record.
+type VulnerabilityAssessmentScanRecordProperties struct {
+ // ScanID - The scan ID.
+ ScanID *string `json:"scanId,omitempty"`
+ // TriggerType - The scan trigger type. Possible values include: 'OnDemand', 'Recurring'
+ TriggerType VulnerabilityAssessmentScanTriggerType `json:"triggerType,omitempty"`
+ // State - The scan status. Possible values include: 'VulnerabilityAssessmentScanStatePassed', 'VulnerabilityAssessmentScanStateFailed', 'VulnerabilityAssessmentScanStateFailedToRun', 'VulnerabilityAssessmentScanStateInProgress'
+ State VulnerabilityAssessmentScanState `json:"state,omitempty"`
+ // StartTime - The scan start time (UTC).
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - The scan end time (UTC).
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // Errors - The scan errors.
+ Errors *[]VulnerabilityAssessmentScanError `json:"errors,omitempty"`
+ // StorageContainerPath - The scan results storage container path.
+ StorageContainerPath *string `json:"storageContainerPath,omitempty"`
+ // NumberOfFailedSecurityChecks - The number of failed security checks.
+ NumberOfFailedSecurityChecks *int32 `json:"numberOfFailedSecurityChecks,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2015-05-01-preview/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2015-05-01-preview/storage/accounts.go
index c2359f09d..a9ba6ab6c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2015-05-01-preview/storage/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2015-05-01-preview/storage/accounts.go
@@ -156,15 +156,17 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2015-05-01-preview/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2015-05-01-preview/storage/models.go
index eacec5a81..5c571a617 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2015-05-01-preview/storage/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2015-05-01-preview/storage/models.go
@@ -515,12 +515,11 @@ type AccountRegenerateKeyParameters struct {
// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
+func (future *AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -528,34 +527,15 @@ func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/accounts.go
new file mode 100644
index 000000000..bbdeecf4b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/accounts.go
@@ -0,0 +1,1214 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// AccountsClient is the the Azure Storage Management API.
+type AccountsClient struct {
+ BaseClient
+}
+
+// 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 that the storage account name is valid and is not already in use.
+// Parameters:
+// accountName - 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(ctx context.Context, accountName AccountCheckNameAvailabilityParameters) (result CheckNameAvailabilityResult, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName.Name", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "accountName.Type", Name: validation.Null, Rule: true, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "CheckNameAvailability", err.Error())
+ }
+
+ req, err := client.CheckNameAvailabilityPreparer(ctx, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.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, "storage.AccountsClient", "CheckNameAvailability", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckNameAvailabilityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "CheckNameAvailability", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request.
+func (client AccountsClient) CheckNameAvailabilityPreparer(ctx context.Context, accountName AccountCheckNameAvailabilityParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability", pathParameters),
+ autorest.WithJSON(accountName),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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 - the parameters to provide for the created account.
+func (client AccountsClient) Create(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters) (result AccountsCreateFuture, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {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}}},
+ }}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "Create", err.Error())
+ }
+
+ req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Create", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters) (*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 = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) CreateResponder(resp *http.Response) (result Account, 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
+}
+
+// CreateOrUpdateManagementPolicies sets the data policy rules associated with the specified storage account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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.
+// properties - the data policy rules to set to a storage account.
+func (client AccountsClient) CreateOrUpdateManagementPolicies(ctx context.Context, resourceGroupName string, accountName string, properties ManagementPoliciesRulesSetParameter) (result AccountManagementPolicies, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "CreateOrUpdateManagementPolicies", err.Error())
+ }
+
+ req, err := client.CreateOrUpdateManagementPoliciesPreparer(ctx, resourceGroupName, accountName, properties)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "CreateOrUpdateManagementPolicies", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateManagementPoliciesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "CreateOrUpdateManagementPolicies", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateManagementPoliciesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "CreateOrUpdateManagementPolicies", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdateManagementPoliciesPreparer prepares the CreateOrUpdateManagementPolicies request.
+func (client AccountsClient) CreateOrUpdateManagementPoliciesPreparer(ctx context.Context, resourceGroupName string, accountName string, properties ManagementPoliciesRulesSetParameter) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "managementPolicyName": autorest.Encode("path", "default"),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", pathParameters),
+ autorest.WithJSON(properties),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateManagementPoliciesSender sends the CreateOrUpdateManagementPolicies request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) CreateOrUpdateManagementPoliciesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateManagementPoliciesResponder handles the response to the CreateOrUpdateManagementPolicies request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) CreateOrUpdateManagementPoliciesResponder(resp *http.Response) (result AccountManagementPolicies, 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 a storage account in Microsoft Azure.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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(ctx context.Context, resourceGroupName string, accountName 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client AccountsClient) DeletePreparer(ctx context.Context, 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 = "2018-03-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.Storage/storageAccounts/{accountName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// DeleteManagementPolicies deletes the data policy rules associated with the specified storage account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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) DeleteManagementPolicies(ctx context.Context, resourceGroupName string, accountName 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "DeleteManagementPolicies", err.Error())
+ }
+
+ req, err := client.DeleteManagementPoliciesPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "DeleteManagementPolicies", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteManagementPoliciesSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "DeleteManagementPolicies", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteManagementPoliciesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "DeleteManagementPolicies", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteManagementPoliciesPreparer prepares the DeleteManagementPolicies request.
+func (client AccountsClient) DeleteManagementPoliciesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "managementPolicyName": autorest.Encode("path", "default"),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-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.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteManagementPoliciesSender sends the DeleteManagementPolicies request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) DeleteManagementPoliciesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteManagementPoliciesResponder handles the response to the DeleteManagementPolicies request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) DeleteManagementPoliciesResponder(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
+}
+
+// GetManagementPolicies gets the data policy rules associated with the specified storage account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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) GetManagementPolicies(ctx context.Context, resourceGroupName string, accountName string) (result AccountManagementPolicies, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "GetManagementPolicies", err.Error())
+ }
+
+ req, err := client.GetManagementPoliciesPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "GetManagementPolicies", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetManagementPoliciesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "GetManagementPolicies", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetManagementPoliciesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "GetManagementPolicies", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetManagementPoliciesPreparer prepares the GetManagementPolicies request.
+func (client AccountsClient) GetManagementPoliciesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "managementPolicyName": autorest.Encode("path", "default"),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetManagementPoliciesSender sends the GetManagementPolicies request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) GetManagementPoliciesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetManagementPoliciesResponder handles the response to the GetManagementPolicies request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) GetManagementPoliciesResponder(resp *http.Response) (result AccountManagementPolicies, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ 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.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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(ctx context.Context, resourceGroupName string, accountName string) (result Account, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "GetProperties", err.Error())
+ }
+
+ req, err := client.GetPropertiesPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "GetProperties", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPropertiesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "GetProperties", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPropertiesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "GetProperties", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPropertiesPreparer prepares the GetProperties request.
+func (client AccountsClient) GetPropertiesPreparer(ctx context.Context, 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 = "2018-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.Storage/storageAccounts/{accountName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPropertiesSender sends the GetProperties request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) GetPropertiesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetPropertiesResponder handles the response to the GetProperties request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) GetPropertiesResponder(resp *http.Response) (result Account, 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 storage accounts available under the subscription. Note that storage keys are not returned; use
+// the ListKeys operation for this.
+func (client AccountsClient) List(ctx context.Context) (result AccountListResult, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "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.AccountsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client AccountsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) ListResponder(resp *http.Response) (result AccountListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListAccountSAS list SAS credentials of a storage account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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 - the parameters to provide to list SAS credentials for the storage account.
+func (client AccountsClient) ListAccountSAS(ctx context.Context, resourceGroupName string, accountName string, parameters AccountSasParameters) (result ListAccountSasResponse, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.SharedAccessExpiryTime", Name: validation.Null, Rule: true, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "ListAccountSAS", err.Error())
+ }
+
+ req, err := client.ListAccountSASPreparer(ctx, resourceGroupName, accountName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListAccountSAS", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAccountSASSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListAccountSAS", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListAccountSASResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListAccountSAS", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAccountSASPreparer prepares the ListAccountSAS request.
+func (client AccountsClient) ListAccountSASPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters AccountSasParameters) (*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 = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAccountSASSender sends the ListAccountSAS request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) ListAccountSASSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAccountSASResponder handles the response to the ListAccountSAS request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) ListAccountSASResponder(resp *http.Response) (result ListAccountSasResponse, 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 lists all the storage accounts available under the given resource group. Note that storage keys
+// are not returned; use the ListKeys operation for this.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AccountListResult, 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: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "ListByResourceGroup", err.Error())
+ }
+
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.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, "storage.AccountsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.Storage/storageAccounts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (result AccountListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListKeys lists the access keys for the specified storage account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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(ctx context.Context, resourceGroupName string, accountName string) (result AccountListKeysResult, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "ListKeys", err.Error())
+ }
+
+ req, err := client.ListKeysPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListKeys", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListKeysSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListKeys", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListKeysResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListKeys", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListKeysPreparer prepares the ListKeys request.
+func (client AccountsClient) ListKeysPreparer(ctx context.Context, 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 = "2018-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.Storage/storageAccounts/{accountName}/listKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListKeysSender sends the ListKeys request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) ListKeysSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListKeysResponder handles the response to the ListKeys request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) ListKeysResponder(resp *http.Response) (result AccountListKeysResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListServiceSAS list service SAS credentials of a specific resource.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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 - the parameters to provide to list service SAS credentials.
+func (client AccountsClient) ListServiceSAS(ctx context.Context, resourceGroupName string, accountName string, parameters ServiceSasParameters) (result ListServiceSasResponse, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.CanonicalizedResource", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.Identifier", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Identifier", Name: validation.MaxLength, Rule: 64, Chain: nil}}}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "ListServiceSAS", err.Error())
+ }
+
+ req, err := client.ListServiceSASPreparer(ctx, resourceGroupName, accountName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListServiceSAS", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListServiceSASSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListServiceSAS", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListServiceSASResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListServiceSAS", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListServiceSASPreparer prepares the ListServiceSAS request.
+func (client AccountsClient) ListServiceSASPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters ServiceSasParameters) (*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 = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListServiceSASSender sends the ListServiceSAS request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) ListServiceSASSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListServiceSASResponder handles the response to the ListServiceSAS request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) ListServiceSASResponder(resp *http.Response) (result ListServiceSasResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// RegenerateKey regenerates one of the access keys for the specified storage account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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 - specifies name of the key which should be regenerated -- key1 or key2.
+func (client AccountsClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, regenerateKey AccountRegenerateKeyParameters) (result AccountListKeysResult, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: regenerateKey,
+ Constraints: []validation.Constraint{{Target: "regenerateKey.KeyName", Name: validation.Null, Rule: true, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "RegenerateKey", err.Error())
+ }
+
+ req, err := client.RegenerateKeyPreparer(ctx, resourceGroupName, accountName, regenerateKey)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RegenerateKey", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.RegenerateKeySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RegenerateKey", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.RegenerateKeyResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RegenerateKey", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// RegenerateKeyPreparer prepares the RegenerateKey request.
+func (client AccountsClient) RegenerateKeyPreparer(ctx context.Context, resourceGroupName string, accountName string, regenerateKey AccountRegenerateKeyParameters) (*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 = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey", pathParameters),
+ autorest.WithJSON(regenerateKey),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RegenerateKeySender sends the RegenerateKey request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) RegenerateKeySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// RegenerateKeyResponder handles the response to the RegenerateKey request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result AccountListKeysResult, 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 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.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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 - the parameters to provide for the updated account.
+func (client AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, parameters AccountUpdateParameters) (result Account, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client AccountsClient) UpdatePreparer(ctx context.Context, 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 = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) UpdateResponder(resp *http.Response) (result Account, 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/services/preview/storage/mgmt/2018-03-01-preview/storage/blobcontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/blobcontainers.go
new file mode 100644
index 000000000..960b0851b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/blobcontainers.go
@@ -0,0 +1,1188 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// BlobContainersClient is the the Azure Storage Management API.
+type BlobContainersClient struct {
+ BaseClient
+}
+
+// NewBlobContainersClient creates an instance of the BlobContainersClient client.
+func NewBlobContainersClient(subscriptionID string) BlobContainersClient {
+ return NewBlobContainersClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client.
+func NewBlobContainersClientWithBaseURI(baseURI string, subscriptionID string) BlobContainersClient {
+ return BlobContainersClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// ClearLegalHold clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation.
+// ClearLegalHold clears out only the specified tags in the request.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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.
+// containerName - the name of the blob container within the specified storage account. Blob container names
+// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every
+// dash (-) character must be immediately preceded and followed by a letter or number.
+// legalHold - the LegalHold property that will be clear from a blob container.
+func (client BlobContainersClient) ClearLegalHold(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold) (result LegalHold, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: containerName,
+ Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: legalHold,
+ Constraints: []validation.Constraint{{Target: "legalHold.Tags", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.BlobContainersClient", "ClearLegalHold", err.Error())
+ }
+
+ req, err := client.ClearLegalHoldPreparer(ctx, resourceGroupName, accountName, containerName, legalHold)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ClearLegalHold", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ClearLegalHoldSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ClearLegalHold", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ClearLegalHoldResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ClearLegalHold", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ClearLegalHoldPreparer prepares the ClearLegalHold request.
+func (client BlobContainersClient) ClearLegalHoldPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "containerName": autorest.Encode("path", containerName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold", pathParameters),
+ autorest.WithJSON(legalHold),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ClearLegalHoldSender sends the ClearLegalHold request. The method will close the
+// http.Response Body if it receives an error.
+func (client BlobContainersClient) ClearLegalHoldSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ClearLegalHoldResponder handles the response to the ClearLegalHold request. The method always
+// closes the http.Response Body.
+func (client BlobContainersClient) ClearLegalHoldResponder(resp *http.Response) (result LegalHold, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Create creates a new container under the specified account as described by request body. The container resource
+// includes metadata and properties for that container. It does not include a list of the blobs contained by the
+// container.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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.
+// containerName - the name of the blob container within the specified storage account. Blob container names
+// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every
+// dash (-) character must be immediately preceded and followed by a letter or number.
+// blobContainer - properties of the blob container to create.
+func (client BlobContainersClient) Create(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer) (result BlobContainer, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: containerName,
+ Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: blobContainer,
+ Constraints: []validation.Constraint{{Target: "blobContainer.ContainerProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "blobContainer.ContainerProperties.ImmutabilityPolicy", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "blobContainer.ContainerProperties.ImmutabilityPolicy.ImmutabilityPolicyProperty", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "blobContainer.ContainerProperties.ImmutabilityPolicy.ImmutabilityPolicyProperty.ImmutabilityPeriodSinceCreationInDays", Name: validation.Null, Rule: true, Chain: nil}}},
+ }},
+ }}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.BlobContainersClient", "Create", err.Error())
+ }
+
+ req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, containerName, blobContainer)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Create", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Create", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client BlobContainersClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "containerName": autorest.Encode("path", containerName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}", pathParameters),
+ autorest.WithJSON(blobContainer),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client BlobContainersClient) CreateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client BlobContainersClient) CreateResponder(resp *http.Response) (result BlobContainer, 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
+}
+
+// CreateOrUpdateImmutabilityPolicy creates or updates an unlocked immutability policy. ETag in If-Match is honored if
+// given but not required for this operation.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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.
+// containerName - the name of the blob container within the specified storage account. Blob container names
+// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every
+// dash (-) character must be immediately preceded and followed by a letter or number.
+// parameters - the ImmutabilityPolicy Properties that will be created or updated to a blob container.
+// ifMatch - the entity state (ETag) version of the immutability policy to update. A value of "*" can be used
+// to apply the operation only if the immutability policy already exists. If omitted, this operation will
+// always be applied.
+func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, parameters *ImmutabilityPolicy, ifMatch string) (result ImmutabilityPolicy, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: containerName,
+ Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty.ImmutabilityPeriodSinceCreationInDays", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("storage.BlobContainersClient", "CreateOrUpdateImmutabilityPolicy", err.Error())
+ }
+
+ req, err := client.CreateOrUpdateImmutabilityPolicyPreparer(ctx, resourceGroupName, accountName, containerName, parameters, ifMatch)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "CreateOrUpdateImmutabilityPolicy", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateImmutabilityPolicySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "CreateOrUpdateImmutabilityPolicy", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateImmutabilityPolicyResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "CreateOrUpdateImmutabilityPolicy", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdateImmutabilityPolicyPreparer prepares the CreateOrUpdateImmutabilityPolicy request.
+func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicyPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, parameters *ImmutabilityPolicy, ifMatch string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "containerName": autorest.Encode("path", containerName),
+ "immutabilityPolicyName": autorest.Encode("path", "default"),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ if len(ifMatch) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("If-Match", autorest.String(ifMatch)))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateImmutabilityPolicySender sends the CreateOrUpdateImmutabilityPolicy request. The method will close the
+// http.Response Body if it receives an error.
+func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateImmutabilityPolicyResponder handles the response to the CreateOrUpdateImmutabilityPolicy request. The method always
+// closes the http.Response Body.
+func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicyResponder(resp *http.Response) (result ImmutabilityPolicy, 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 specified container under its account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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.
+// containerName - the name of the blob container within the specified storage account. Blob container names
+// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every
+// dash (-) character must be immediately preceded and followed by a letter or number.
+func (client BlobContainersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, containerName 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: containerName,
+ Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.BlobContainersClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, containerName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client BlobContainersClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "containerName": autorest.Encode("path", containerName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-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.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client BlobContainersClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client BlobContainersClient) 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
+}
+
+// DeleteImmutabilityPolicy aborts an unlocked immutability policy. The response of delete has
+// immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked
+// immutability policy is not allowed, only way is to delete the container after deleting all blobs inside the
+// container.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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.
+// containerName - the name of the blob container within the specified storage account. Blob container names
+// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every
+// dash (-) character must be immediately preceded and followed by a letter or number.
+// ifMatch - the entity state (ETag) version of the immutability policy to update. A value of "*" can be used
+// to apply the operation only if the immutability policy already exists. If omitted, this operation will
+// always be applied.
+func (client BlobContainersClient) DeleteImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (result ImmutabilityPolicy, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: containerName,
+ Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.BlobContainersClient", "DeleteImmutabilityPolicy", err.Error())
+ }
+
+ req, err := client.DeleteImmutabilityPolicyPreparer(ctx, resourceGroupName, accountName, containerName, ifMatch)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "DeleteImmutabilityPolicy", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteImmutabilityPolicySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "DeleteImmutabilityPolicy", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteImmutabilityPolicyResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "DeleteImmutabilityPolicy", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteImmutabilityPolicyPreparer prepares the DeleteImmutabilityPolicy request.
+func (client BlobContainersClient) DeleteImmutabilityPolicyPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "containerName": autorest.Encode("path", containerName),
+ "immutabilityPolicyName": autorest.Encode("path", "default"),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-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.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters),
+ autorest.WithHeader("If-Match", autorest.String(ifMatch)))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteImmutabilityPolicySender sends the DeleteImmutabilityPolicy request. The method will close the
+// http.Response Body if it receives an error.
+func (client BlobContainersClient) DeleteImmutabilityPolicySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteImmutabilityPolicyResponder handles the response to the DeleteImmutabilityPolicy request. The method always
+// closes the http.Response Body.
+func (client BlobContainersClient) DeleteImmutabilityPolicyResponder(resp *http.Response) (result ImmutabilityPolicy, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ExtendImmutabilityPolicy extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only
+// action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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.
+// containerName - the name of the blob container within the specified storage account. Blob container names
+// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every
+// dash (-) character must be immediately preceded and followed by a letter or number.
+// ifMatch - the entity state (ETag) version of the immutability policy to update. A value of "*" can be used
+// to apply the operation only if the immutability policy already exists. If omitted, this operation will
+// always be applied.
+// parameters - the ImmutabilityPolicy Properties that will be extented for a blob container.
+func (client BlobContainersClient) ExtendImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, parameters *ImmutabilityPolicy) (result ImmutabilityPolicy, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: containerName,
+ Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty.ImmutabilityPeriodSinceCreationInDays", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("storage.BlobContainersClient", "ExtendImmutabilityPolicy", err.Error())
+ }
+
+ req, err := client.ExtendImmutabilityPolicyPreparer(ctx, resourceGroupName, accountName, containerName, ifMatch, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ExtendImmutabilityPolicy", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ExtendImmutabilityPolicySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ExtendImmutabilityPolicy", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ExtendImmutabilityPolicyResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ExtendImmutabilityPolicy", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ExtendImmutabilityPolicyPreparer prepares the ExtendImmutabilityPolicy request.
+func (client BlobContainersClient) ExtendImmutabilityPolicyPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, parameters *ImmutabilityPolicy) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "containerName": autorest.Encode("path", containerName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend", pathParameters),
+ autorest.WithQueryParameters(queryParameters),
+ autorest.WithHeader("If-Match", autorest.String(ifMatch)))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ExtendImmutabilityPolicySender sends the ExtendImmutabilityPolicy request. The method will close the
+// http.Response Body if it receives an error.
+func (client BlobContainersClient) ExtendImmutabilityPolicySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ExtendImmutabilityPolicyResponder handles the response to the ExtendImmutabilityPolicy request. The method always
+// closes the http.Response Body.
+func (client BlobContainersClient) ExtendImmutabilityPolicyResponder(resp *http.Response) (result ImmutabilityPolicy, 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 properties of a specified container.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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.
+// containerName - the name of the blob container within the specified storage account. Blob container names
+// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every
+// dash (-) character must be immediately preceded and followed by a letter or number.
+func (client BlobContainersClient) Get(ctx context.Context, resourceGroupName string, accountName string, containerName string) (result BlobContainer, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: containerName,
+ Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.BlobContainersClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, accountName, containerName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client BlobContainersClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "containerName": autorest.Encode("path", containerName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client BlobContainersClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client BlobContainersClient) GetResponder(resp *http.Response) (result BlobContainer, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetImmutabilityPolicy gets the existing immutability policy along with the corresponding ETag in response headers
+// and body.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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.
+// containerName - the name of the blob container within the specified storage account. Blob container names
+// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every
+// dash (-) character must be immediately preceded and followed by a letter or number.
+// ifMatch - the entity state (ETag) version of the immutability policy to update. A value of "*" can be used
+// to apply the operation only if the immutability policy already exists. If omitted, this operation will
+// always be applied.
+func (client BlobContainersClient) GetImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (result ImmutabilityPolicy, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: containerName,
+ Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.BlobContainersClient", "GetImmutabilityPolicy", err.Error())
+ }
+
+ req, err := client.GetImmutabilityPolicyPreparer(ctx, resourceGroupName, accountName, containerName, ifMatch)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "GetImmutabilityPolicy", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetImmutabilityPolicySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "GetImmutabilityPolicy", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetImmutabilityPolicyResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "GetImmutabilityPolicy", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetImmutabilityPolicyPreparer prepares the GetImmutabilityPolicy request.
+func (client BlobContainersClient) GetImmutabilityPolicyPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "containerName": autorest.Encode("path", containerName),
+ "immutabilityPolicyName": autorest.Encode("path", "default"),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(ifMatch) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("If-Match", autorest.String(ifMatch)))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetImmutabilityPolicySender sends the GetImmutabilityPolicy request. The method will close the
+// http.Response Body if it receives an error.
+func (client BlobContainersClient) GetImmutabilityPolicySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetImmutabilityPolicyResponder handles the response to the GetImmutabilityPolicy request. The method always
+// closes the http.Response Body.
+func (client BlobContainersClient) GetImmutabilityPolicyResponder(resp *http.Response) (result ImmutabilityPolicy, 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 containers and does not support a prefix like data plane. Also SRP today does not return continuation
+// token.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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 BlobContainersClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ListContainerItems, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.BlobContainersClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "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.BlobContainersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client BlobContainersClient) ListPreparer(ctx context.Context, 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 = "2018-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.Storage/storageAccounts/{accountName}/blobServices/default/containers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client BlobContainersClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client BlobContainersClient) ListResponder(resp *http.Response) (result ListContainerItems, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// LockImmutabilityPolicy sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is
+// ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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.
+// containerName - the name of the blob container within the specified storage account. Blob container names
+// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every
+// dash (-) character must be immediately preceded and followed by a letter or number.
+// ifMatch - the entity state (ETag) version of the immutability policy to update. A value of "*" can be used
+// to apply the operation only if the immutability policy already exists. If omitted, this operation will
+// always be applied.
+func (client BlobContainersClient) LockImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (result ImmutabilityPolicy, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: containerName,
+ Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.BlobContainersClient", "LockImmutabilityPolicy", err.Error())
+ }
+
+ req, err := client.LockImmutabilityPolicyPreparer(ctx, resourceGroupName, accountName, containerName, ifMatch)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "LockImmutabilityPolicy", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.LockImmutabilityPolicySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "LockImmutabilityPolicy", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.LockImmutabilityPolicyResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "LockImmutabilityPolicy", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// LockImmutabilityPolicyPreparer prepares the LockImmutabilityPolicy request.
+func (client BlobContainersClient) LockImmutabilityPolicyPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "containerName": autorest.Encode("path", containerName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/lock", pathParameters),
+ autorest.WithQueryParameters(queryParameters),
+ autorest.WithHeader("If-Match", autorest.String(ifMatch)))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// LockImmutabilityPolicySender sends the LockImmutabilityPolicy request. The method will close the
+// http.Response Body if it receives an error.
+func (client BlobContainersClient) LockImmutabilityPolicySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// LockImmutabilityPolicyResponder handles the response to the LockImmutabilityPolicy request. The method always
+// closes the http.Response Body.
+func (client BlobContainersClient) LockImmutabilityPolicyResponder(resp *http.Response) (result ImmutabilityPolicy, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// SetLegalHold sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an
+// append pattern and does not clear out the existing tags that are not specified in the request.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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.
+// containerName - the name of the blob container within the specified storage account. Blob container names
+// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every
+// dash (-) character must be immediately preceded and followed by a letter or number.
+// legalHold - the LegalHold property that will be set to a blob container.
+func (client BlobContainersClient) SetLegalHold(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold) (result LegalHold, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: containerName,
+ Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: legalHold,
+ Constraints: []validation.Constraint{{Target: "legalHold.Tags", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.BlobContainersClient", "SetLegalHold", err.Error())
+ }
+
+ req, err := client.SetLegalHoldPreparer(ctx, resourceGroupName, accountName, containerName, legalHold)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "SetLegalHold", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.SetLegalHoldSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "SetLegalHold", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.SetLegalHoldResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "SetLegalHold", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// SetLegalHoldPreparer prepares the SetLegalHold request.
+func (client BlobContainersClient) SetLegalHoldPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "containerName": autorest.Encode("path", containerName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/setLegalHold", pathParameters),
+ autorest.WithJSON(legalHold),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// SetLegalHoldSender sends the SetLegalHold request. The method will close the
+// http.Response Body if it receives an error.
+func (client BlobContainersClient) SetLegalHoldSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// SetLegalHoldResponder handles the response to the SetLegalHold request. The method always
+// closes the http.Response Body.
+func (client BlobContainersClient) SetLegalHoldResponder(resp *http.Response) (result LegalHold, 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 container properties as specified in request body. Properties not mentioned in the request will be
+// unchanged. Update fails if the specified container doesn't already exist.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - 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.
+// containerName - the name of the blob container within the specified storage account. Blob container names
+// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every
+// dash (-) character must be immediately preceded and followed by a letter or number.
+// blobContainer - properties to update for the blob container.
+func (client BlobContainersClient) Update(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer) (result BlobContainer, 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: containerName,
+ Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.BlobContainersClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, containerName, blobContainer)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client BlobContainersClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "containerName": autorest.Encode("path", containerName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}", pathParameters),
+ autorest.WithJSON(blobContainer),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client BlobContainersClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client BlobContainersClient) UpdateResponder(resp *http.Response) (result BlobContainer, 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/services/preview/storage/mgmt/2018-03-01-preview/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/client.go
new file mode 100644
index 000000000..e34792498
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/client.go
@@ -0,0 +1,51 @@
+// Package storage implements the Azure ARM Storage service API version 2018-03-01-preview.
+//
+// The Azure Storage Management API.
+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"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Storage
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Storage.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/models.go
new file mode 100644
index 000000000..de89ab8c5
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/models.go
@@ -0,0 +1,2035 @@
+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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "net/http"
+)
+
+// AccessTier enumerates the values for access tier.
+type AccessTier string
+
+const (
+ // Cool ...
+ Cool AccessTier = "Cool"
+ // Hot ...
+ Hot AccessTier = "Hot"
+)
+
+// PossibleAccessTierValues returns an array of possible values for the AccessTier const type.
+func PossibleAccessTierValues() []AccessTier {
+ return []AccessTier{Cool, Hot}
+}
+
+// AccountStatus enumerates the values for account status.
+type AccountStatus string
+
+const (
+ // Available ...
+ Available AccountStatus = "available"
+ // Unavailable ...
+ Unavailable AccountStatus = "unavailable"
+)
+
+// PossibleAccountStatusValues returns an array of possible values for the AccountStatus const type.
+func PossibleAccountStatusValues() []AccountStatus {
+ return []AccountStatus{Available, Unavailable}
+}
+
+// Action enumerates the values for action.
+type Action string
+
+const (
+ // Allow ...
+ Allow Action = "Allow"
+)
+
+// PossibleActionValues returns an array of possible values for the Action const type.
+func PossibleActionValues() []Action {
+ return []Action{Allow}
+}
+
+// Bypass enumerates the values for bypass.
+type Bypass string
+
+const (
+ // AzureServices ...
+ AzureServices Bypass = "AzureServices"
+ // Logging ...
+ Logging Bypass = "Logging"
+ // Metrics ...
+ Metrics Bypass = "Metrics"
+ // None ...
+ None Bypass = "None"
+)
+
+// PossibleBypassValues returns an array of possible values for the Bypass const type.
+func PossibleBypassValues() []Bypass {
+ return []Bypass{AzureServices, Logging, Metrics, None}
+}
+
+// DefaultAction enumerates the values for default action.
+type DefaultAction string
+
+const (
+ // DefaultActionAllow ...
+ DefaultActionAllow DefaultAction = "Allow"
+ // DefaultActionDeny ...
+ DefaultActionDeny DefaultAction = "Deny"
+)
+
+// PossibleDefaultActionValues returns an array of possible values for the DefaultAction const type.
+func PossibleDefaultActionValues() []DefaultAction {
+ return []DefaultAction{DefaultActionAllow, DefaultActionDeny}
+}
+
+// HTTPProtocol enumerates the values for http protocol.
+type HTTPProtocol string
+
+const (
+ // HTTPS ...
+ HTTPS HTTPProtocol = "https"
+ // Httpshttp ...
+ Httpshttp HTTPProtocol = "https,http"
+)
+
+// PossibleHTTPProtocolValues returns an array of possible values for the HTTPProtocol const type.
+func PossibleHTTPProtocolValues() []HTTPProtocol {
+ return []HTTPProtocol{HTTPS, Httpshttp}
+}
+
+// ImmutabilityPolicyState enumerates the values for immutability policy state.
+type ImmutabilityPolicyState string
+
+const (
+ // Locked ...
+ Locked ImmutabilityPolicyState = "Locked"
+ // Unlocked ...
+ Unlocked ImmutabilityPolicyState = "Unlocked"
+)
+
+// PossibleImmutabilityPolicyStateValues returns an array of possible values for the ImmutabilityPolicyState const type.
+func PossibleImmutabilityPolicyStateValues() []ImmutabilityPolicyState {
+ return []ImmutabilityPolicyState{Locked, Unlocked}
+}
+
+// ImmutabilityPolicyUpdateType enumerates the values for immutability policy update type.
+type ImmutabilityPolicyUpdateType string
+
+const (
+ // Extend ...
+ Extend ImmutabilityPolicyUpdateType = "extend"
+ // Lock ...
+ Lock ImmutabilityPolicyUpdateType = "lock"
+ // Put ...
+ Put ImmutabilityPolicyUpdateType = "put"
+)
+
+// PossibleImmutabilityPolicyUpdateTypeValues returns an array of possible values for the ImmutabilityPolicyUpdateType const type.
+func PossibleImmutabilityPolicyUpdateTypeValues() []ImmutabilityPolicyUpdateType {
+ return []ImmutabilityPolicyUpdateType{Extend, Lock, Put}
+}
+
+// KeyPermission enumerates the values for key permission.
+type KeyPermission string
+
+const (
+ // Full ...
+ Full KeyPermission = "Full"
+ // Read ...
+ Read KeyPermission = "Read"
+)
+
+// PossibleKeyPermissionValues returns an array of possible values for the KeyPermission const type.
+func PossibleKeyPermissionValues() []KeyPermission {
+ return []KeyPermission{Full, Read}
+}
+
+// KeySource enumerates the values for key source.
+type KeySource string
+
+const (
+ // MicrosoftKeyvault ...
+ MicrosoftKeyvault KeySource = "Microsoft.Keyvault"
+ // MicrosoftStorage ...
+ MicrosoftStorage KeySource = "Microsoft.Storage"
+)
+
+// PossibleKeySourceValues returns an array of possible values for the KeySource const type.
+func PossibleKeySourceValues() []KeySource {
+ return []KeySource{MicrosoftKeyvault, MicrosoftStorage}
+}
+
+// Kind enumerates the values for kind.
+type Kind string
+
+const (
+ // BlobStorage ...
+ BlobStorage Kind = "BlobStorage"
+ // Storage ...
+ Storage Kind = "Storage"
+ // StorageV2 ...
+ StorageV2 Kind = "StorageV2"
+)
+
+// PossibleKindValues returns an array of possible values for the Kind const type.
+func PossibleKindValues() []Kind {
+ return []Kind{BlobStorage, Storage, StorageV2}
+}
+
+// LeaseDuration enumerates the values for lease duration.
+type LeaseDuration string
+
+const (
+ // Fixed ...
+ Fixed LeaseDuration = "Fixed"
+ // Infinite ...
+ Infinite LeaseDuration = "Infinite"
+)
+
+// PossibleLeaseDurationValues returns an array of possible values for the LeaseDuration const type.
+func PossibleLeaseDurationValues() []LeaseDuration {
+ return []LeaseDuration{Fixed, Infinite}
+}
+
+// LeaseState enumerates the values for lease state.
+type LeaseState string
+
+const (
+ // LeaseStateAvailable ...
+ LeaseStateAvailable LeaseState = "Available"
+ // LeaseStateBreaking ...
+ LeaseStateBreaking LeaseState = "Breaking"
+ // LeaseStateBroken ...
+ LeaseStateBroken LeaseState = "Broken"
+ // LeaseStateExpired ...
+ LeaseStateExpired LeaseState = "Expired"
+ // LeaseStateLeased ...
+ LeaseStateLeased LeaseState = "Leased"
+)
+
+// PossibleLeaseStateValues returns an array of possible values for the LeaseState const type.
+func PossibleLeaseStateValues() []LeaseState {
+ return []LeaseState{LeaseStateAvailable, LeaseStateBreaking, LeaseStateBroken, LeaseStateExpired, LeaseStateLeased}
+}
+
+// LeaseStatus enumerates the values for lease status.
+type LeaseStatus string
+
+const (
+ // LeaseStatusLocked ...
+ LeaseStatusLocked LeaseStatus = "Locked"
+ // LeaseStatusUnlocked ...
+ LeaseStatusUnlocked LeaseStatus = "Unlocked"
+)
+
+// PossibleLeaseStatusValues returns an array of possible values for the LeaseStatus const type.
+func PossibleLeaseStatusValues() []LeaseStatus {
+ return []LeaseStatus{LeaseStatusLocked, LeaseStatusUnlocked}
+}
+
+// Permissions enumerates the values for permissions.
+type Permissions string
+
+const (
+ // A ...
+ A Permissions = "a"
+ // C ...
+ C Permissions = "c"
+ // D ...
+ D Permissions = "d"
+ // L ...
+ L Permissions = "l"
+ // P ...
+ P Permissions = "p"
+ // R ...
+ R Permissions = "r"
+ // U ...
+ U Permissions = "u"
+ // W ...
+ W Permissions = "w"
+)
+
+// PossiblePermissionsValues returns an array of possible values for the Permissions const type.
+func PossiblePermissionsValues() []Permissions {
+ return []Permissions{A, C, D, L, P, R, U, W}
+}
+
+// ProvisioningState enumerates the values for provisioning state.
+type ProvisioningState string
+
+const (
+ // Creating ...
+ Creating ProvisioningState = "Creating"
+ // ResolvingDNS ...
+ ResolvingDNS ProvisioningState = "ResolvingDNS"
+ // Succeeded ...
+ Succeeded ProvisioningState = "Succeeded"
+)
+
+// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
+func PossibleProvisioningStateValues() []ProvisioningState {
+ return []ProvisioningState{Creating, ResolvingDNS, Succeeded}
+}
+
+// PublicAccess enumerates the values for public access.
+type PublicAccess string
+
+const (
+ // PublicAccessBlob ...
+ PublicAccessBlob PublicAccess = "Blob"
+ // PublicAccessContainer ...
+ PublicAccessContainer PublicAccess = "Container"
+ // PublicAccessNone ...
+ PublicAccessNone PublicAccess = "None"
+)
+
+// PossiblePublicAccessValues returns an array of possible values for the PublicAccess const type.
+func PossiblePublicAccessValues() []PublicAccess {
+ return []PublicAccess{PublicAccessBlob, PublicAccessContainer, PublicAccessNone}
+}
+
+// Reason enumerates the values for reason.
+type Reason string
+
+const (
+ // AccountNameInvalid ...
+ AccountNameInvalid Reason = "AccountNameInvalid"
+ // AlreadyExists ...
+ AlreadyExists Reason = "AlreadyExists"
+)
+
+// PossibleReasonValues returns an array of possible values for the Reason const type.
+func PossibleReasonValues() []Reason {
+ return []Reason{AccountNameInvalid, AlreadyExists}
+}
+
+// ReasonCode enumerates the values for reason code.
+type ReasonCode string
+
+const (
+ // NotAvailableForSubscription ...
+ NotAvailableForSubscription ReasonCode = "NotAvailableForSubscription"
+ // QuotaID ...
+ QuotaID ReasonCode = "QuotaId"
+)
+
+// PossibleReasonCodeValues returns an array of possible values for the ReasonCode const type.
+func PossibleReasonCodeValues() []ReasonCode {
+ return []ReasonCode{NotAvailableForSubscription, QuotaID}
+}
+
+// Services enumerates the values for services.
+type Services string
+
+const (
+ // B ...
+ B Services = "b"
+ // F ...
+ F Services = "f"
+ // Q ...
+ Q Services = "q"
+ // T ...
+ T Services = "t"
+)
+
+// PossibleServicesValues returns an array of possible values for the Services const type.
+func PossibleServicesValues() []Services {
+ return []Services{B, F, Q, T}
+}
+
+// SignedResource enumerates the values for signed resource.
+type SignedResource string
+
+const (
+ // SignedResourceB ...
+ SignedResourceB SignedResource = "b"
+ // SignedResourceC ...
+ SignedResourceC SignedResource = "c"
+ // SignedResourceF ...
+ SignedResourceF SignedResource = "f"
+ // SignedResourceS ...
+ SignedResourceS SignedResource = "s"
+)
+
+// PossibleSignedResourceValues returns an array of possible values for the SignedResource const type.
+func PossibleSignedResourceValues() []SignedResource {
+ return []SignedResource{SignedResourceB, SignedResourceC, SignedResourceF, SignedResourceS}
+}
+
+// SignedResourceTypes enumerates the values for signed resource types.
+type SignedResourceTypes string
+
+const (
+ // SignedResourceTypesC ...
+ SignedResourceTypesC SignedResourceTypes = "c"
+ // SignedResourceTypesO ...
+ SignedResourceTypesO SignedResourceTypes = "o"
+ // SignedResourceTypesS ...
+ SignedResourceTypesS SignedResourceTypes = "s"
+)
+
+// PossibleSignedResourceTypesValues returns an array of possible values for the SignedResourceTypes const type.
+func PossibleSignedResourceTypesValues() []SignedResourceTypes {
+ return []SignedResourceTypes{SignedResourceTypesC, SignedResourceTypesO, SignedResourceTypesS}
+}
+
+// SkuName enumerates the values for sku name.
+type SkuName string
+
+const (
+ // PremiumLRS ...
+ PremiumLRS SkuName = "Premium_LRS"
+ // StandardGRS ...
+ StandardGRS SkuName = "Standard_GRS"
+ // StandardLRS ...
+ StandardLRS SkuName = "Standard_LRS"
+ // StandardRAGRS ...
+ StandardRAGRS SkuName = "Standard_RAGRS"
+ // StandardZRS ...
+ StandardZRS SkuName = "Standard_ZRS"
+)
+
+// PossibleSkuNameValues returns an array of possible values for the SkuName const type.
+func PossibleSkuNameValues() []SkuName {
+ return []SkuName{PremiumLRS, StandardGRS, StandardLRS, StandardRAGRS, StandardZRS}
+}
+
+// SkuTier enumerates the values for sku tier.
+type SkuTier string
+
+const (
+ // Premium ...
+ Premium SkuTier = "Premium"
+ // Standard ...
+ Standard SkuTier = "Standard"
+)
+
+// PossibleSkuTierValues returns an array of possible values for the SkuTier const type.
+func PossibleSkuTierValues() []SkuTier {
+ return []SkuTier{Premium, Standard}
+}
+
+// State enumerates the values for state.
+type State string
+
+const (
+ // StateDeprovisioning ...
+ StateDeprovisioning State = "deprovisioning"
+ // StateFailed ...
+ StateFailed State = "failed"
+ // StateNetworkSourceDeleted ...
+ StateNetworkSourceDeleted State = "networkSourceDeleted"
+ // StateProvisioning ...
+ StateProvisioning State = "provisioning"
+ // StateSucceeded ...
+ StateSucceeded State = "succeeded"
+)
+
+// PossibleStateValues returns an array of possible values for the State const type.
+func PossibleStateValues() []State {
+ return []State{StateDeprovisioning, StateFailed, StateNetworkSourceDeleted, StateProvisioning, StateSucceeded}
+}
+
+// UsageUnit enumerates the values for usage unit.
+type UsageUnit string
+
+const (
+ // Bytes ...
+ Bytes UsageUnit = "Bytes"
+ // BytesPerSecond ...
+ BytesPerSecond UsageUnit = "BytesPerSecond"
+ // Count ...
+ Count UsageUnit = "Count"
+ // CountsPerSecond ...
+ CountsPerSecond UsageUnit = "CountsPerSecond"
+ // Percent ...
+ Percent UsageUnit = "Percent"
+ // Seconds ...
+ Seconds UsageUnit = "Seconds"
+)
+
+// PossibleUsageUnitValues returns an array of possible values for the UsageUnit const type.
+func PossibleUsageUnitValues() []UsageUnit {
+ return []UsageUnit{Bytes, BytesPerSecond, Count, CountsPerSecond, Percent, Seconds}
+}
+
+// Account the storage account.
+type Account struct {
+ autorest.Response `json:"-"`
+ // Sku - Gets the SKU.
+ Sku *Sku `json:"sku,omitempty"`
+ // Kind - Gets the Kind. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'
+ Kind Kind `json:"kind,omitempty"`
+ // Identity - The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // AccountProperties - Properties of the storage account.
+ *AccountProperties `json:"properties,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+ // Location - The geo-location where the resource lives
+ Location *string `json:"location,omitempty"`
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Account.
+func (a Account) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if a.Sku != nil {
+ objectMap["sku"] = a.Sku
+ }
+ if a.Kind != "" {
+ objectMap["kind"] = a.Kind
+ }
+ if a.Identity != nil {
+ objectMap["identity"] = a.Identity
+ }
+ if a.AccountProperties != nil {
+ objectMap["properties"] = a.AccountProperties
+ }
+ if a.Tags != nil {
+ objectMap["tags"] = a.Tags
+ }
+ if a.Location != nil {
+ objectMap["location"] = a.Location
+ }
+ if a.ID != nil {
+ objectMap["id"] = a.ID
+ }
+ if a.Name != nil {
+ objectMap["name"] = a.Name
+ }
+ if a.Type != nil {
+ objectMap["type"] = a.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Account struct.
+func (a *Account) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ a.Sku = &sku
+ }
+ case "kind":
+ if v != nil {
+ var kind Kind
+ err = json.Unmarshal(*v, &kind)
+ if err != nil {
+ return err
+ }
+ a.Kind = kind
+ }
+ case "identity":
+ if v != nil {
+ var identity Identity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ a.Identity = &identity
+ }
+ case "properties":
+ if v != nil {
+ var accountProperties AccountProperties
+ err = json.Unmarshal(*v, &accountProperties)
+ if err != nil {
+ return err
+ }
+ a.AccountProperties = &accountProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ a.Tags = tags
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ a.Location = &location
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ a.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ a.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ a.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// AccountCheckNameAvailabilityParameters the parameters used to check the availabity of the storage account name.
+type AccountCheckNameAvailabilityParameters struct {
+ // Name - The storage account name.
+ Name *string `json:"name,omitempty"`
+ // Type - The type of resource, Microsoft.Storage/storageAccounts
+ Type *string `json:"type,omitempty"`
+}
+
+// AccountCreateParameters the parameters used when creating a storage account.
+type AccountCreateParameters struct {
+ // Sku - Required. Gets or sets the sku name.
+ Sku *Sku `json:"sku,omitempty"`
+ // Kind - Required. Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'
+ Kind Kind `json:"kind,omitempty"`
+ // Location - Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed.
+ Location *string `json:"location,omitempty"`
+ // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters.
+ Tags map[string]*string `json:"tags"`
+ // Identity - The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // AccountPropertiesCreateParameters - The parameters used to create the storage account.
+ *AccountPropertiesCreateParameters `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AccountCreateParameters.
+func (acp AccountCreateParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if acp.Sku != nil {
+ objectMap["sku"] = acp.Sku
+ }
+ if acp.Kind != "" {
+ objectMap["kind"] = acp.Kind
+ }
+ if acp.Location != nil {
+ objectMap["location"] = acp.Location
+ }
+ if acp.Tags != nil {
+ objectMap["tags"] = acp.Tags
+ }
+ if acp.Identity != nil {
+ objectMap["identity"] = acp.Identity
+ }
+ if acp.AccountPropertiesCreateParameters != nil {
+ objectMap["properties"] = acp.AccountPropertiesCreateParameters
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AccountCreateParameters struct.
+func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ acp.Sku = &sku
+ }
+ case "kind":
+ if v != nil {
+ var kind Kind
+ err = json.Unmarshal(*v, &kind)
+ if err != nil {
+ return err
+ }
+ acp.Kind = kind
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ acp.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ acp.Tags = tags
+ }
+ case "identity":
+ if v != nil {
+ var identity Identity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ acp.Identity = &identity
+ }
+ case "properties":
+ if v != nil {
+ var accountPropertiesCreateParameters AccountPropertiesCreateParameters
+ err = json.Unmarshal(*v, &accountPropertiesCreateParameters)
+ if err != nil {
+ return err
+ }
+ acp.AccountPropertiesCreateParameters = &accountPropertiesCreateParameters
+ }
+ }
+ }
+
+ return nil
+}
+
+// AccountKey an access key for the storage account.
+type AccountKey struct {
+ // KeyName - Name of the key.
+ KeyName *string `json:"keyName,omitempty"`
+ // Value - Base 64-encoded value of the key.
+ Value *string `json:"value,omitempty"`
+ // Permissions - Permissions for the key -- read-only or full permissions. Possible values include: 'Read', 'Full'
+ Permissions KeyPermission `json:"permissions,omitempty"`
+}
+
+// AccountListKeysResult the response from the ListKeys operation.
+type AccountListKeysResult struct {
+ autorest.Response `json:"-"`
+ // Keys - Gets the list of storage account keys and their properties for the specified storage account.
+ Keys *[]AccountKey `json:"keys,omitempty"`
+}
+
+// AccountListResult the response from the List Storage Accounts operation.
+type AccountListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets the list of storage accounts and their properties.
+ Value *[]Account `json:"value,omitempty"`
+}
+
+// AccountManagementPolicies the Get Storage Account ManagementPolicies operation response.
+type AccountManagementPolicies struct {
+ autorest.Response `json:"-"`
+ // AccountManagementPoliciesRulesProperty - Returns the Storage Account Data Policies Rules.
+ *AccountManagementPoliciesRulesProperty `json:"properties,omitempty"`
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AccountManagementPolicies.
+func (amp AccountManagementPolicies) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if amp.AccountManagementPoliciesRulesProperty != nil {
+ objectMap["properties"] = amp.AccountManagementPoliciesRulesProperty
+ }
+ if amp.ID != nil {
+ objectMap["id"] = amp.ID
+ }
+ if amp.Name != nil {
+ objectMap["name"] = amp.Name
+ }
+ if amp.Type != nil {
+ objectMap["type"] = amp.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AccountManagementPolicies struct.
+func (amp *AccountManagementPolicies) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var accountManagementPoliciesRulesProperty AccountManagementPoliciesRulesProperty
+ err = json.Unmarshal(*v, &accountManagementPoliciesRulesProperty)
+ if err != nil {
+ return err
+ }
+ amp.AccountManagementPoliciesRulesProperty = &accountManagementPoliciesRulesProperty
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ amp.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ amp.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ amp.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// AccountManagementPoliciesRulesProperty the Storage Account Data Policies properties.
+type AccountManagementPoliciesRulesProperty struct {
+ // LastModifiedTime - Returns the date and time the ManagementPolicies was last modified.
+ LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
+ // Policy - The Storage Account ManagementPolicies Rules, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
+ Policy interface{} `json:"policy,omitempty"`
+}
+
+// AccountProperties properties of the storage account.
+type AccountProperties struct {
+ // ProvisioningState - Gets the status of the storage account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // PrimaryEndpoints - Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint.
+ PrimaryEndpoints *Endpoints `json:"primaryEndpoints,omitempty"`
+ // PrimaryLocation - Gets the location of the primary data center for the storage account.
+ PrimaryLocation *string `json:"primaryLocation,omitempty"`
+ // StatusOfPrimary - Gets the status indicating whether the primary location of the storage account is available or unavailable. Possible values include: 'Available', 'Unavailable'
+ StatusOfPrimary AccountStatus `json:"statusOfPrimary,omitempty"`
+ // LastGeoFailoverTime - Gets the timestamp of the most recent instance of a failover to the secondary location. Only the most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only available if the accountType is Standard_GRS or Standard_RAGRS.
+ LastGeoFailoverTime *date.Time `json:"lastGeoFailoverTime,omitempty"`
+ // SecondaryLocation - Gets the location of the geo-replicated secondary for the storage account. Only available if the accountType is Standard_GRS or Standard_RAGRS.
+ SecondaryLocation *string `json:"secondaryLocation,omitempty"`
+ // StatusOfSecondary - Gets the status indicating whether the secondary location of the storage account is available or unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS. Possible values include: 'Available', 'Unavailable'
+ StatusOfSecondary AccountStatus `json:"statusOfSecondary,omitempty"`
+ // CreationTime - Gets the creation date and time of the storage account in UTC.
+ CreationTime *date.Time `json:"creationTime,omitempty"`
+ // CustomDomain - Gets the custom domain the user assigned to this storage account.
+ CustomDomain *CustomDomain `json:"customDomain,omitempty"`
+ // SecondaryEndpoints - Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location of the storage account. Only available if the SKU name is Standard_RAGRS.
+ SecondaryEndpoints *Endpoints `json:"secondaryEndpoints,omitempty"`
+ // Encryption - Gets the encryption settings on the account. If unspecified, the account is unencrypted.
+ Encryption *Encryption `json:"encryption,omitempty"`
+ // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'
+ AccessTier AccessTier `json:"accessTier,omitempty"`
+ // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true.
+ EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`
+ // NetworkRuleSet - Network rule set
+ NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"`
+}
+
+// AccountPropertiesCreateParameters the parameters used to create the storage account.
+type AccountPropertiesCreateParameters struct {
+ // CustomDomain - User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property.
+ CustomDomain *CustomDomain `json:"customDomain,omitempty"`
+ // Encryption - Provides the encryption settings on the account. If left unspecified the account encryption settings will remain the same. The default setting is unencrypted.
+ Encryption *Encryption `json:"encryption,omitempty"`
+ // NetworkRuleSet - Network rule set
+ NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"`
+ // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'
+ AccessTier AccessTier `json:"accessTier,omitempty"`
+ // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true.
+ EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`
+}
+
+// AccountPropertiesUpdateParameters the parameters used when updating a storage account.
+type AccountPropertiesUpdateParameters struct {
+ // CustomDomain - Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property.
+ CustomDomain *CustomDomain `json:"customDomain,omitempty"`
+ // Encryption - Provides the encryption settings on the account. The default setting is unencrypted.
+ Encryption *Encryption `json:"encryption,omitempty"`
+ // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'
+ AccessTier AccessTier `json:"accessTier,omitempty"`
+ // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true.
+ EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`
+ // NetworkRuleSet - Network rule set
+ NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"`
+}
+
+// AccountRegenerateKeyParameters the parameters used to regenerate the storage account key.
+type AccountRegenerateKeyParameters struct {
+ // KeyName - The name of storage keys that want to be regenerated, possible vaules are key1, key2.
+ KeyName *string `json:"keyName,omitempty"`
+}
+
+// AccountSasParameters the parameters to list SAS credentials of a storage account.
+type AccountSasParameters struct {
+ // Services - The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). Possible values include: 'B', 'Q', 'T', 'F'
+ Services Services `json:"signedServices,omitempty"`
+ // ResourceTypes - The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files. Possible values include: 'SignedResourceTypesS', 'SignedResourceTypesC', 'SignedResourceTypesO'
+ ResourceTypes SignedResourceTypes `json:"signedResourceTypes,omitempty"`
+ // Permissions - The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'R', 'D', 'W', 'L', 'A', 'C', 'U', 'P'
+ Permissions Permissions `json:"signedPermission,omitempty"`
+ // IPAddressOrRange - An IP address or a range of IP addresses from which to accept requests.
+ IPAddressOrRange *string `json:"signedIp,omitempty"`
+ // Protocols - The protocol permitted for a request made with the account SAS. Possible values include: 'Httpshttp', 'HTTPS'
+ Protocols HTTPProtocol `json:"signedProtocol,omitempty"`
+ // SharedAccessStartTime - The time at which the SAS becomes valid.
+ SharedAccessStartTime *date.Time `json:"signedStart,omitempty"`
+ // SharedAccessExpiryTime - The time at which the shared access signature becomes invalid.
+ SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"`
+ // KeyToSign - The key to sign the account SAS token with.
+ KeyToSign *string `json:"keyToSign,omitempty"`
+}
+
+// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type AccountsCreateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateResponder(a.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// AccountUpdateParameters the parameters that can be provided when updating the storage account properties.
+type AccountUpdateParameters struct {
+ // Sku - Gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS or Premium_LRS, nor can accounts of those sku names be updated to any other value.
+ Sku *Sku `json:"sku,omitempty"`
+ // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters.
+ Tags map[string]*string `json:"tags"`
+ // Identity - The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // AccountPropertiesUpdateParameters - The parameters used when updating a storage account.
+ *AccountPropertiesUpdateParameters `json:"properties,omitempty"`
+ // Kind - Optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'
+ Kind Kind `json:"kind,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AccountUpdateParameters.
+func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if aup.Sku != nil {
+ objectMap["sku"] = aup.Sku
+ }
+ if aup.Tags != nil {
+ objectMap["tags"] = aup.Tags
+ }
+ if aup.Identity != nil {
+ objectMap["identity"] = aup.Identity
+ }
+ if aup.AccountPropertiesUpdateParameters != nil {
+ objectMap["properties"] = aup.AccountPropertiesUpdateParameters
+ }
+ if aup.Kind != "" {
+ objectMap["kind"] = aup.Kind
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AccountUpdateParameters struct.
+func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ aup.Sku = &sku
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ aup.Tags = tags
+ }
+ case "identity":
+ if v != nil {
+ var identity Identity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ aup.Identity = &identity
+ }
+ case "properties":
+ if v != nil {
+ var accountPropertiesUpdateParameters AccountPropertiesUpdateParameters
+ err = json.Unmarshal(*v, &accountPropertiesUpdateParameters)
+ if err != nil {
+ return err
+ }
+ aup.AccountPropertiesUpdateParameters = &accountPropertiesUpdateParameters
+ }
+ case "kind":
+ if v != nil {
+ var kind Kind
+ err = json.Unmarshal(*v, &kind)
+ if err != nil {
+ return err
+ }
+ aup.Kind = kind
+ }
+ }
+ }
+
+ return nil
+}
+
+// AzureEntityResource the resource model definition for a Azure Resource Manager resource with an etag.
+type AzureEntityResource struct {
+ // Etag - Resource Etag.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// BlobContainer properties of the blob container, including Id, resource name, resource type, Etag.
+type BlobContainer struct {
+ autorest.Response `json:"-"`
+ // ContainerProperties - Properties of the blob container.
+ *ContainerProperties `json:"properties,omitempty"`
+ // Etag - Resource Etag.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for BlobContainer.
+func (bc BlobContainer) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if bc.ContainerProperties != nil {
+ objectMap["properties"] = bc.ContainerProperties
+ }
+ if bc.Etag != nil {
+ objectMap["etag"] = bc.Etag
+ }
+ if bc.ID != nil {
+ objectMap["id"] = bc.ID
+ }
+ if bc.Name != nil {
+ objectMap["name"] = bc.Name
+ }
+ if bc.Type != nil {
+ objectMap["type"] = bc.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for BlobContainer struct.
+func (bc *BlobContainer) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var containerProperties ContainerProperties
+ err = json.Unmarshal(*v, &containerProperties)
+ if err != nil {
+ return err
+ }
+ bc.ContainerProperties = &containerProperties
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ bc.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ bc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ bc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ bc.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// CheckNameAvailabilityResult the CheckNameAvailability operation response.
+type CheckNameAvailabilityResult struct {
+ autorest.Response `json:"-"`
+ // NameAvailable - Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used.
+ NameAvailable *bool `json:"nameAvailable,omitempty"`
+ // Reason - Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false. Possible values include: 'AccountNameInvalid', 'AlreadyExists'
+ Reason Reason `json:"reason,omitempty"`
+ // Message - Gets an error message explaining the Reason value in more detail.
+ Message *string `json:"message,omitempty"`
+}
+
+// ContainerProperties the properties of a container.
+type ContainerProperties struct {
+ // PublicAccess - Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'PublicAccessContainer', 'PublicAccessBlob', 'PublicAccessNone'
+ PublicAccess PublicAccess `json:"publicAccess,omitempty"`
+ // LastModifiedTime - Returns the date and time the container was last modified.
+ LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
+ // LeaseStatus - The lease status of the container. Possible values include: 'LeaseStatusLocked', 'LeaseStatusUnlocked'
+ LeaseStatus LeaseStatus `json:"leaseStatus,omitempty"`
+ // LeaseState - Lease state of the container. Possible values include: 'LeaseStateAvailable', 'LeaseStateLeased', 'LeaseStateExpired', 'LeaseStateBreaking', 'LeaseStateBroken'
+ LeaseState LeaseState `json:"leaseState,omitempty"`
+ // LeaseDuration - Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased. Possible values include: 'Infinite', 'Fixed'
+ LeaseDuration LeaseDuration `json:"leaseDuration,omitempty"`
+ // Metadata - A name-value pair to associate with the container as metadata.
+ Metadata map[string]*string `json:"metadata"`
+ // ImmutabilityPolicy - The ImmutabilityPolicy property of the container.
+ ImmutabilityPolicy *ImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"`
+ // LegalHold - The LegalHold property of the container.
+ LegalHold *LegalHoldProperties `json:"legalHold,omitempty"`
+ // HasLegalHold - The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
+ HasLegalHold *bool `json:"hasLegalHold,omitempty"`
+ // HasImmutabilityPolicy - The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container.
+ HasImmutabilityPolicy *bool `json:"hasImmutabilityPolicy,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ContainerProperties.
+func (cp ContainerProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cp.PublicAccess != "" {
+ objectMap["publicAccess"] = cp.PublicAccess
+ }
+ if cp.LastModifiedTime != nil {
+ objectMap["lastModifiedTime"] = cp.LastModifiedTime
+ }
+ if cp.LeaseStatus != "" {
+ objectMap["leaseStatus"] = cp.LeaseStatus
+ }
+ if cp.LeaseState != "" {
+ objectMap["leaseState"] = cp.LeaseState
+ }
+ if cp.LeaseDuration != "" {
+ objectMap["leaseDuration"] = cp.LeaseDuration
+ }
+ if cp.Metadata != nil {
+ objectMap["metadata"] = cp.Metadata
+ }
+ if cp.ImmutabilityPolicy != nil {
+ objectMap["immutabilityPolicy"] = cp.ImmutabilityPolicy
+ }
+ if cp.LegalHold != nil {
+ objectMap["legalHold"] = cp.LegalHold
+ }
+ if cp.HasLegalHold != nil {
+ objectMap["hasLegalHold"] = cp.HasLegalHold
+ }
+ if cp.HasImmutabilityPolicy != nil {
+ objectMap["hasImmutabilityPolicy"] = cp.HasImmutabilityPolicy
+ }
+ return json.Marshal(objectMap)
+}
+
+// CustomDomain the custom domain assigned to this storage account. This can be set via Update.
+type CustomDomain struct {
+ // Name - Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source.
+ Name *string `json:"name,omitempty"`
+ // UseSubDomain - Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates.
+ UseSubDomain *bool `json:"useSubDomain,omitempty"`
+}
+
+// Dimension dimension of blobs, possiblly be blob type or access tier.
+type Dimension struct {
+ // Name - Display name of dimension.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - Display name of dimension.
+ DisplayName *string `json:"displayName,omitempty"`
+}
+
+// Encryption the encryption settings on the storage account.
+type Encryption struct {
+ // Services - List of services which support encryption.
+ Services *EncryptionServices `json:"services,omitempty"`
+ // KeySource - The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. Possible values include: 'MicrosoftStorage', 'MicrosoftKeyvault'
+ KeySource KeySource `json:"keySource,omitempty"`
+ // KeyVaultProperties - Properties provided by key vault.
+ KeyVaultProperties *KeyVaultProperties `json:"keyvaultproperties,omitempty"`
+}
+
+// EncryptionService a service that allows server-side encryption to be used.
+type EncryptionService struct {
+ // Enabled - A boolean indicating whether or not the service encrypts the data as it is stored.
+ Enabled *bool `json:"enabled,omitempty"`
+ // LastEnabledTime - Gets a rough estimate of the date/time when the encryption was last enabled by the user. Only returned when encryption is enabled. There might be some unencrypted blobs which were written after this time, as it is just a rough estimate.
+ LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"`
+}
+
+// EncryptionServices a list of services that support encryption.
+type EncryptionServices struct {
+ // Blob - The encryption function of the blob storage service.
+ Blob *EncryptionService `json:"blob,omitempty"`
+ // File - The encryption function of the file storage service.
+ File *EncryptionService `json:"file,omitempty"`
+ // Table - The encryption function of the table storage service.
+ Table *EncryptionService `json:"table,omitempty"`
+ // Queue - The encryption function of the queue storage service.
+ Queue *EncryptionService `json:"queue,omitempty"`
+}
+
+// Endpoints the URIs that are used to perform a retrieval of a public blob, queue, or table object.
+type Endpoints struct {
+ // Blob - Gets the blob endpoint.
+ Blob *string `json:"blob,omitempty"`
+ // Queue - Gets the queue endpoint.
+ Queue *string `json:"queue,omitempty"`
+ // Table - Gets the table endpoint.
+ Table *string `json:"table,omitempty"`
+ // File - Gets the file endpoint.
+ File *string `json:"file,omitempty"`
+}
+
+// Identity identity for the resource.
+type Identity struct {
+ // PrincipalID - The principal ID of resource identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - The tenant ID of resource.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The identity type.
+ Type *string `json:"type,omitempty"`
+}
+
+// ImmutabilityPolicy the ImmutabilityPolicy property of a blob container, including Id, resource name, resource
+// type, Etag.
+type ImmutabilityPolicy struct {
+ autorest.Response `json:"-"`
+ // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container.
+ *ImmutabilityPolicyProperty `json:"properties,omitempty"`
+ // Etag - Resource Etag.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ImmutabilityPolicy.
+func (IP ImmutabilityPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if IP.ImmutabilityPolicyProperty != nil {
+ objectMap["properties"] = IP.ImmutabilityPolicyProperty
+ }
+ if IP.Etag != nil {
+ objectMap["etag"] = IP.Etag
+ }
+ if IP.ID != nil {
+ objectMap["id"] = IP.ID
+ }
+ if IP.Name != nil {
+ objectMap["name"] = IP.Name
+ }
+ if IP.Type != nil {
+ objectMap["type"] = IP.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ImmutabilityPolicy struct.
+func (IP *ImmutabilityPolicy) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var immutabilityPolicyProperty ImmutabilityPolicyProperty
+ err = json.Unmarshal(*v, &immutabilityPolicyProperty)
+ if err != nil {
+ return err
+ }
+ IP.ImmutabilityPolicyProperty = &immutabilityPolicyProperty
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ IP.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ IP.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ IP.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ IP.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// ImmutabilityPolicyProperties the properties of an ImmutabilityPolicy of a blob container.
+type ImmutabilityPolicyProperties struct {
+ // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container.
+ *ImmutabilityPolicyProperty `json:"properties,omitempty"`
+ // Etag - ImmutabilityPolicy Etag.
+ Etag *string `json:"etag,omitempty"`
+ // UpdateHistory - The ImmutabilityPolicy update history of the blob container.
+ UpdateHistory *[]UpdateHistoryProperty `json:"updateHistory,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ImmutabilityPolicyProperties.
+func (ipp ImmutabilityPolicyProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ipp.ImmutabilityPolicyProperty != nil {
+ objectMap["properties"] = ipp.ImmutabilityPolicyProperty
+ }
+ if ipp.Etag != nil {
+ objectMap["etag"] = ipp.Etag
+ }
+ if ipp.UpdateHistory != nil {
+ objectMap["updateHistory"] = ipp.UpdateHistory
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ImmutabilityPolicyProperties struct.
+func (ipp *ImmutabilityPolicyProperties) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var immutabilityPolicyProperty ImmutabilityPolicyProperty
+ err = json.Unmarshal(*v, &immutabilityPolicyProperty)
+ if err != nil {
+ return err
+ }
+ ipp.ImmutabilityPolicyProperty = &immutabilityPolicyProperty
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ ipp.Etag = &etag
+ }
+ case "updateHistory":
+ if v != nil {
+ var updateHistory []UpdateHistoryProperty
+ err = json.Unmarshal(*v, &updateHistory)
+ if err != nil {
+ return err
+ }
+ ipp.UpdateHistory = &updateHistory
+ }
+ }
+ }
+
+ return nil
+}
+
+// ImmutabilityPolicyProperty the properties of an ImmutabilityPolicy of a blob container.
+type ImmutabilityPolicyProperty struct {
+ // ImmutabilityPeriodSinceCreationInDays - The immutability period for the blobs in the container since the policy creation, in days.
+ ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"`
+ // State - The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked'
+ State ImmutabilityPolicyState `json:"state,omitempty"`
+}
+
+// IPRule IP rule with specific IP or IP range in CIDR format.
+type IPRule struct {
+ // IPAddressOrRange - Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
+ IPAddressOrRange *string `json:"value,omitempty"`
+ // Action - The action of IP ACL rule. Possible values include: 'Allow'
+ Action Action `json:"action,omitempty"`
+}
+
+// KeyVaultProperties properties of key vault.
+type KeyVaultProperties struct {
+ // KeyName - The name of KeyVault key.
+ KeyName *string `json:"keyname,omitempty"`
+ // KeyVersion - The version of KeyVault key.
+ KeyVersion *string `json:"keyversion,omitempty"`
+ // KeyVaultURI - The Uri of KeyVault.
+ KeyVaultURI *string `json:"keyvaulturi,omitempty"`
+}
+
+// LegalHold the LegalHold property of a blob container.
+type LegalHold struct {
+ autorest.Response `json:"-"`
+ // HasLegalHold - The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
+ HasLegalHold *bool `json:"hasLegalHold,omitempty"`
+ // Tags - Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.
+ Tags *[]string `json:"tags,omitempty"`
+}
+
+// LegalHoldProperties the LegalHold property of a blob container.
+type LegalHoldProperties struct {
+ // HasLegalHold - The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
+ HasLegalHold *bool `json:"hasLegalHold,omitempty"`
+ // Tags - The list of LegalHold tags of a blob container.
+ Tags *[]TagProperty `json:"tags,omitempty"`
+}
+
+// ListAccountSasResponse the List SAS credentials operation response.
+type ListAccountSasResponse struct {
+ autorest.Response `json:"-"`
+ // AccountSasToken - List SAS credentials of storage account.
+ AccountSasToken *string `json:"accountSasToken,omitempty"`
+}
+
+// ListContainerItem the blob container properties be listed out.
+type ListContainerItem struct {
+ // ContainerProperties - The blob container properties be listed out.
+ *ContainerProperties `json:"properties,omitempty"`
+ // Etag - Resource Etag.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ListContainerItem.
+func (lci ListContainerItem) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lci.ContainerProperties != nil {
+ objectMap["properties"] = lci.ContainerProperties
+ }
+ if lci.Etag != nil {
+ objectMap["etag"] = lci.Etag
+ }
+ if lci.ID != nil {
+ objectMap["id"] = lci.ID
+ }
+ if lci.Name != nil {
+ objectMap["name"] = lci.Name
+ }
+ if lci.Type != nil {
+ objectMap["type"] = lci.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ListContainerItem struct.
+func (lci *ListContainerItem) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var containerProperties ContainerProperties
+ err = json.Unmarshal(*v, &containerProperties)
+ if err != nil {
+ return err
+ }
+ lci.ContainerProperties = &containerProperties
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ lci.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ lci.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ lci.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ lci.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// ListContainerItems the list of blob containers.
+type ListContainerItems struct {
+ autorest.Response `json:"-"`
+ // Value - The list of blob containers.
+ Value *[]ListContainerItem `json:"value,omitempty"`
+}
+
+// ListServiceSasResponse the List service SAS credentials operation response.
+type ListServiceSasResponse struct {
+ autorest.Response `json:"-"`
+ // ServiceSasToken - List service SAS credentials of speicific resource.
+ ServiceSasToken *string `json:"serviceSasToken,omitempty"`
+}
+
+// ManagementPoliciesRules the Storage Account ManagementPolicies Rules, in JSON format. See more details in:
+// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
+type ManagementPoliciesRules struct {
+ // Policy - The Storage Account ManagementPolicies Rules, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
+ Policy interface{} `json:"policy,omitempty"`
+}
+
+// ManagementPoliciesRulesSetParameter the Storage Account ManagementPolicies Rules, in JSON format. See more
+// details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
+type ManagementPoliciesRulesSetParameter struct {
+ // ManagementPoliciesRules - The Storage Account ManagementPolicies Rules, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
+ *ManagementPoliciesRules `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagementPoliciesRulesSetParameter.
+func (mprsp ManagementPoliciesRulesSetParameter) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mprsp.ManagementPoliciesRules != nil {
+ objectMap["properties"] = mprsp.ManagementPoliciesRules
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ManagementPoliciesRulesSetParameter struct.
+func (mprsp *ManagementPoliciesRulesSetParameter) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var managementPoliciesRules ManagementPoliciesRules
+ err = json.Unmarshal(*v, &managementPoliciesRules)
+ if err != nil {
+ return err
+ }
+ mprsp.ManagementPoliciesRules = &managementPoliciesRules
+ }
+ }
+ }
+
+ return nil
+}
+
+// MetricSpecification metric specification of operation.
+type MetricSpecification struct {
+ // Name - Name of metric specification.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - Display name of metric specification.
+ DisplayName *string `json:"displayName,omitempty"`
+ // DisplayDescription - Display description of metric specification.
+ DisplayDescription *string `json:"displayDescription,omitempty"`
+ // Unit - Unit could be Bytes or Count.
+ Unit *string `json:"unit,omitempty"`
+ // Dimensions - Dimensions of blobs, including blob type and access tier.
+ Dimensions *[]Dimension `json:"dimensions,omitempty"`
+ // AggregationType - Aggregation type could be Average.
+ AggregationType *string `json:"aggregationType,omitempty"`
+ // FillGapWithZero - The property to decide fill gap with zero or not.
+ FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
+ // Category - The category this metric specification belong to, could be Capacity.
+ Category *string `json:"category,omitempty"`
+ // ResourceIDDimensionNameOverride - Account Resource Id.
+ ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
+}
+
+// NetworkRuleSet network rule set
+type NetworkRuleSet struct {
+ // Bypass - Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. Possible values include: 'None', 'Logging', 'Metrics', 'AzureServices'
+ Bypass Bypass `json:"bypass,omitempty"`
+ // VirtualNetworkRules - Sets the virtual network rules
+ VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
+ // IPRules - Sets the IP ACL rules
+ IPRules *[]IPRule `json:"ipRules,omitempty"`
+ // DefaultAction - Specifies the default action of allow or deny when no other rules match. Possible values include: 'DefaultActionAllow', 'DefaultActionDeny'
+ DefaultAction DefaultAction `json:"defaultAction,omitempty"`
+}
+
+// Operation storage REST API operation definition.
+type Operation struct {
+ // Name - Operation name: {provider}/{resource}/{operation}
+ Name *string `json:"name,omitempty"`
+ // Display - Display metadata associated with the operation.
+ Display *OperationDisplay `json:"display,omitempty"`
+ // Origin - The origin of operations.
+ Origin *string `json:"origin,omitempty"`
+ // OperationProperties - Properties of operation, include metric specifications.
+ *OperationProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Operation.
+func (o Operation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if o.Name != nil {
+ objectMap["name"] = o.Name
+ }
+ if o.Display != nil {
+ objectMap["display"] = o.Display
+ }
+ if o.Origin != nil {
+ objectMap["origin"] = o.Origin
+ }
+ if o.OperationProperties != nil {
+ objectMap["properties"] = o.OperationProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Operation struct.
+func (o *Operation) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ o.Name = &name
+ }
+ case "display":
+ if v != nil {
+ var display OperationDisplay
+ err = json.Unmarshal(*v, &display)
+ if err != nil {
+ return err
+ }
+ o.Display = &display
+ }
+ case "origin":
+ if v != nil {
+ var origin string
+ err = json.Unmarshal(*v, &origin)
+ if err != nil {
+ return err
+ }
+ o.Origin = &origin
+ }
+ case "properties":
+ if v != nil {
+ var operationProperties OperationProperties
+ err = json.Unmarshal(*v, &operationProperties)
+ if err != nil {
+ return err
+ }
+ o.OperationProperties = &operationProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// OperationDisplay display metadata associated with the operation.
+type OperationDisplay struct {
+ // Provider - Service provider: Microsoft Storage.
+ Provider *string `json:"provider,omitempty"`
+ // Resource - Resource on which the operation is performed etc.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - Type of operation: get, read, delete, etc.
+ Operation *string `json:"operation,omitempty"`
+}
+
+// OperationListResult 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 - List of Storage operations supported by the Storage resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+}
+
+// OperationProperties properties of operation, include metric specifications.
+type OperationProperties struct {
+ // ServiceSpecification - One property of operation, include metric specifications.
+ ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"`
+}
+
+// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than
+// required location and tags
+type ProxyResource struct {
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// Resource ...
+type Resource struct {
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// Restriction the restriction because of which SKU cannot be used.
+type Restriction struct {
+ // Type - The type of restrictions. As of now only possible value for this is location.
+ Type *string `json:"type,omitempty"`
+ // Values - The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
+ Values *[]string `json:"values,omitempty"`
+ // ReasonCode - The reason for the restriction. As of now this can be “QuotaId” or “NotAvailableForSubscription”. Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The “NotAvailableForSubscription” is related to capacity at DC. Possible values include: 'QuotaID', 'NotAvailableForSubscription'
+ ReasonCode ReasonCode `json:"reasonCode,omitempty"`
+}
+
+// ServiceSasParameters the parameters to list service SAS credentials of a speicific resource.
+type ServiceSasParameters struct {
+ // CanonicalizedResource - The canonical path to the signed resource.
+ CanonicalizedResource *string `json:"canonicalizedResource,omitempty"`
+ // Resource - The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s). Possible values include: 'SignedResourceB', 'SignedResourceC', 'SignedResourceF', 'SignedResourceS'
+ Resource SignedResource `json:"signedResource,omitempty"`
+ // Permissions - The signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'R', 'D', 'W', 'L', 'A', 'C', 'U', 'P'
+ Permissions Permissions `json:"signedPermission,omitempty"`
+ // IPAddressOrRange - An IP address or a range of IP addresses from which to accept requests.
+ IPAddressOrRange *string `json:"signedIp,omitempty"`
+ // Protocols - The protocol permitted for a request made with the account SAS. Possible values include: 'Httpshttp', 'HTTPS'
+ Protocols HTTPProtocol `json:"signedProtocol,omitempty"`
+ // SharedAccessStartTime - The time at which the SAS becomes valid.
+ SharedAccessStartTime *date.Time `json:"signedStart,omitempty"`
+ // SharedAccessExpiryTime - The time at which the shared access signature becomes invalid.
+ SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"`
+ // Identifier - A unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table.
+ Identifier *string `json:"signedIdentifier,omitempty"`
+ // PartitionKeyStart - The start of partition key.
+ PartitionKeyStart *string `json:"startPk,omitempty"`
+ // PartitionKeyEnd - The end of partition key.
+ PartitionKeyEnd *string `json:"endPk,omitempty"`
+ // RowKeyStart - The start of row key.
+ RowKeyStart *string `json:"startRk,omitempty"`
+ // RowKeyEnd - The end of row key.
+ RowKeyEnd *string `json:"endRk,omitempty"`
+ // KeyToSign - The key to sign the account SAS token with.
+ KeyToSign *string `json:"keyToSign,omitempty"`
+ // CacheControl - The response header override for cache control.
+ CacheControl *string `json:"rscc,omitempty"`
+ // ContentDisposition - The response header override for content disposition.
+ ContentDisposition *string `json:"rscd,omitempty"`
+ // ContentEncoding - The response header override for content encoding.
+ ContentEncoding *string `json:"rsce,omitempty"`
+ // ContentLanguage - The response header override for content language.
+ ContentLanguage *string `json:"rscl,omitempty"`
+ // ContentType - The response header override for content type.
+ ContentType *string `json:"rsct,omitempty"`
+}
+
+// ServiceSpecification one property of operation, include metric specifications.
+type ServiceSpecification struct {
+ // MetricSpecifications - Metric specifications of operation.
+ MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
+}
+
+// Sku the SKU of the storage account.
+type Sku struct {
+ // Name - Gets or sets the sku name. Required for account creation; optional for update. Note that in older versions, sku name was called accountType. Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS'
+ Name SkuName `json:"name,omitempty"`
+ // Tier - Gets the sku tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium'
+ Tier SkuTier `json:"tier,omitempty"`
+ // ResourceType - The type of the resource, usually it is 'storageAccounts'.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // Kind - Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'
+ Kind Kind `json:"kind,omitempty"`
+ // Locations - The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.).
+ Locations *[]string `json:"locations,omitempty"`
+ // Capabilities - The capability information in the specified sku, including file encryption, network acls, change notification, etc.
+ Capabilities *[]SKUCapability `json:"capabilities,omitempty"`
+ // Restrictions - The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
+ Restrictions *[]Restriction `json:"restrictions,omitempty"`
+}
+
+// SKUCapability the capability information in the specified sku, including file encryption, network acls, change
+// notification, etc.
+type SKUCapability struct {
+ // Name - The name of capability, The capability information in the specified sku, including file encryption, network acls, change notification, etc.
+ Name *string `json:"name,omitempty"`
+ // Value - A string value to indicate states of given capability. Possibly 'true' or 'false'.
+ Value *string `json:"value,omitempty"`
+}
+
+// SkuListResult the response from the List Storage SKUs operation.
+type SkuListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Get the list result of storage SKUs and their properties.
+ Value *[]Sku `json:"value,omitempty"`
+}
+
+// TagProperty a tag of the LegalHold of a blob container.
+type TagProperty struct {
+ // Tag - The tag value.
+ Tag *string `json:"tag,omitempty"`
+ // Timestamp - Returns the date and time the tag was added.
+ Timestamp *date.Time `json:"timestamp,omitempty"`
+ // ObjectIdentifier - Returns the Object ID of the user who added the tag.
+ ObjectIdentifier *string `json:"objectIdentifier,omitempty"`
+ // TenantID - Returns the Tenant ID that issued the token for the user who added the tag.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Upn - Returns the User Principal Name of the user who added the tag.
+ Upn *string `json:"upn,omitempty"`
+}
+
+// TrackedResource the resource model definition for a ARM tracked top level resource
+type TrackedResource struct {
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+ // Location - The geo-location where the resource lives
+ Location *string `json:"location,omitempty"`
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for TrackedResource.
+func (tr TrackedResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if tr.Tags != nil {
+ objectMap["tags"] = tr.Tags
+ }
+ if tr.Location != nil {
+ objectMap["location"] = tr.Location
+ }
+ if tr.ID != nil {
+ objectMap["id"] = tr.ID
+ }
+ if tr.Name != nil {
+ objectMap["name"] = tr.Name
+ }
+ if tr.Type != nil {
+ objectMap["type"] = tr.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UpdateHistoryProperty an update history of the ImmutabilityPolicy of a blob container.
+type UpdateHistoryProperty struct {
+ // Update - The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend. Possible values include: 'Put', 'Lock', 'Extend'
+ Update ImmutabilityPolicyUpdateType `json:"update,omitempty"`
+ // ImmutabilityPeriodSinceCreationInDays - The immutability period for the blobs in the container since the policy creation, in days.
+ ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"`
+ // Timestamp - Returns the date and time the ImmutabilityPolicy was updated.
+ Timestamp *date.Time `json:"timestamp,omitempty"`
+ // ObjectIdentifier - Returns the Object ID of the user who updated the ImmutabilityPolicy.
+ ObjectIdentifier *string `json:"objectIdentifier,omitempty"`
+ // TenantID - Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Upn - Returns the User Principal Name of the user who updated the ImmutabilityPolicy.
+ Upn *string `json:"upn,omitempty"`
+}
+
+// Usage describes Storage Resource Usage.
+type Usage struct {
+ // Unit - Gets the unit of measurement. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', 'BytesPerSecond'
+ Unit UsageUnit `json:"unit,omitempty"`
+ // CurrentValue - Gets the current count of the allocated resources in the subscription.
+ CurrentValue *int32 `json:"currentValue,omitempty"`
+ // Limit - Gets the maximum count of the resources that can be allocated in the subscription.
+ Limit *int32 `json:"limit,omitempty"`
+ // Name - Gets the name of the type of usage.
+ Name *UsageName `json:"name,omitempty"`
+}
+
+// UsageListResult the response from the List Usages operation.
+type UsageListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets or sets the list of Storage Resource Usages.
+ Value *[]Usage `json:"value,omitempty"`
+}
+
+// UsageName the usage names that can be used; currently limited to StorageAccount.
+type UsageName struct {
+ // Value - Gets a string describing the resource name.
+ Value *string `json:"value,omitempty"`
+ // LocalizedValue - Gets a localized string describing the resource name.
+ LocalizedValue *string `json:"localizedValue,omitempty"`
+}
+
+// VirtualNetworkRule virtual Network rule.
+type VirtualNetworkRule struct {
+ // VirtualNetworkResourceID - Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
+ VirtualNetworkResourceID *string `json:"id,omitempty"`
+ // Action - The action of virtual network rule. Possible values include: 'Allow'
+ Action Action `json:"action,omitempty"`
+ // State - Gets the state of virtual network rule. Possible values include: 'StateProvisioning', 'StateDeprovisioning', 'StateSucceeded', 'StateFailed', 'StateNetworkSourceDeleted'
+ State State `json:"state,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/operations.go
new file mode 100644
index 000000000..d10c40b6e
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/operations.go
@@ -0,0 +1,98 @@
+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 (
+ "context"
+ "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 {
+ BaseClient
+}
+
+// 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(ctx context.Context) (result OperationListResult, err error) {
+ req, err := client.ListPreparer(ctx)
+ 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(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-03-01-preview"
+ 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{}).WithContext(ctx))
+}
+
+// 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,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// 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/services/preview/storage/mgmt/2018-03-01-preview/storage/skus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/skus.go
new file mode 100644
index 000000000..715f49ac0
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/skus.go
@@ -0,0 +1,109 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// SkusClient is the the Azure Storage Management API.
+type SkusClient struct {
+ BaseClient
+}
+
+// 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(ctx context.Context) (result SkuListResult, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.SkusClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx)
+ 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(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ 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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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/services/preview/storage/mgmt/2018-03-01-preview/storage/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/usages.go
new file mode 100644
index 000000000..ebdec6c5b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/usages.go
@@ -0,0 +1,180 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// UsagesClient is the the Azure Storage Management API.
+type UsagesClient struct {
+ BaseClient
+}
+
+// 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)}
+}
+
+// List gets the current usage count and the limit for the resources under the subscription.
+func (client UsagesClient) List(ctx context.Context) (result UsageListResult, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.UsagesClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.UsagesClient", "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.UsagesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.UsagesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client UsagesClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/usages", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client UsagesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client UsagesClient) ListResponder(resp *http.Response) (result UsageListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByLocation gets the current usage count and the limit for the resources of the location under the subscription.
+// Parameters:
+// location - the location of the Azure Storage resource.
+func (client UsagesClient) ListByLocation(ctx context.Context, location string) (result UsageListResult, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.UsagesClient", "ListByLocation", err.Error())
+ }
+
+ req, err := client.ListByLocationPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.UsagesClient", "ListByLocation", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.UsagesClient", "ListByLocation", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.UsagesClient", "ListByLocation", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByLocationPreparer prepares the ListByLocation request.
+func (client UsagesClient) ListByLocationPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByLocationSender sends the ListByLocation request. The method will close the
+// http.Response Body if it receives an error.
+func (client UsagesClient) ListByLocationSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByLocationResponder handles the response to the ListByLocation request. The method always
+// closes the http.Response Body.
+func (client UsagesClient) ListByLocationResponder(resp *http.Response) (result UsageListResult, 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/services/preview/storage/mgmt/2018-03-01-preview/storage/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/version.go
new file mode 100644
index 000000000..bae154868
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage/version.go
@@ -0,0 +1,30 @@
+package storage
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " storage/2018-03-01-preview"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2017-11-01-preview/subscription/definitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2017-11-01-preview/subscription/definitions.go
index 976a1a1b2..f934c73d0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2017-11-01-preview/subscription/definitions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2017-11-01-preview/subscription/definitions.go
@@ -85,15 +85,17 @@ func (client DefinitionsClient) CreatePreparer(ctx context.Context, subscription
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client DefinitionsClient) CreateSender(req *http.Request) (future DefinitionsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2017-11-01-preview/subscription/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2017-11-01-preview/subscription/models.go
index f7d4c7844..d7c88589a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2017-11-01-preview/subscription/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2017-11-01-preview/subscription/models.go
@@ -224,12 +224,11 @@ type DefinitionProperties struct {
// DefinitionsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DefinitionsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DefinitionsCreateFuture) Result(client DefinitionsClient) (d Definition, err error) {
+func (future *DefinitionsCreateFuture) Result(client DefinitionsClient) (d Definition, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -237,34 +236,15 @@ func (future DefinitionsCreateFuture) Result(client DefinitionsClient) (d Defini
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("subscription.DefinitionsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "subscription.DefinitionsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("subscription.DefinitionsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "subscription.DefinitionsCreateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "subscription.DefinitionsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "subscription.DefinitionsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2018-03-01-preview/subscription/factory.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2018-03-01-preview/subscription/factory.go
index 365d2ee97..52a1b2ff1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2018-03-01-preview/subscription/factory.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2018-03-01-preview/subscription/factory.go
@@ -83,15 +83,17 @@ func (client FactoryClient) CreateSubscriptionInEnrollmentAccountPreparer(ctx co
// CreateSubscriptionInEnrollmentAccountSender sends the CreateSubscriptionInEnrollmentAccount request. The method will close the
// http.Response Body if it receives an error.
func (client FactoryClient) CreateSubscriptionInEnrollmentAccountSender(req *http.Request) (future FactoryCreateSubscriptionInEnrollmentAccountFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2018-03-01-preview/subscription/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2018-03-01-preview/subscription/models.go
index 5b7eaa9d3..2c53b1c3c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2018-03-01-preview/subscription/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2018-03-01-preview/subscription/models.go
@@ -133,12 +133,11 @@ type ErrorResponse struct {
// long-running operation.
type FactoryCreateSubscriptionInEnrollmentAccountFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FactoryCreateSubscriptionInEnrollmentAccountFuture) Result(client FactoryClient) (cr CreationResult, err error) {
+func (future *FactoryCreateSubscriptionInEnrollmentAccountFuture) Result(client FactoryClient) (cr CreationResult, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -146,34 +145,15 @@ func (future FactoryCreateSubscriptionInEnrollmentAccountFuture) Result(client F
return
}
if !done {
- return cr, azure.NewAsyncOpIncompleteError("subscription.FactoryCreateSubscriptionInEnrollmentAccountFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- cr, err = client.CreateSubscriptionInEnrollmentAccountResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "subscription.FactoryCreateSubscriptionInEnrollmentAccountFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("subscription.FactoryCreateSubscriptionInEnrollmentAccountFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
+ cr, err = client.CreateSubscriptionInEnrollmentAccountResponder(cr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "subscription.FactoryCreateSubscriptionInEnrollmentAccountFuture", "Result", cr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "subscription.FactoryCreateSubscriptionInEnrollmentAccountFuture", "Result", resp, "Failure sending request")
- return
- }
- cr, err = client.CreateSubscriptionInEnrollmentAccountResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "subscription.FactoryCreateSubscriptionInEnrollmentAccountFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/environments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/environments.go
index effefd25a..25c30e9a8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/environments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/environments.go
@@ -104,15 +104,17 @@ func (client EnvironmentsClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client EnvironmentsClient) CreateOrUpdateSender(req *http.Request) (future EnvironmentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -440,15 +442,17 @@ func (client EnvironmentsClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client EnvironmentsClient) UpdateSender(req *http.Request) (future EnvironmentsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/models.go
index d32a245ec..79a87aca2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/models.go
@@ -642,12 +642,11 @@ type EnvironmentResourceProperties struct {
// operation.
type EnvironmentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EnvironmentsCreateOrUpdateFuture) Result(client EnvironmentsClient) (er EnvironmentResource, err error) {
+func (future *EnvironmentsCreateOrUpdateFuture) Result(client EnvironmentsClient) (er EnvironmentResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -655,34 +654,15 @@ func (future EnvironmentsCreateOrUpdateFuture) Result(client EnvironmentsClient)
return
}
if !done {
- return er, azure.NewAsyncOpIncompleteError("timeseriesinsights.EnvironmentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- er, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("timeseriesinsights.EnvironmentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if er.Response.Response, err = future.GetResult(sender); err == nil && er.Response.Response.StatusCode != http.StatusNoContent {
+ er, err = client.CreateOrUpdateResponder(er.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsCreateOrUpdateFuture", "Result", er.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- er, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -690,12 +670,11 @@ func (future EnvironmentsCreateOrUpdateFuture) Result(client EnvironmentsClient)
// EnvironmentsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EnvironmentsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EnvironmentsUpdateFuture) Result(client EnvironmentsClient) (er EnvironmentResource, err error) {
+func (future *EnvironmentsUpdateFuture) Result(client EnvironmentsClient) (er EnvironmentResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -703,34 +682,15 @@ func (future EnvironmentsUpdateFuture) Result(client EnvironmentsClient) (er Env
return
}
if !done {
- return er, azure.NewAsyncOpIncompleteError("timeseriesinsights.EnvironmentsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- er, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("timeseriesinsights.EnvironmentsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if er.Response.Response, err = future.GetResult(sender); err == nil && er.Response.Response.StatusCode != http.StatusNoContent {
+ er, err = client.UpdateResponder(er.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsUpdateFuture", "Result", er.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- er, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/models.go
index c846be8e9..20dff7e47 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/models.go
@@ -298,12 +298,11 @@ type ProjectResourceListResult struct {
// ProjectsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProjectsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ProjectsCreateFuture) Result(client ProjectsClient) (pr ProjectResource, err error) {
+func (future *ProjectsCreateFuture) Result(client ProjectsClient) (pr ProjectResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -311,34 +310,15 @@ func (future ProjectsCreateFuture) Result(client ProjectsClient) (pr ProjectReso
return
}
if !done {
- return pr, azure.NewAsyncOpIncompleteError("visualstudio.ProjectsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pr, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "visualstudio.ProjectsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("visualstudio.ProjectsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pr.Response.Response, err = future.GetResult(sender); err == nil && pr.Response.Response.StatusCode != http.StatusNoContent {
+ pr, err = client.CreateResponder(pr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "visualstudio.ProjectsCreateFuture", "Result", pr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "visualstudio.ProjectsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pr, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "visualstudio.ProjectsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/projects.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/projects.go
index 96a20471e..c67b55d4b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/projects.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/projects.go
@@ -99,15 +99,17 @@ func (client ProjectsClient) CreatePreparer(ctx context.Context, body ProjectRes
// 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) (future ProjectsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/hostingenvironments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/hostingenvironments.go
index 09133ba25..95ad4e6b7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/hostingenvironments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/hostingenvironments.go
@@ -86,15 +86,17 @@ func (client HostingEnvironmentsClient) CreateOrUpdateHostingEnvironmentPreparer
// CreateOrUpdateHostingEnvironmentSender sends the CreateOrUpdateHostingEnvironment request. The method will close the
// http.Response Body if it receives an error.
func (client HostingEnvironmentsClient) CreateOrUpdateHostingEnvironmentSender(req *http.Request) (future HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -158,15 +160,17 @@ func (client HostingEnvironmentsClient) CreateOrUpdateMultiRolePoolPreparer(ctx
// CreateOrUpdateMultiRolePoolSender sends the CreateOrUpdateMultiRolePool request. The method will close the
// http.Response Body if it receives an error.
func (client HostingEnvironmentsClient) CreateOrUpdateMultiRolePoolSender(req *http.Request) (future HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -232,15 +236,17 @@ func (client HostingEnvironmentsClient) CreateOrUpdateWorkerPoolPreparer(ctx con
// CreateOrUpdateWorkerPoolSender sends the CreateOrUpdateWorkerPool request. The method will close the
// http.Response Body if it receives an error.
func (client HostingEnvironmentsClient) CreateOrUpdateWorkerPoolSender(req *http.Request) (future HostingEnvironmentsCreateOrUpdateWorkerPoolFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -305,15 +311,17 @@ func (client HostingEnvironmentsClient) DeleteHostingEnvironmentPreparer(ctx con
// DeleteHostingEnvironmentSender sends the DeleteHostingEnvironment request. The method will close the
// http.Response Body if it receives an error.
func (client HostingEnvironmentsClient) DeleteHostingEnvironmentSender(req *http.Request) (future HostingEnvironmentsDeleteHostingEnvironmentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -3019,15 +3027,17 @@ func (client HostingEnvironmentsClient) ResumeHostingEnvironmentPreparer(ctx con
// ResumeHostingEnvironmentSender sends the ResumeHostingEnvironment request. The method will close the
// http.Response Body if it receives an error.
func (client HostingEnvironmentsClient) ResumeHostingEnvironmentSender(req *http.Request) (future HostingEnvironmentsResumeHostingEnvironmentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -3073,7 +3083,6 @@ func (client HostingEnvironmentsClient) ResumeHostingEnvironmentComplete(ctx con
var future HostingEnvironmentsResumeHostingEnvironmentFuture
future, err = client.ResumeHostingEnvironment(ctx, resourceGroupName, name)
result.Future = future.Future
- result.req = future.req
return
}
@@ -3121,15 +3130,17 @@ func (client HostingEnvironmentsClient) SuspendHostingEnvironmentPreparer(ctx co
// SuspendHostingEnvironmentSender sends the SuspendHostingEnvironment request. The method will close the
// http.Response Body if it receives an error.
func (client HostingEnvironmentsClient) SuspendHostingEnvironmentSender(req *http.Request) (future HostingEnvironmentsSuspendHostingEnvironmentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -3175,6 +3186,5 @@ func (client HostingEnvironmentsClient) SuspendHostingEnvironmentComplete(ctx co
var future HostingEnvironmentsSuspendHostingEnvironmentFuture
future, err = client.SuspendHostingEnvironment(ctx, resourceGroupName, name)
result.Future = future.Future
- result.req = future.req
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/managedhostingenvironments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/managedhostingenvironments.go
index 58fa34e69..b6aef9dd5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/managedhostingenvironments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/managedhostingenvironments.go
@@ -86,15 +86,17 @@ func (client ManagedHostingEnvironmentsClient) CreateOrUpdateManagedHostingEnvir
// CreateOrUpdateManagedHostingEnvironmentSender sends the CreateOrUpdateManagedHostingEnvironment request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedHostingEnvironmentsClient) CreateOrUpdateManagedHostingEnvironmentSender(req *http.Request) (future ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client ManagedHostingEnvironmentsClient) DeleteManagedHostingEnvironmentPr
// DeleteManagedHostingEnvironmentSender sends the DeleteManagedHostingEnvironment request. The method will close the
// http.Response Body if it receives an error.
func (client ManagedHostingEnvironmentsClient) DeleteManagedHostingEnvironmentSender(req *http.Request) (future ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/models.go
index 09551ffaa..f3b5fae16 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/models.go
@@ -6692,12 +6692,11 @@ type HostingEnvironmentProperties struct {
// results of a long-running operation.
type HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture) Result(client HostingEnvironmentsClient) (he HostingEnvironment, err error) {
+func (future *HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture) Result(client HostingEnvironmentsClient) (he HostingEnvironment, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6705,34 +6704,15 @@ func (future HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture) Result(c
return
}
if !done {
- return he, azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- he, err = client.CreateOrUpdateHostingEnvironmentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if he.Response.Response, err = future.GetResult(sender); err == nil && he.Response.Response.StatusCode != http.StatusNoContent {
+ he, err = client.CreateOrUpdateHostingEnvironmentResponder(he.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture", "Result", he.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture", "Result", resp, "Failure sending request")
- return
- }
- he, err = client.CreateOrUpdateHostingEnvironmentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6741,12 +6721,11 @@ func (future HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture) Result(c
// a long-running operation.
type HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture) Result(client HostingEnvironmentsClient) (wp WorkerPool, err error) {
+func (future *HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture) Result(client HostingEnvironmentsClient) (wp WorkerPool, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6754,34 +6733,15 @@ func (future HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture) Result(client
return
}
if !done {
- return wp, azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- wp, err = client.CreateOrUpdateMultiRolePoolResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if wp.Response.Response, err = future.GetResult(sender); err == nil && wp.Response.Response.StatusCode != http.StatusNoContent {
+ wp, err = client.CreateOrUpdateMultiRolePoolResponder(wp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", wp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", resp, "Failure sending request")
- return
- }
- wp, err = client.CreateOrUpdateMultiRolePoolResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6790,12 +6750,11 @@ func (future HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture) Result(client
// long-running operation.
type HostingEnvironmentsCreateOrUpdateWorkerPoolFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future HostingEnvironmentsCreateOrUpdateWorkerPoolFuture) Result(client HostingEnvironmentsClient) (wp WorkerPool, err error) {
+func (future *HostingEnvironmentsCreateOrUpdateWorkerPoolFuture) Result(client HostingEnvironmentsClient) (wp WorkerPool, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6803,34 +6762,15 @@ func (future HostingEnvironmentsCreateOrUpdateWorkerPoolFuture) Result(client Ho
return
}
if !done {
- return wp, azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsCreateOrUpdateWorkerPoolFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- wp, err = client.CreateOrUpdateWorkerPoolResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsCreateOrUpdateWorkerPoolFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if wp.Response.Response, err = future.GetResult(sender); err == nil && wp.Response.Response.StatusCode != http.StatusNoContent {
+ wp, err = client.CreateOrUpdateWorkerPoolResponder(wp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", wp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", resp, "Failure sending request")
- return
- }
- wp, err = client.CreateOrUpdateWorkerPoolResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6839,12 +6779,11 @@ func (future HostingEnvironmentsCreateOrUpdateWorkerPoolFuture) Result(client Ho
// long-running operation.
type HostingEnvironmentsDeleteHostingEnvironmentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future HostingEnvironmentsDeleteHostingEnvironmentFuture) Result(client HostingEnvironmentsClient) (so SetObject, err error) {
+func (future *HostingEnvironmentsDeleteHostingEnvironmentFuture) Result(client HostingEnvironmentsClient) (so SetObject, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6852,34 +6791,15 @@ func (future HostingEnvironmentsDeleteHostingEnvironmentFuture) Result(client Ho
return
}
if !done {
- return so, azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsDeleteHostingEnvironmentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- so, err = client.DeleteHostingEnvironmentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsDeleteHostingEnvironmentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsDeleteHostingEnvironmentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.DeleteHostingEnvironmentResponder(so.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsDeleteHostingEnvironmentFuture", "Result", so.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsDeleteHostingEnvironmentFuture", "Result", resp, "Failure sending request")
- return
- }
- so, err = client.DeleteHostingEnvironmentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsDeleteHostingEnvironmentFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6903,12 +6823,11 @@ type HostingEnvironmentServiceDescriptions struct {
// a long-running operation.
type HostingEnvironmentsResumeHostingEnvironmentAllFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future HostingEnvironmentsResumeHostingEnvironmentAllFuture) Result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) {
+func (future *HostingEnvironmentsResumeHostingEnvironmentAllFuture) Result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6916,34 +6835,15 @@ func (future HostingEnvironmentsResumeHostingEnvironmentAllFuture) Result(client
return
}
if !done {
- return scp, azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsResumeHostingEnvironmentAllFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- scp, err = client.ResumeHostingEnvironmentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentAllFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsResumeHostingEnvironmentAllFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if scp.sc.Response.Response, err = future.GetResult(sender); err == nil && scp.sc.Response.Response.StatusCode != http.StatusNoContent {
+ scp, err = client.ResumeHostingEnvironmentResponder(scp.sc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentAllFuture", "Result", scp.sc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentAllFuture", "Result", resp, "Failure sending request")
- return
- }
- scp, err = client.ResumeHostingEnvironmentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentAllFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6952,12 +6852,11 @@ func (future HostingEnvironmentsResumeHostingEnvironmentAllFuture) Result(client
// long-running operation.
type HostingEnvironmentsResumeHostingEnvironmentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future HostingEnvironmentsResumeHostingEnvironmentFuture) Result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) {
+func (future *HostingEnvironmentsResumeHostingEnvironmentFuture) Result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6965,34 +6864,15 @@ func (future HostingEnvironmentsResumeHostingEnvironmentFuture) Result(client Ho
return
}
if !done {
- return scp, azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsResumeHostingEnvironmentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- scp, err = client.ResumeHostingEnvironmentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsResumeHostingEnvironmentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if scp.sc.Response.Response, err = future.GetResult(sender); err == nil && scp.sc.Response.Response.StatusCode != http.StatusNoContent {
+ scp, err = client.ResumeHostingEnvironmentResponder(scp.sc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentFuture", "Result", scp.sc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentFuture", "Result", resp, "Failure sending request")
- return
- }
- scp, err = client.ResumeHostingEnvironmentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7001,12 +6881,11 @@ func (future HostingEnvironmentsResumeHostingEnvironmentFuture) Result(client Ho
// of a long-running operation.
type HostingEnvironmentsSuspendHostingEnvironmentAllFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future HostingEnvironmentsSuspendHostingEnvironmentAllFuture) Result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) {
+func (future *HostingEnvironmentsSuspendHostingEnvironmentAllFuture) Result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7014,34 +6893,15 @@ func (future HostingEnvironmentsSuspendHostingEnvironmentAllFuture) Result(clien
return
}
if !done {
- return scp, azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsSuspendHostingEnvironmentAllFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- scp, err = client.SuspendHostingEnvironmentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentAllFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsSuspendHostingEnvironmentAllFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if scp.sc.Response.Response, err = future.GetResult(sender); err == nil && scp.sc.Response.Response.StatusCode != http.StatusNoContent {
+ scp, err = client.SuspendHostingEnvironmentResponder(scp.sc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentAllFuture", "Result", scp.sc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentAllFuture", "Result", resp, "Failure sending request")
- return
- }
- scp, err = client.SuspendHostingEnvironmentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentAllFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7050,12 +6910,11 @@ func (future HostingEnvironmentsSuspendHostingEnvironmentAllFuture) Result(clien
// long-running operation.
type HostingEnvironmentsSuspendHostingEnvironmentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future HostingEnvironmentsSuspendHostingEnvironmentFuture) Result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) {
+func (future *HostingEnvironmentsSuspendHostingEnvironmentFuture) Result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7063,34 +6922,15 @@ func (future HostingEnvironmentsSuspendHostingEnvironmentFuture) Result(client H
return
}
if !done {
- return scp, azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsSuspendHostingEnvironmentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- scp, err = client.SuspendHostingEnvironmentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsSuspendHostingEnvironmentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if scp.sc.Response.Response, err = future.GetResult(sender); err == nil && scp.sc.Response.Response.StatusCode != http.StatusNoContent {
+ scp, err = client.SuspendHostingEnvironmentResponder(scp.sc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentFuture", "Result", scp.sc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentFuture", "Result", resp, "Failure sending request")
- return
- }
- scp, err = client.SuspendHostingEnvironmentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7827,12 +7667,11 @@ type ManagedHostingEnvironmentProperties struct {
// retrieving the results of a long-running operation.
type ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture) Result(client ManagedHostingEnvironmentsClient) (he HostingEnvironment, err error) {
+func (future *ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture) Result(client ManagedHostingEnvironmentsClient) (he HostingEnvironment, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7840,34 +7679,15 @@ func (future ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFu
return
}
if !done {
- return he, azure.NewAsyncOpIncompleteError("web.ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- he, err = client.CreateOrUpdateManagedHostingEnvironmentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if he.Response.Response, err = future.GetResult(sender); err == nil && he.Response.Response.StatusCode != http.StatusNoContent {
+ he, err = client.CreateOrUpdateManagedHostingEnvironmentResponder(he.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture", "Result", he.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture", "Result", resp, "Failure sending request")
- return
- }
- he, err = client.CreateOrUpdateManagedHostingEnvironmentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -7876,12 +7696,11 @@ func (future ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFu
// results of a long-running operation.
type ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture) Result(client ManagedHostingEnvironmentsClient) (so SetObject, err error) {
+func (future *ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture) Result(client ManagedHostingEnvironmentsClient) (so SetObject, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -7889,34 +7708,15 @@ func (future ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture) Re
return
}
if !done {
- return so, azure.NewAsyncOpIncompleteError("web.ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- so, err = client.DeleteManagedHostingEnvironmentResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.DeleteManagedHostingEnvironmentResponder(so.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture", "Result", so.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture", "Result", resp, "Failure sending request")
- return
- }
- so, err = client.DeleteManagedHostingEnvironmentResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -9740,12 +9540,11 @@ func (page ServerFarmCollectionPage) Values() []ServerFarmWithRichSku {
// long-running operation.
type ServerFarmsCreateOrUpdateServerFarmFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServerFarmsCreateOrUpdateServerFarmFuture) Result(client ServerFarmsClient) (sfwrs ServerFarmWithRichSku, err error) {
+func (future *ServerFarmsCreateOrUpdateServerFarmFuture) Result(client ServerFarmsClient) (sfwrs ServerFarmWithRichSku, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9753,34 +9552,15 @@ func (future ServerFarmsCreateOrUpdateServerFarmFuture) Result(client ServerFarm
return
}
if !done {
- return sfwrs, azure.NewAsyncOpIncompleteError("web.ServerFarmsCreateOrUpdateServerFarmFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sfwrs, err = client.CreateOrUpdateServerFarmResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.ServerFarmsCreateOrUpdateServerFarmFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.ServerFarmsCreateOrUpdateServerFarmFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sfwrs.Response.Response, err = future.GetResult(sender); err == nil && sfwrs.Response.Response.StatusCode != http.StatusNoContent {
+ sfwrs, err = client.CreateOrUpdateServerFarmResponder(sfwrs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.ServerFarmsCreateOrUpdateServerFarmFuture", "Result", sfwrs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.ServerFarmsCreateOrUpdateServerFarmFuture", "Result", resp, "Failure sending request")
- return
- }
- sfwrs, err = client.CreateOrUpdateServerFarmResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.ServerFarmsCreateOrUpdateServerFarmFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10961,12 +10741,11 @@ type SitePropertiesModel struct {
// operation.
type SitesCreateOrUpdateSiteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SitesCreateOrUpdateSiteFuture) Result(client SitesClient) (s Site, err error) {
+func (future *SitesCreateOrUpdateSiteFuture) Result(client SitesClient) (s Site, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -10974,34 +10753,15 @@ func (future SitesCreateOrUpdateSiteFuture) Result(client SitesClient) (s Site,
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("web.SitesCreateOrUpdateSiteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateSiteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.SitesCreateOrUpdateSiteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateSiteResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateSiteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11010,12 +10770,11 @@ func (future SitesCreateOrUpdateSiteFuture) Result(client SitesClient) (s Site,
// operation.
type SitesCreateOrUpdateSiteSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SitesCreateOrUpdateSiteSlotFuture) Result(client SitesClient) (s Site, err error) {
+func (future *SitesCreateOrUpdateSiteSlotFuture) Result(client SitesClient) (s Site, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11023,34 +10782,15 @@ func (future SitesCreateOrUpdateSiteSlotFuture) Result(client SitesClient) (s Si
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("web.SitesCreateOrUpdateSiteSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateSiteSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.SitesCreateOrUpdateSiteSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateSiteSlotResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteSlotFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateSiteSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11059,12 +10799,11 @@ func (future SitesCreateOrUpdateSiteSlotFuture) Result(client SitesClient) (s Si
// long-running operation.
type SitesListSitePublishingCredentialsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SitesListSitePublishingCredentialsFuture) Result(client SitesClient) (u User, err error) {
+func (future *SitesListSitePublishingCredentialsFuture) Result(client SitesClient) (u User, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11072,34 +10811,15 @@ func (future SitesListSitePublishingCredentialsFuture) Result(client SitesClient
return
}
if !done {
- return u, azure.NewAsyncOpIncompleteError("web.SitesListSitePublishingCredentialsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- u, err = client.ListSitePublishingCredentialsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.SitesListSitePublishingCredentialsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if u.Response.Response, err = future.GetResult(sender); err == nil && u.Response.Response.StatusCode != http.StatusNoContent {
+ u, err = client.ListSitePublishingCredentialsResponder(u.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsFuture", "Result", u.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsFuture", "Result", resp, "Failure sending request")
- return
- }
- u, err = client.ListSitePublishingCredentialsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11108,12 +10828,11 @@ func (future SitesListSitePublishingCredentialsFuture) Result(client SitesClient
// long-running operation.
type SitesListSitePublishingCredentialsSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SitesListSitePublishingCredentialsSlotFuture) Result(client SitesClient) (u User, err error) {
+func (future *SitesListSitePublishingCredentialsSlotFuture) Result(client SitesClient) (u User, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11121,34 +10840,15 @@ func (future SitesListSitePublishingCredentialsSlotFuture) Result(client SitesCl
return
}
if !done {
- return u, azure.NewAsyncOpIncompleteError("web.SitesListSitePublishingCredentialsSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- u, err = client.ListSitePublishingCredentialsSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.SitesListSitePublishingCredentialsSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if u.Response.Response, err = future.GetResult(sender); err == nil && u.Response.Response.StatusCode != http.StatusNoContent {
+ u, err = client.ListSitePublishingCredentialsSlotResponder(u.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsSlotFuture", "Result", u.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- u, err = client.ListSitePublishingCredentialsSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11293,12 +10993,11 @@ type SiteSourceControlProperties struct {
// SitesRecoverSiteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SitesRecoverSiteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SitesRecoverSiteFuture) Result(client SitesClient) (s Site, err error) {
+func (future *SitesRecoverSiteFuture) Result(client SitesClient) (s Site, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11306,34 +11005,15 @@ func (future SitesRecoverSiteFuture) Result(client SitesClient) (s Site, err err
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("web.SitesRecoverSiteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.RecoverSiteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.SitesRecoverSiteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.RecoverSiteResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.RecoverSiteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11341,12 +11021,11 @@ func (future SitesRecoverSiteFuture) Result(client SitesClient) (s Site, err err
// SitesRecoverSiteSlotFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SitesRecoverSiteSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SitesRecoverSiteSlotFuture) Result(client SitesClient) (s Site, err error) {
+func (future *SitesRecoverSiteSlotFuture) Result(client SitesClient) (s Site, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11354,34 +11033,15 @@ func (future SitesRecoverSiteSlotFuture) Result(client SitesClient) (s Site, err
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("web.SitesRecoverSiteSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.RecoverSiteSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.SitesRecoverSiteSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.RecoverSiteSlotResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteSlotFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.RecoverSiteSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11389,12 +11049,11 @@ func (future SitesRecoverSiteSlotFuture) Result(client SitesClient) (s Site, err
// SitesRestoreSiteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SitesRestoreSiteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SitesRestoreSiteFuture) Result(client SitesClient) (rr RestoreResponse, err error) {
+func (future *SitesRestoreSiteFuture) Result(client SitesClient) (rr RestoreResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11402,34 +11061,15 @@ func (future SitesRestoreSiteFuture) Result(client SitesClient) (rr RestoreRespo
return
}
if !done {
- return rr, azure.NewAsyncOpIncompleteError("web.SitesRestoreSiteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rr, err = client.RestoreSiteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.SitesRestoreSiteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rr.Response.Response, err = future.GetResult(sender); err == nil && rr.Response.Response.StatusCode != http.StatusNoContent {
+ rr, err = client.RestoreSiteResponder(rr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteFuture", "Result", rr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteFuture", "Result", resp, "Failure sending request")
- return
- }
- rr, err = client.RestoreSiteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11437,12 +11077,11 @@ func (future SitesRestoreSiteFuture) Result(client SitesClient) (rr RestoreRespo
// SitesRestoreSiteSlotFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SitesRestoreSiteSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SitesRestoreSiteSlotFuture) Result(client SitesClient) (rr RestoreResponse, err error) {
+func (future *SitesRestoreSiteSlotFuture) Result(client SitesClient) (rr RestoreResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11450,34 +11089,15 @@ func (future SitesRestoreSiteSlotFuture) Result(client SitesClient) (rr RestoreR
return
}
if !done {
- return rr, azure.NewAsyncOpIncompleteError("web.SitesRestoreSiteSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rr, err = client.RestoreSiteSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.SitesRestoreSiteSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rr.Response.Response, err = future.GetResult(sender); err == nil && rr.Response.Response.StatusCode != http.StatusNoContent {
+ rr, err = client.RestoreSiteSlotResponder(rr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteSlotFuture", "Result", rr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- rr, err = client.RestoreSiteSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11485,12 +11105,11 @@ func (future SitesRestoreSiteSlotFuture) Result(client SitesClient) (rr RestoreR
// SitesSwapSlotsSlotFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SitesSwapSlotsSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SitesSwapSlotsSlotFuture) Result(client SitesClient) (so SetObject, err error) {
+func (future *SitesSwapSlotsSlotFuture) Result(client SitesClient) (so SetObject, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11498,34 +11117,15 @@ func (future SitesSwapSlotsSlotFuture) Result(client SitesClient) (so SetObject,
return
}
if !done {
- return so, azure.NewAsyncOpIncompleteError("web.SitesSwapSlotsSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- so, err = client.SwapSlotsSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesSwapSlotsSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.SitesSwapSlotsSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.SwapSlotsSlotResponder(so.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.SitesSwapSlotsSlotFuture", "Result", so.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesSwapSlotsSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- so, err = client.SwapSlotsSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesSwapSlotsSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -11534,12 +11134,11 @@ func (future SitesSwapSlotsSlotFuture) Result(client SitesClient) (so SetObject,
// operation.
type SitesSwapSlotWithProductionFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SitesSwapSlotWithProductionFuture) Result(client SitesClient) (so SetObject, err error) {
+func (future *SitesSwapSlotWithProductionFuture) Result(client SitesClient) (so SetObject, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -11547,34 +11146,15 @@ func (future SitesSwapSlotWithProductionFuture) Result(client SitesClient) (so S
return
}
if !done {
- return so, azure.NewAsyncOpIncompleteError("web.SitesSwapSlotWithProductionFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- so, err = client.SwapSlotWithProductionResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesSwapSlotWithProductionFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.SitesSwapSlotWithProductionFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
+ so, err = client.SwapSlotWithProductionResponder(so.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.SitesSwapSlotWithProductionFuture", "Result", so.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesSwapSlotWithProductionFuture", "Result", resp, "Failure sending request")
- return
- }
- so, err = client.SwapSlotWithProductionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.SitesSwapSlotWithProductionFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/serverfarms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/serverfarms.go
index af9a39f46..40fbd61d3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/serverfarms.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/serverfarms.go
@@ -90,15 +90,17 @@ func (client ServerFarmsClient) CreateOrUpdateServerFarmPreparer(ctx context.Con
// CreateOrUpdateServerFarmSender sends the CreateOrUpdateServerFarm request. The method will close the
// http.Response Body if it receives an error.
func (client ServerFarmsClient) CreateOrUpdateServerFarmSender(req *http.Request) (future ServerFarmsCreateOrUpdateServerFarmFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/sites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/sites.go
index 5b08269cf..dd742286e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/sites.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-preview/web/sites.go
@@ -821,15 +821,17 @@ func (client SitesClient) CreateOrUpdateSitePreparer(ctx context.Context, resour
// CreateOrUpdateSiteSender sends the CreateOrUpdateSite request. The method will close the
// http.Response Body if it receives an error.
func (client SitesClient) CreateOrUpdateSiteSender(req *http.Request) (future SitesCreateOrUpdateSiteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1347,15 +1349,17 @@ func (client SitesClient) CreateOrUpdateSiteSlotPreparer(ctx context.Context, re
// CreateOrUpdateSiteSlotSender sends the CreateOrUpdateSiteSlot request. The method will close the
// http.Response Body if it receives an error.
func (client SitesClient) CreateOrUpdateSiteSlotSender(req *http.Request) (future SitesCreateOrUpdateSiteSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -8869,15 +8873,17 @@ func (client SitesClient) ListSitePublishingCredentialsPreparer(ctx context.Cont
// ListSitePublishingCredentialsSender sends the ListSitePublishingCredentials request. The method will close the
// http.Response Body if it receives an error.
func (client SitesClient) ListSitePublishingCredentialsSender(req *http.Request) (future SitesListSitePublishingCredentialsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -8940,15 +8946,17 @@ func (client SitesClient) ListSitePublishingCredentialsSlotPreparer(ctx context.
// ListSitePublishingCredentialsSlotSender sends the ListSitePublishingCredentialsSlot request. The method will close the
// http.Response Body if it receives an error.
func (client SitesClient) ListSitePublishingCredentialsSlotSender(req *http.Request) (future SitesListSitePublishingCredentialsSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -9291,15 +9299,17 @@ func (client SitesClient) RecoverSitePreparer(ctx context.Context, resourceGroup
// RecoverSiteSender sends the RecoverSite request. The method will close the
// http.Response Body if it receives an error.
func (client SitesClient) RecoverSiteSender(req *http.Request) (future SitesRecoverSiteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -9366,15 +9376,17 @@ func (client SitesClient) RecoverSiteSlotPreparer(ctx context.Context, resourceG
// RecoverSiteSlotSender sends the RecoverSiteSlot request. The method will close the
// http.Response Body if it receives an error.
func (client SitesClient) RecoverSiteSlotSender(req *http.Request) (future SitesRecoverSiteSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -9730,15 +9742,17 @@ func (client SitesClient) RestoreSitePreparer(ctx context.Context, resourceGroup
// RestoreSiteSender sends the RestoreSite request. The method will close the
// http.Response Body if it receives an error.
func (client SitesClient) RestoreSiteSender(req *http.Request) (future SitesRestoreSiteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -9806,15 +9820,17 @@ func (client SitesClient) RestoreSiteSlotPreparer(ctx context.Context, resourceG
// RestoreSiteSlotSender sends the RestoreSiteSlot request. The method will close the
// http.Response Body if it receives an error.
func (client SitesClient) RestoreSiteSlotSender(req *http.Request) (future SitesRestoreSiteSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -10152,15 +10168,17 @@ func (client SitesClient) SwapSlotsSlotPreparer(ctx context.Context, resourceGro
// SwapSlotsSlotSender sends the SwapSlotsSlot request. The method will close the
// http.Response Body if it receives an error.
func (client SitesClient) SwapSlotsSlotSender(req *http.Request) (future SitesSwapSlotsSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -10224,15 +10242,17 @@ func (client SitesClient) SwapSlotWithProductionPreparer(ctx context.Context, re
// SwapSlotWithProductionSender sends the SwapSlotWithProduction request. The method will close the
// http.Response Body if it receives an error.
func (client SitesClient) SwapSlotWithProductionSender(req *http.Request) (future SitesSwapSlotWithProductionFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2017-11-15/iothub/iotdpsresource.go b/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2017-11-15/iothub/iotdpsresource.go
index 73af97333..bd7804b43 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2017-11-15/iothub/iotdpsresource.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2017-11-15/iothub/iotdpsresource.go
@@ -170,15 +170,17 @@ func (client IotDpsResourceClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client IotDpsResourceClient) CreateOrUpdateSender(req *http.Request) (future IotDpsResourceCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -239,15 +241,17 @@ func (client IotDpsResourceClient) DeletePreparer(ctx context.Context, provision
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client IotDpsResourceClient) DeleteSender(req *http.Request) (future IotDpsResourceDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -892,15 +896,17 @@ func (client IotDpsResourceClient) UpdatePreparer(ctx context.Context, resourceG
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client IotDpsResourceClient) UpdateSender(req *http.Request) (future IotDpsResourceUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2017-11-15/iothub/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2017-11-15/iothub/models.go
index 52959374c..ed6f5d4df 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2017-11-15/iothub/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2017-11-15/iothub/models.go
@@ -258,12 +258,11 @@ type IotDpsPropertiesDescription struct {
// operation.
type IotDpsResourceCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotDpsResourceCreateOrUpdateFuture) Result(client IotDpsResourceClient) (psd ProvisioningServiceDescription, err error) {
+func (future *IotDpsResourceCreateOrUpdateFuture) Result(client IotDpsResourceClient) (psd ProvisioningServiceDescription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -271,34 +270,15 @@ func (future IotDpsResourceCreateOrUpdateFuture) Result(client IotDpsResourceCli
return
}
if !done {
- return psd, azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- psd, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if psd.Response.Response, err = future.GetResult(sender); err == nil && psd.Response.Response.StatusCode != http.StatusNoContent {
+ psd, err = client.CreateOrUpdateResponder(psd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceCreateOrUpdateFuture", "Result", psd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- psd, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -306,12 +286,11 @@ func (future IotDpsResourceCreateOrUpdateFuture) Result(client IotDpsResourceCli
// IotDpsResourceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type IotDpsResourceDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotDpsResourceDeleteFuture) Result(client IotDpsResourceClient) (ar autorest.Response, err error) {
+func (future *IotDpsResourceDeleteFuture) Result(client IotDpsResourceClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -319,47 +298,21 @@ func (future IotDpsResourceDeleteFuture) Result(client IotDpsResourceClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// IotDpsResourceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type IotDpsResourceUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotDpsResourceUpdateFuture) Result(client IotDpsResourceClient) (psd ProvisioningServiceDescription, err error) {
+func (future *IotDpsResourceUpdateFuture) Result(client IotDpsResourceClient) (psd ProvisioningServiceDescription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -367,34 +320,15 @@ func (future IotDpsResourceUpdateFuture) Result(client IotDpsResourceClient) (ps
return
}
if !done {
- return psd, azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- psd, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if psd.Response.Response, err = future.GetResult(sender); err == nil && psd.Response.Response.StatusCode != http.StatusNoContent {
+ psd, err = client.UpdateResponder(psd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceUpdateFuture", "Result", psd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- psd, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2018-01-22/iothub/iotdpsresource.go b/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2018-01-22/iothub/iotdpsresource.go
index 5dd8e587e..2dba86ea4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2018-01-22/iothub/iotdpsresource.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2018-01-22/iothub/iotdpsresource.go
@@ -170,15 +170,17 @@ func (client IotDpsResourceClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client IotDpsResourceClient) CreateOrUpdateSender(req *http.Request) (future IotDpsResourceCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -239,15 +241,17 @@ func (client IotDpsResourceClient) DeletePreparer(ctx context.Context, provision
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client IotDpsResourceClient) DeleteSender(req *http.Request) (future IotDpsResourceDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -892,15 +896,17 @@ func (client IotDpsResourceClient) UpdatePreparer(ctx context.Context, resourceG
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client IotDpsResourceClient) UpdateSender(req *http.Request) (future IotDpsResourceUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2018-01-22/iothub/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2018-01-22/iothub/models.go
index c90062741..b505d5fe2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2018-01-22/iothub/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/provisioningservices/mgmt/2018-01-22/iothub/models.go
@@ -258,12 +258,11 @@ type IotDpsPropertiesDescription struct {
// operation.
type IotDpsResourceCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotDpsResourceCreateOrUpdateFuture) Result(client IotDpsResourceClient) (psd ProvisioningServiceDescription, err error) {
+func (future *IotDpsResourceCreateOrUpdateFuture) Result(client IotDpsResourceClient) (psd ProvisioningServiceDescription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -271,34 +270,15 @@ func (future IotDpsResourceCreateOrUpdateFuture) Result(client IotDpsResourceCli
return
}
if !done {
- return psd, azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- psd, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if psd.Response.Response, err = future.GetResult(sender); err == nil && psd.Response.Response.StatusCode != http.StatusNoContent {
+ psd, err = client.CreateOrUpdateResponder(psd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceCreateOrUpdateFuture", "Result", psd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- psd, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -306,12 +286,11 @@ func (future IotDpsResourceCreateOrUpdateFuture) Result(client IotDpsResourceCli
// IotDpsResourceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type IotDpsResourceDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotDpsResourceDeleteFuture) Result(client IotDpsResourceClient) (ar autorest.Response, err error) {
+func (future *IotDpsResourceDeleteFuture) Result(client IotDpsResourceClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -319,47 +298,21 @@ func (future IotDpsResourceDeleteFuture) Result(client IotDpsResourceClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// IotDpsResourceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type IotDpsResourceUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future IotDpsResourceUpdateFuture) Result(client IotDpsResourceClient) (psd ProvisioningServiceDescription, err error) {
+func (future *IotDpsResourceUpdateFuture) Result(client IotDpsResourceClient) (psd ProvisioningServiceDescription, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -367,34 +320,15 @@ func (future IotDpsResourceUpdateFuture) Result(client IotDpsResourceClient) (ps
return
}
if !done {
- return psd, azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- psd, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("iothub.IotDpsResourceUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if psd.Response.Response, err = future.GetResult(sender); err == nil && psd.Response.Response.StatusCode != http.StatusNoContent {
+ psd, err = client.UpdateResponder(psd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceUpdateFuture", "Result", psd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- psd, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/models.go
index 65342618d..1a9f80b79 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/models.go
@@ -13417,12 +13417,11 @@ type RenewCertificateInputProperties struct {
// long-running operation.
type ReplicationFabricsCheckConsistencyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsCheckConsistencyFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
+func (future *ReplicationFabricsCheckConsistencyFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13430,34 +13429,15 @@ func (future ReplicationFabricsCheckConsistencyFuture) Result(client Replication
return
}
if !done {
- return f, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCheckConsistencyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- f, err = client.CheckConsistencyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCheckConsistencyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
+ f, err = client.CheckConsistencyResponder(f.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", f.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", resp, "Failure sending request")
- return
- }
- f, err = client.CheckConsistencyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13466,12 +13446,11 @@ func (future ReplicationFabricsCheckConsistencyFuture) Result(client Replication
// operation.
type ReplicationFabricsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsCreateFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
+func (future *ReplicationFabricsCreateFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13479,34 +13458,15 @@ func (future ReplicationFabricsCreateFuture) Result(client ReplicationFabricsCli
return
}
if !done {
- return f, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- f, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
+ f, err = client.CreateResponder(f.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", f.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- f, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13515,12 +13475,11 @@ func (future ReplicationFabricsCreateFuture) Result(client ReplicationFabricsCli
// operation.
type ReplicationFabricsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsDeleteFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
+func (future *ReplicationFabricsDeleteFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13528,35 +13487,10 @@ func (future ReplicationFabricsDeleteFuture) Result(client ReplicationFabricsCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13564,12 +13498,11 @@ func (future ReplicationFabricsDeleteFuture) Result(client ReplicationFabricsCli
// operation.
type ReplicationFabricsMigrateToAadFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsMigrateToAadFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
+func (future *ReplicationFabricsMigrateToAadFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13577,35 +13510,10 @@ func (future ReplicationFabricsMigrateToAadFuture) Result(client ReplicationFabr
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsMigrateToAadFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.MigrateToAadResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsMigrateToAadFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsMigrateToAadFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsMigrateToAadFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.MigrateToAadResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsMigrateToAadFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13613,12 +13521,11 @@ func (future ReplicationFabricsMigrateToAadFuture) Result(client ReplicationFabr
// operation.
type ReplicationFabricsPurgeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsPurgeFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
+func (future *ReplicationFabricsPurgeFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13626,35 +13533,10 @@ func (future ReplicationFabricsPurgeFuture) Result(client ReplicationFabricsClie
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsPurgeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsPurgeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsPurgeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsPurgeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsPurgeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -13662,12 +13544,11 @@ func (future ReplicationFabricsPurgeFuture) Result(client ReplicationFabricsClie
// long-running operation.
type ReplicationFabricsReassociateGatewayFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsReassociateGatewayFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
+func (future *ReplicationFabricsReassociateGatewayFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13675,34 +13556,15 @@ func (future ReplicationFabricsReassociateGatewayFuture) Result(client Replicati
return
}
if !done {
- return f, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsReassociateGatewayFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- f, err = client.ReassociateGatewayResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsReassociateGatewayFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
+ f, err = client.ReassociateGatewayResponder(f.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", f.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", resp, "Failure sending request")
- return
- }
- f, err = client.ReassociateGatewayResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13711,12 +13573,11 @@ func (future ReplicationFabricsReassociateGatewayFuture) Result(client Replicati
// long-running operation.
type ReplicationFabricsRenewCertificateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsRenewCertificateFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
+func (future *ReplicationFabricsRenewCertificateFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13724,34 +13585,15 @@ func (future ReplicationFabricsRenewCertificateFuture) Result(client Replication
return
}
if !done {
- return f, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsRenewCertificateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- f, err = client.RenewCertificateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsRenewCertificateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
+ f, err = client.RenewCertificateResponder(f.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", f.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", resp, "Failure sending request")
- return
- }
- f, err = client.RenewCertificateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13801,12 +13643,11 @@ func (rgd ReplicationGroupDetails) AsBasicConfigurationSettings() (BasicConfigur
// operation.
type ReplicationJobsCancelFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationJobsCancelFuture) Result(client ReplicationJobsClient) (j Job, err error) {
+func (future *ReplicationJobsCancelFuture) Result(client ReplicationJobsClient) (j Job, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13814,34 +13655,15 @@ func (future ReplicationJobsCancelFuture) Result(client ReplicationJobsClient) (
return
}
if !done {
- return j, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsCancelFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- j, err = client.CancelResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsCancelFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
+ j, err = client.CancelResponder(j.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", j.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", resp, "Failure sending request")
- return
- }
- j, err = client.CancelResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13850,12 +13672,11 @@ func (future ReplicationJobsCancelFuture) Result(client ReplicationJobsClient) (
// operation.
type ReplicationJobsExportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationJobsExportFuture) Result(client ReplicationJobsClient) (j Job, err error) {
+func (future *ReplicationJobsExportFuture) Result(client ReplicationJobsClient) (j Job, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13863,34 +13684,15 @@ func (future ReplicationJobsExportFuture) Result(client ReplicationJobsClient) (
return
}
if !done {
- return j, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsExportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- j, err = client.ExportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsExportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
+ j, err = client.ExportResponder(j.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", j.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", resp, "Failure sending request")
- return
- }
- j, err = client.ExportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13899,12 +13701,11 @@ func (future ReplicationJobsExportFuture) Result(client ReplicationJobsClient) (
// operation.
type ReplicationJobsRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationJobsRestartFuture) Result(client ReplicationJobsClient) (j Job, err error) {
+func (future *ReplicationJobsRestartFuture) Result(client ReplicationJobsClient) (j Job, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13912,34 +13713,15 @@ func (future ReplicationJobsRestartFuture) Result(client ReplicationJobsClient)
return
}
if !done {
- return j, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- j, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
+ j, err = client.RestartResponder(j.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", j.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- j, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13948,12 +13730,11 @@ func (future ReplicationJobsRestartFuture) Result(client ReplicationJobsClient)
// operation.
type ReplicationJobsResumeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationJobsResumeFuture) Result(client ReplicationJobsClient) (j Job, err error) {
+func (future *ReplicationJobsResumeFuture) Result(client ReplicationJobsClient) (j Job, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -13961,34 +13742,15 @@ func (future ReplicationJobsResumeFuture) Result(client ReplicationJobsClient) (
return
}
if !done {
- return j, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsResumeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- j, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsResumeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
+ j, err = client.ResumeResponder(j.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", j.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", resp, "Failure sending request")
- return
- }
- j, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -13997,12 +13759,11 @@ func (future ReplicationJobsResumeFuture) Result(client ReplicationJobsClient) (
// long-running operation.
type ReplicationNetworkMappingsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationNetworkMappingsCreateFuture) Result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
+func (future *ReplicationNetworkMappingsCreateFuture) Result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14010,34 +13771,15 @@ func (future ReplicationNetworkMappingsCreateFuture) Result(client ReplicationNe
return
}
if !done {
- return nm, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nm, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent {
+ nm, err = client.CreateResponder(nm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", nm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- nm, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14046,12 +13788,11 @@ func (future ReplicationNetworkMappingsCreateFuture) Result(client ReplicationNe
// long-running operation.
type ReplicationNetworkMappingsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationNetworkMappingsDeleteFuture) Result(client ReplicationNetworkMappingsClient) (ar autorest.Response, err error) {
+func (future *ReplicationNetworkMappingsDeleteFuture) Result(client ReplicationNetworkMappingsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14059,35 +13800,10 @@ func (future ReplicationNetworkMappingsDeleteFuture) Result(client ReplicationNe
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14095,12 +13811,11 @@ func (future ReplicationNetworkMappingsDeleteFuture) Result(client ReplicationNe
// long-running operation.
type ReplicationNetworkMappingsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationNetworkMappingsUpdateFuture) Result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
+func (future *ReplicationNetworkMappingsUpdateFuture) Result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14108,34 +13823,15 @@ func (future ReplicationNetworkMappingsUpdateFuture) Result(client ReplicationNe
return
}
if !done {
- return nm, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nm, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent {
+ nm, err = client.UpdateResponder(nm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", nm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- nm, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14144,12 +13840,11 @@ func (future ReplicationNetworkMappingsUpdateFuture) Result(client ReplicationNe
// operation.
type ReplicationPoliciesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationPoliciesCreateFuture) Result(client ReplicationPoliciesClient) (p Policy, err error) {
+func (future *ReplicationPoliciesCreateFuture) Result(client ReplicationPoliciesClient) (p Policy, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14157,34 +13852,15 @@ func (future ReplicationPoliciesCreateFuture) Result(client ReplicationPoliciesC
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.CreateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14193,12 +13869,11 @@ func (future ReplicationPoliciesCreateFuture) Result(client ReplicationPoliciesC
// operation.
type ReplicationPoliciesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationPoliciesDeleteFuture) Result(client ReplicationPoliciesClient) (ar autorest.Response, err error) {
+func (future *ReplicationPoliciesDeleteFuture) Result(client ReplicationPoliciesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14206,35 +13881,10 @@ func (future ReplicationPoliciesDeleteFuture) Result(client ReplicationPoliciesC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14242,12 +13892,11 @@ func (future ReplicationPoliciesDeleteFuture) Result(client ReplicationPoliciesC
// operation.
type ReplicationPoliciesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationPoliciesUpdateFuture) Result(client ReplicationPoliciesClient) (p Policy, err error) {
+func (future *ReplicationPoliciesUpdateFuture) Result(client ReplicationPoliciesClient) (p Policy, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14255,34 +13904,15 @@ func (future ReplicationPoliciesUpdateFuture) Result(client ReplicationPoliciesC
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.UpdateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14724,12 +14354,11 @@ func (rpip *ReplicationProtectedItemProperties) UnmarshalJSON(body []byte) error
// long-running operation.
type ReplicationProtectedItemsApplyRecoveryPointFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsApplyRecoveryPointFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsApplyRecoveryPointFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14737,34 +14366,15 @@ func (future ReplicationProtectedItemsApplyRecoveryPointFuture) Result(client Re
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.ApplyRecoveryPointResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.ApplyRecoveryPointResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.ApplyRecoveryPointResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14773,12 +14383,11 @@ func (future ReplicationProtectedItemsApplyRecoveryPointFuture) Result(client Re
// operation.
type ReplicationProtectedItemsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsCreateFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsCreateFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14786,34 +14395,15 @@ func (future ReplicationProtectedItemsCreateFuture) Result(client ReplicationPro
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.CreateResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14822,12 +14412,11 @@ func (future ReplicationProtectedItemsCreateFuture) Result(client ReplicationPro
// operation.
type ReplicationProtectedItemsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsDeleteFuture) Result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
+func (future *ReplicationProtectedItemsDeleteFuture) Result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14835,35 +14424,10 @@ func (future ReplicationProtectedItemsDeleteFuture) Result(client ReplicationPro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14871,12 +14435,11 @@ func (future ReplicationProtectedItemsDeleteFuture) Result(client ReplicationPro
// long-running operation.
type ReplicationProtectedItemsFailoverCommitFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsFailoverCommitFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsFailoverCommitFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14884,34 +14447,15 @@ func (future ReplicationProtectedItemsFailoverCommitFuture) Result(client Replic
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsFailoverCommitFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.FailoverCommitResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsFailoverCommitFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.FailoverCommitResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.FailoverCommitResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14920,12 +14464,11 @@ func (future ReplicationProtectedItemsFailoverCommitFuture) Result(client Replic
// long-running operation.
type ReplicationProtectedItemsPlannedFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsPlannedFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsPlannedFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14933,34 +14476,15 @@ func (future ReplicationProtectedItemsPlannedFailoverFuture) Result(client Repli
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPlannedFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.PlannedFailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPlannedFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.PlannedFailoverResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.PlannedFailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14969,12 +14493,11 @@ func (future ReplicationProtectedItemsPlannedFailoverFuture) Result(client Repli
// operation.
type ReplicationProtectedItemsPurgeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsPurgeFuture) Result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
+func (future *ReplicationProtectedItemsPurgeFuture) Result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14982,35 +14505,10 @@ func (future ReplicationProtectedItemsPurgeFuture) Result(client ReplicationProt
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPurgeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPurgeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPurgeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPurgeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPurgeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15018,12 +14516,11 @@ func (future ReplicationProtectedItemsPurgeFuture) Result(client ReplicationProt
// long-running operation.
type ReplicationProtectedItemsRepairReplicationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsRepairReplicationFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsRepairReplicationFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15031,34 +14528,15 @@ func (future ReplicationProtectedItemsRepairReplicationFuture) Result(client Rep
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsRepairReplicationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.RepairReplicationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsRepairReplicationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.RepairReplicationResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.RepairReplicationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15067,12 +14545,11 @@ func (future ReplicationProtectedItemsRepairReplicationFuture) Result(client Rep
// long-running operation.
type ReplicationProtectedItemsReprotectFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsReprotectFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsReprotectFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15080,34 +14557,15 @@ func (future ReplicationProtectedItemsReprotectFuture) Result(client Replication
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsReprotectFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.ReprotectResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsReprotectFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.ReprotectResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.ReprotectResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15116,12 +14574,11 @@ func (future ReplicationProtectedItemsReprotectFuture) Result(client Replication
// long-running operation.
type ReplicationProtectedItemsTestFailoverCleanupFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsTestFailoverCleanupFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsTestFailoverCleanupFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15129,34 +14586,15 @@ func (future ReplicationProtectedItemsTestFailoverCleanupFuture) Result(client R
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.TestFailoverCleanupResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.TestFailoverCleanupResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.TestFailoverCleanupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15165,12 +14603,11 @@ func (future ReplicationProtectedItemsTestFailoverCleanupFuture) Result(client R
// long-running operation.
type ReplicationProtectedItemsTestFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsTestFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsTestFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15178,34 +14615,15 @@ func (future ReplicationProtectedItemsTestFailoverFuture) Result(client Replicat
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.TestFailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.TestFailoverResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.TestFailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15214,12 +14632,11 @@ func (future ReplicationProtectedItemsTestFailoverFuture) Result(client Replicat
// long-running operation.
type ReplicationProtectedItemsUnplannedFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsUnplannedFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsUnplannedFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15227,34 +14644,15 @@ func (future ReplicationProtectedItemsUnplannedFailoverFuture) Result(client Rep
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.UnplannedFailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.UnplannedFailoverResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.UnplannedFailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15263,12 +14661,11 @@ func (future ReplicationProtectedItemsUnplannedFailoverFuture) Result(client Rep
// operation.
type ReplicationProtectedItemsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsUpdateFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsUpdateFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15276,34 +14673,15 @@ func (future ReplicationProtectedItemsUpdateFuture) Result(client ReplicationPro
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.UpdateResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15312,12 +14690,11 @@ func (future ReplicationProtectedItemsUpdateFuture) Result(client ReplicationPro
// a long-running operation.
type ReplicationProtectedItemsUpdateMobilityServiceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsUpdateMobilityServiceFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsUpdateMobilityServiceFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15325,34 +14702,15 @@ func (future ReplicationProtectedItemsUpdateMobilityServiceFuture) Result(client
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.UpdateMobilityServiceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.UpdateMobilityServiceResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.UpdateMobilityServiceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15361,12 +14719,11 @@ func (future ReplicationProtectedItemsUpdateMobilityServiceFuture) Result(client
// long-running operation.
type ReplicationProtectionContainerMappingsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainerMappingsCreateFuture) Result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) {
+func (future *ReplicationProtectionContainerMappingsCreateFuture) Result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15374,34 +14731,15 @@ func (future ReplicationProtectionContainerMappingsCreateFuture) Result(client R
return
}
if !done {
- return pcm, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcm, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcm.Response.Response, err = future.GetResult(sender); err == nil && pcm.Response.Response.StatusCode != http.StatusNoContent {
+ pcm, err = client.CreateResponder(pcm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", pcm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcm, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15410,12 +14748,11 @@ func (future ReplicationProtectionContainerMappingsCreateFuture) Result(client R
// long-running operation.
type ReplicationProtectionContainerMappingsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainerMappingsDeleteFuture) Result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
+func (future *ReplicationProtectionContainerMappingsDeleteFuture) Result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15423,35 +14760,10 @@ func (future ReplicationProtectionContainerMappingsDeleteFuture) Result(client R
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15459,12 +14771,11 @@ func (future ReplicationProtectionContainerMappingsDeleteFuture) Result(client R
// long-running operation.
type ReplicationProtectionContainerMappingsPurgeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainerMappingsPurgeFuture) Result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
+func (future *ReplicationProtectionContainerMappingsPurgeFuture) Result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15472,35 +14783,10 @@ func (future ReplicationProtectionContainerMappingsPurgeFuture) Result(client Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsPurgeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsPurgeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsPurgeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsPurgeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsPurgeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15508,12 +14794,11 @@ func (future ReplicationProtectionContainerMappingsPurgeFuture) Result(client Re
// long-running operation.
type ReplicationProtectionContainersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainersCreateFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
+func (future *ReplicationProtectionContainersCreateFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15521,34 +14806,15 @@ func (future ReplicationProtectionContainersCreateFuture) Result(client Replicat
return
}
if !done {
- return pc, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pc, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
+ pc, err = client.CreateResponder(pc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", pc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pc, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15557,12 +14823,11 @@ func (future ReplicationProtectionContainersCreateFuture) Result(client Replicat
// long-running operation.
type ReplicationProtectionContainersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainersDeleteFuture) Result(client ReplicationProtectionContainersClient) (ar autorest.Response, err error) {
+func (future *ReplicationProtectionContainersDeleteFuture) Result(client ReplicationProtectionContainersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15570,35 +14835,10 @@ func (future ReplicationProtectionContainersDeleteFuture) Result(client Replicat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15606,12 +14846,11 @@ func (future ReplicationProtectionContainersDeleteFuture) Result(client Replicat
// results of a long-running operation.
type ReplicationProtectionContainersDiscoverProtectableItemFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainersDiscoverProtectableItemFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
+func (future *ReplicationProtectionContainersDiscoverProtectableItemFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15619,34 +14858,15 @@ func (future ReplicationProtectionContainersDiscoverProtectableItemFuture) Resul
return
}
if !done {
- return pc, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pc, err = client.DiscoverProtectableItemResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
+ pc, err = client.DiscoverProtectableItemResponder(pc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", pc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", resp, "Failure sending request")
- return
- }
- pc, err = client.DiscoverProtectableItemResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15655,12 +14875,11 @@ func (future ReplicationProtectionContainersDiscoverProtectableItemFuture) Resul
// of a long-running operation.
type ReplicationProtectionContainersSwitchProtectionFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainersSwitchProtectionFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
+func (future *ReplicationProtectionContainersSwitchProtectionFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15668,34 +14887,15 @@ func (future ReplicationProtectionContainersSwitchProtectionFuture) Result(clien
return
}
if !done {
- return pc, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersSwitchProtectionFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pc, err = client.SwitchProtectionResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersSwitchProtectionFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
+ pc, err = client.SwitchProtectionResponder(pc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", pc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", resp, "Failure sending request")
- return
- }
- pc, err = client.SwitchProtectionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15924,12 +15124,11 @@ func (rpss ReplicationProviderSpecificSettings) AsBasicReplicationProviderSpecif
// operation.
type ReplicationRecoveryPlansCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansCreateFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansCreateFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15937,34 +15136,15 @@ func (future ReplicationRecoveryPlansCreateFuture) Result(client ReplicationReco
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.CreateResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15973,12 +15153,11 @@ func (future ReplicationRecoveryPlansCreateFuture) Result(client ReplicationReco
// operation.
type ReplicationRecoveryPlansDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansDeleteFuture) Result(client ReplicationRecoveryPlansClient) (ar autorest.Response, err error) {
+func (future *ReplicationRecoveryPlansDeleteFuture) Result(client ReplicationRecoveryPlansClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15986,35 +15165,10 @@ func (future ReplicationRecoveryPlansDeleteFuture) Result(client ReplicationReco
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16022,12 +15176,11 @@ func (future ReplicationRecoveryPlansDeleteFuture) Result(client ReplicationReco
// long-running operation.
type ReplicationRecoveryPlansFailoverCommitFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansFailoverCommitFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansFailoverCommitFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16035,34 +15188,15 @@ func (future ReplicationRecoveryPlansFailoverCommitFuture) Result(client Replica
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansFailoverCommitFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.FailoverCommitResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansFailoverCommitFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.FailoverCommitResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.FailoverCommitResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16071,12 +15205,11 @@ func (future ReplicationRecoveryPlansFailoverCommitFuture) Result(client Replica
// long-running operation.
type ReplicationRecoveryPlansPlannedFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansPlannedFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansPlannedFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16084,34 +15217,15 @@ func (future ReplicationRecoveryPlansPlannedFailoverFuture) Result(client Replic
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.PlannedFailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.PlannedFailoverResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.PlannedFailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16120,12 +15234,11 @@ func (future ReplicationRecoveryPlansPlannedFailoverFuture) Result(client Replic
// long-running operation.
type ReplicationRecoveryPlansReprotectFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansReprotectFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansReprotectFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16133,34 +15246,15 @@ func (future ReplicationRecoveryPlansReprotectFuture) Result(client ReplicationR
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansReprotectFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.ReprotectResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansReprotectFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.ReprotectResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.ReprotectResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16169,12 +15263,11 @@ func (future ReplicationRecoveryPlansReprotectFuture) Result(client ReplicationR
// long-running operation.
type ReplicationRecoveryPlansTestFailoverCleanupFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansTestFailoverCleanupFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansTestFailoverCleanupFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16182,34 +15275,15 @@ func (future ReplicationRecoveryPlansTestFailoverCleanupFuture) Result(client Re
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.TestFailoverCleanupResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.TestFailoverCleanupResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.TestFailoverCleanupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16218,12 +15292,11 @@ func (future ReplicationRecoveryPlansTestFailoverCleanupFuture) Result(client Re
// long-running operation.
type ReplicationRecoveryPlansTestFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansTestFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansTestFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16231,34 +15304,15 @@ func (future ReplicationRecoveryPlansTestFailoverFuture) Result(client Replicati
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.TestFailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.TestFailoverResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.TestFailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16267,12 +15321,11 @@ func (future ReplicationRecoveryPlansTestFailoverFuture) Result(client Replicati
// long-running operation.
type ReplicationRecoveryPlansUnplannedFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansUnplannedFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansUnplannedFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16280,34 +15333,15 @@ func (future ReplicationRecoveryPlansUnplannedFailoverFuture) Result(client Repl
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.UnplannedFailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.UnplannedFailoverResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.UnplannedFailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16316,12 +15350,11 @@ func (future ReplicationRecoveryPlansUnplannedFailoverFuture) Result(client Repl
// operation.
type ReplicationRecoveryPlansUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansUpdateFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansUpdateFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16329,34 +15362,15 @@ func (future ReplicationRecoveryPlansUpdateFuture) Result(client ReplicationReco
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.UpdateResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16365,12 +15379,11 @@ func (future ReplicationRecoveryPlansUpdateFuture) Result(client ReplicationReco
// long-running operation.
type ReplicationRecoveryServicesProvidersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryServicesProvidersDeleteFuture) Result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
+func (future *ReplicationRecoveryServicesProvidersDeleteFuture) Result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16378,35 +15391,10 @@ func (future ReplicationRecoveryServicesProvidersDeleteFuture) Result(client Rep
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16414,12 +15402,11 @@ func (future ReplicationRecoveryServicesProvidersDeleteFuture) Result(client Rep
// long-running operation.
type ReplicationRecoveryServicesProvidersPurgeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryServicesProvidersPurgeFuture) Result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
+func (future *ReplicationRecoveryServicesProvidersPurgeFuture) Result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16427,35 +15414,10 @@ func (future ReplicationRecoveryServicesProvidersPurgeFuture) Result(client Repl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16463,12 +15425,11 @@ func (future ReplicationRecoveryServicesProvidersPurgeFuture) Result(client Repl
// results of a long-running operation.
type ReplicationRecoveryServicesProvidersRefreshProviderFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryServicesProvidersRefreshProviderFuture) Result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) {
+func (future *ReplicationRecoveryServicesProvidersRefreshProviderFuture) Result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16476,34 +15437,15 @@ func (future ReplicationRecoveryServicesProvidersRefreshProviderFuture) Result(c
return
}
if !done {
- return rsp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rsp, err = client.RefreshProviderResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rsp.Response.Response, err = future.GetResult(sender); err == nil && rsp.Response.Response.StatusCode != http.StatusNoContent {
+ rsp, err = client.RefreshProviderResponder(rsp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", rsp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", resp, "Failure sending request")
- return
- }
- rsp, err = client.RefreshProviderResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16512,12 +15454,11 @@ func (future ReplicationRecoveryServicesProvidersRefreshProviderFuture) Result(c
// a long-running operation.
type ReplicationStorageClassificationMappingsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationStorageClassificationMappingsCreateFuture) Result(client ReplicationStorageClassificationMappingsClient) (scm StorageClassificationMapping, err error) {
+func (future *ReplicationStorageClassificationMappingsCreateFuture) Result(client ReplicationStorageClassificationMappingsClient) (scm StorageClassificationMapping, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16525,34 +15466,15 @@ func (future ReplicationStorageClassificationMappingsCreateFuture) Result(client
return
}
if !done {
- return scm, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- scm, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if scm.Response.Response, err = future.GetResult(sender); err == nil && scm.Response.Response.StatusCode != http.StatusNoContent {
+ scm, err = client.CreateResponder(scm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", scm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- scm, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16561,12 +15483,11 @@ func (future ReplicationStorageClassificationMappingsCreateFuture) Result(client
// a long-running operation.
type ReplicationStorageClassificationMappingsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationStorageClassificationMappingsDeleteFuture) Result(client ReplicationStorageClassificationMappingsClient) (ar autorest.Response, err error) {
+func (future *ReplicationStorageClassificationMappingsDeleteFuture) Result(client ReplicationStorageClassificationMappingsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16574,35 +15495,10 @@ func (future ReplicationStorageClassificationMappingsDeleteFuture) Result(client
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16610,12 +15506,11 @@ func (future ReplicationStorageClassificationMappingsDeleteFuture) Result(client
// operation.
type ReplicationvCentersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationvCentersCreateFuture) Result(client ReplicationvCentersClient) (vc VCenter, err error) {
+func (future *ReplicationvCentersCreateFuture) Result(client ReplicationvCentersClient) (vc VCenter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16623,34 +15518,15 @@ func (future ReplicationvCentersCreateFuture) Result(client ReplicationvCentersC
return
}
if !done {
- return vc, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vc, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
+ vc, err = client.CreateResponder(vc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", vc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- vc, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16659,12 +15535,11 @@ func (future ReplicationvCentersCreateFuture) Result(client ReplicationvCentersC
// operation.
type ReplicationvCentersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationvCentersDeleteFuture) Result(client ReplicationvCentersClient) (ar autorest.Response, err error) {
+func (future *ReplicationvCentersDeleteFuture) Result(client ReplicationvCentersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16672,35 +15547,10 @@ func (future ReplicationvCentersDeleteFuture) Result(client ReplicationvCentersC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16708,12 +15558,11 @@ func (future ReplicationvCentersDeleteFuture) Result(client ReplicationvCentersC
// operation.
type ReplicationvCentersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationvCentersUpdateFuture) Result(client ReplicationvCentersClient) (vc VCenter, err error) {
+func (future *ReplicationvCentersUpdateFuture) Result(client ReplicationvCentersClient) (vc VCenter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16721,34 +15570,15 @@ func (future ReplicationvCentersUpdateFuture) Result(client ReplicationvCentersC
return
}
if !done {
- return vc, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vc, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
+ vc, err = client.UpdateResponder(vc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vc, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationfabrics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationfabrics.go
index dbc9f9fe1..e9847b604 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationfabrics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationfabrics.go
@@ -83,15 +83,17 @@ func (client ReplicationFabricsClient) CheckConsistencyPreparer(ctx context.Cont
// CheckConsistencySender sends the CheckConsistency request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationFabricsClient) CheckConsistencySender(req *http.Request) (future ReplicationFabricsCheckConsistencyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ReplicationFabricsClient) CreatePreparer(ctx context.Context, fabri
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationFabricsClient) CreateSender(req *http.Request) (future ReplicationFabricsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -224,15 +228,17 @@ func (client ReplicationFabricsClient) DeletePreparer(ctx context.Context, fabri
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationFabricsClient) DeleteSender(req *http.Request) (future ReplicationFabricsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -451,15 +457,17 @@ func (client ReplicationFabricsClient) MigrateToAadPreparer(ctx context.Context,
// 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) (future ReplicationFabricsMigrateToAadFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -519,15 +527,17 @@ func (client ReplicationFabricsClient) PurgePreparer(ctx context.Context, fabric
// PurgeSender sends the Purge request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationFabricsClient) PurgeSender(req *http.Request) (future ReplicationFabricsPurgeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -590,15 +600,17 @@ func (client ReplicationFabricsClient) ReassociateGatewayPreparer(ctx context.Co
// ReassociateGatewaySender sends the ReassociateGateway request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationFabricsClient) ReassociateGatewaySender(req *http.Request) (future ReplicationFabricsReassociateGatewayFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -662,15 +674,17 @@ func (client ReplicationFabricsClient) RenewCertificatePreparer(ctx context.Cont
// RenewCertificateSender sends the RenewCertificate request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationFabricsClient) RenewCertificateSender(req *http.Request) (future ReplicationFabricsRenewCertificateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationjobs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationjobs.go
index 699979246..5d2c19e12 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationjobs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationjobs.go
@@ -83,15 +83,17 @@ func (client ReplicationJobsClient) CancelPreparer(ctx context.Context, jobName
// CancelSender sends the Cancel request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationJobsClient) CancelSender(req *http.Request) (future ReplicationJobsCancelFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -153,15 +155,17 @@ func (client ReplicationJobsClient) ExportPreparer(ctx context.Context, jobQuery
// ExportSender sends the Export request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationJobsClient) ExportSender(req *http.Request) (future ReplicationJobsExportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -386,15 +390,17 @@ func (client ReplicationJobsClient) RestartPreparer(ctx context.Context, jobName
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationJobsClient) RestartSender(req *http.Request) (future ReplicationJobsRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -458,15 +464,17 @@ func (client ReplicationJobsClient) ResumePreparer(ctx context.Context, jobName
// ResumeSender sends the Resume request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationJobsClient) ResumeSender(req *http.Request) (future ReplicationJobsResumeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationnetworkmappings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationnetworkmappings.go
index 45aa8a97a..4838df2c6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationnetworkmappings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationnetworkmappings.go
@@ -91,15 +91,17 @@ func (client ReplicationNetworkMappingsClient) CreatePreparer(ctx context.Contex
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationNetworkMappingsClient) CreateSender(req *http.Request) (future ReplicationNetworkMappingsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -164,15 +166,17 @@ func (client ReplicationNetworkMappingsClient) DeletePreparer(ctx context.Contex
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationNetworkMappingsClient) DeleteSender(req *http.Request) (future ReplicationNetworkMappingsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -499,15 +503,17 @@ func (client ReplicationNetworkMappingsClient) UpdatePreparer(ctx context.Contex
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationNetworkMappingsClient) UpdateSender(req *http.Request) (future ReplicationNetworkMappingsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationpolicies.go
index 73f05508f..d9f9c7df3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationpolicies.go
@@ -86,15 +86,17 @@ func (client ReplicationPoliciesClient) CreatePreparer(ctx context.Context, poli
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationPoliciesClient) CreateSender(req *http.Request) (future ReplicationPoliciesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ReplicationPoliciesClient) DeletePreparer(ctx context.Context, poli
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationPoliciesClient) DeleteSender(req *http.Request) (future ReplicationPoliciesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -385,15 +389,17 @@ func (client ReplicationPoliciesClient) UpdatePreparer(ctx context.Context, poli
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationPoliciesClient) UpdateSender(req *http.Request) (future ReplicationPoliciesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotecteditems.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotecteditems.go
index c74fe01b3..35e06c241 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotecteditems.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotecteditems.go
@@ -91,15 +91,17 @@ func (client ReplicationProtectedItemsClient) ApplyRecoveryPointPreparer(ctx con
// ApplyRecoveryPointSender sends the ApplyRecoveryPoint request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) ApplyRecoveryPointSender(req *http.Request) (future ReplicationProtectedItemsApplyRecoveryPointFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client ReplicationProtectedItemsClient) CreatePreparer(ctx context.Context
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) CreateSender(req *http.Request) (future ReplicationProtectedItemsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -243,15 +247,17 @@ func (client ReplicationProtectedItemsClient) DeletePreparer(ctx context.Context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) DeleteSender(req *http.Request) (future ReplicationProtectedItemsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -315,15 +321,17 @@ func (client ReplicationProtectedItemsClient) FailoverCommitPreparer(ctx context
// FailoverCommitSender sends the FailoverCommit request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) FailoverCommitSender(req *http.Request) (future ReplicationProtectedItemsFailoverCommitFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -660,15 +668,17 @@ func (client ReplicationProtectedItemsClient) PlannedFailoverPreparer(ctx contex
// PlannedFailoverSender sends the PlannedFailover request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) PlannedFailoverSender(req *http.Request) (future ReplicationProtectedItemsPlannedFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -735,15 +745,17 @@ func (client ReplicationProtectedItemsClient) PurgePreparer(ctx context.Context,
// PurgeSender sends the Purge request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) PurgeSender(req *http.Request) (future ReplicationProtectedItemsPurgeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -808,15 +820,17 @@ func (client ReplicationProtectedItemsClient) RepairReplicationPreparer(ctx cont
// RepairReplicationSender sends the RepairReplication request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) RepairReplicationSender(req *http.Request) (future ReplicationProtectedItemsRepairReplicationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -884,15 +898,17 @@ func (client ReplicationProtectedItemsClient) ReprotectPreparer(ctx context.Cont
// ReprotectSender sends the Reprotect request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) ReprotectSender(req *http.Request) (future ReplicationProtectedItemsReprotectFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -960,15 +976,17 @@ func (client ReplicationProtectedItemsClient) TestFailoverPreparer(ctx context.C
// TestFailoverSender sends the TestFailover request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) TestFailoverSender(req *http.Request) (future ReplicationProtectedItemsTestFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1042,15 +1060,17 @@ func (client ReplicationProtectedItemsClient) TestFailoverCleanupPreparer(ctx co
// TestFailoverCleanupSender sends the TestFailoverCleanup request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) TestFailoverCleanupSender(req *http.Request) (future ReplicationProtectedItemsTestFailoverCleanupFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1118,15 +1138,17 @@ func (client ReplicationProtectedItemsClient) UnplannedFailoverPreparer(ctx cont
// UnplannedFailoverSender sends the UnplannedFailover request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) UnplannedFailoverSender(req *http.Request) (future ReplicationProtectedItemsUnplannedFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1194,15 +1216,17 @@ func (client ReplicationProtectedItemsClient) UpdatePreparer(ctx context.Context
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) UpdateSender(req *http.Request) (future ReplicationProtectedItemsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1271,15 +1295,17 @@ func (client ReplicationProtectedItemsClient) UpdateMobilityServicePreparer(ctx
// UpdateMobilityServiceSender sends the UpdateMobilityService request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) UpdateMobilityServiceSender(req *http.Request) (future ReplicationProtectedItemsUpdateMobilityServiceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainermappings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainermappings.go
index bfd128184..4bee325ab 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainermappings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainermappings.go
@@ -93,15 +93,17 @@ func (client ReplicationProtectionContainerMappingsClient) CreatePreparer(ctx co
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainerMappingsClient) CreateSender(req *http.Request) (future ReplicationProtectionContainerMappingsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client ReplicationProtectionContainerMappingsClient) DeletePreparer(ctx co
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainerMappingsClient) DeleteSender(req *http.Request) (future ReplicationProtectionContainerMappingsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -501,15 +505,17 @@ func (client ReplicationProtectionContainerMappingsClient) PurgePreparer(ctx con
// PurgeSender sends the Purge request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainerMappingsClient) PurgeSender(req *http.Request) (future ReplicationProtectionContainerMappingsPurgeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainers.go
index 624811c4a..44048bca7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainers.go
@@ -90,15 +90,17 @@ func (client ReplicationProtectionContainersClient) CreatePreparer(ctx context.C
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainersClient) CreateSender(req *http.Request) (future ReplicationProtectionContainersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -161,15 +163,17 @@ func (client ReplicationProtectionContainersClient) DeletePreparer(ctx context.C
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainersClient) DeleteSender(req *http.Request) (future ReplicationProtectionContainersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -234,15 +238,17 @@ func (client ReplicationProtectionContainersClient) DiscoverProtectableItemPrepa
// DiscoverProtectableItemSender sends the DiscoverProtectableItem request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainersClient) DiscoverProtectableItemSender(req *http.Request) (future ReplicationProtectionContainersDiscoverProtectableItemFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -565,15 +571,17 @@ func (client ReplicationProtectionContainersClient) SwitchProtectionPreparer(ctx
// SwitchProtectionSender sends the SwitchProtection request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainersClient) SwitchProtectionSender(req *http.Request) (future ReplicationProtectionContainersSwitchProtectionFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryplans.go
index 9d9a5a750..d3c12933d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryplans.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryplans.go
@@ -97,15 +97,17 @@ func (client ReplicationRecoveryPlansClient) CreatePreparer(ctx context.Context,
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) CreateSender(req *http.Request) (future ReplicationRecoveryPlansCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -166,15 +168,17 @@ func (client ReplicationRecoveryPlansClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) DeleteSender(req *http.Request) (future ReplicationRecoveryPlansDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -234,15 +238,17 @@ func (client ReplicationRecoveryPlansClient) FailoverCommitPreparer(ctx context.
// FailoverCommitSender sends the FailoverCommit request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) FailoverCommitSender(req *http.Request) (future ReplicationRecoveryPlansFailoverCommitFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -471,15 +477,17 @@ func (client ReplicationRecoveryPlansClient) PlannedFailoverPreparer(ctx context
// PlannedFailoverSender sends the PlannedFailover request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) PlannedFailoverSender(req *http.Request) (future ReplicationRecoveryPlansPlannedFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -540,15 +548,17 @@ func (client ReplicationRecoveryPlansClient) ReprotectPreparer(ctx context.Conte
// ReprotectSender sends the Reprotect request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) ReprotectSender(req *http.Request) (future ReplicationRecoveryPlansReprotectFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -619,15 +629,17 @@ func (client ReplicationRecoveryPlansClient) TestFailoverPreparer(ctx context.Co
// TestFailoverSender sends the TestFailover request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) TestFailoverSender(req *http.Request) (future ReplicationRecoveryPlansTestFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -697,15 +709,17 @@ func (client ReplicationRecoveryPlansClient) TestFailoverCleanupPreparer(ctx con
// TestFailoverCleanupSender sends the TestFailoverCleanup request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) TestFailoverCleanupSender(req *http.Request) (future ReplicationRecoveryPlansTestFailoverCleanupFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -775,15 +789,17 @@ func (client ReplicationRecoveryPlansClient) UnplannedFailoverPreparer(ctx conte
// UnplannedFailoverSender sends the UnplannedFailover request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) UnplannedFailoverSender(req *http.Request) (future ReplicationRecoveryPlansUnplannedFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -847,15 +863,17 @@ func (client ReplicationRecoveryPlansClient) UpdatePreparer(ctx context.Context,
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) UpdateSender(req *http.Request) (future ReplicationRecoveryPlansUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryservicesproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryservicesproviders.go
index ca91b85bc..81c1426d2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryservicesproviders.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryservicesproviders.go
@@ -88,15 +88,17 @@ func (client ReplicationRecoveryServicesProvidersClient) DeletePreparer(ctx cont
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryServicesProvidersClient) DeleteSender(req *http.Request) (future ReplicationRecoveryServicesProvidersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -414,15 +416,17 @@ func (client ReplicationRecoveryServicesProvidersClient) PurgePreparer(ctx conte
// PurgeSender sends the Purge request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryServicesProvidersClient) PurgeSender(req *http.Request) (future ReplicationRecoveryServicesProvidersPurgeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -484,15 +488,17 @@ func (client ReplicationRecoveryServicesProvidersClient) RefreshProviderPreparer
// RefreshProviderSender sends the RefreshProvider request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryServicesProvidersClient) RefreshProviderSender(req *http.Request) (future ReplicationRecoveryServicesProvidersRefreshProviderFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationstorageclassificationmappings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationstorageclassificationmappings.go
index 3837059ed..6241b954d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationstorageclassificationmappings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationstorageclassificationmappings.go
@@ -93,15 +93,17 @@ func (client ReplicationStorageClassificationMappingsClient) CreatePreparer(ctx
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationStorageClassificationMappingsClient) CreateSender(req *http.Request) (future ReplicationStorageClassificationMappingsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -166,15 +168,17 @@ func (client ReplicationStorageClassificationMappingsClient) DeletePreparer(ctx
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationStorageClassificationMappingsClient) DeleteSender(req *http.Request) (future ReplicationStorageClassificationMappingsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationvcenters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationvcenters.go
index d339874b3..0fb55e353 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationvcenters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationvcenters.go
@@ -88,15 +88,17 @@ func (client ReplicationvCentersClient) CreatePreparer(ctx context.Context, fabr
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationvCentersClient) CreateSender(req *http.Request) (future ReplicationvCentersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client ReplicationvCentersClient) DeletePreparer(ctx context.Context, fabr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationvCentersClient) DeleteSender(req *http.Request) (future ReplicationvCentersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -488,15 +492,17 @@ func (client ReplicationvCentersClient) UpdatePreparer(ctx context.Context, fabr
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationvCentersClient) UpdateSender(req *http.Request) (future ReplicationvCentersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/models.go
index 2fdefcb68..e294e9c17 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/models.go
@@ -10095,9 +10095,9 @@ type JobQueryParameter struct {
// FabricID - The Id of the fabric to search jobs under.
FabricID *string `json:"fabricId,omitempty"`
// AffectedObjectTypes - The type of objects.
- AffectedObjectTypes *[]string `json:"affectedObjectTypes,omitempty"`
+ AffectedObjectTypes *string `json:"affectedObjectTypes,omitempty"`
// JobStatus - The states of the job to be filtered can be in.
- JobStatus *[]string `json:"jobStatus,omitempty"`
+ JobStatus *string `json:"jobStatus,omitempty"`
}
// JobStatusEventDetails model class for event details of a job status event.
@@ -11860,6 +11860,12 @@ func (pip *ProtectableItemProperties) UnmarshalJSON(body []byte) error {
return nil
}
+// ProtectableItemQueryParameter query parameter to enumerate Protectable items.
+type ProtectableItemQueryParameter struct {
+ // State - State of the Protectable item query filter.
+ State *string `json:"state,omitempty"`
+}
+
// ProtectedItemsQueryParameter query parameter to enumerate protected items.
type ProtectedItemsQueryParameter struct {
// SourceFabricName - The source fabric name filter.
@@ -14242,12 +14248,11 @@ type RenewCertificateInputProperties struct {
// long-running operation.
type ReplicationFabricsCheckConsistencyFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsCheckConsistencyFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
+func (future *ReplicationFabricsCheckConsistencyFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14255,34 +14260,15 @@ func (future ReplicationFabricsCheckConsistencyFuture) Result(client Replication
return
}
if !done {
- return f, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCheckConsistencyFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- f, err = client.CheckConsistencyResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCheckConsistencyFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
+ f, err = client.CheckConsistencyResponder(f.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", f.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", resp, "Failure sending request")
- return
- }
- f, err = client.CheckConsistencyResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14291,12 +14277,11 @@ func (future ReplicationFabricsCheckConsistencyFuture) Result(client Replication
// operation.
type ReplicationFabricsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsCreateFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
+func (future *ReplicationFabricsCreateFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14304,34 +14289,15 @@ func (future ReplicationFabricsCreateFuture) Result(client ReplicationFabricsCli
return
}
if !done {
- return f, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- f, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
+ f, err = client.CreateResponder(f.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", f.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- f, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14340,12 +14306,11 @@ func (future ReplicationFabricsCreateFuture) Result(client ReplicationFabricsCli
// operation.
type ReplicationFabricsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsDeleteFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
+func (future *ReplicationFabricsDeleteFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14353,35 +14318,10 @@ func (future ReplicationFabricsDeleteFuture) Result(client ReplicationFabricsCli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14389,12 +14329,11 @@ func (future ReplicationFabricsDeleteFuture) Result(client ReplicationFabricsCli
// operation.
type ReplicationFabricsMigrateToAadFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsMigrateToAadFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
+func (future *ReplicationFabricsMigrateToAadFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14402,35 +14341,10 @@ func (future ReplicationFabricsMigrateToAadFuture) Result(client ReplicationFabr
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsMigrateToAadFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.MigrateToAadResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsMigrateToAadFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsMigrateToAadFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsMigrateToAadFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.MigrateToAadResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsMigrateToAadFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14438,12 +14352,11 @@ func (future ReplicationFabricsMigrateToAadFuture) Result(client ReplicationFabr
// operation.
type ReplicationFabricsPurgeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsPurgeFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
+func (future *ReplicationFabricsPurgeFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14451,35 +14364,10 @@ func (future ReplicationFabricsPurgeFuture) Result(client ReplicationFabricsClie
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsPurgeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsPurgeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsPurgeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsPurgeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsPurgeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14487,12 +14375,11 @@ func (future ReplicationFabricsPurgeFuture) Result(client ReplicationFabricsClie
// long-running operation.
type ReplicationFabricsReassociateGatewayFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsReassociateGatewayFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
+func (future *ReplicationFabricsReassociateGatewayFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14500,34 +14387,15 @@ func (future ReplicationFabricsReassociateGatewayFuture) Result(client Replicati
return
}
if !done {
- return f, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsReassociateGatewayFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- f, err = client.ReassociateGatewayResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsReassociateGatewayFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
+ f, err = client.ReassociateGatewayResponder(f.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", f.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", resp, "Failure sending request")
- return
- }
- f, err = client.ReassociateGatewayResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14536,12 +14404,11 @@ func (future ReplicationFabricsReassociateGatewayFuture) Result(client Replicati
// long-running operation.
type ReplicationFabricsRenewCertificateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationFabricsRenewCertificateFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
+func (future *ReplicationFabricsRenewCertificateFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14549,34 +14416,15 @@ func (future ReplicationFabricsRenewCertificateFuture) Result(client Replication
return
}
if !done {
- return f, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsRenewCertificateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- f, err = client.RenewCertificateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsRenewCertificateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
+ f, err = client.RenewCertificateResponder(f.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", f.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", resp, "Failure sending request")
- return
- }
- f, err = client.RenewCertificateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14631,12 +14479,11 @@ func (rgd ReplicationGroupDetails) AsBasicConfigurationSettings() (BasicConfigur
// operation.
type ReplicationJobsCancelFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationJobsCancelFuture) Result(client ReplicationJobsClient) (j Job, err error) {
+func (future *ReplicationJobsCancelFuture) Result(client ReplicationJobsClient) (j Job, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14644,34 +14491,15 @@ func (future ReplicationJobsCancelFuture) Result(client ReplicationJobsClient) (
return
}
if !done {
- return j, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsCancelFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- j, err = client.CancelResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsCancelFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
+ j, err = client.CancelResponder(j.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", j.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", resp, "Failure sending request")
- return
- }
- j, err = client.CancelResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14680,12 +14508,11 @@ func (future ReplicationJobsCancelFuture) Result(client ReplicationJobsClient) (
// operation.
type ReplicationJobsExportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationJobsExportFuture) Result(client ReplicationJobsClient) (j Job, err error) {
+func (future *ReplicationJobsExportFuture) Result(client ReplicationJobsClient) (j Job, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14693,34 +14520,15 @@ func (future ReplicationJobsExportFuture) Result(client ReplicationJobsClient) (
return
}
if !done {
- return j, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsExportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- j, err = client.ExportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsExportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
+ j, err = client.ExportResponder(j.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", j.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", resp, "Failure sending request")
- return
- }
- j, err = client.ExportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14729,12 +14537,11 @@ func (future ReplicationJobsExportFuture) Result(client ReplicationJobsClient) (
// operation.
type ReplicationJobsRestartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationJobsRestartFuture) Result(client ReplicationJobsClient) (j Job, err error) {
+func (future *ReplicationJobsRestartFuture) Result(client ReplicationJobsClient) (j Job, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14742,34 +14549,15 @@ func (future ReplicationJobsRestartFuture) Result(client ReplicationJobsClient)
return
}
if !done {
- return j, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsRestartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- j, err = client.RestartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsRestartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
+ j, err = client.RestartResponder(j.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", j.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", resp, "Failure sending request")
- return
- }
- j, err = client.RestartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14778,12 +14566,11 @@ func (future ReplicationJobsRestartFuture) Result(client ReplicationJobsClient)
// operation.
type ReplicationJobsResumeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationJobsResumeFuture) Result(client ReplicationJobsClient) (j Job, err error) {
+func (future *ReplicationJobsResumeFuture) Result(client ReplicationJobsClient) (j Job, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14791,34 +14578,15 @@ func (future ReplicationJobsResumeFuture) Result(client ReplicationJobsClient) (
return
}
if !done {
- return j, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsResumeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- j, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsResumeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent {
+ j, err = client.ResumeResponder(j.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", j.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", resp, "Failure sending request")
- return
- }
- j, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14827,12 +14595,11 @@ func (future ReplicationJobsResumeFuture) Result(client ReplicationJobsClient) (
// long-running operation.
type ReplicationNetworkMappingsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationNetworkMappingsCreateFuture) Result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
+func (future *ReplicationNetworkMappingsCreateFuture) Result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14840,34 +14607,15 @@ func (future ReplicationNetworkMappingsCreateFuture) Result(client ReplicationNe
return
}
if !done {
- return nm, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nm, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent {
+ nm, err = client.CreateResponder(nm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", nm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- nm, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14876,12 +14624,11 @@ func (future ReplicationNetworkMappingsCreateFuture) Result(client ReplicationNe
// long-running operation.
type ReplicationNetworkMappingsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationNetworkMappingsDeleteFuture) Result(client ReplicationNetworkMappingsClient) (ar autorest.Response, err error) {
+func (future *ReplicationNetworkMappingsDeleteFuture) Result(client ReplicationNetworkMappingsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14889,35 +14636,10 @@ func (future ReplicationNetworkMappingsDeleteFuture) Result(client ReplicationNe
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -14925,12 +14647,11 @@ func (future ReplicationNetworkMappingsDeleteFuture) Result(client ReplicationNe
// long-running operation.
type ReplicationNetworkMappingsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationNetworkMappingsUpdateFuture) Result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
+func (future *ReplicationNetworkMappingsUpdateFuture) Result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14938,34 +14659,15 @@ func (future ReplicationNetworkMappingsUpdateFuture) Result(client ReplicationNe
return
}
if !done {
- return nm, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nm, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent {
+ nm, err = client.UpdateResponder(nm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", nm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- nm, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -14974,12 +14676,11 @@ func (future ReplicationNetworkMappingsUpdateFuture) Result(client ReplicationNe
// operation.
type ReplicationPoliciesCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationPoliciesCreateFuture) Result(client ReplicationPoliciesClient) (p Policy, err error) {
+func (future *ReplicationPoliciesCreateFuture) Result(client ReplicationPoliciesClient) (p Policy, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -14987,34 +14688,15 @@ func (future ReplicationPoliciesCreateFuture) Result(client ReplicationPoliciesC
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.CreateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15023,12 +14705,11 @@ func (future ReplicationPoliciesCreateFuture) Result(client ReplicationPoliciesC
// operation.
type ReplicationPoliciesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationPoliciesDeleteFuture) Result(client ReplicationPoliciesClient) (ar autorest.Response, err error) {
+func (future *ReplicationPoliciesDeleteFuture) Result(client ReplicationPoliciesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15036,35 +14717,10 @@ func (future ReplicationPoliciesDeleteFuture) Result(client ReplicationPoliciesC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15072,12 +14728,11 @@ func (future ReplicationPoliciesDeleteFuture) Result(client ReplicationPoliciesC
// operation.
type ReplicationPoliciesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationPoliciesUpdateFuture) Result(client ReplicationPoliciesClient) (p Policy, err error) {
+func (future *ReplicationPoliciesUpdateFuture) Result(client ReplicationPoliciesClient) (p Policy, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15085,34 +14740,15 @@ func (future ReplicationPoliciesUpdateFuture) Result(client ReplicationPoliciesC
return
}
if !done {
- return p, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- p, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
+ p, err = client.UpdateResponder(p.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", p.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- p, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15554,12 +15190,11 @@ func (rpip *ReplicationProtectedItemProperties) UnmarshalJSON(body []byte) error
// long-running operation.
type ReplicationProtectedItemsApplyRecoveryPointFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsApplyRecoveryPointFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsApplyRecoveryPointFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15567,34 +15202,15 @@ func (future ReplicationProtectedItemsApplyRecoveryPointFuture) Result(client Re
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.ApplyRecoveryPointResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.ApplyRecoveryPointResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.ApplyRecoveryPointResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15603,12 +15219,11 @@ func (future ReplicationProtectedItemsApplyRecoveryPointFuture) Result(client Re
// operation.
type ReplicationProtectedItemsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsCreateFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsCreateFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15616,34 +15231,15 @@ func (future ReplicationProtectedItemsCreateFuture) Result(client ReplicationPro
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.CreateResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15652,12 +15248,11 @@ func (future ReplicationProtectedItemsCreateFuture) Result(client ReplicationPro
// operation.
type ReplicationProtectedItemsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsDeleteFuture) Result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
+func (future *ReplicationProtectedItemsDeleteFuture) Result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15665,35 +15260,10 @@ func (future ReplicationProtectedItemsDeleteFuture) Result(client ReplicationPro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15701,12 +15271,11 @@ func (future ReplicationProtectedItemsDeleteFuture) Result(client ReplicationPro
// long-running operation.
type ReplicationProtectedItemsFailoverCommitFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsFailoverCommitFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsFailoverCommitFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15714,34 +15283,15 @@ func (future ReplicationProtectedItemsFailoverCommitFuture) Result(client Replic
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsFailoverCommitFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.FailoverCommitResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsFailoverCommitFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.FailoverCommitResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.FailoverCommitResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15750,12 +15300,11 @@ func (future ReplicationProtectedItemsFailoverCommitFuture) Result(client Replic
// long-running operation.
type ReplicationProtectedItemsPlannedFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsPlannedFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsPlannedFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15763,34 +15312,15 @@ func (future ReplicationProtectedItemsPlannedFailoverFuture) Result(client Repli
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPlannedFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.PlannedFailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPlannedFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.PlannedFailoverResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.PlannedFailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15799,12 +15329,11 @@ func (future ReplicationProtectedItemsPlannedFailoverFuture) Result(client Repli
// operation.
type ReplicationProtectedItemsPurgeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsPurgeFuture) Result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
+func (future *ReplicationProtectedItemsPurgeFuture) Result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15812,35 +15341,10 @@ func (future ReplicationProtectedItemsPurgeFuture) Result(client ReplicationProt
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPurgeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPurgeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPurgeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPurgeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPurgeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -15848,12 +15352,11 @@ func (future ReplicationProtectedItemsPurgeFuture) Result(client ReplicationProt
// long-running operation.
type ReplicationProtectedItemsRepairReplicationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsRepairReplicationFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsRepairReplicationFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15861,34 +15364,15 @@ func (future ReplicationProtectedItemsRepairReplicationFuture) Result(client Rep
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsRepairReplicationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.RepairReplicationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsRepairReplicationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.RepairReplicationResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.RepairReplicationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15897,12 +15381,11 @@ func (future ReplicationProtectedItemsRepairReplicationFuture) Result(client Rep
// long-running operation.
type ReplicationProtectedItemsReprotectFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsReprotectFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsReprotectFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15910,34 +15393,15 @@ func (future ReplicationProtectedItemsReprotectFuture) Result(client Replication
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsReprotectFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.ReprotectResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsReprotectFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.ReprotectResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.ReprotectResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15946,12 +15410,11 @@ func (future ReplicationProtectedItemsReprotectFuture) Result(client Replication
// long-running operation.
type ReplicationProtectedItemsTestFailoverCleanupFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsTestFailoverCleanupFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsTestFailoverCleanupFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -15959,34 +15422,15 @@ func (future ReplicationProtectedItemsTestFailoverCleanupFuture) Result(client R
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.TestFailoverCleanupResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.TestFailoverCleanupResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.TestFailoverCleanupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -15995,12 +15439,11 @@ func (future ReplicationProtectedItemsTestFailoverCleanupFuture) Result(client R
// long-running operation.
type ReplicationProtectedItemsTestFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsTestFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsTestFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16008,34 +15451,15 @@ func (future ReplicationProtectedItemsTestFailoverFuture) Result(client Replicat
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.TestFailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.TestFailoverResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.TestFailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16044,12 +15468,11 @@ func (future ReplicationProtectedItemsTestFailoverFuture) Result(client Replicat
// long-running operation.
type ReplicationProtectedItemsUnplannedFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsUnplannedFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsUnplannedFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16057,34 +15480,15 @@ func (future ReplicationProtectedItemsUnplannedFailoverFuture) Result(client Rep
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.UnplannedFailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.UnplannedFailoverResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.UnplannedFailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16093,12 +15497,11 @@ func (future ReplicationProtectedItemsUnplannedFailoverFuture) Result(client Rep
// operation.
type ReplicationProtectedItemsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsUpdateFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsUpdateFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16106,34 +15509,15 @@ func (future ReplicationProtectedItemsUpdateFuture) Result(client ReplicationPro
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.UpdateResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16142,12 +15526,11 @@ func (future ReplicationProtectedItemsUpdateFuture) Result(client ReplicationPro
// a long-running operation.
type ReplicationProtectedItemsUpdateMobilityServiceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectedItemsUpdateMobilityServiceFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
+func (future *ReplicationProtectedItemsUpdateMobilityServiceFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16155,34 +15538,15 @@ func (future ReplicationProtectedItemsUpdateMobilityServiceFuture) Result(client
return
}
if !done {
- return rpi, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rpi, err = client.UpdateMobilityServiceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent {
+ rpi, err = client.UpdateMobilityServiceResponder(rpi.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", rpi.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", resp, "Failure sending request")
- return
- }
- rpi, err = client.UpdateMobilityServiceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16191,12 +15555,11 @@ func (future ReplicationProtectedItemsUpdateMobilityServiceFuture) Result(client
// long-running operation.
type ReplicationProtectionContainerMappingsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainerMappingsCreateFuture) Result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) {
+func (future *ReplicationProtectionContainerMappingsCreateFuture) Result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16204,34 +15567,15 @@ func (future ReplicationProtectionContainerMappingsCreateFuture) Result(client R
return
}
if !done {
- return pcm, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcm, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcm.Response.Response, err = future.GetResult(sender); err == nil && pcm.Response.Response.StatusCode != http.StatusNoContent {
+ pcm, err = client.CreateResponder(pcm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", pcm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcm, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16240,12 +15584,11 @@ func (future ReplicationProtectionContainerMappingsCreateFuture) Result(client R
// long-running operation.
type ReplicationProtectionContainerMappingsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainerMappingsDeleteFuture) Result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
+func (future *ReplicationProtectionContainerMappingsDeleteFuture) Result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16253,35 +15596,10 @@ func (future ReplicationProtectionContainerMappingsDeleteFuture) Result(client R
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16289,12 +15607,11 @@ func (future ReplicationProtectionContainerMappingsDeleteFuture) Result(client R
// long-running operation.
type ReplicationProtectionContainerMappingsPurgeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainerMappingsPurgeFuture) Result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
+func (future *ReplicationProtectionContainerMappingsPurgeFuture) Result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16302,35 +15619,10 @@ func (future ReplicationProtectionContainerMappingsPurgeFuture) Result(client Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsPurgeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsPurgeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsPurgeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsPurgeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsPurgeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16338,12 +15630,11 @@ func (future ReplicationProtectionContainerMappingsPurgeFuture) Result(client Re
// long-running operation.
type ReplicationProtectionContainerMappingsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainerMappingsUpdateFuture) Result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) {
+func (future *ReplicationProtectionContainerMappingsUpdateFuture) Result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16351,34 +15642,15 @@ func (future ReplicationProtectionContainerMappingsUpdateFuture) Result(client R
return
}
if !done {
- return pcm, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pcm, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcm.Response.Response, err = future.GetResult(sender); err == nil && pcm.Response.Response.StatusCode != http.StatusNoContent {
+ pcm, err = client.UpdateResponder(pcm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsUpdateFuture", "Result", pcm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- pcm, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16387,12 +15659,11 @@ func (future ReplicationProtectionContainerMappingsUpdateFuture) Result(client R
// long-running operation.
type ReplicationProtectionContainersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainersCreateFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
+func (future *ReplicationProtectionContainersCreateFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16400,34 +15671,15 @@ func (future ReplicationProtectionContainersCreateFuture) Result(client Replicat
return
}
if !done {
- return pc, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pc, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
+ pc, err = client.CreateResponder(pc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", pc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- pc, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16436,12 +15688,11 @@ func (future ReplicationProtectionContainersCreateFuture) Result(client Replicat
// long-running operation.
type ReplicationProtectionContainersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainersDeleteFuture) Result(client ReplicationProtectionContainersClient) (ar autorest.Response, err error) {
+func (future *ReplicationProtectionContainersDeleteFuture) Result(client ReplicationProtectionContainersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16449,35 +15700,10 @@ func (future ReplicationProtectionContainersDeleteFuture) Result(client Replicat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -16485,12 +15711,11 @@ func (future ReplicationProtectionContainersDeleteFuture) Result(client Replicat
// results of a long-running operation.
type ReplicationProtectionContainersDiscoverProtectableItemFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainersDiscoverProtectableItemFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
+func (future *ReplicationProtectionContainersDiscoverProtectableItemFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16498,34 +15723,15 @@ func (future ReplicationProtectionContainersDiscoverProtectableItemFuture) Resul
return
}
if !done {
- return pc, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pc, err = client.DiscoverProtectableItemResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
+ pc, err = client.DiscoverProtectableItemResponder(pc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", pc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", resp, "Failure sending request")
- return
- }
- pc, err = client.DiscoverProtectableItemResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16534,12 +15740,11 @@ func (future ReplicationProtectionContainersDiscoverProtectableItemFuture) Resul
// of a long-running operation.
type ReplicationProtectionContainersSwitchProtectionFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationProtectionContainersSwitchProtectionFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
+func (future *ReplicationProtectionContainersSwitchProtectionFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16547,34 +15752,15 @@ func (future ReplicationProtectionContainersSwitchProtectionFuture) Result(clien
return
}
if !done {
- return pc, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersSwitchProtectionFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- pc, err = client.SwitchProtectionResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersSwitchProtectionFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent {
+ pc, err = client.SwitchProtectionResponder(pc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", pc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", resp, "Failure sending request")
- return
- }
- pc, err = client.SwitchProtectionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16945,12 +16131,11 @@ func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) AsBasicRep
// operation.
type ReplicationRecoveryPlansCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansCreateFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansCreateFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -16958,34 +16143,15 @@ func (future ReplicationRecoveryPlansCreateFuture) Result(client ReplicationReco
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.CreateResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -16994,12 +16160,11 @@ func (future ReplicationRecoveryPlansCreateFuture) Result(client ReplicationReco
// operation.
type ReplicationRecoveryPlansDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansDeleteFuture) Result(client ReplicationRecoveryPlansClient) (ar autorest.Response, err error) {
+func (future *ReplicationRecoveryPlansDeleteFuture) Result(client ReplicationRecoveryPlansClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17007,35 +16172,10 @@ func (future ReplicationRecoveryPlansDeleteFuture) Result(client ReplicationReco
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -17043,12 +16183,11 @@ func (future ReplicationRecoveryPlansDeleteFuture) Result(client ReplicationReco
// long-running operation.
type ReplicationRecoveryPlansFailoverCommitFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansFailoverCommitFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansFailoverCommitFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17056,34 +16195,15 @@ func (future ReplicationRecoveryPlansFailoverCommitFuture) Result(client Replica
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansFailoverCommitFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.FailoverCommitResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansFailoverCommitFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.FailoverCommitResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.FailoverCommitResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17092,12 +16212,11 @@ func (future ReplicationRecoveryPlansFailoverCommitFuture) Result(client Replica
// long-running operation.
type ReplicationRecoveryPlansPlannedFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansPlannedFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansPlannedFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17105,34 +16224,15 @@ func (future ReplicationRecoveryPlansPlannedFailoverFuture) Result(client Replic
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.PlannedFailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.PlannedFailoverResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.PlannedFailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17141,12 +16241,11 @@ func (future ReplicationRecoveryPlansPlannedFailoverFuture) Result(client Replic
// long-running operation.
type ReplicationRecoveryPlansReprotectFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansReprotectFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansReprotectFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17154,34 +16253,15 @@ func (future ReplicationRecoveryPlansReprotectFuture) Result(client ReplicationR
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansReprotectFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.ReprotectResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansReprotectFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.ReprotectResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.ReprotectResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17190,12 +16270,11 @@ func (future ReplicationRecoveryPlansReprotectFuture) Result(client ReplicationR
// long-running operation.
type ReplicationRecoveryPlansTestFailoverCleanupFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansTestFailoverCleanupFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansTestFailoverCleanupFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17203,34 +16282,15 @@ func (future ReplicationRecoveryPlansTestFailoverCleanupFuture) Result(client Re
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.TestFailoverCleanupResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.TestFailoverCleanupResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.TestFailoverCleanupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17239,12 +16299,11 @@ func (future ReplicationRecoveryPlansTestFailoverCleanupFuture) Result(client Re
// long-running operation.
type ReplicationRecoveryPlansTestFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansTestFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansTestFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17252,34 +16311,15 @@ func (future ReplicationRecoveryPlansTestFailoverFuture) Result(client Replicati
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.TestFailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.TestFailoverResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.TestFailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17288,12 +16328,11 @@ func (future ReplicationRecoveryPlansTestFailoverFuture) Result(client Replicati
// long-running operation.
type ReplicationRecoveryPlansUnplannedFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansUnplannedFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansUnplannedFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17301,34 +16340,15 @@ func (future ReplicationRecoveryPlansUnplannedFailoverFuture) Result(client Repl
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.UnplannedFailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.UnplannedFailoverResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.UnplannedFailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17337,12 +16357,11 @@ func (future ReplicationRecoveryPlansUnplannedFailoverFuture) Result(client Repl
// operation.
type ReplicationRecoveryPlansUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryPlansUpdateFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
+func (future *ReplicationRecoveryPlansUpdateFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17350,34 +16369,15 @@ func (future ReplicationRecoveryPlansUpdateFuture) Result(client ReplicationReco
return
}
if !done {
- return rp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rp, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.UpdateResponder(rp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", rp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- rp, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17386,12 +16386,11 @@ func (future ReplicationRecoveryPlansUpdateFuture) Result(client ReplicationReco
// long-running operation.
type ReplicationRecoveryServicesProvidersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryServicesProvidersDeleteFuture) Result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
+func (future *ReplicationRecoveryServicesProvidersDeleteFuture) Result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17399,35 +16398,10 @@ func (future ReplicationRecoveryServicesProvidersDeleteFuture) Result(client Rep
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -17435,12 +16409,11 @@ func (future ReplicationRecoveryServicesProvidersDeleteFuture) Result(client Rep
// long-running operation.
type ReplicationRecoveryServicesProvidersPurgeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryServicesProvidersPurgeFuture) Result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
+func (future *ReplicationRecoveryServicesProvidersPurgeFuture) Result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17448,35 +16421,10 @@ func (future ReplicationRecoveryServicesProvidersPurgeFuture) Result(client Repl
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PurgeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PurgeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -17484,12 +16432,11 @@ func (future ReplicationRecoveryServicesProvidersPurgeFuture) Result(client Repl
// results of a long-running operation.
type ReplicationRecoveryServicesProvidersRefreshProviderFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationRecoveryServicesProvidersRefreshProviderFuture) Result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) {
+func (future *ReplicationRecoveryServicesProvidersRefreshProviderFuture) Result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17497,34 +16444,15 @@ func (future ReplicationRecoveryServicesProvidersRefreshProviderFuture) Result(c
return
}
if !done {
- return rsp, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rsp, err = client.RefreshProviderResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rsp.Response.Response, err = future.GetResult(sender); err == nil && rsp.Response.Response.StatusCode != http.StatusNoContent {
+ rsp, err = client.RefreshProviderResponder(rsp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", rsp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", resp, "Failure sending request")
- return
- }
- rsp, err = client.RefreshProviderResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17533,12 +16461,11 @@ func (future ReplicationRecoveryServicesProvidersRefreshProviderFuture) Result(c
// a long-running operation.
type ReplicationStorageClassificationMappingsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationStorageClassificationMappingsCreateFuture) Result(client ReplicationStorageClassificationMappingsClient) (scm StorageClassificationMapping, err error) {
+func (future *ReplicationStorageClassificationMappingsCreateFuture) Result(client ReplicationStorageClassificationMappingsClient) (scm StorageClassificationMapping, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17546,34 +16473,15 @@ func (future ReplicationStorageClassificationMappingsCreateFuture) Result(client
return
}
if !done {
- return scm, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- scm, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if scm.Response.Response, err = future.GetResult(sender); err == nil && scm.Response.Response.StatusCode != http.StatusNoContent {
+ scm, err = client.CreateResponder(scm.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", scm.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- scm, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17582,12 +16490,11 @@ func (future ReplicationStorageClassificationMappingsCreateFuture) Result(client
// a long-running operation.
type ReplicationStorageClassificationMappingsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationStorageClassificationMappingsDeleteFuture) Result(client ReplicationStorageClassificationMappingsClient) (ar autorest.Response, err error) {
+func (future *ReplicationStorageClassificationMappingsDeleteFuture) Result(client ReplicationStorageClassificationMappingsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17595,35 +16502,10 @@ func (future ReplicationStorageClassificationMappingsDeleteFuture) Result(client
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -17631,12 +16513,11 @@ func (future ReplicationStorageClassificationMappingsDeleteFuture) Result(client
// operation.
type ReplicationVaultHealthRefreshFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationVaultHealthRefreshFuture) Result(client ReplicationVaultHealthClient) (vhd VaultHealthDetails, err error) {
+func (future *ReplicationVaultHealthRefreshFuture) Result(client ReplicationVaultHealthClient) (vhd VaultHealthDetails, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17644,34 +16525,15 @@ func (future ReplicationVaultHealthRefreshFuture) Result(client ReplicationVault
return
}
if !done {
- return vhd, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationVaultHealthRefreshFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vhd, err = client.RefreshResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthRefreshFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationVaultHealthRefreshFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vhd.Response.Response, err = future.GetResult(sender); err == nil && vhd.Response.Response.StatusCode != http.StatusNoContent {
+ vhd, err = client.RefreshResponder(vhd.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthRefreshFuture", "Result", vhd.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthRefreshFuture", "Result", resp, "Failure sending request")
- return
- }
- vhd, err = client.RefreshResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthRefreshFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17680,12 +16542,11 @@ func (future ReplicationVaultHealthRefreshFuture) Result(client ReplicationVault
// operation.
type ReplicationvCentersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationvCentersCreateFuture) Result(client ReplicationvCentersClient) (vc VCenter, err error) {
+func (future *ReplicationvCentersCreateFuture) Result(client ReplicationvCentersClient) (vc VCenter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17693,34 +16554,15 @@ func (future ReplicationvCentersCreateFuture) Result(client ReplicationvCentersC
return
}
if !done {
- return vc, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vc, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
+ vc, err = client.CreateResponder(vc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", vc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- vc, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -17729,12 +16571,11 @@ func (future ReplicationvCentersCreateFuture) Result(client ReplicationvCentersC
// operation.
type ReplicationvCentersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationvCentersDeleteFuture) Result(client ReplicationvCentersClient) (ar autorest.Response, err error) {
+func (future *ReplicationvCentersDeleteFuture) Result(client ReplicationvCentersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17742,35 +16583,10 @@ func (future ReplicationvCentersDeleteFuture) Result(client ReplicationvCentersC
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -17778,12 +16594,11 @@ func (future ReplicationvCentersDeleteFuture) Result(client ReplicationvCentersC
// operation.
type ReplicationvCentersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationvCentersUpdateFuture) Result(client ReplicationvCentersClient) (vc VCenter, err error) {
+func (future *ReplicationvCentersUpdateFuture) Result(client ReplicationvCentersClient) (vc VCenter, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -17791,34 +16606,15 @@ func (future ReplicationvCentersUpdateFuture) Result(client ReplicationvCentersC
return
}
if !done {
- return vc, azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vc, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
+ vc, err = client.UpdateResponder(vc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vc, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationfabrics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationfabrics.go
index af2d3b182..c1e5efa0d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationfabrics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationfabrics.go
@@ -83,15 +83,17 @@ func (client ReplicationFabricsClient) CheckConsistencyPreparer(ctx context.Cont
// CheckConsistencySender sends the CheckConsistency request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationFabricsClient) CheckConsistencySender(req *http.Request) (future ReplicationFabricsCheckConsistencyFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ReplicationFabricsClient) CreatePreparer(ctx context.Context, fabri
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationFabricsClient) CreateSender(req *http.Request) (future ReplicationFabricsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -224,15 +228,17 @@ func (client ReplicationFabricsClient) DeletePreparer(ctx context.Context, fabri
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationFabricsClient) DeleteSender(req *http.Request) (future ReplicationFabricsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -451,15 +457,17 @@ func (client ReplicationFabricsClient) MigrateToAadPreparer(ctx context.Context,
// 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) (future ReplicationFabricsMigrateToAadFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -519,15 +527,17 @@ func (client ReplicationFabricsClient) PurgePreparer(ctx context.Context, fabric
// PurgeSender sends the Purge request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationFabricsClient) PurgeSender(req *http.Request) (future ReplicationFabricsPurgeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -590,15 +600,17 @@ func (client ReplicationFabricsClient) ReassociateGatewayPreparer(ctx context.Co
// ReassociateGatewaySender sends the ReassociateGateway request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationFabricsClient) ReassociateGatewaySender(req *http.Request) (future ReplicationFabricsReassociateGatewayFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -662,15 +674,17 @@ func (client ReplicationFabricsClient) RenewCertificatePreparer(ctx context.Cont
// RenewCertificateSender sends the RenewCertificate request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationFabricsClient) RenewCertificateSender(req *http.Request) (future ReplicationFabricsRenewCertificateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationjobs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationjobs.go
index 65f208971..f29f4fe04 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationjobs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationjobs.go
@@ -83,15 +83,17 @@ func (client ReplicationJobsClient) CancelPreparer(ctx context.Context, jobName
// CancelSender sends the Cancel request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationJobsClient) CancelSender(req *http.Request) (future ReplicationJobsCancelFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -153,15 +155,17 @@ func (client ReplicationJobsClient) ExportPreparer(ctx context.Context, jobQuery
// ExportSender sends the Export request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationJobsClient) ExportSender(req *http.Request) (future ReplicationJobsExportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -386,15 +390,17 @@ func (client ReplicationJobsClient) RestartPreparer(ctx context.Context, jobName
// RestartSender sends the Restart request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationJobsClient) RestartSender(req *http.Request) (future ReplicationJobsRestartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -458,15 +464,17 @@ func (client ReplicationJobsClient) ResumePreparer(ctx context.Context, jobName
// ResumeSender sends the Resume request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationJobsClient) ResumeSender(req *http.Request) (future ReplicationJobsResumeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationnetworkmappings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationnetworkmappings.go
index 1e49fc2d1..03a732920 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationnetworkmappings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationnetworkmappings.go
@@ -91,15 +91,17 @@ func (client ReplicationNetworkMappingsClient) CreatePreparer(ctx context.Contex
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationNetworkMappingsClient) CreateSender(req *http.Request) (future ReplicationNetworkMappingsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -164,15 +166,17 @@ func (client ReplicationNetworkMappingsClient) DeletePreparer(ctx context.Contex
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationNetworkMappingsClient) DeleteSender(req *http.Request) (future ReplicationNetworkMappingsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -499,15 +503,17 @@ func (client ReplicationNetworkMappingsClient) UpdatePreparer(ctx context.Contex
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationNetworkMappingsClient) UpdateSender(req *http.Request) (future ReplicationNetworkMappingsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationpolicies.go
index d67f83d5b..5c2951edc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationpolicies.go
@@ -86,15 +86,17 @@ func (client ReplicationPoliciesClient) CreatePreparer(ctx context.Context, poli
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationPoliciesClient) CreateSender(req *http.Request) (future ReplicationPoliciesCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -155,15 +157,17 @@ func (client ReplicationPoliciesClient) DeletePreparer(ctx context.Context, poli
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationPoliciesClient) DeleteSender(req *http.Request) (future ReplicationPoliciesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -385,15 +389,17 @@ func (client ReplicationPoliciesClient) UpdatePreparer(ctx context.Context, poli
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationPoliciesClient) UpdateSender(req *http.Request) (future ReplicationPoliciesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectableitems.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectableitems.go
index cbaae870a..4a88be2fb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectableitems.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectableitems.go
@@ -115,9 +115,10 @@ func (client ReplicationProtectableItemsClient) GetResponder(resp *http.Response
// Parameters:
// fabricName - fabric name.
// protectionContainerName - protection container name.
-func (client ReplicationProtectableItemsClient) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result ProtectableItemCollectionPage, err error) {
+// filter - oData filter options.
+func (client ReplicationProtectableItemsClient) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string, filter string) (result ProtectableItemCollectionPage, err error) {
result.fn = client.listByReplicationProtectionContainersNextResults
- req, err := client.ListByReplicationProtectionContainersPreparer(ctx, fabricName, protectionContainerName)
+ req, err := client.ListByReplicationProtectionContainersPreparer(ctx, fabricName, protectionContainerName, filter)
if err != nil {
err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectableItemsClient", "ListByReplicationProtectionContainers", nil, "Failure preparing request")
return
@@ -139,7 +140,7 @@ func (client ReplicationProtectableItemsClient) ListByReplicationProtectionConta
}
// ListByReplicationProtectionContainersPreparer prepares the ListByReplicationProtectionContainers request.
-func (client ReplicationProtectableItemsClient) ListByReplicationProtectionContainersPreparer(ctx context.Context, fabricName string, protectionContainerName string) (*http.Request, error) {
+func (client ReplicationProtectableItemsClient) ListByReplicationProtectionContainersPreparer(ctx context.Context, fabricName string, protectionContainerName string, filter string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"fabricName": autorest.Encode("path", fabricName),
"protectionContainerName": autorest.Encode("path", protectionContainerName),
@@ -152,6 +153,9 @@ func (client ReplicationProtectableItemsClient) ListByReplicationProtectionConta
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
preparer := autorest.CreatePreparer(
autorest.AsGet(),
@@ -203,7 +207,7 @@ func (client ReplicationProtectableItemsClient) listByReplicationProtectionConta
}
// ListByReplicationProtectionContainersComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ReplicationProtectableItemsClient) ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string) (result ProtectableItemCollectionIterator, err error) {
- result.page, err = client.ListByReplicationProtectionContainers(ctx, fabricName, protectionContainerName)
+func (client ReplicationProtectableItemsClient) ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string, filter string) (result ProtectableItemCollectionIterator, err error) {
+ result.page, err = client.ListByReplicationProtectionContainers(ctx, fabricName, protectionContainerName, filter)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotecteditems.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotecteditems.go
index cce30ba6e..1b2a60750 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotecteditems.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotecteditems.go
@@ -91,15 +91,17 @@ func (client ReplicationProtectedItemsClient) ApplyRecoveryPointPreparer(ctx con
// ApplyRecoveryPointSender sends the ApplyRecoveryPoint request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) ApplyRecoveryPointSender(req *http.Request) (future ReplicationProtectedItemsApplyRecoveryPointFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,15 +169,17 @@ func (client ReplicationProtectedItemsClient) CreatePreparer(ctx context.Context
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) CreateSender(req *http.Request) (future ReplicationProtectedItemsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -243,15 +247,17 @@ func (client ReplicationProtectedItemsClient) DeletePreparer(ctx context.Context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) DeleteSender(req *http.Request) (future ReplicationProtectedItemsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -315,15 +321,17 @@ func (client ReplicationProtectedItemsClient) FailoverCommitPreparer(ctx context
// FailoverCommitSender sends the FailoverCommit request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) FailoverCommitSender(req *http.Request) (future ReplicationProtectedItemsFailoverCommitFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -660,15 +668,17 @@ func (client ReplicationProtectedItemsClient) PlannedFailoverPreparer(ctx contex
// PlannedFailoverSender sends the PlannedFailover request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) PlannedFailoverSender(req *http.Request) (future ReplicationProtectedItemsPlannedFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -735,15 +745,17 @@ func (client ReplicationProtectedItemsClient) PurgePreparer(ctx context.Context,
// PurgeSender sends the Purge request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) PurgeSender(req *http.Request) (future ReplicationProtectedItemsPurgeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -808,15 +820,17 @@ func (client ReplicationProtectedItemsClient) RepairReplicationPreparer(ctx cont
// RepairReplicationSender sends the RepairReplication request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) RepairReplicationSender(req *http.Request) (future ReplicationProtectedItemsRepairReplicationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -884,15 +898,17 @@ func (client ReplicationProtectedItemsClient) ReprotectPreparer(ctx context.Cont
// ReprotectSender sends the Reprotect request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) ReprotectSender(req *http.Request) (future ReplicationProtectedItemsReprotectFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -960,15 +976,17 @@ func (client ReplicationProtectedItemsClient) TestFailoverPreparer(ctx context.C
// TestFailoverSender sends the TestFailover request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) TestFailoverSender(req *http.Request) (future ReplicationProtectedItemsTestFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1042,15 +1060,17 @@ func (client ReplicationProtectedItemsClient) TestFailoverCleanupPreparer(ctx co
// TestFailoverCleanupSender sends the TestFailoverCleanup request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) TestFailoverCleanupSender(req *http.Request) (future ReplicationProtectedItemsTestFailoverCleanupFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1118,15 +1138,17 @@ func (client ReplicationProtectedItemsClient) UnplannedFailoverPreparer(ctx cont
// UnplannedFailoverSender sends the UnplannedFailover request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) UnplannedFailoverSender(req *http.Request) (future ReplicationProtectedItemsUnplannedFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1194,15 +1216,17 @@ func (client ReplicationProtectedItemsClient) UpdatePreparer(ctx context.Context
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) UpdateSender(req *http.Request) (future ReplicationProtectedItemsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1271,15 +1295,17 @@ func (client ReplicationProtectedItemsClient) UpdateMobilityServicePreparer(ctx
// UpdateMobilityServiceSender sends the UpdateMobilityService request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectedItemsClient) UpdateMobilityServiceSender(req *http.Request) (future ReplicationProtectedItemsUpdateMobilityServiceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainermappings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainermappings.go
index 391506340..278b0b18e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainermappings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainermappings.go
@@ -93,15 +93,17 @@ func (client ReplicationProtectionContainerMappingsClient) CreatePreparer(ctx co
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainerMappingsClient) CreateSender(req *http.Request) (future ReplicationProtectionContainerMappingsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -169,15 +171,17 @@ func (client ReplicationProtectionContainerMappingsClient) DeletePreparer(ctx co
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainerMappingsClient) DeleteSender(req *http.Request) (future ReplicationProtectionContainerMappingsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -501,15 +505,17 @@ func (client ReplicationProtectionContainerMappingsClient) PurgePreparer(ctx con
// PurgeSender sends the Purge request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainerMappingsClient) PurgeSender(req *http.Request) (future ReplicationProtectionContainerMappingsPurgeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -576,15 +582,17 @@ func (client ReplicationProtectionContainerMappingsClient) UpdatePreparer(ctx co
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainerMappingsClient) UpdateSender(req *http.Request) (future ReplicationProtectionContainerMappingsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainers.go
index 465730418..e462fa377 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainers.go
@@ -90,15 +90,17 @@ func (client ReplicationProtectionContainersClient) CreatePreparer(ctx context.C
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainersClient) CreateSender(req *http.Request) (future ReplicationProtectionContainersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -161,15 +163,17 @@ func (client ReplicationProtectionContainersClient) DeletePreparer(ctx context.C
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainersClient) DeleteSender(req *http.Request) (future ReplicationProtectionContainersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -234,15 +238,17 @@ func (client ReplicationProtectionContainersClient) DiscoverProtectableItemPrepa
// DiscoverProtectableItemSender sends the DiscoverProtectableItem request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainersClient) DiscoverProtectableItemSender(req *http.Request) (future ReplicationProtectionContainersDiscoverProtectableItemFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -565,15 +571,17 @@ func (client ReplicationProtectionContainersClient) SwitchProtectionPreparer(ctx
// SwitchProtectionSender sends the SwitchProtection request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationProtectionContainersClient) SwitchProtectionSender(req *http.Request) (future ReplicationProtectionContainersSwitchProtectionFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryplans.go
index 2711a407b..9901da66b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryplans.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryplans.go
@@ -97,15 +97,17 @@ func (client ReplicationRecoveryPlansClient) CreatePreparer(ctx context.Context,
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) CreateSender(req *http.Request) (future ReplicationRecoveryPlansCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -166,15 +168,17 @@ func (client ReplicationRecoveryPlansClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) DeleteSender(req *http.Request) (future ReplicationRecoveryPlansDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -234,15 +238,17 @@ func (client ReplicationRecoveryPlansClient) FailoverCommitPreparer(ctx context.
// FailoverCommitSender sends the FailoverCommit request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) FailoverCommitSender(req *http.Request) (future ReplicationRecoveryPlansFailoverCommitFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -471,15 +477,17 @@ func (client ReplicationRecoveryPlansClient) PlannedFailoverPreparer(ctx context
// PlannedFailoverSender sends the PlannedFailover request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) PlannedFailoverSender(req *http.Request) (future ReplicationRecoveryPlansPlannedFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -540,15 +548,17 @@ func (client ReplicationRecoveryPlansClient) ReprotectPreparer(ctx context.Conte
// ReprotectSender sends the Reprotect request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) ReprotectSender(req *http.Request) (future ReplicationRecoveryPlansReprotectFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -619,15 +629,17 @@ func (client ReplicationRecoveryPlansClient) TestFailoverPreparer(ctx context.Co
// TestFailoverSender sends the TestFailover request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) TestFailoverSender(req *http.Request) (future ReplicationRecoveryPlansTestFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -697,15 +709,17 @@ func (client ReplicationRecoveryPlansClient) TestFailoverCleanupPreparer(ctx con
// TestFailoverCleanupSender sends the TestFailoverCleanup request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) TestFailoverCleanupSender(req *http.Request) (future ReplicationRecoveryPlansTestFailoverCleanupFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -775,15 +789,17 @@ func (client ReplicationRecoveryPlansClient) UnplannedFailoverPreparer(ctx conte
// UnplannedFailoverSender sends the UnplannedFailover request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) UnplannedFailoverSender(req *http.Request) (future ReplicationRecoveryPlansUnplannedFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -847,15 +863,17 @@ func (client ReplicationRecoveryPlansClient) UpdatePreparer(ctx context.Context,
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryPlansClient) UpdateSender(req *http.Request) (future ReplicationRecoveryPlansUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryservicesproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryservicesproviders.go
index d250294c0..d9d56e1c4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryservicesproviders.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryservicesproviders.go
@@ -88,15 +88,17 @@ func (client ReplicationRecoveryServicesProvidersClient) DeletePreparer(ctx cont
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryServicesProvidersClient) DeleteSender(req *http.Request) (future ReplicationRecoveryServicesProvidersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -414,15 +416,17 @@ func (client ReplicationRecoveryServicesProvidersClient) PurgePreparer(ctx conte
// PurgeSender sends the Purge request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryServicesProvidersClient) PurgeSender(req *http.Request) (future ReplicationRecoveryServicesProvidersPurgeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -484,15 +488,17 @@ func (client ReplicationRecoveryServicesProvidersClient) RefreshProviderPreparer
// RefreshProviderSender sends the RefreshProvider request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationRecoveryServicesProvidersClient) RefreshProviderSender(req *http.Request) (future ReplicationRecoveryServicesProvidersRefreshProviderFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationstorageclassificationmappings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationstorageclassificationmappings.go
index b59d9e398..4c7f169a3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationstorageclassificationmappings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationstorageclassificationmappings.go
@@ -93,15 +93,17 @@ func (client ReplicationStorageClassificationMappingsClient) CreatePreparer(ctx
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationStorageClassificationMappingsClient) CreateSender(req *http.Request) (future ReplicationStorageClassificationMappingsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -166,15 +168,17 @@ func (client ReplicationStorageClassificationMappingsClient) DeletePreparer(ctx
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationStorageClassificationMappingsClient) DeleteSender(req *http.Request) (future ReplicationStorageClassificationMappingsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvaulthealth.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvaulthealth.go
index 98a0e609b..92cf3629e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvaulthealth.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvaulthealth.go
@@ -144,15 +144,17 @@ func (client ReplicationVaultHealthClient) RefreshPreparer(ctx context.Context)
// RefreshSender sends the Refresh request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationVaultHealthClient) RefreshSender(req *http.Request) (future ReplicationVaultHealthRefreshFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvcenters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvcenters.go
index 1e200332e..6047f22f4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvcenters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvcenters.go
@@ -88,15 +88,17 @@ func (client ReplicationvCentersClient) CreatePreparer(ctx context.Context, fabr
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationvCentersClient) CreateSender(req *http.Request) (future ReplicationvCentersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,15 +161,17 @@ func (client ReplicationvCentersClient) DeletePreparer(ctx context.Context, fabr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationvCentersClient) DeleteSender(req *http.Request) (future ReplicationvCentersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -488,15 +492,17 @@ func (client ReplicationvCentersClient) UpdatePreparer(ctx context.Context, fabr
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationvCentersClient) UpdateSender(req *http.Request) (future ReplicationvCentersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2016-04-01/redis/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2016-04-01/redis/models.go
index 93b95e339..3b8ba471e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2016-04-01/redis/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2016-04-01/redis/models.go
@@ -130,12 +130,11 @@ type AccessKeys struct {
// CreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateFuture) Result(client Client) (rt ResourceType, err error) {
+func (future *CreateFuture) Result(client Client) (rt ResourceType, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -143,34 +142,15 @@ func (future CreateFuture) Result(client Client) (rt ResourceType, err error) {
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("redis.CreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.CreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -332,12 +312,11 @@ func (cp CreateProperties) MarshalJSON() ([]byte, error) {
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -345,47 +324,21 @@ func (future DeleteFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("redis.DeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.DeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.DeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.DeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.DeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ExportDataFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ExportDataFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExportDataFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *ExportDataFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -393,35 +346,10 @@ func (future ExportDataFuture) Result(client Client) (ar autorest.Response, err
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("redis.ExportDataFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ExportDataResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ExportDataFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.ExportDataFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ExportDataFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ExportDataResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ExportDataFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -638,12 +566,11 @@ type ForceRebootResponse struct {
// ImportDataFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImportDataFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ImportDataFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *ImportDataFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -651,35 +578,10 @@ func (future ImportDataFuture) Result(client Client) (ar autorest.Response, err
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("redis.ImportDataFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ImportDataResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ImportDataFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.ImportDataFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ImportDataFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ImportDataResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ImportDataFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2016-04-01/redis/redis.go b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2016-04-01/redis/redis.go
index 6380023be..2f8fa95ba 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2016-04-01/redis/redis.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2016-04-01/redis/redis.go
@@ -96,15 +96,17 @@ func (client Client) CreatePreparer(ctx context.Context, resourceGroupName strin
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateSender(req *http.Request) (future CreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -165,15 +167,17 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -243,15 +247,17 @@ func (client Client) ExportDataPreparer(ctx context.Context, resourceGroupName s
// ExportDataSender sends the ExportData request. The method will close the
// http.Response Body if it receives an error.
func (client Client) ExportDataSender(req *http.Request) (future ExportDataFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -458,15 +464,17 @@ func (client Client) ImportDataPreparer(ctx context.Context, resourceGroupName s
// ImportDataSender sends the ImportData request. The method will close the
// http.Response Body if it receives an error.
func (client Client) ImportDataSender(req *http.Request) (future ImportDataFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-02-01/redis/linkedserver.go b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-02-01/redis/linkedserver.go
index 80869464a..1fa0db604 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-02-01/redis/linkedserver.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-02-01/redis/linkedserver.go
@@ -98,15 +98,17 @@ func (client LinkedServerClient) CreatePreparer(ctx context.Context, resourceGro
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client LinkedServerClient) CreateSender(req *http.Request) (future LinkedServerCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-02-01/redis/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-02-01/redis/models.go
index 742cfacc0..89e99dae5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-02-01/redis/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-02-01/redis/models.go
@@ -145,12 +145,11 @@ type AccessKeys struct {
// CreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateFuture) Result(client Client) (rt ResourceType, err error) {
+func (future *CreateFuture) Result(client Client) (rt ResourceType, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -158,34 +157,15 @@ func (future CreateFuture) Result(client Client) (rt ResourceType, err error) {
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("redis.CreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.CreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -347,12 +327,11 @@ func (cp CreateProperties) MarshalJSON() ([]byte, error) {
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -360,47 +339,21 @@ func (future DeleteFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("redis.DeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.DeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.DeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.DeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.DeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ExportDataFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ExportDataFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExportDataFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *ExportDataFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -408,35 +361,10 @@ func (future ExportDataFuture) Result(client Client) (ar autorest.Response, err
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("redis.ExportDataFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ExportDataResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ExportDataFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.ExportDataFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ExportDataFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ExportDataResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ExportDataFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -653,12 +581,11 @@ type ForceRebootResponse struct {
// ImportDataFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImportDataFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ImportDataFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *ImportDataFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -666,35 +593,10 @@ func (future ImportDataFuture) Result(client Client) (ar autorest.Response, err
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("redis.ImportDataFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ImportDataResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ImportDataFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.ImportDataFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ImportDataFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ImportDataResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ImportDataFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -715,12 +617,11 @@ type LinkedServer struct {
// LinkedServerCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LinkedServerCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LinkedServerCreateFuture) Result(client LinkedServerClient) (lswp LinkedServerWithProperties, err error) {
+func (future *LinkedServerCreateFuture) Result(client LinkedServerClient) (lswp LinkedServerWithProperties, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -728,34 +629,15 @@ func (future LinkedServerCreateFuture) Result(client LinkedServerClient) (lswp L
return
}
if !done {
- return lswp, azure.NewAsyncOpIncompleteError("redis.LinkedServerCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lswp, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.LinkedServerCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.LinkedServerCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lswp.Response.Response, err = future.GetResult(sender); err == nil && lswp.Response.Response.StatusCode != http.StatusNoContent {
+ lswp, err = client.CreateResponder(lswp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "redis.LinkedServerCreateFuture", "Result", lswp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.LinkedServerCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- lswp, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.LinkedServerCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-02-01/redis/redis.go b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-02-01/redis/redis.go
index f1072fe3e..302f7f225 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-02-01/redis/redis.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-02-01/redis/redis.go
@@ -96,15 +96,17 @@ func (client Client) CreatePreparer(ctx context.Context, resourceGroupName strin
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateSender(req *http.Request) (future CreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -165,15 +167,17 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -243,15 +247,17 @@ func (client Client) ExportDataPreparer(ctx context.Context, resourceGroupName s
// ExportDataSender sends the ExportData request. The method will close the
// http.Response Body if it receives an error.
func (client Client) ExportDataSender(req *http.Request) (future ExportDataFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -458,15 +464,17 @@ func (client Client) ImportDataPreparer(ctx context.Context, resourceGroupName s
// ImportDataSender sends the ImportData request. The method will close the
// http.Response Body if it receives an error.
func (client Client) ImportDataSender(req *http.Request) (future ImportDataFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-10-01/redis/linkedserver.go b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-10-01/redis/linkedserver.go
index bf73ea6e2..2c99a35eb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-10-01/redis/linkedserver.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-10-01/redis/linkedserver.go
@@ -98,15 +98,17 @@ func (client LinkedServerClient) CreatePreparer(ctx context.Context, resourceGro
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client LinkedServerClient) CreateSender(req *http.Request) (future LinkedServerCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-10-01/redis/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-10-01/redis/models.go
index 4fb2e2ca9..86a8d7b95 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-10-01/redis/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-10-01/redis/models.go
@@ -184,12 +184,11 @@ func (cp CommonProperties) MarshalJSON() ([]byte, error) {
// CreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateFuture) Result(client Client) (rt ResourceType, err error) {
+func (future *CreateFuture) Result(client Client) (rt ResourceType, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -197,34 +196,15 @@ func (future CreateFuture) Result(client Client) (rt ResourceType, err error) {
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("redis.CreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.CreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -358,12 +338,11 @@ func (cp CreateProperties) MarshalJSON() ([]byte, error) {
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -371,47 +350,21 @@ func (future DeleteFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("redis.DeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.DeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.DeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.DeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.DeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ExportDataFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ExportDataFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExportDataFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *ExportDataFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -419,35 +372,10 @@ func (future ExportDataFuture) Result(client Client) (ar autorest.Response, err
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("redis.ExportDataFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ExportDataResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ExportDataFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.ExportDataFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ExportDataFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ExportDataResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ExportDataFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -703,12 +631,11 @@ type ForceRebootResponse struct {
// ImportDataFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImportDataFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ImportDataFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *ImportDataFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -716,35 +643,10 @@ func (future ImportDataFuture) Result(client Client) (ar autorest.Response, err
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("redis.ImportDataFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ImportDataResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ImportDataFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.ImportDataFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ImportDataFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ImportDataResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ImportDataFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -765,12 +667,11 @@ type LinkedServer struct {
// LinkedServerCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LinkedServerCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LinkedServerCreateFuture) Result(client LinkedServerClient) (lswp LinkedServerWithProperties, err error) {
+func (future *LinkedServerCreateFuture) Result(client LinkedServerClient) (lswp LinkedServerWithProperties, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -778,34 +679,15 @@ func (future LinkedServerCreateFuture) Result(client LinkedServerClient) (lswp L
return
}
if !done {
- return lswp, azure.NewAsyncOpIncompleteError("redis.LinkedServerCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lswp, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.LinkedServerCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.LinkedServerCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lswp.Response.Response, err = future.GetResult(sender); err == nil && lswp.Response.Response.StatusCode != http.StatusNoContent {
+ lswp, err = client.CreateResponder(lswp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "redis.LinkedServerCreateFuture", "Result", lswp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.LinkedServerCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- lswp, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.LinkedServerCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-10-01/redis/redis.go b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-10-01/redis/redis.go
index de4fa2554..4d9996959 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-10-01/redis/redis.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2017-10-01/redis/redis.go
@@ -174,15 +174,17 @@ func (client Client) CreatePreparer(ctx context.Context, resourceGroupName strin
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateSender(req *http.Request) (future CreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -243,15 +245,17 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -321,15 +325,17 @@ func (client Client) ExportDataPreparer(ctx context.Context, resourceGroupName s
// ExportDataSender sends the ExportData request. The method will close the
// http.Response Body if it receives an error.
func (client Client) ExportDataSender(req *http.Request) (future ExportDataFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -536,15 +542,17 @@ func (client Client) ImportDataPreparer(ctx context.Context, resourceGroupName s
// ImportDataSender sends the ImportData request. The method will close the
// http.Response Body if it receives an error.
func (client Client) ImportDataSender(req *http.Request) (future ImportDataFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis/linkedserver.go b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis/linkedserver.go
index 393872ad3..efef2fad0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis/linkedserver.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis/linkedserver.go
@@ -98,15 +98,17 @@ func (client LinkedServerClient) CreatePreparer(ctx context.Context, resourceGro
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client LinkedServerClient) CreateSender(req *http.Request) (future LinkedServerCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis/models.go
index 4e10cd26d..0dbe32832 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis/models.go
@@ -241,12 +241,11 @@ func (cp CommonProperties) MarshalJSON() ([]byte, error) {
// CreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateFuture) Result(client Client) (rt ResourceType, err error) {
+func (future *CreateFuture) Result(client Client) (rt ResourceType, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -254,34 +253,15 @@ func (future CreateFuture) Result(client Client) (rt ResourceType, err error) {
return
}
if !done {
- return rt, azure.NewAsyncOpIncompleteError("redis.CreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rt, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.CreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateResponder(rt.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", rt.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", resp, "Failure sending request")
- return
- }
- rt, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.CreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -420,12 +400,11 @@ func (cp CreateProperties) MarshalJSON() ([]byte, error) {
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -433,47 +412,21 @@ func (future DeleteFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("redis.DeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.DeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.DeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.DeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.DeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ExportDataFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ExportDataFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ExportDataFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *ExportDataFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -481,35 +434,10 @@ func (future ExportDataFuture) Result(client Client) (ar autorest.Response, err
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("redis.ExportDataFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ExportDataResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ExportDataFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.ExportDataFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ExportDataFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ExportDataResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ExportDataFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -765,12 +693,11 @@ type ForceRebootResponse struct {
// ImportDataFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImportDataFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ImportDataFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *ImportDataFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -778,35 +705,10 @@ func (future ImportDataFuture) Result(client Client) (ar autorest.Response, err
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("redis.ImportDataFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ImportDataResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ImportDataFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.ImportDataFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ImportDataFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ImportDataResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.ImportDataFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -827,12 +729,11 @@ type LinkedServer struct {
// LinkedServerCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type LinkedServerCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future LinkedServerCreateFuture) Result(client LinkedServerClient) (lswp LinkedServerWithProperties, err error) {
+func (future *LinkedServerCreateFuture) Result(client LinkedServerClient) (lswp LinkedServerWithProperties, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -840,34 +741,15 @@ func (future LinkedServerCreateFuture) Result(client LinkedServerClient) (lswp L
return
}
if !done {
- return lswp, azure.NewAsyncOpIncompleteError("redis.LinkedServerCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lswp, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.LinkedServerCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("redis.LinkedServerCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lswp.Response.Response, err = future.GetResult(sender); err == nil && lswp.Response.Response.StatusCode != http.StatusNoContent {
+ lswp, err = client.CreateResponder(lswp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "redis.LinkedServerCreateFuture", "Result", lswp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.LinkedServerCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- lswp, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "redis.LinkedServerCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis/redis.go b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis/redis.go
index f92814c2b..6f7d7a63e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis/redis.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis/redis.go
@@ -174,15 +174,17 @@ func (client Client) CreatePreparer(ctx context.Context, resourceGroupName strin
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateSender(req *http.Request) (future CreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -243,15 +245,17 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -321,15 +325,17 @@ func (client Client) ExportDataPreparer(ctx context.Context, resourceGroupName s
// ExportDataSender sends the ExportData request. The method will close the
// http.Response Body if it receives an error.
func (client Client) ExportDataSender(req *http.Request) (future ExportDataFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -536,15 +542,17 @@ func (client Client) ImportDataPreparer(ctx context.Context, resourceGroupName s
// ImportDataSender sends the ImportData request. The method will close the
// http.Response Body if it receives an error.
func (client Client) ImportDataSender(req *http.Request) (future ImportDataFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2016-07-01/relay/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2016-07-01/relay/models.go
index a2031ed20..c6c50f8ec 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2016-07-01/relay/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2016-07-01/relay/models.go
@@ -769,12 +769,11 @@ type NamespaceProperties struct {
// operation.
type NamespacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (n Namespace, err error) {
+func (future *NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (n Namespace, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -782,34 +781,15 @@ func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (n
return
}
if !done {
- return n, azure.NewAsyncOpIncompleteError("relay.NamespacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- n, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "relay.NamespacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("relay.NamespacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if n.Response.Response, err = future.GetResult(sender); err == nil && n.Response.Response.StatusCode != http.StatusNoContent {
+ n, err = client.CreateOrUpdateResponder(n.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "relay.NamespacesCreateOrUpdateFuture", "Result", n.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "relay.NamespacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- n, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "relay.NamespacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -817,12 +797,11 @@ func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (n
// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type NamespacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
+func (future *NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -830,35 +809,10 @@ func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("relay.NamespacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "relay.NamespacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("relay.NamespacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "relay.NamespacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "relay.NamespacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2016-07-01/relay/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2016-07-01/relay/namespaces.go
index 02f3f473c..78d474cbd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2016-07-01/relay/namespaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2016-07-01/relay/namespaces.go
@@ -174,15 +174,17 @@ func (client NamespacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) CreateOrUpdateSender(req *http.Request) (future NamespacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -343,15 +345,17 @@ func (client NamespacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) DeleteSender(req *http.Request) (future NamespacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/models.go
index fc6eb7926..5a775156f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/models.go
@@ -805,12 +805,11 @@ type NamespaceProperties struct {
// operation.
type NamespacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (n Namespace, err error) {
+func (future *NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (n Namespace, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -818,34 +817,15 @@ func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (n
return
}
if !done {
- return n, azure.NewAsyncOpIncompleteError("relay.NamespacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- n, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "relay.NamespacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("relay.NamespacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if n.Response.Response, err = future.GetResult(sender); err == nil && n.Response.Response.StatusCode != http.StatusNoContent {
+ n, err = client.CreateOrUpdateResponder(n.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "relay.NamespacesCreateOrUpdateFuture", "Result", n.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "relay.NamespacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- n, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "relay.NamespacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -853,12 +833,11 @@ func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (n
// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type NamespacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
+func (future *NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -866,35 +845,10 @@ func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("relay.NamespacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "relay.NamespacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("relay.NamespacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "relay.NamespacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "relay.NamespacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/namespaces.go
index f1dd78a83..25b1b98db 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/namespaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/namespaces.go
@@ -172,15 +172,17 @@ func (client NamespacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) CreateOrUpdateSender(req *http.Request) (future NamespacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -340,15 +342,17 @@ func (client NamespacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) DeleteSender(req *http.Request) (future NamespacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2017-11-01/reservations/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2017-11-01/reservations/models.go
index 1db90d8b4..4146115a9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2017-11-01/reservations/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2017-11-01/reservations/models.go
@@ -1062,12 +1062,11 @@ type Properties struct {
// ReservationMergeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ReservationMergeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReservationMergeFuture) Result(client Client) (lr ListResponse, err error) {
+func (future *ReservationMergeFuture) Result(client Client) (lr ListResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1075,34 +1074,15 @@ func (future ReservationMergeFuture) Result(client Client) (lr ListResponse, err
return
}
if !done {
- return lr, azure.NewAsyncOpIncompleteError("reservations.ReservationMergeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lr, err = client.MergeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "reservations.ReservationMergeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("reservations.ReservationMergeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lr.Response.Response, err = future.GetResult(sender); err == nil && lr.Response.Response.StatusCode != http.StatusNoContent {
+ lr, err = client.MergeResponder(lr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "reservations.ReservationMergeFuture", "Result", lr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "reservations.ReservationMergeFuture", "Result", resp, "Failure sending request")
- return
- }
- lr, err = client.MergeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "reservations.ReservationMergeFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1110,12 +1090,11 @@ func (future ReservationMergeFuture) Result(client Client) (lr ListResponse, err
// ReservationUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ReservationUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReservationUpdateFuture) Result(client Client) (r Response, err error) {
+func (future *ReservationUpdateFuture) Result(client Client) (r Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1123,34 +1102,15 @@ func (future ReservationUpdateFuture) Result(client Client) (r Response, err err
return
}
if !done {
- return r, azure.NewAsyncOpIncompleteError("reservations.ReservationUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- r, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "reservations.ReservationUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("reservations.ReservationUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.UpdateResponder(r.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "reservations.ReservationUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "reservations.ReservationUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- r, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "reservations.ReservationUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1199,12 +1159,11 @@ type SkuRestriction struct {
// SplitFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SplitFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future SplitFuture) Result(client Client) (lr ListResponse, err error) {
+func (future *SplitFuture) Result(client Client) (lr ListResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1212,34 +1171,15 @@ func (future SplitFuture) Result(client Client) (lr ListResponse, err error) {
return
}
if !done {
- return lr, azure.NewAsyncOpIncompleteError("reservations.SplitFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- lr, err = client.SplitResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "reservations.SplitFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("reservations.SplitFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lr.Response.Response, err = future.GetResult(sender); err == nil && lr.Response.Response.StatusCode != http.StatusNoContent {
+ lr, err = client.SplitResponder(lr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "reservations.SplitFuture", "Result", lr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "reservations.SplitFuture", "Result", resp, "Failure sending request")
- return
- }
- lr, err = client.SplitResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "reservations.SplitFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2017-11-01/reservations/reservation.go b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2017-11-01/reservations/reservation.go
index cb75eacd6..c850ff1f2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2017-11-01/reservations/reservation.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2017-11-01/reservations/reservation.go
@@ -336,15 +336,17 @@ func (client Client) MergePreparer(ctx context.Context, reservationOrderID strin
// MergeSender sends the Merge request. The method will close the
// http.Response Body if it receives an error.
func (client Client) MergeSender(req *http.Request) (future ReservationMergeFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -405,15 +407,17 @@ func (client Client) SplitPreparer(ctx context.Context, reservationOrderID strin
// SplitSender sends the Split request. The method will close the
// http.Response Body if it receives an error.
func (client Client) SplitSender(req *http.Request) (future SplitFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -476,15 +480,17 @@ func (client Client) UpdatePreparer(ctx context.Context, reservationOrderID stri
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateSender(req *http.Request) (future ReservationUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/client.go
new file mode 100644
index 000000000..4be69f7f7
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/client.go
@@ -0,0 +1,187 @@
+// Package reservations implements the Azure ARM Reservations service API version 2018-06-01.
+//
+// This API describe Azure Reservation
+package reservations
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Reservations
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Reservations.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+}
+
+// New creates an instance of the BaseClient client.
+func New() BaseClient {
+ return NewWithBaseURI(DefaultBaseURI)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ }
+}
+
+// GetAppliedReservationList get applicable `Reservation`s that are applied to this subscription.
+// Parameters:
+// subscriptionID - id of the subscription
+func (client BaseClient) GetAppliedReservationList(ctx context.Context, subscriptionID string) (result AppliedReservations, err error) {
+ req, err := client.GetAppliedReservationListPreparer(ctx, subscriptionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.BaseClient", "GetAppliedReservationList", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAppliedReservationListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "reservations.BaseClient", "GetAppliedReservationList", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAppliedReservationListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.BaseClient", "GetAppliedReservationList", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetAppliedReservationListPreparer prepares the GetAppliedReservationList request.
+func (client BaseClient) GetAppliedReservationListPreparer(ctx context.Context, subscriptionID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", subscriptionID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/appliedReservations", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAppliedReservationListSender sends the GetAppliedReservationList request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) GetAppliedReservationListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetAppliedReservationListResponder handles the response to the GetAppliedReservationList request. The method always
+// closes the http.Response Body.
+func (client BaseClient) GetAppliedReservationListResponder(resp *http.Response) (result AppliedReservations, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetCatalog sends the get catalog request.
+// Parameters:
+// subscriptionID - id of the subscription
+// reservedResourceType - the type of the resource for which the skus should be provided.
+// location - filters the skus based on the location specified in this parameter. This can be an azure region
+// or global
+func (client BaseClient) GetCatalog(ctx context.Context, subscriptionID string, reservedResourceType string, location string) (result ListCatalog, err error) {
+ req, err := client.GetCatalogPreparer(ctx, subscriptionID, reservedResourceType, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.BaseClient", "GetCatalog", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetCatalogSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "reservations.BaseClient", "GetCatalog", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetCatalogResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.BaseClient", "GetCatalog", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetCatalogPreparer prepares the GetCatalog request.
+func (client BaseClient) GetCatalogPreparer(ctx context.Context, subscriptionID string, reservedResourceType string, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", subscriptionID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "reservedResourceType": autorest.Encode("query", reservedResourceType),
+ }
+ if len(location) > 0 {
+ queryParameters["location"] = autorest.Encode("query", location)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/catalogs", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetCatalogSender sends the GetCatalog request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) GetCatalogSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetCatalogResponder handles the response to the GetCatalog request. The method always
+// closes the http.Response Body.
+func (client BaseClient) GetCatalogResponder(resp *http.Response) (result ListCatalog, 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/services/reservations/mgmt/2018-06-01/reservations/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/models.go
new file mode 100644
index 000000000..f2b664283
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/models.go
@@ -0,0 +1,1287 @@
+package reservations
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "net/http"
+)
+
+// AppliedScopeType enumerates the values for applied scope type.
+type AppliedScopeType string
+
+const (
+ // Shared ...
+ Shared AppliedScopeType = "Shared"
+ // Single ...
+ Single AppliedScopeType = "Single"
+)
+
+// PossibleAppliedScopeTypeValues returns an array of possible values for the AppliedScopeType const type.
+func PossibleAppliedScopeTypeValues() []AppliedScopeType {
+ return []AppliedScopeType{Shared, Single}
+}
+
+// AppliedScopeType1 enumerates the values for applied scope type 1.
+type AppliedScopeType1 string
+
+const (
+ // AppliedScopeType1Shared ...
+ AppliedScopeType1Shared AppliedScopeType1 = "Shared"
+ // AppliedScopeType1Single ...
+ AppliedScopeType1Single AppliedScopeType1 = "Single"
+)
+
+// PossibleAppliedScopeType1Values returns an array of possible values for the AppliedScopeType1 const type.
+func PossibleAppliedScopeType1Values() []AppliedScopeType1 {
+ return []AppliedScopeType1{AppliedScopeType1Shared, AppliedScopeType1Single}
+}
+
+// Code enumerates the values for code.
+type Code string
+
+const (
+ // ActivateQuoteFailed ...
+ ActivateQuoteFailed Code = "ActivateQuoteFailed"
+ // AppliedScopesNotAssociatedWithCommerceAccount ...
+ AppliedScopesNotAssociatedWithCommerceAccount Code = "AppliedScopesNotAssociatedWithCommerceAccount"
+ // AuthorizationFailed ...
+ AuthorizationFailed Code = "AuthorizationFailed"
+ // BadRequest ...
+ BadRequest Code = "BadRequest"
+ // BillingCustomerInputError ...
+ BillingCustomerInputError Code = "BillingCustomerInputError"
+ // BillingError ...
+ BillingError Code = "BillingError"
+ // BillingPaymentInstrumentHardError ...
+ BillingPaymentInstrumentHardError Code = "BillingPaymentInstrumentHardError"
+ // BillingPaymentInstrumentSoftError ...
+ BillingPaymentInstrumentSoftError Code = "BillingPaymentInstrumentSoftError"
+ // BillingScopeIDCannotBeChanged ...
+ BillingScopeIDCannotBeChanged Code = "BillingScopeIdCannotBeChanged"
+ // BillingTransientError ...
+ BillingTransientError Code = "BillingTransientError"
+ // CalculatePriceFailed ...
+ CalculatePriceFailed Code = "CalculatePriceFailed"
+ // CapacityUpdateScopesFailed ...
+ CapacityUpdateScopesFailed Code = "CapacityUpdateScopesFailed"
+ // ClientCertificateThumbprintNotSet ...
+ ClientCertificateThumbprintNotSet Code = "ClientCertificateThumbprintNotSet"
+ // CreateQuoteFailed ...
+ CreateQuoteFailed Code = "CreateQuoteFailed"
+ // Forbidden ...
+ Forbidden Code = "Forbidden"
+ // FulfillmentConfigurationError ...
+ FulfillmentConfigurationError Code = "FulfillmentConfigurationError"
+ // FulfillmentError ...
+ FulfillmentError Code = "FulfillmentError"
+ // FulfillmentOutOfStockError ...
+ FulfillmentOutOfStockError Code = "FulfillmentOutOfStockError"
+ // FulfillmentTransientError ...
+ FulfillmentTransientError Code = "FulfillmentTransientError"
+ // HTTPMethodNotSupported ...
+ HTTPMethodNotSupported Code = "HttpMethodNotSupported"
+ // InternalServerError ...
+ InternalServerError Code = "InternalServerError"
+ // InvalidAccessToken ...
+ InvalidAccessToken Code = "InvalidAccessToken"
+ // InvalidFulfillmentRequestParameters ...
+ InvalidFulfillmentRequestParameters Code = "InvalidFulfillmentRequestParameters"
+ // InvalidHealthCheckType ...
+ InvalidHealthCheckType Code = "InvalidHealthCheckType"
+ // InvalidLocationID ...
+ InvalidLocationID Code = "InvalidLocationId"
+ // InvalidRefundQuantity ...
+ InvalidRefundQuantity Code = "InvalidRefundQuantity"
+ // InvalidRequestContent ...
+ InvalidRequestContent Code = "InvalidRequestContent"
+ // InvalidRequestURI ...
+ InvalidRequestURI Code = "InvalidRequestUri"
+ // InvalidReservationID ...
+ InvalidReservationID Code = "InvalidReservationId"
+ // InvalidReservationOrderID ...
+ InvalidReservationOrderID Code = "InvalidReservationOrderId"
+ // InvalidSingleAppliedScopesCount ...
+ InvalidSingleAppliedScopesCount Code = "InvalidSingleAppliedScopesCount"
+ // InvalidSubscriptionID ...
+ InvalidSubscriptionID Code = "InvalidSubscriptionId"
+ // InvalidTenantID ...
+ InvalidTenantID Code = "InvalidTenantId"
+ // MissingAppliedScopesForSingle ...
+ MissingAppliedScopesForSingle Code = "MissingAppliedScopesForSingle"
+ // MissingTenantID ...
+ MissingTenantID Code = "MissingTenantId"
+ // NonsupportedAccountID ...
+ NonsupportedAccountID Code = "NonsupportedAccountId"
+ // NotSpecified ...
+ NotSpecified Code = "NotSpecified"
+ // NotSupportedCountry ...
+ NotSupportedCountry Code = "NotSupportedCountry"
+ // NoValidReservationsToReRate ...
+ NoValidReservationsToReRate Code = "NoValidReservationsToReRate"
+ // OperationCannotBePerformedInCurrentState ...
+ OperationCannotBePerformedInCurrentState Code = "OperationCannotBePerformedInCurrentState"
+ // OperationFailed ...
+ OperationFailed Code = "OperationFailed"
+ // PatchValuesSameAsExisting ...
+ PatchValuesSameAsExisting Code = "PatchValuesSameAsExisting"
+ // PaymentInstrumentNotFound ...
+ PaymentInstrumentNotFound Code = "PaymentInstrumentNotFound"
+ // PurchaseError ...
+ PurchaseError Code = "PurchaseError"
+ // ReRateOnlyAllowedForEA ...
+ ReRateOnlyAllowedForEA Code = "ReRateOnlyAllowedForEA"
+ // ReservationIDNotInReservationOrder ...
+ ReservationIDNotInReservationOrder Code = "ReservationIdNotInReservationOrder"
+ // ReservationOrderCreationFailed ...
+ ReservationOrderCreationFailed Code = "ReservationOrderCreationFailed"
+ // ReservationOrderIDAlreadyExists ...
+ ReservationOrderIDAlreadyExists Code = "ReservationOrderIdAlreadyExists"
+ // ReservationOrderNotEnabled ...
+ ReservationOrderNotEnabled Code = "ReservationOrderNotEnabled"
+ // ReservationOrderNotFound ...
+ ReservationOrderNotFound Code = "ReservationOrderNotFound"
+ // RiskCheckFailed ...
+ RiskCheckFailed Code = "RiskCheckFailed"
+ // RoleAssignmentCreationFailed ...
+ RoleAssignmentCreationFailed Code = "RoleAssignmentCreationFailed"
+ // ServerTimeout ...
+ ServerTimeout Code = "ServerTimeout"
+ // UnauthenticatedRequestsThrottled ...
+ UnauthenticatedRequestsThrottled Code = "UnauthenticatedRequestsThrottled"
+ // UnsupportedReservationTerm ...
+ UnsupportedReservationTerm Code = "UnsupportedReservationTerm"
+)
+
+// PossibleCodeValues returns an array of possible values for the Code const type.
+func PossibleCodeValues() []Code {
+ return []Code{ActivateQuoteFailed, AppliedScopesNotAssociatedWithCommerceAccount, AuthorizationFailed, BadRequest, BillingCustomerInputError, BillingError, BillingPaymentInstrumentHardError, BillingPaymentInstrumentSoftError, BillingScopeIDCannotBeChanged, BillingTransientError, CalculatePriceFailed, CapacityUpdateScopesFailed, ClientCertificateThumbprintNotSet, CreateQuoteFailed, Forbidden, FulfillmentConfigurationError, FulfillmentError, FulfillmentOutOfStockError, FulfillmentTransientError, HTTPMethodNotSupported, InternalServerError, InvalidAccessToken, InvalidFulfillmentRequestParameters, InvalidHealthCheckType, InvalidLocationID, InvalidRefundQuantity, InvalidRequestContent, InvalidRequestURI, InvalidReservationID, InvalidReservationOrderID, InvalidSingleAppliedScopesCount, InvalidSubscriptionID, InvalidTenantID, MissingAppliedScopesForSingle, MissingTenantID, NonsupportedAccountID, NotSpecified, NotSupportedCountry, NoValidReservationsToReRate, OperationCannotBePerformedInCurrentState, OperationFailed, PatchValuesSameAsExisting, PaymentInstrumentNotFound, PurchaseError, ReRateOnlyAllowedForEA, ReservationIDNotInReservationOrder, ReservationOrderCreationFailed, ReservationOrderIDAlreadyExists, ReservationOrderNotEnabled, ReservationOrderNotFound, RiskCheckFailed, RoleAssignmentCreationFailed, ServerTimeout, UnauthenticatedRequestsThrottled, UnsupportedReservationTerm}
+}
+
+// InstanceFlexibility enumerates the values for instance flexibility.
+type InstanceFlexibility string
+
+const (
+ // NotSupported ...
+ NotSupported InstanceFlexibility = "NotSupported"
+ // Off ...
+ Off InstanceFlexibility = "Off"
+ // On ...
+ On InstanceFlexibility = "On"
+)
+
+// PossibleInstanceFlexibilityValues returns an array of possible values for the InstanceFlexibility const type.
+func PossibleInstanceFlexibilityValues() []InstanceFlexibility {
+ return []InstanceFlexibility{NotSupported, Off, On}
+}
+
+// InstanceFlexibility1 enumerates the values for instance flexibility 1.
+type InstanceFlexibility1 string
+
+const (
+ // InstanceFlexibility1NotSupported ...
+ InstanceFlexibility1NotSupported InstanceFlexibility1 = "NotSupported"
+ // InstanceFlexibility1Off ...
+ InstanceFlexibility1Off InstanceFlexibility1 = "Off"
+ // InstanceFlexibility1On ...
+ InstanceFlexibility1On InstanceFlexibility1 = "On"
+)
+
+// PossibleInstanceFlexibility1Values returns an array of possible values for the InstanceFlexibility1 const type.
+func PossibleInstanceFlexibility1Values() []InstanceFlexibility1 {
+ return []InstanceFlexibility1{InstanceFlexibility1NotSupported, InstanceFlexibility1Off, InstanceFlexibility1On}
+}
+
+// Location enumerates the values for location.
+type Location string
+
+const (
+ // Australiac ...
+ Australiac Location = "australiac"
+ // Australiac2 ...
+ Australiac2 Location = "australiac2"
+ // Australiaeast ...
+ Australiaeast Location = "australiaeast"
+ // Australiasoutheast ...
+ Australiasoutheast Location = "australiasoutheast"
+ // Brazilsouth ...
+ Brazilsouth Location = "brazilsouth"
+ // Canadacentral ...
+ Canadacentral Location = "canadacentral"
+ // Canadaeast ...
+ Canadaeast Location = "canadaeast"
+ // Centralindia ...
+ Centralindia Location = "centralindia"
+ // Centralus ...
+ Centralus Location = "centralus"
+ // Eastasia ...
+ Eastasia Location = "eastasia"
+ // Eastus ...
+ Eastus Location = "eastus"
+ // Eastus2 ...
+ Eastus2 Location = "eastus2"
+ // Francecentral ...
+ Francecentral Location = "francecentral"
+ // Francesouth ...
+ Francesouth Location = "francesouth"
+ // Japaneast ...
+ Japaneast Location = "japaneast"
+ // Japanwest ...
+ Japanwest Location = "japanwest"
+ // Northcentralus ...
+ Northcentralus Location = "northcentralus"
+ // Northeurope ...
+ Northeurope Location = "northeurope"
+ // Southcentralus ...
+ Southcentralus Location = "southcentralus"
+ // Southeastasia ...
+ Southeastasia Location = "southeastasia"
+ // Southindia ...
+ Southindia Location = "southindia"
+ // Uksouth ...
+ Uksouth Location = "uksouth"
+ // Ukwest ...
+ Ukwest Location = "ukwest"
+ // Westcentralus ...
+ Westcentralus Location = "westcentralus"
+ // Westeurope ...
+ Westeurope Location = "westeurope"
+ // Westindia ...
+ Westindia Location = "westindia"
+ // Westus ...
+ Westus Location = "westus"
+ // Westus2 ...
+ Westus2 Location = "westus2"
+)
+
+// PossibleLocationValues returns an array of possible values for the Location const type.
+func PossibleLocationValues() []Location {
+ return []Location{Australiac, Australiac2, Australiaeast, Australiasoutheast, Brazilsouth, Canadacentral, Canadaeast, Centralindia, Centralus, Eastasia, Eastus, Eastus2, Francecentral, Francesouth, Japaneast, Japanwest, Northcentralus, Northeurope, Southcentralus, Southeastasia, Southindia, Uksouth, Ukwest, Westcentralus, Westeurope, Westindia, Westus, Westus2}
+}
+
+// ProvisioningState enumerates the values for provisioning state.
+type ProvisioningState string
+
+const (
+ // BillingFailed ...
+ BillingFailed ProvisioningState = "BillingFailed"
+ // Cancelled ...
+ Cancelled ProvisioningState = "Cancelled"
+ // ConfirmedBilling ...
+ ConfirmedBilling ProvisioningState = "ConfirmedBilling"
+ // ConfirmedResourceHold ...
+ ConfirmedResourceHold ProvisioningState = "ConfirmedResourceHold"
+ // Created ...
+ Created ProvisioningState = "Created"
+ // Creating ...
+ Creating ProvisioningState = "Creating"
+ // Expired ...
+ Expired ProvisioningState = "Expired"
+ // Failed ...
+ Failed ProvisioningState = "Failed"
+ // Merged ...
+ Merged ProvisioningState = "Merged"
+ // PendingBilling ...
+ PendingBilling ProvisioningState = "PendingBilling"
+ // PendingResourceHold ...
+ PendingResourceHold ProvisioningState = "PendingResourceHold"
+ // Split ...
+ Split ProvisioningState = "Split"
+ // Succeeded ...
+ Succeeded ProvisioningState = "Succeeded"
+)
+
+// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
+func PossibleProvisioningStateValues() []ProvisioningState {
+ return []ProvisioningState{BillingFailed, Cancelled, ConfirmedBilling, ConfirmedResourceHold, Created, Creating, Expired, Failed, Merged, PendingBilling, PendingResourceHold, Split, Succeeded}
+}
+
+// ProvisioningState1 enumerates the values for provisioning state 1.
+type ProvisioningState1 string
+
+const (
+ // ProvisioningState1BillingFailed ...
+ ProvisioningState1BillingFailed ProvisioningState1 = "BillingFailed"
+ // ProvisioningState1Cancelled ...
+ ProvisioningState1Cancelled ProvisioningState1 = "Cancelled"
+ // ProvisioningState1ConfirmedBilling ...
+ ProvisioningState1ConfirmedBilling ProvisioningState1 = "ConfirmedBilling"
+ // ProvisioningState1ConfirmedResourceHold ...
+ ProvisioningState1ConfirmedResourceHold ProvisioningState1 = "ConfirmedResourceHold"
+ // ProvisioningState1Created ...
+ ProvisioningState1Created ProvisioningState1 = "Created"
+ // ProvisioningState1Creating ...
+ ProvisioningState1Creating ProvisioningState1 = "Creating"
+ // ProvisioningState1Expired ...
+ ProvisioningState1Expired ProvisioningState1 = "Expired"
+ // ProvisioningState1Failed ...
+ ProvisioningState1Failed ProvisioningState1 = "Failed"
+ // ProvisioningState1Merged ...
+ ProvisioningState1Merged ProvisioningState1 = "Merged"
+ // ProvisioningState1PendingBilling ...
+ ProvisioningState1PendingBilling ProvisioningState1 = "PendingBilling"
+ // ProvisioningState1PendingResourceHold ...
+ ProvisioningState1PendingResourceHold ProvisioningState1 = "PendingResourceHold"
+ // ProvisioningState1Split ...
+ ProvisioningState1Split ProvisioningState1 = "Split"
+ // ProvisioningState1Succeeded ...
+ ProvisioningState1Succeeded ProvisioningState1 = "Succeeded"
+)
+
+// PossibleProvisioningState1Values returns an array of possible values for the ProvisioningState1 const type.
+func PossibleProvisioningState1Values() []ProvisioningState1 {
+ return []ProvisioningState1{ProvisioningState1BillingFailed, ProvisioningState1Cancelled, ProvisioningState1ConfirmedBilling, ProvisioningState1ConfirmedResourceHold, ProvisioningState1Created, ProvisioningState1Creating, ProvisioningState1Expired, ProvisioningState1Failed, ProvisioningState1Merged, ProvisioningState1PendingBilling, ProvisioningState1PendingResourceHold, ProvisioningState1Split, ProvisioningState1Succeeded}
+}
+
+// ReservedResourceType enumerates the values for reserved resource type.
+type ReservedResourceType string
+
+const (
+ // SQLDatabases ...
+ SQLDatabases ReservedResourceType = "SqlDatabases"
+ // SuseLinux ...
+ SuseLinux ReservedResourceType = "SuseLinux"
+ // VirtualMachines ...
+ VirtualMachines ReservedResourceType = "VirtualMachines"
+)
+
+// PossibleReservedResourceTypeValues returns an array of possible values for the ReservedResourceType const type.
+func PossibleReservedResourceTypeValues() []ReservedResourceType {
+ return []ReservedResourceType{SQLDatabases, SuseLinux, VirtualMachines}
+}
+
+// StatusCode enumerates the values for status code.
+type StatusCode string
+
+const (
+ // StatusCodeActive ...
+ StatusCodeActive StatusCode = "Active"
+ // StatusCodeExpired ...
+ StatusCodeExpired StatusCode = "Expired"
+ // StatusCodeMerged ...
+ StatusCodeMerged StatusCode = "Merged"
+ // StatusCodeNone ...
+ StatusCodeNone StatusCode = "None"
+ // StatusCodePaymentInstrumentError ...
+ StatusCodePaymentInstrumentError StatusCode = "PaymentInstrumentError"
+ // StatusCodePending ...
+ StatusCodePending StatusCode = "Pending"
+ // StatusCodePurchaseError ...
+ StatusCodePurchaseError StatusCode = "PurchaseError"
+ // StatusCodeSplit ...
+ StatusCodeSplit StatusCode = "Split"
+ // StatusCodeSucceeded ...
+ StatusCodeSucceeded StatusCode = "Succeeded"
+)
+
+// PossibleStatusCodeValues returns an array of possible values for the StatusCode const type.
+func PossibleStatusCodeValues() []StatusCode {
+ return []StatusCode{StatusCodeActive, StatusCodeExpired, StatusCodeMerged, StatusCodeNone, StatusCodePaymentInstrumentError, StatusCodePending, StatusCodePurchaseError, StatusCodeSplit, StatusCodeSucceeded}
+}
+
+// Term enumerates the values for term.
+type Term string
+
+const (
+ // P1Y ...
+ P1Y Term = "P1Y"
+ // P3Y ...
+ P3Y Term = "P3Y"
+)
+
+// PossibleTermValues returns an array of possible values for the Term const type.
+func PossibleTermValues() []Term {
+ return []Term{P1Y, P3Y}
+}
+
+// AppliedReservationList ...
+type AppliedReservationList struct {
+ Value *[]string `json:"value,omitempty"`
+ // NextLink - Url to get the next page of reservations
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// AppliedReservations ...
+type AppliedReservations struct {
+ autorest.Response `json:"-"`
+ // ID - Identifier of the applied reservations
+ ID *string `json:"id,omitempty"`
+ // Name - Name of resource
+ Name *string `json:"name,omitempty"`
+ // Type - Type of resource. "Microsoft.Capacity/AppliedReservations"
+ Type *string `json:"type,omitempty"`
+ *AppliedReservationsProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AppliedReservations.
+func (ar AppliedReservations) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ar.ID != nil {
+ objectMap["id"] = ar.ID
+ }
+ if ar.Name != nil {
+ objectMap["name"] = ar.Name
+ }
+ if ar.Type != nil {
+ objectMap["type"] = ar.Type
+ }
+ if ar.AppliedReservationsProperties != nil {
+ objectMap["properties"] = ar.AppliedReservationsProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AppliedReservations struct.
+func (ar *AppliedReservations) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ar.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ar.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ar.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var appliedReservationsProperties AppliedReservationsProperties
+ err = json.Unmarshal(*v, &appliedReservationsProperties)
+ if err != nil {
+ return err
+ }
+ ar.AppliedReservationsProperties = &appliedReservationsProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// AppliedReservationsProperties ...
+type AppliedReservationsProperties struct {
+ ReservationOrderIds *AppliedReservationList `json:"reservationOrderIds,omitempty"`
+}
+
+// Catalog ...
+type Catalog struct {
+ // ResourceType - The type of resource the SKU applies to.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // Name - The name of SKU
+ Name *string `json:"name,omitempty"`
+ // Terms - Available reservation terms for this resource
+ Terms *[]string `json:"terms,omitempty"`
+ Locations *[]string `json:"locations,omitempty"`
+ SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"`
+ Restrictions *[]SkuRestriction `json:"restrictions,omitempty"`
+}
+
+// Error ...
+type Error struct {
+ Error *ExtendedErrorInfo `json:"error,omitempty"`
+}
+
+// ExtendedErrorInfo ...
+type ExtendedErrorInfo struct {
+ // Code - Possible values include: 'NotSpecified', 'InternalServerError', 'ServerTimeout', 'AuthorizationFailed', 'BadRequest', 'ClientCertificateThumbprintNotSet', 'InvalidRequestContent', 'OperationFailed', 'HTTPMethodNotSupported', 'InvalidRequestURI', 'MissingTenantID', 'InvalidTenantID', 'InvalidReservationOrderID', 'InvalidReservationID', 'ReservationIDNotInReservationOrder', 'ReservationOrderNotFound', 'InvalidSubscriptionID', 'InvalidAccessToken', 'InvalidLocationID', 'UnauthenticatedRequestsThrottled', 'InvalidHealthCheckType', 'Forbidden', 'BillingScopeIDCannotBeChanged', 'AppliedScopesNotAssociatedWithCommerceAccount', 'PatchValuesSameAsExisting', 'RoleAssignmentCreationFailed', 'ReservationOrderCreationFailed', 'ReservationOrderNotEnabled', 'CapacityUpdateScopesFailed', 'UnsupportedReservationTerm', 'ReservationOrderIDAlreadyExists', 'RiskCheckFailed', 'CreateQuoteFailed', 'ActivateQuoteFailed', 'NonsupportedAccountID', 'PaymentInstrumentNotFound', 'MissingAppliedScopesForSingle', 'NoValidReservationsToReRate', 'ReRateOnlyAllowedForEA', 'OperationCannotBePerformedInCurrentState', 'InvalidSingleAppliedScopesCount', 'InvalidFulfillmentRequestParameters', 'NotSupportedCountry', 'InvalidRefundQuantity', 'PurchaseError', 'BillingCustomerInputError', 'BillingPaymentInstrumentSoftError', 'BillingPaymentInstrumentHardError', 'BillingTransientError', 'BillingError', 'FulfillmentConfigurationError', 'FulfillmentOutOfStockError', 'FulfillmentTransientError', 'FulfillmentError', 'CalculatePriceFailed'
+ Code Code `json:"code,omitempty"`
+ Message *string `json:"message,omitempty"`
+}
+
+// ExtendedStatusInfo ...
+type ExtendedStatusInfo struct {
+ // StatusCode - Possible values include: 'StatusCodeNone', 'StatusCodePending', 'StatusCodeActive', 'StatusCodePurchaseError', 'StatusCodePaymentInstrumentError', 'StatusCodeSplit', 'StatusCodeMerged', 'StatusCodeExpired', 'StatusCodeSucceeded'
+ StatusCode StatusCode `json:"statusCode,omitempty"`
+ // Message - The message giving detailed information about the status code.
+ Message *string `json:"message,omitempty"`
+}
+
+// List ...
+type List struct {
+ autorest.Response `json:"-"`
+ Value *[]Response `json:"value,omitempty"`
+ // NextLink - Url to get the next page of reservations.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListCatalog ...
+type ListCatalog struct {
+ autorest.Response `json:"-"`
+ Value *[]Catalog `json:"value,omitempty"`
+}
+
+// ListIterator provides access to a complete listing of Response values.
+type ListIterator struct {
+ i int
+ page ListPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ListIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ListIterator) Response() List {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ListIterator) Value() Response {
+ if !iter.page.NotDone() {
+ return Response{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (l List) IsEmpty() bool {
+ return l.Value == nil || len(*l.Value) == 0
+}
+
+// listPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (l List) listPreparer() (*http.Request, error) {
+ if l.NextLink == nil || len(to.String(l.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(l.NextLink)))
+}
+
+// ListPage contains a page of Response values.
+type ListPage struct {
+ fn func(List) (List, error)
+ l List
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ListPage) Next() error {
+ next, err := page.fn(page.l)
+ if err != nil {
+ return err
+ }
+ page.l = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListPage) NotDone() bool {
+ return !page.l.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListPage) Response() List {
+ return page.l
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListPage) Values() []Response {
+ if page.l.IsEmpty() {
+ return nil
+ }
+ return *page.l.Value
+}
+
+// ListResponse ...
+type ListResponse struct {
+ autorest.Response `json:"-"`
+ Value *[]Response `json:"value,omitempty"`
+}
+
+// MergeProperties ...
+type MergeProperties struct {
+ // Sources - Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
+ Sources *[]string `json:"sources,omitempty"`
+}
+
+// MergePropertiesType ...
+type MergePropertiesType struct {
+ // MergeDestination - Reservation Resource Id Created due to the merge. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
+ MergeDestination *string `json:"mergeDestination,omitempty"`
+ // MergeSources - Resource Ids of the Source Reservation's merged to form this Reservation. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
+ MergeSources *[]string `json:"mergeSources,omitempty"`
+}
+
+// MergeRequest ...
+type MergeRequest struct {
+ *MergeProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for MergeRequest.
+func (mr MergeRequest) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mr.MergeProperties != nil {
+ objectMap["properties"] = mr.MergeProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for MergeRequest struct.
+func (mr *MergeRequest) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var mergeProperties MergeProperties
+ err = json.Unmarshal(*v, &mergeProperties)
+ if err != nil {
+ return err
+ }
+ mr.MergeProperties = &mergeProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// OperationDisplay ...
+type OperationDisplay struct {
+ Provider *string `json:"provider,omitempty"`
+ Resource *string `json:"resource,omitempty"`
+ Operation *string `json:"operation,omitempty"`
+ Description *string `json:"description,omitempty"`
+}
+
+// OperationList ...
+type OperationList struct {
+ autorest.Response `json:"-"`
+ Value *[]OperationResponse `json:"value,omitempty"`
+ // NextLink - Url to get the next page of items.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// OperationListIterator provides access to a complete listing of OperationResponse values.
+type OperationListIterator struct {
+ i int
+ page OperationListPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OperationListIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OperationListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OperationListIterator) Response() OperationList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OperationListIterator) Value() OperationResponse {
+ if !iter.page.NotDone() {
+ return OperationResponse{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ol OperationList) IsEmpty() bool {
+ return ol.Value == nil || len(*ol.Value) == 0
+}
+
+// operationListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ol OperationList) operationListPreparer() (*http.Request, error) {
+ if ol.NextLink == nil || len(to.String(ol.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ol.NextLink)))
+}
+
+// OperationListPage contains a page of OperationResponse values.
+type OperationListPage struct {
+ fn func(OperationList) (OperationList, error)
+ ol OperationList
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OperationListPage) Next() error {
+ next, err := page.fn(page.ol)
+ if err != nil {
+ return err
+ }
+ page.ol = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OperationListPage) NotDone() bool {
+ return !page.ol.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OperationListPage) Response() OperationList {
+ return page.ol
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OperationListPage) Values() []OperationResponse {
+ if page.ol.IsEmpty() {
+ return nil
+ }
+ return *page.ol.Value
+}
+
+// OperationResponse ...
+type OperationResponse struct {
+ Name *string `json:"name,omitempty"`
+ Display *OperationDisplay `json:"display,omitempty"`
+ Origin *string `json:"origin,omitempty"`
+}
+
+// OrderList ...
+type OrderList struct {
+ autorest.Response `json:"-"`
+ Value *[]OrderResponse `json:"value,omitempty"`
+ // NextLink - Url to get the next page of reservationOrders.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// OrderListIterator provides access to a complete listing of OrderResponse values.
+type OrderListIterator struct {
+ i int
+ page OrderListPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OrderListIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OrderListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OrderListIterator) Response() OrderList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OrderListIterator) Value() OrderResponse {
+ if !iter.page.NotDone() {
+ return OrderResponse{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ol OrderList) IsEmpty() bool {
+ return ol.Value == nil || len(*ol.Value) == 0
+}
+
+// orderListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ol OrderList) orderListPreparer() (*http.Request, error) {
+ if ol.NextLink == nil || len(to.String(ol.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ol.NextLink)))
+}
+
+// OrderListPage contains a page of OrderResponse values.
+type OrderListPage struct {
+ fn func(OrderList) (OrderList, error)
+ ol OrderList
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OrderListPage) Next() error {
+ next, err := page.fn(page.ol)
+ if err != nil {
+ return err
+ }
+ page.ol = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OrderListPage) NotDone() bool {
+ return !page.ol.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OrderListPage) Response() OrderList {
+ return page.ol
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OrderListPage) Values() []OrderResponse {
+ if page.ol.IsEmpty() {
+ return nil
+ }
+ return *page.ol.Value
+}
+
+// OrderProperties ...
+type OrderProperties struct {
+ // DisplayName - Friendly name for user to easily identified the reservation.
+ DisplayName *string `json:"displayName,omitempty"`
+ // RequestDateTime - This is the DateTime when the reservation was initially requested for purchase.
+ RequestDateTime *date.Time `json:"requestDateTime,omitempty"`
+ // CreatedDateTime - This is the DateTime when the reservation was created.
+ CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
+ // ExpiryDate - This is the date when the Reservation will expire.
+ ExpiryDate *date.Date `json:"expiryDate,omitempty"`
+ // OriginalQuantity - Total Quantity of the SKUs purchased in the Reservation.
+ OriginalQuantity *int32 `json:"originalQuantity,omitempty"`
+ // Term - Possible values include: 'P1Y', 'P3Y'
+ Term Term `json:"term,omitempty"`
+ // ProvisioningState - Possible values include: 'ProvisioningState1Creating', 'ProvisioningState1PendingResourceHold', 'ProvisioningState1ConfirmedResourceHold', 'ProvisioningState1PendingBilling', 'ProvisioningState1ConfirmedBilling', 'ProvisioningState1Created', 'ProvisioningState1Succeeded', 'ProvisioningState1Cancelled', 'ProvisioningState1Expired', 'ProvisioningState1BillingFailed', 'ProvisioningState1Failed', 'ProvisioningState1Split', 'ProvisioningState1Merged'
+ ProvisioningState ProvisioningState1 `json:"provisioningState,omitempty"`
+ ReservationsProperty *[]Response `json:"reservations,omitempty"`
+}
+
+// OrderResponse ...
+type OrderResponse struct {
+ autorest.Response `json:"-"`
+ Etag *int32 `json:"etag,omitempty"`
+ // ID - Identifier of the reservation
+ ID *string `json:"id,omitempty"`
+ // Name - Name of the reservation
+ Name *string `json:"name,omitempty"`
+ *OrderProperties `json:"properties,omitempty"`
+ // Type - Type of resource. "Microsoft.Capacity/reservations"
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OrderResponse.
+func (or OrderResponse) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if or.Etag != nil {
+ objectMap["etag"] = or.Etag
+ }
+ if or.ID != nil {
+ objectMap["id"] = or.ID
+ }
+ if or.Name != nil {
+ objectMap["name"] = or.Name
+ }
+ if or.OrderProperties != nil {
+ objectMap["properties"] = or.OrderProperties
+ }
+ if or.Type != nil {
+ objectMap["type"] = or.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for OrderResponse struct.
+func (or *OrderResponse) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "etag":
+ if v != nil {
+ var etag int32
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ or.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ or.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ or.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var orderProperties OrderProperties
+ err = json.Unmarshal(*v, &orderProperties)
+ if err != nil {
+ return err
+ }
+ or.OrderProperties = &orderProperties
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ or.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// Patch ...
+type Patch struct {
+ *PatchProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Patch.
+func (p Patch) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if p.PatchProperties != nil {
+ objectMap["properties"] = p.PatchProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Patch struct.
+func (p *Patch) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var patchProperties PatchProperties
+ err = json.Unmarshal(*v, &patchProperties)
+ if err != nil {
+ return err
+ }
+ p.PatchProperties = &patchProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// PatchProperties ...
+type PatchProperties struct {
+ // AppliedScopeType - Possible values include: 'AppliedScopeType1Single', 'AppliedScopeType1Shared'
+ AppliedScopeType AppliedScopeType1 `json:"appliedScopeType,omitempty"`
+ AppliedScopes *[]string `json:"appliedScopes,omitempty"`
+ // InstanceFlexibility - Possible values include: 'InstanceFlexibility1On', 'InstanceFlexibility1Off', 'InstanceFlexibility1NotSupported'
+ InstanceFlexibility InstanceFlexibility1 `json:"instanceFlexibility,omitempty"`
+}
+
+// Properties ...
+type Properties struct {
+ // ReservedResourceType - Possible values include: 'VirtualMachines', 'SQLDatabases', 'SuseLinux'
+ ReservedResourceType ReservedResourceType `json:"reservedResourceType,omitempty"`
+ // InstanceFlexibility - Possible values include: 'On', 'Off', 'NotSupported'
+ InstanceFlexibility InstanceFlexibility `json:"instanceFlexibility,omitempty"`
+ // DisplayName - Friendly name for user to easily identify the reservation
+ DisplayName *string `json:"displayName,omitempty"`
+ AppliedScopes *[]string `json:"appliedScopes,omitempty"`
+ // AppliedScopeType - Possible values include: 'Single', 'Shared'
+ AppliedScopeType AppliedScopeType `json:"appliedScopeType,omitempty"`
+ // Quantity - Quantity of the SKUs that are part of the Reservation.
+ Quantity *int32 `json:"quantity,omitempty"`
+ // ProvisioningState - Possible values include: 'Creating', 'PendingResourceHold', 'ConfirmedResourceHold', 'PendingBilling', 'ConfirmedBilling', 'Created', 'Succeeded', 'Cancelled', 'Expired', 'BillingFailed', 'Failed', 'Split', 'Merged'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // EffectiveDateTime - DateTime of the Reservation starting when this version is effective from.
+ EffectiveDateTime *date.Time `json:"effectiveDateTime,omitempty"`
+ // LastUpdatedDateTime - DateTime of the last time the Reservation was updated.
+ LastUpdatedDateTime *date.Time `json:"lastUpdatedDateTime,omitempty"`
+ // ExpiryDate - This is the date when the Reservation will expire.
+ ExpiryDate *date.Date `json:"expiryDate,omitempty"`
+ // SkuDescription - Description of the SKU in english.
+ SkuDescription *string `json:"skuDescription,omitempty"`
+ ExtendedStatusInfo *ExtendedStatusInfo `json:"extendedStatusInfo,omitempty"`
+ SplitProperties *SplitPropertiesType `json:"splitProperties,omitempty"`
+ MergeProperties *MergePropertiesType `json:"mergeProperties,omitempty"`
+}
+
+// ReservationMergeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ReservationMergeFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ReservationMergeFuture) Result(client Client) (lr ListResponse, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.ReservationMergeFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("reservations.ReservationMergeFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lr.Response.Response, err = future.GetResult(sender); err == nil && lr.Response.Response.StatusCode != http.StatusNoContent {
+ lr, err = client.MergeResponder(lr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.ReservationMergeFuture", "Result", lr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ReservationUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ReservationUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ReservationUpdateFuture) Result(client Client) (r Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.ReservationUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("reservations.ReservationUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.UpdateResponder(r.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.ReservationUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// Response ...
+type Response struct {
+ autorest.Response `json:"-"`
+ // Location - Possible values include: 'Westus', 'Eastus', 'Eastus2', 'Northcentralus', 'Westus2', 'Southcentralus', 'Centralus', 'Westeurope', 'Northeurope', 'Eastasia', 'Southeastasia', 'Japaneast', 'Japanwest', 'Brazilsouth', 'Australiaeast', 'Australiasoutheast', 'Southindia', 'Westindia', 'Centralindia', 'Canadacentral', 'Canadaeast', 'Uksouth', 'Westcentralus', 'Ukwest', 'Francecentral', 'Francesouth', 'Australiac', 'Australiac2'
+ Location Location `json:"location,omitempty"`
+ Etag *int32 `json:"etag,omitempty"`
+ // ID - Identifier of the reservation
+ ID *string `json:"id,omitempty"`
+ // Name - Name of the reservation
+ Name *string `json:"name,omitempty"`
+ Sku *SkuName `json:"sku,omitempty"`
+ Properties *Properties `json:"properties,omitempty"`
+ // Type - Type of resource. "Microsoft.Capacity/reservationOrders/reservations"
+ Type *string `json:"type,omitempty"`
+}
+
+// SkuName ...
+type SkuName struct {
+ Name *string `json:"name,omitempty"`
+}
+
+// SkuProperty ...
+type SkuProperty struct {
+ // Name - An invariant to describe the feature.
+ Name *string `json:"name,omitempty"`
+ // Value - An invariant if the feature is measured by quantity.
+ Value *string `json:"value,omitempty"`
+}
+
+// SkuRestriction ...
+type SkuRestriction struct {
+ // Type - The type of restrictions.
+ Type *string `json:"type,omitempty"`
+ // Values - The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
+ Values *[]string `json:"values,omitempty"`
+ // ReasonCode - The reason for restriction.
+ ReasonCode *string `json:"reasonCode,omitempty"`
+}
+
+// SplitFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type SplitFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *SplitFuture) Result(client Client) (lr ListResponse, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.SplitFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("reservations.SplitFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lr.Response.Response, err = future.GetResult(sender); err == nil && lr.Response.Response.StatusCode != http.StatusNoContent {
+ lr, err = client.SplitResponder(lr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.SplitFuture", "Result", lr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// SplitProperties ...
+type SplitProperties struct {
+ // Quantities - List of the quantities in the new reservations to create.
+ Quantities *[]int32 `json:"quantities,omitempty"`
+ // ReservationID - Resource id of the reservation to be split. Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
+ ReservationID *string `json:"reservationId,omitempty"`
+}
+
+// SplitPropertiesType ...
+type SplitPropertiesType struct {
+ // SplitDestinations - List of destination Resource Id that are created due to split. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
+ SplitDestinations *[]string `json:"splitDestinations,omitempty"`
+ // SplitSource - Resource Id of the Reservation from which this is split. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
+ SplitSource *string `json:"splitSource,omitempty"`
+}
+
+// SplitRequest ...
+type SplitRequest struct {
+ *SplitProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SplitRequest.
+func (sr SplitRequest) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sr.SplitProperties != nil {
+ objectMap["properties"] = sr.SplitProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SplitRequest struct.
+func (sr *SplitRequest) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var splitProperties SplitProperties
+ err = json.Unmarshal(*v, &splitProperties)
+ if err != nil {
+ return err
+ }
+ sr.SplitProperties = &splitProperties
+ }
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/operation.go b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/operation.go
new file mode 100644
index 000000000..e47e14cd1
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/operation.go
@@ -0,0 +1,126 @@
+package reservations
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// OperationClient is the this API describe Azure Reservation
+type OperationClient struct {
+ BaseClient
+}
+
+// NewOperationClient creates an instance of the OperationClient client.
+func NewOperationClient() OperationClient {
+ return NewOperationClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewOperationClientWithBaseURI creates an instance of the OperationClient client.
+func NewOperationClientWithBaseURI(baseURI string) OperationClient {
+ return OperationClient{NewWithBaseURI(baseURI)}
+}
+
+// List list all the operations.
+func (client OperationClient) List(ctx context.Context) (result OperationListPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.OperationClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.ol.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "reservations.OperationClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.ol, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.OperationClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Capacity/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client OperationClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client OperationClient) ListResponder(resp *http.Response) (result OperationList, 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 OperationClient) listNextResults(lastResults OperationList) (result OperationList, err error) {
+ req, err := lastResults.operationListPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "reservations.OperationClient", "listNextResults", 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, "reservations.OperationClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.OperationClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OperationClient) ListComplete(ctx context.Context) (result OperationListIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/order.go b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/order.go
new file mode 100644
index 000000000..792cb83eb
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/order.go
@@ -0,0 +1,190 @@
+package reservations
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// OrderClient is the this API describe Azure Reservation
+type OrderClient struct {
+ BaseClient
+}
+
+// NewOrderClient creates an instance of the OrderClient client.
+func NewOrderClient() OrderClient {
+ return NewOrderClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewOrderClientWithBaseURI creates an instance of the OrderClient client.
+func NewOrderClientWithBaseURI(baseURI string) OrderClient {
+ return OrderClient{NewWithBaseURI(baseURI)}
+}
+
+// Get get the details of the `ReservationOrder`.
+// Parameters:
+// reservationOrderID - order Id of the reservation
+func (client OrderClient) Get(ctx context.Context, reservationOrderID string) (result OrderResponse, err error) {
+ req, err := client.GetPreparer(ctx, reservationOrderID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.OrderClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "reservations.OrderClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.OrderClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client OrderClient) GetPreparer(ctx context.Context, reservationOrderID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "reservationOrderId": autorest.Encode("path", reservationOrderID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client OrderClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client OrderClient) GetResponder(resp *http.Response) (result OrderResponse, 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 of all the `ReservationOrder`s that the user has access to in the current tenant.
+func (client OrderClient) List(ctx context.Context) (result OrderListPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.OrderClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.ol.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "reservations.OrderClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.ol, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.OrderClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OrderClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Capacity/reservationOrders"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client OrderClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client OrderClient) ListResponder(resp *http.Response) (result OrderList, 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 OrderClient) listNextResults(lastResults OrderList) (result OrderList, err error) {
+ req, err := lastResults.orderListPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "reservations.OrderClient", "listNextResults", 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, "reservations.OrderClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.OrderClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OrderClient) ListComplete(ctx context.Context) (result OrderListIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/reservation.go b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/reservation.go
new file mode 100644
index 000000000..4e3a62cb9
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/reservation.go
@@ -0,0 +1,508 @@
+package reservations
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// Client is the this API describe Azure Reservation
+type Client struct {
+ BaseClient
+}
+
+// NewClient creates an instance of the Client client.
+func NewClient() Client {
+ return NewClientWithBaseURI(DefaultBaseURI)
+}
+
+// NewClientWithBaseURI creates an instance of the Client client.
+func NewClientWithBaseURI(baseURI string) Client {
+ return Client{NewWithBaseURI(baseURI)}
+}
+
+// Get get specific `Reservation` details.
+// Parameters:
+// reservationID - id of the Reservation Item
+// reservationOrderID - order Id of the reservation
+func (client Client) Get(ctx context.Context, reservationID string, reservationOrderID string) (result Response, err error) {
+ req, err := client.GetPreparer(ctx, reservationID, reservationOrderID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "reservations.Client", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client Client) GetPreparer(ctx context.Context, reservationID string, reservationOrderID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "reservationId": autorest.Encode("path", reservationID),
+ "reservationOrderId": autorest.Encode("path", reservationOrderID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client Client) GetResponder(resp *http.Response) (result Response, 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 `Reservation`s within a single `ReservationOrder`.
+// Parameters:
+// reservationOrderID - order Id of the reservation
+func (client Client) List(ctx context.Context, reservationOrderID string) (result ListPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, reservationOrderID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.l.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "reservations.Client", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.l, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client Client) ListPreparer(ctx context.Context, reservationOrderID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "reservationOrderId": autorest.Encode("path", reservationOrderID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client Client) ListResponder(resp *http.Response) (result List, 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 Client) listNextResults(lastResults List) (result List, err error) {
+ req, err := lastResults.listPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "reservations.Client", "listNextResults", 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, "reservations.Client", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client Client) ListComplete(ctx context.Context, reservationOrderID string) (result ListIterator, err error) {
+ result.page, err = client.List(ctx, reservationOrderID)
+ return
+}
+
+// ListRevisions list of all the revisions for the `Reservation`.
+// Parameters:
+// reservationID - id of the Reservation Item
+// reservationOrderID - order Id of the reservation
+func (client Client) ListRevisions(ctx context.Context, reservationID string, reservationOrderID string) (result ListPage, err error) {
+ result.fn = client.listRevisionsNextResults
+ req, err := client.ListRevisionsPreparer(ctx, reservationID, reservationOrderID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "ListRevisions", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListRevisionsSender(req)
+ if err != nil {
+ result.l.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "reservations.Client", "ListRevisions", resp, "Failure sending request")
+ return
+ }
+
+ result.l, err = client.ListRevisionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "ListRevisions", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListRevisionsPreparer prepares the ListRevisions request.
+func (client Client) ListRevisionsPreparer(ctx context.Context, reservationID string, reservationOrderID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "reservationId": autorest.Encode("path", reservationID),
+ "reservationOrderId": autorest.Encode("path", reservationOrderID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/revisions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListRevisionsSender sends the ListRevisions request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ListRevisionsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListRevisionsResponder handles the response to the ListRevisions request. The method always
+// closes the http.Response Body.
+func (client Client) ListRevisionsResponder(resp *http.Response) (result List, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listRevisionsNextResults retrieves the next set of results, if any.
+func (client Client) listRevisionsNextResults(lastResults List) (result List, err error) {
+ req, err := lastResults.listPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "reservations.Client", "listRevisionsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListRevisionsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "reservations.Client", "listRevisionsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListRevisionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "listRevisionsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListRevisionsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client Client) ListRevisionsComplete(ctx context.Context, reservationID string, reservationOrderID string) (result ListIterator, err error) {
+ result.page, err = client.ListRevisions(ctx, reservationID, reservationOrderID)
+ return
+}
+
+// Merge merge the specified `Reservation`s into a new `Reservation`. The two `Reservation`s being merged must have
+// same properties.
+// Parameters:
+// reservationOrderID - order Id of the reservation
+// body - information needed for commercial request for a reservation
+func (client Client) Merge(ctx context.Context, reservationOrderID string, body MergeRequest) (result ReservationMergeFuture, err error) {
+ req, err := client.MergePreparer(ctx, reservationOrderID, body)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "Merge", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.MergeSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "Merge", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// MergePreparer prepares the Merge request.
+func (client Client) MergePreparer(ctx context.Context, reservationOrderID string, body MergeRequest) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "reservationOrderId": autorest.Encode("path", reservationOrderID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/merge", pathParameters),
+ autorest.WithJSON(body),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// MergeSender sends the Merge request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) MergeSender(req *http.Request) (future ReservationMergeFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// MergeResponder handles the response to the Merge request. The method always
+// closes the http.Response Body.
+func (client Client) MergeResponder(resp *http.Response) (result ListResponse, 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
+}
+
+// Split split a `Reservation` into two `Reservation`s with specified quantity distribution.
+// Parameters:
+// reservationOrderID - order Id of the reservation
+// body - information needed to Split a reservation item
+func (client Client) Split(ctx context.Context, reservationOrderID string, body SplitRequest) (result SplitFuture, err error) {
+ req, err := client.SplitPreparer(ctx, reservationOrderID, body)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "Split", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.SplitSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "Split", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// SplitPreparer prepares the Split request.
+func (client Client) SplitPreparer(ctx context.Context, reservationOrderID string, body SplitRequest) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "reservationOrderId": autorest.Encode("path", reservationOrderID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split", pathParameters),
+ autorest.WithJSON(body),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// SplitSender sends the Split request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) SplitSender(req *http.Request) (future SplitFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// SplitResponder handles the response to the Split request. The method always
+// closes the http.Response Body.
+func (client Client) SplitResponder(resp *http.Response) (result ListResponse, 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 the applied scopes of the `Reservation`.
+// Parameters:
+// reservationOrderID - order Id of the reservation
+// reservationID - id of the Reservation Item
+// parameters - information needed to patch a reservation item
+func (client Client) Update(ctx context.Context, reservationOrderID string, reservationID string, parameters Patch) (result ReservationUpdateFuture, err error) {
+ req, err := client.UpdatePreparer(ctx, reservationOrderID, reservationID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "reservations.Client", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client Client) UpdatePreparer(ctx context.Context, reservationOrderID string, reservationID string, parameters Patch) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "reservationId": autorest.Encode("path", reservationID),
+ "reservationOrderId": autorest.Encode("path", reservationOrderID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) UpdateSender(req *http.Request) (future ReservationUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client Client) UpdateResponder(resp *http.Response) (result Response, 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/services/reservations/mgmt/2018-06-01/reservations/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/version.go
new file mode 100644
index 000000000..64d335ca8
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2018-06-01/reservations/version.go
@@ -0,0 +1,30 @@
+package reservations
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " reservations/2018-06-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/deployments.go
index bb97cb965..f23a67752 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/deployments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/deployments.go
@@ -250,15 +250,17 @@ func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future DeploymentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -328,15 +330,17 @@ func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DeploymentsClient) DeleteSender(req *http.Request) (future DeploymentsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/groups.go
index 00648bb0a..8f276e1b3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/groups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/groups.go
@@ -241,15 +241,17 @@ func (client GroupsClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/models.go
index ec120e40d..175e2c8f8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/models.go
@@ -359,12 +359,11 @@ type DeploymentPropertiesExtended struct {
// operation.
type DeploymentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
+func (future *DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -372,34 +371,15 @@ func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (
return
}
if !done {
- return de, azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- de, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
+ de, err = client.CreateOrUpdateResponder(de.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", de.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- de, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -407,12 +387,11 @@ func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (
// DeploymentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeploymentsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
+func (future *DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -420,35 +399,10 @@ func (future DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -669,12 +623,11 @@ type GroupProperties struct {
// GroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
+func (future *GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -682,35 +635,10 @@ func (future GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -849,12 +777,11 @@ type MoveInfo struct {
// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type MoveResourcesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -862,35 +789,10 @@ func (future MoveResourcesFuture) Result(client Client) (ar autorest.Response, e
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.MoveResourcesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.MoveResourcesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1520,12 +1422,11 @@ type TemplateLink struct {
// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *UpdateFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1533,34 +1434,15 @@ func (future UpdateFuture) Result(client Client) (gr GenericResource, err error)
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/resources.go
index adf28630c..9d8524926 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/resources.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/resources/resources.go
@@ -518,15 +518,17 @@ func (client Client) MoveResourcesPreparer(ctx context.Context, sourceResourceGr
// MoveResourcesSender sends the MoveResources request. The method will close the
// http.Response Body if it receives an error.
func (client Client) MoveResourcesSender(req *http.Request) (future MoveResourcesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -603,15 +605,17 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/deployments.go
index 55ee6222d..5e70d8d7c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/deployments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/deployments.go
@@ -250,15 +250,17 @@ func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future DeploymentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -327,15 +329,17 @@ func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DeploymentsClient) DeleteSender(req *http.Request) (future DeploymentsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/groups.go
index 62266a44c..341799672 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/groups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/groups.go
@@ -240,15 +240,17 @@ func (client GroupsClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/models.go
index fcd7da8ee..bf84a5d4c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/models.go
@@ -411,12 +411,11 @@ type DeploymentPropertiesExtended struct {
// operation.
type DeploymentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
+func (future *DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -424,34 +423,15 @@ func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (
return
}
if !done {
- return de, azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- de, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
+ de, err = client.CreateOrUpdateResponder(de.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", de.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- de, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -459,12 +439,11 @@ func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (
// DeploymentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeploymentsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
+func (future *DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -472,35 +451,10 @@ func (future DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -758,12 +712,11 @@ type GroupProperties struct {
// GroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
+func (future *GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -771,35 +724,10 @@ func (future GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -944,12 +872,11 @@ type MoveInfo struct {
// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type MoveResourcesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -957,35 +884,10 @@ func (future MoveResourcesFuture) Result(client Client) (ar autorest.Response, e
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.MoveResourcesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.MoveResourcesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1385,12 +1287,11 @@ type TemplateLink struct {
// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *UpdateFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1398,34 +1299,15 @@ func (future UpdateFuture) Result(client Client) (gr GenericResource, err error)
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/resources.go
index b09149ab6..6f9d4708e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/resources.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources/resources.go
@@ -522,15 +522,17 @@ func (client Client) MoveResourcesPreparer(ctx context.Context, sourceResourceGr
// MoveResourcesSender sends the MoveResources request. The method will close the
// http.Response Body if it receives an error.
func (client Client) MoveResourcesSender(req *http.Request) (future MoveResourcesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -607,15 +609,17 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/deployments.go
index 24cc9738e..993a1a3fa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/deployments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/deployments.go
@@ -250,15 +250,17 @@ func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future DeploymentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -327,15 +329,17 @@ func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DeploymentsClient) DeleteSender(req *http.Request) (future DeploymentsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/groups.go
index d6c3e80b4..cab9bcfeb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/groups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/groups.go
@@ -240,15 +240,17 @@ func (client GroupsClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/models.go
index c606c805c..8f217d3aa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/models.go
@@ -411,12 +411,11 @@ type DeploymentPropertiesExtended struct {
// operation.
type DeploymentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
+func (future *DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -424,34 +423,15 @@ func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (
return
}
if !done {
- return de, azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- de, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
+ de, err = client.CreateOrUpdateResponder(de.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", de.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- de, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -459,12 +439,11 @@ func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (
// DeploymentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeploymentsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
+func (future *DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -472,35 +451,10 @@ func (future DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -758,12 +712,11 @@ type GroupProperties struct {
// GroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
+func (future *GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -771,35 +724,10 @@ func (future GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -944,12 +872,11 @@ type MoveInfo struct {
// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type MoveResourcesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -957,35 +884,10 @@ func (future MoveResourcesFuture) Result(client Client) (ar autorest.Response, e
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.MoveResourcesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.MoveResourcesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1385,12 +1287,11 @@ type TemplateLink struct {
// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *UpdateFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1398,34 +1299,15 @@ func (future UpdateFuture) Result(client Client) (gr GenericResource, err error)
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/resources.go
index 4ab73c5bc..f5b5921ed 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/resources.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-07-01/resources/resources.go
@@ -522,15 +522,17 @@ func (client Client) MoveResourcesPreparer(ctx context.Context, sourceResourceGr
// MoveResourcesSender sends the MoveResources request. The method will close the
// http.Response Body if it receives an error.
func (client Client) MoveResourcesSender(req *http.Request) (future MoveResourcesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -607,15 +609,17 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/deployments.go
index 10de5c4a6..cef6e7764 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/deployments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/deployments.go
@@ -266,15 +266,17 @@ func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future DeploymentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -354,15 +356,17 @@ func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DeploymentsClient) DeleteSender(req *http.Request) (future DeploymentsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/groups.go
index a52c9bfb2..de4f1b02d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/groups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/groups.go
@@ -241,15 +241,17 @@ func (client GroupsClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/models.go
index d83848556..97b4a6a6d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/models.go
@@ -83,12 +83,11 @@ type BasicDependency struct {
// CreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateOrUpdateByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -96,34 +95,15 @@ func (future CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.CreateOrUpdateByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateOrUpdateByIDResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.CreateOrUpdateByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -131,12 +111,11 @@ func (future CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource
// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateOrUpdateFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *CreateOrUpdateFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -144,34 +123,15 @@ func (future CreateOrUpdateFuture) Result(client Client) (gr GenericResource, er
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateOrUpdateResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -185,12 +145,11 @@ type DebugSetting struct {
// DeleteByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteByIDFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteByIDFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -198,47 +157,21 @@ func (future DeleteByIDFuture) Result(client Client) (ar autorest.Response, err
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.DeleteByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeleteByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -246,35 +179,10 @@ func (future DeleteFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.DeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -603,12 +511,11 @@ type DeploymentPropertiesExtended struct {
// operation.
type DeploymentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
+func (future *DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -616,34 +523,15 @@ func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (
return
}
if !done {
- return de, azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- de, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
+ de, err = client.CreateOrUpdateResponder(de.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", de.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- de, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -651,12 +539,11 @@ func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (
// DeploymentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeploymentsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
+func (future *DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -664,35 +551,10 @@ func (future DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -955,12 +817,11 @@ type GroupProperties struct {
// GroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
+func (future *GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -968,35 +829,10 @@ func (future GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1141,12 +977,11 @@ type MoveInfo struct {
// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type MoveResourcesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1154,35 +989,10 @@ func (future MoveResourcesFuture) Result(client Client) (ar autorest.Response, e
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.MoveResourcesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.MoveResourcesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1582,12 +1392,11 @@ type TemplateLink struct {
// UpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *UpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1595,34 +1404,15 @@ func (future UpdateByIDFuture) Result(client Client) (gr GenericResource, err er
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.UpdateByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.UpdateByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateByIDResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.UpdateByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1630,12 +1420,11 @@ func (future UpdateByIDFuture) Result(client Client) (gr GenericResource, err er
// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *UpdateFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1643,34 +1432,15 @@ func (future UpdateFuture) Result(client Client) (gr GenericResource, err error)
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/resources.go
index 43cb29d5d..5b986a3ce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/resources.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/resources/resources.go
@@ -250,15 +250,17 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupNa
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -328,15 +330,17 @@ func (client Client) CreateOrUpdateByIDPreparer(ctx context.Context, resourceID
// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateByIDSender(req *http.Request) (future CreateOrUpdateByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -412,15 +416,17 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -479,15 +485,17 @@ func (client Client) DeleteByIDPreparer(ctx context.Context, resourceID string)
// DeleteByIDSender sends the DeleteByID request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteByIDSender(req *http.Request) (future DeleteByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -809,15 +817,17 @@ func (client Client) MoveResourcesPreparer(ctx context.Context, sourceResourceGr
// MoveResourcesSender sends the MoveResources request. The method will close the
// http.Response Body if it receives an error.
func (client Client) MoveResourcesSender(req *http.Request) (future MoveResourcesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -894,15 +904,17 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -965,15 +977,17 @@ func (client Client) UpdateByIDPreparer(ctx context.Context, resourceID string,
// UpdateByIDSender sends the UpdateByID request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateByIDSender(req *http.Request) (future UpdateByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go
index df1779aff..d27a542c0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go
@@ -266,15 +266,17 @@ func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future DeploymentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -354,15 +356,17 @@ func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DeploymentsClient) DeleteSender(req *http.Request) (future DeploymentsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go
index ad361bc9d..012de7818 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go
@@ -241,15 +241,17 @@ func (client GroupsClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/models.go
index 9e3263cf8..691edfa35 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/models.go
@@ -83,12 +83,11 @@ type BasicDependency struct {
// CreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateOrUpdateByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -96,34 +95,15 @@ func (future CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.CreateOrUpdateByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateOrUpdateByIDResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.CreateOrUpdateByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -131,12 +111,11 @@ func (future CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource
// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateOrUpdateFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *CreateOrUpdateFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -144,34 +123,15 @@ func (future CreateOrUpdateFuture) Result(client Client) (gr GenericResource, er
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateOrUpdateResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -185,12 +145,11 @@ type DebugSetting struct {
// DeleteByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteByIDFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteByIDFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -198,47 +157,21 @@ func (future DeleteByIDFuture) Result(client Client) (ar autorest.Response, err
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.DeleteByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeleteByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -246,35 +179,10 @@ func (future DeleteFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.DeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -603,12 +511,11 @@ type DeploymentPropertiesExtended struct {
// operation.
type DeploymentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
+func (future *DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -616,34 +523,15 @@ func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (
return
}
if !done {
- return de, azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- de, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
+ de, err = client.CreateOrUpdateResponder(de.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", de.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- de, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -651,12 +539,11 @@ func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (
// DeploymentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeploymentsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
+func (future *DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -664,35 +551,10 @@ func (future DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -984,12 +846,11 @@ type GroupProperties struct {
// GroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
+func (future *GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -997,35 +858,10 @@ func (future GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1170,12 +1006,11 @@ type MoveInfo struct {
// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type MoveResourcesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1183,35 +1018,10 @@ func (future MoveResourcesFuture) Result(client Client) (ar autorest.Response, e
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.MoveResourcesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.MoveResourcesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1613,12 +1423,11 @@ type TemplateLink struct {
// UpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *UpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1626,34 +1435,15 @@ func (future UpdateByIDFuture) Result(client Client) (gr GenericResource, err er
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.UpdateByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.UpdateByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateByIDResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.UpdateByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1661,12 +1451,11 @@ func (future UpdateByIDFuture) Result(client Client) (gr GenericResource, err er
// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *UpdateFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1674,34 +1463,15 @@ func (future UpdateFuture) Result(client Client) (gr GenericResource, err error)
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1710,12 +1480,11 @@ func (future UpdateFuture) Result(client Client) (gr GenericResource, err error)
// operation.
type ValidateMoveResourcesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ValidateMoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *ValidateMoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1723,34 +1492,9 @@ func (future ValidateMoveResourcesFuture) Result(client Client) (ar autorest.Res
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.ValidateMoveResourcesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ValidateMoveResourcesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.ValidateMoveResourcesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.ValidateMoveResourcesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.ValidateMoveResourcesFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ValidateMoveResourcesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.ValidateMoveResourcesFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go
index 5ea79e268..bd8987cf1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go
@@ -250,15 +250,17 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupNa
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -328,15 +330,17 @@ func (client Client) CreateOrUpdateByIDPreparer(ctx context.Context, resourceID
// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateByIDSender(req *http.Request) (future CreateOrUpdateByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -412,15 +416,17 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -479,15 +485,17 @@ func (client Client) DeleteByIDPreparer(ctx context.Context, resourceID string)
// DeleteByIDSender sends the DeleteByID request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteByIDSender(req *http.Request) (future DeleteByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -922,15 +930,17 @@ func (client Client) MoveResourcesPreparer(ctx context.Context, sourceResourceGr
// MoveResourcesSender sends the MoveResources request. The method will close the
// http.Response Body if it receives an error.
func (client Client) MoveResourcesSender(req *http.Request) (future MoveResourcesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1007,15 +1017,17 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1078,15 +1090,17 @@ func (client Client) UpdateByIDPreparer(ctx context.Context, resourceID string,
// UpdateByIDSender sends the UpdateByID request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateByIDSender(req *http.Request) (future UpdateByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1160,15 +1174,17 @@ func (client Client) ValidateMoveResourcesPreparer(ctx context.Context, sourceRe
// ValidateMoveResourcesSender sends the ValidateMoveResources request. The method will close the
// http.Response Body if it receives an error.
func (client Client) ValidateMoveResourcesSender(req *http.Request) (future ValidateMoveResourcesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-09-01/managedapplications/applicationdefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-09-01/managedapplications/applicationdefinitions.go
index b794550ec..efde37f25 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-09-01/managedapplications/applicationdefinitions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-09-01/managedapplications/applicationdefinitions.go
@@ -101,15 +101,17 @@ func (client ApplicationDefinitionsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationDefinitionsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationDefinitionsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -179,15 +181,17 @@ func (client ApplicationDefinitionsClient) CreateOrUpdateByIDPreparer(ctx contex
// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationDefinitionsClient) CreateOrUpdateByIDSender(req *http.Request) (future ApplicationDefinitionsCreateOrUpdateByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -259,15 +263,17 @@ func (client ApplicationDefinitionsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationDefinitionsClient) DeleteSender(req *http.Request) (future ApplicationDefinitionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -326,15 +332,17 @@ func (client ApplicationDefinitionsClient) DeleteByIDPreparer(ctx context.Contex
// DeleteByIDSender sends the DeleteByID request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationDefinitionsClient) DeleteByIDSender(req *http.Request) (future ApplicationDefinitionsDeleteByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-09-01/managedapplications/applications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-09-01/managedapplications/applications.go
index 5c177cb1f..4e11ea2f4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-09-01/managedapplications/applications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-09-01/managedapplications/applications.go
@@ -109,15 +109,17 @@ func (client ApplicationsClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -195,15 +197,17 @@ func (client ApplicationsClient) CreateOrUpdateByIDPreparer(ctx context.Context,
// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) CreateOrUpdateByIDSender(req *http.Request) (future ApplicationsCreateOrUpdateByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -275,15 +279,17 @@ func (client ApplicationsClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) DeleteSender(req *http.Request) (future ApplicationsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -342,15 +348,17 @@ func (client ApplicationsClient) DeleteByIDPreparer(ctx context.Context, applica
// DeleteByIDSender sends the DeleteByID request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) DeleteByIDSender(req *http.Request) (future ApplicationsDeleteByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-09-01/managedapplications/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-09-01/managedapplications/models.go
index bdc97efc3..29c04bd2b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-09-01/managedapplications/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-09-01/managedapplications/models.go
@@ -573,12 +573,11 @@ type ApplicationDefinitionProperties struct {
// long-running operation.
type ApplicationDefinitionsCreateOrUpdateByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationDefinitionsCreateOrUpdateByIDFuture) Result(client ApplicationDefinitionsClient) (ad ApplicationDefinition, err error) {
+func (future *ApplicationDefinitionsCreateOrUpdateByIDFuture) Result(client ApplicationDefinitionsClient) (ad ApplicationDefinition, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -586,34 +585,15 @@ func (future ApplicationDefinitionsCreateOrUpdateByIDFuture) Result(client Appli
return
}
if !done {
- return ad, azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ad, err = client.CreateOrUpdateByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ad.Response.Response, err = future.GetResult(sender); err == nil && ad.Response.Response.StatusCode != http.StatusNoContent {
+ ad, err = client.CreateOrUpdateByIDResponder(ad.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture", "Result", ad.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- ad, err = client.CreateOrUpdateByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -622,12 +602,11 @@ func (future ApplicationDefinitionsCreateOrUpdateByIDFuture) Result(client Appli
// long-running operation.
type ApplicationDefinitionsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationDefinitionsCreateOrUpdateFuture) Result(client ApplicationDefinitionsClient) (ad ApplicationDefinition, err error) {
+func (future *ApplicationDefinitionsCreateOrUpdateFuture) Result(client ApplicationDefinitionsClient) (ad ApplicationDefinition, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -635,34 +614,15 @@ func (future ApplicationDefinitionsCreateOrUpdateFuture) Result(client Applicati
return
}
if !done {
- return ad, azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ad, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ad.Response.Response, err = future.GetResult(sender); err == nil && ad.Response.Response.StatusCode != http.StatusNoContent {
+ ad, err = client.CreateOrUpdateResponder(ad.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateFuture", "Result", ad.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ad, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -671,12 +631,11 @@ func (future ApplicationDefinitionsCreateOrUpdateFuture) Result(client Applicati
// long-running operation.
type ApplicationDefinitionsDeleteByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationDefinitionsDeleteByIDFuture) Result(client ApplicationDefinitionsClient) (ar autorest.Response, err error) {
+func (future *ApplicationDefinitionsDeleteByIDFuture) Result(client ApplicationDefinitionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -684,35 +643,10 @@ func (future ApplicationDefinitionsDeleteByIDFuture) Result(client ApplicationDe
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsDeleteByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsDeleteByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsDeleteByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsDeleteByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsDeleteByIDFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -720,12 +654,11 @@ func (future ApplicationDefinitionsDeleteByIDFuture) Result(client ApplicationDe
// operation.
type ApplicationDefinitionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationDefinitionsDeleteFuture) Result(client ApplicationDefinitionsClient) (ar autorest.Response, err error) {
+func (future *ApplicationDefinitionsDeleteFuture) Result(client ApplicationDefinitionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -733,35 +666,10 @@ func (future ApplicationDefinitionsDeleteFuture) Result(client ApplicationDefini
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1090,12 +998,11 @@ type ApplicationProviderAuthorization struct {
// operation.
type ApplicationsCreateOrUpdateByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationsCreateOrUpdateByIDFuture) Result(client ApplicationsClient) (a Application, err error) {
+func (future *ApplicationsCreateOrUpdateByIDFuture) Result(client ApplicationsClient) (a Application, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1103,34 +1010,15 @@ func (future ApplicationsCreateOrUpdateByIDFuture) Result(client ApplicationsCli
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsCreateOrUpdateByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateOrUpdateByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsCreateOrUpdateByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateOrUpdateByIDResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateByIDFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateOrUpdateByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateByIDFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1139,12 +1027,11 @@ func (future ApplicationsCreateOrUpdateByIDFuture) Result(client ApplicationsCli
// operation.
type ApplicationsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationsCreateOrUpdateFuture) Result(client ApplicationsClient) (a Application, err error) {
+func (future *ApplicationsCreateOrUpdateFuture) Result(client ApplicationsClient) (a Application, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1152,34 +1039,15 @@ func (future ApplicationsCreateOrUpdateFuture) Result(client ApplicationsClient)
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateOrUpdateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1188,12 +1056,11 @@ func (future ApplicationsCreateOrUpdateFuture) Result(client ApplicationsClient)
// operation.
type ApplicationsDeleteByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationsDeleteByIDFuture) Result(client ApplicationsClient) (ar autorest.Response, err error) {
+func (future *ApplicationsDeleteByIDFuture) Result(client ApplicationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1201,47 +1068,21 @@ func (future ApplicationsDeleteByIDFuture) Result(client ApplicationsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsDeleteByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsDeleteByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsDeleteByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsDeleteByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsDeleteByIDFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// ApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ApplicationsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ApplicationsDeleteFuture) Result(client ApplicationsClient) (ar autorest.Response, err error) {
+func (future *ApplicationsDeleteFuture) Result(client ApplicationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1249,35 +1090,10 @@ func (future ApplicationsDeleteFuture) Result(client ApplicationsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/deployments.go
index f679b944a..886129be8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/deployments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/deployments.go
@@ -266,15 +266,17 @@ func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future DeploymentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -354,15 +356,17 @@ func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DeploymentsClient) DeleteSender(req *http.Request) (future DeploymentsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/groups.go
index d83035dfe..1b24ebcbf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/groups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/groups.go
@@ -241,15 +241,17 @@ func (client GroupsClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/models.go
index 334f2866d..44e1b6102 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/models.go
@@ -104,12 +104,11 @@ type BasicDependency struct {
// CreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateOrUpdateByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -117,34 +116,15 @@ func (future CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.CreateOrUpdateByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateOrUpdateByIDResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.CreateOrUpdateByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -152,12 +132,11 @@ func (future CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource
// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type CreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CreateOrUpdateFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *CreateOrUpdateFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -165,34 +144,15 @@ func (future CreateOrUpdateFuture) Result(client Client) (gr GenericResource, er
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateOrUpdateResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -206,12 +166,11 @@ type DebugSetting struct {
// DeleteByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteByIDFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteByIDFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -219,47 +178,21 @@ func (future DeleteByIDFuture) Result(client Client) (ar autorest.Response, err
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.DeleteByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeleteByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -267,35 +200,10 @@ func (future DeleteFuture) Result(client Client) (ar autorest.Response, err erro
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.DeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -628,12 +536,11 @@ type DeploymentPropertiesExtended struct {
// operation.
type DeploymentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
+func (future *DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -641,34 +548,15 @@ func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (
return
}
if !done {
- return de, azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- de, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
+ de, err = client.CreateOrUpdateResponder(de.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", de.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- de, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -676,12 +564,11 @@ func (future DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (
// DeploymentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeploymentsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
+func (future *DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -689,35 +576,10 @@ func (future DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1009,12 +871,11 @@ type GroupProperties struct {
// GroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GroupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
+func (future *GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1022,35 +883,10 @@ func (future GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Respon
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1195,12 +1031,11 @@ type MoveInfo struct {
// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type MoveResourcesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1208,35 +1043,10 @@ func (future MoveResourcesFuture) Result(client Client) (ar autorest.Response, e
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.MoveResourcesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.MoveResourcesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1656,12 +1466,11 @@ type TemplateLink struct {
// UpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateByIDFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *UpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1669,34 +1478,15 @@ func (future UpdateByIDFuture) Result(client Client) (gr GenericResource, err er
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.UpdateByIDFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.UpdateByIDResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateByIDFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateByIDResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.UpdateByIDResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1704,12 +1494,11 @@ func (future UpdateByIDFuture) Result(client Client) (gr GenericResource, err er
// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future UpdateFuture) Result(client Client) (gr GenericResource, err error) {
+func (future *UpdateFuture) Result(client Client) (gr GenericResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1717,34 +1506,15 @@ func (future UpdateFuture) Result(client Client) (gr GenericResource, err error)
return
}
if !done {
- return gr, azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- gr, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateResponder(gr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- gr, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1753,12 +1523,11 @@ func (future UpdateFuture) Result(client Client) (gr GenericResource, err error)
// operation.
type ValidateMoveResourcesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ValidateMoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
+func (future *ValidateMoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1766,34 +1535,9 @@ func (future ValidateMoveResourcesFuture) Result(client Client) (ar autorest.Res
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("resources.ValidateMoveResourcesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ValidateMoveResourcesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.ValidateMoveResourcesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("resources.ValidateMoveResourcesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.ValidateMoveResourcesFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ValidateMoveResourcesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.ValidateMoveResourcesFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/resources.go
index 762088e23..bc7e57190 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/resources.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/resources.go
@@ -250,15 +250,17 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupNa
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -328,15 +330,17 @@ func (client Client) CreateOrUpdateByIDPreparer(ctx context.Context, resourceID
// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateByIDSender(req *http.Request) (future CreateOrUpdateByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -412,15 +416,17 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -479,15 +485,17 @@ func (client Client) DeleteByIDPreparer(ctx context.Context, resourceID string)
// DeleteByIDSender sends the DeleteByID request. The method will close the
// http.Response Body if it receives an error.
func (client Client) DeleteByIDSender(req *http.Request) (future DeleteByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -922,15 +930,17 @@ func (client Client) MoveResourcesPreparer(ctx context.Context, sourceResourceGr
// MoveResourcesSender sends the MoveResources request. The method will close the
// http.Response Body if it receives an error.
func (client Client) MoveResourcesSender(req *http.Request) (future MoveResourcesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1007,15 +1017,17 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1078,15 +1090,17 @@ func (client Client) UpdateByIDPreparer(ctx context.Context, resourceID string,
// UpdateByIDSender sends the UpdateByID request. The method will close the
// http.Response Body if it receives an error.
func (client Client) UpdateByIDSender(req *http.Request) (future UpdateByIDFuture, err error) {
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1160,15 +1174,17 @@ func (client Client) ValidateMoveResourcesPreparer(ctx context.Context, sourceRe
// ValidateMoveResourcesSender sends the ValidateMoveResources request. The method will close the
// http.Response Body if it receives an error.
func (client Client) ValidateMoveResourcesSender(req *http.Request) (future ValidateMoveResourcesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/assignments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/assignments.go
new file mode 100644
index 000000000..e6c139662
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/assignments.go
@@ -0,0 +1,840 @@
+package policy
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// 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 {
+ BaseClient
+}
+
+// NewAssignmentsClient creates an instance of the AssignmentsClient client.
+func NewAssignmentsClient(subscriptionID string) AssignmentsClient {
+ return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client.
+func NewAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) AssignmentsClient {
+ return AssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create this operation creates or updates a policy assignment with the given scope and name. Policy assignments apply
+// to all resources contained within their scope. For example, when you assign a policy at resource group scope, that
+// policy applies to all resources in the group.
+// Parameters:
+// scope - the scope of the policy assignment. Valid scopes are: management group (format:
+// '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
+// '/subscriptions/{subscriptionId}'), resource group (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+// policyAssignmentName - the name of the policy assignment.
+// parameters - parameters for the policy assignment.
+func (client AssignmentsClient) Create(ctx context.Context, scope string, policyAssignmentName string, parameters Assignment) (result Assignment, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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}}}}}}); err != nil {
+ return result, validation.NewError("policy.AssignmentsClient", "Create", err.Error())
+ }
+
+ req, err := client.CreatePreparer(ctx, scope, policyAssignmentName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Create", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Create", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client AssignmentsClient) CreatePreparer(ctx context.Context, scope string, policyAssignmentName string, parameters Assignment) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyAssignmentName": autorest.Encode("path", policyAssignmentName),
+ "scope": scope,
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) CreateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) CreateResponder(resp *http.Response) (result Assignment, 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
+}
+
+// CreateByID this operation creates or updates the policy assignment with the given ID. Policy assignments made on a
+// scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that
+// policy applies to all resources in the group. Policy assignment IDs have this format:
+// '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management
+// group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
+// '/subscriptions/{subscriptionId}'), resource group (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
+// Parameters:
+// policyAssignmentID - the ID of the policy assignment to create. Use the format
+// '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+// parameters - parameters for policy assignment.
+func (client AssignmentsClient) CreateByID(ctx context.Context, policyAssignmentID string, parameters Assignment) (result Assignment, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {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}}}}}}); err != nil {
+ return result, validation.NewError("policy.AssignmentsClient", "CreateByID", err.Error())
+ }
+
+ req, err := client.CreateByIDPreparer(ctx, policyAssignmentID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "CreateByID", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateByIDSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "CreateByID", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateByIDResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "CreateByID", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateByIDPreparer prepares the CreateByID request.
+func (client AssignmentsClient) CreateByIDPreparer(ctx context.Context, policyAssignmentID string, parameters Assignment) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyAssignmentId": policyAssignmentID,
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{policyAssignmentId}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateByIDSender sends the CreateByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) CreateByIDSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateByIDResponder handles the response to the CreateByID request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) CreateByIDResponder(resp *http.Response) (result Assignment, 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 this operation deletes a policy assignment, given its name and the scope it was created in. The scope of a
+// policy assignment is the part of its ID preceding
+// '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+// Parameters:
+// scope - the scope of the policy assignment. Valid scopes are: management group (format:
+// '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
+// '/subscriptions/{subscriptionId}'), resource group (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+// policyAssignmentName - the name of the policy assignment to delete.
+func (client AssignmentsClient) Delete(ctx context.Context, scope string, policyAssignmentName string) (result Assignment, err error) {
+ req, err := client.DeletePreparer(ctx, scope, policyAssignmentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client AssignmentsClient) DeletePreparer(ctx context.Context, scope string, policyAssignmentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyAssignmentName": autorest.Encode("path", policyAssignmentName),
+ "scope": scope,
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) DeleteResponder(resp *http.Response) (result Assignment, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// DeleteByID this operation deletes the policy with the given ID. Policy assignment IDs have this format:
+// '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope} are:
+// '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group),
+// '/subscriptions/{subscriptionId}' (subscription),
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+// (resource).
+// Parameters:
+// policyAssignmentID - the ID of the policy assignment to delete. Use the format
+// '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+func (client AssignmentsClient) DeleteByID(ctx context.Context, policyAssignmentID string) (result Assignment, err error) {
+ req, err := client.DeleteByIDPreparer(ctx, policyAssignmentID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "DeleteByID", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteByIDSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "DeleteByID", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteByIDResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "DeleteByID", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteByIDPreparer prepares the DeleteByID request.
+func (client AssignmentsClient) DeleteByIDPreparer(ctx context.Context, policyAssignmentID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyAssignmentId": policyAssignmentID,
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{policyAssignmentId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteByIDSender sends the DeleteByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) DeleteByIDSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteByIDResponder handles the response to the DeleteByID request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) DeleteByIDResponder(resp *http.Response) (result Assignment, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Get this operation retrieves a single policy assignment, given its name and the scope it was created at.
+// Parameters:
+// scope - the scope of the policy assignment. Valid scopes are: management group (format:
+// '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
+// '/subscriptions/{subscriptionId}'), resource group (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
+// policyAssignmentName - the name of the policy assignment to get.
+func (client AssignmentsClient) Get(ctx context.Context, scope string, policyAssignmentName string) (result Assignment, err error) {
+ req, err := client.GetPreparer(ctx, scope, policyAssignmentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client AssignmentsClient) GetPreparer(ctx context.Context, scope string, policyAssignmentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyAssignmentName": autorest.Encode("path", policyAssignmentName),
+ "scope": scope,
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) GetResponder(resp *http.Response) (result Assignment, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetByID the operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format:
+// '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management
+// group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format:
+// '/subscriptions/{subscriptionId}'), resource group (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format:
+// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.
+// Parameters:
+// policyAssignmentID - the ID of the policy assignment to get. Use the format
+// '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
+func (client AssignmentsClient) GetByID(ctx context.Context, policyAssignmentID string) (result Assignment, err error) {
+ req, err := client.GetByIDPreparer(ctx, policyAssignmentID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "GetByID", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetByIDSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "GetByID", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetByIDResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "GetByID", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetByIDPreparer prepares the GetByID request.
+func (client AssignmentsClient) GetByIDPreparer(ctx context.Context, policyAssignmentID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyAssignmentId": policyAssignmentID,
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{policyAssignmentId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetByIDSender sends the GetByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) GetByIDSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetByIDResponder handles the response to the GetByID request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) GetByIDResponder(resp *http.Response) (result Assignment, 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 this operation retrieves the list of all policy assignments associated with the given subscription that match
+// the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If
+// $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription,
+// including those that apply directly or from management groups that contain the given subscription, as well as any
+// applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes
+// all policy assignments that apply to the subscription, which is everything in the unfiltered list except those
+// applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the
+// returned list includes only policy assignments that apply to the subscription and assign the policy definition whose
+// id is {value}.
+// Parameters:
+// filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()' or
+// 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed.
+func (client AssignmentsClient) List(ctx context.Context, filter string) (result AssignmentListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.alr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.alr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client AssignmentsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01"
+ 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("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) ListResponder(resp *http.Response) (result AssignmentListResult, 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 AssignmentsClient) listNextResults(lastResults AssignmentListResult) (result AssignmentListResult, err error) {
+ req, err := lastResults.assignmentListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listNextResults", 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, "policy.AssignmentsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AssignmentsClient) ListComplete(ctx context.Context, filter string) (result AssignmentListResultIterator, err error) {
+ result.page, err = client.List(ctx, filter)
+ return
+}
+
+// ListForResource this operation retrieves the list of all policy assignments associated with the specified resource
+// in the given resource group and subscription that match the optional given $filter. Valid values for $filter are:
+// 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all
+// policy assignments associated with the resource, including those that apply directly or from all containing scopes,
+// as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned
+// list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except
+// those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided,
+// the returned list includes only policy assignments that apply to the resource and assign the policy definition whose
+// id is {value}. Three parameters plus the resource name are used to identify a specific resource. If the resource is
+// not part of a parent resource (the more common case), the parent resource path should not be provided (or provided
+// as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web',
+// {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a
+// parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified
+// as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine',
+// {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the
+// namespace and type name separately is to provide both in the {resourceType} parameter, format:
+// ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites',
+// {resourceName} == 'MyWebApp').
+// Parameters:
+// resourceGroupName - the name of the resource group containing the resource.
+// resourceProviderNamespace - the namespace of the resource provider. For example, the namespace of a virtual
+// machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines)
+// parentResourcePath - the parent resource path. Use empty string if there is none.
+// resourceType - the resource type name. For example the type name of a web app is 'sites' (from
+// Microsoft.Web/sites).
+// resourceName - the name of the resource.
+// filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()' or
+// 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed.
+func (client AssignmentsClient) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result AssignmentListResultPage, 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.NewError("policy.AssignmentsClient", "ListForResource", err.Error())
+ }
+
+ result.fn = client.listForResourceNextResults
+ req, err := client.ListForResourcePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForResource", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListForResourceSender(req)
+ if err != nil {
+ result.alr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForResource", resp, "Failure sending request")
+ return
+ }
+
+ result.alr, err = client.ListForResourceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForResource", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListForResourcePreparer prepares the ListForResource request.
+func (client AssignmentsClient) ListForResourcePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "parentResourcePath": parentResourcePath,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "resourceType": resourceType,
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01"
+ 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("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListForResourceSender sends the ListForResource request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) ListForResourceSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListForResourceResponder handles the response to the ListForResource request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) ListForResourceResponder(resp *http.Response) (result AssignmentListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listForResourceNextResults retrieves the next set of results, if any.
+func (client AssignmentsClient) listForResourceNextResults(lastResults AssignmentListResult) (result AssignmentListResult, err error) {
+ req, err := lastResults.assignmentListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForResourceNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListForResourceSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForResourceNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListForResourceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForResourceNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListForResourceComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AssignmentsClient) ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result AssignmentListResultIterator, err error) {
+ result.page, err = client.ListForResource(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter)
+ return
+}
+
+// ListForResourceGroup this operation retrieves the list of all policy assignments associated with the given resource
+// group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or
+// 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments
+// associated with the resource group, including those that apply directly or apply from containing scopes, as well as
+// any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list
+// includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except
+// those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is
+// provided, the returned list includes only policy assignments that apply to the resource group and assign the policy
+// definition whose id is {value}.
+// Parameters:
+// resourceGroupName - the name of the resource group that contains policy assignments.
+// filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()' or
+// 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed.
+func (client AssignmentsClient) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result AssignmentListResultPage, 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.NewError("policy.AssignmentsClient", "ListForResourceGroup", err.Error())
+ }
+
+ result.fn = client.listForResourceGroupNextResults
+ req, err := client.ListForResourceGroupPreparer(ctx, resourceGroupName, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListForResourceGroupSender(req)
+ if err != nil {
+ result.alr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.alr, err = client.ListForResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListForResourceGroupPreparer prepares the ListForResourceGroup request.
+func (client AssignmentsClient) ListForResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = filter
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListForResourceGroupSender sends the ListForResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client AssignmentsClient) ListForResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListForResourceGroupResponder handles the response to the ListForResourceGroup request. The method always
+// closes the http.Response Body.
+func (client AssignmentsClient) ListForResourceGroupResponder(resp *http.Response) (result AssignmentListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listForResourceGroupNextResults retrieves the next set of results, if any.
+func (client AssignmentsClient) listForResourceGroupNextResults(lastResults AssignmentListResult) (result AssignmentListResult, err error) {
+ req, err := lastResults.assignmentListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListForResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListForResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListForResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AssignmentsClient) ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result AssignmentListResultIterator, err error) {
+ result.page, err = client.ListForResourceGroup(ctx, resourceGroupName, filter)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/client.go
new file mode 100644
index 000000000..cd0945362
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/client.go
@@ -0,0 +1,51 @@
+// Package policy implements the Azure ARM Policy service API version 2018-03-01.
+//
+// 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.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT 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 Policy
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Policy.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/definitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/definitions.go
new file mode 100644
index 000000000..438d5668f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/definitions.go
@@ -0,0 +1,773 @@
+package policy
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// 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 {
+ BaseClient
+}
+
+// NewDefinitionsClient creates an instance of the DefinitionsClient client.
+func NewDefinitionsClient(subscriptionID string) DefinitionsClient {
+ return NewDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client.
+func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient {
+ return DefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate this operation creates or updates a policy definition in the given subscription with the given name.
+// Parameters:
+// policyDefinitionName - the name of the policy definition to create.
+// parameters - the policy definition properties.
+func (client DefinitionsClient) CreateOrUpdate(ctx context.Context, policyDefinitionName string, parameters Definition) (result Definition, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, policyDefinitionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, policyDefinitionName string, parameters Definition) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result Definition, 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
+}
+
+// CreateOrUpdateAtManagementGroup this operation creates or updates a policy definition in the given management group
+// with the given name.
+// Parameters:
+// policyDefinitionName - the name of the policy definition to create.
+// parameters - the policy definition properties.
+// managementGroupID - the ID of the management group.
+func (client DefinitionsClient) CreateOrUpdateAtManagementGroup(ctx context.Context, policyDefinitionName string, parameters Definition, managementGroupID string) (result Definition, err error) {
+ req, err := client.CreateOrUpdateAtManagementGroupPreparer(ctx, policyDefinitionName, parameters, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "CreateOrUpdateAtManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateAtManagementGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "CreateOrUpdateAtManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateAtManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "CreateOrUpdateAtManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdateAtManagementGroupPreparer prepares the CreateOrUpdateAtManagementGroup request.
+func (client DefinitionsClient) CreateOrUpdateAtManagementGroupPreparer(ctx context.Context, policyDefinitionName string, parameters Definition, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateAtManagementGroupSender sends the CreateOrUpdateAtManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) CreateOrUpdateAtManagementGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateOrUpdateAtManagementGroupResponder handles the response to the CreateOrUpdateAtManagementGroup request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) CreateOrUpdateAtManagementGroupResponder(resp *http.Response) (result Definition, 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 this operation deletes the policy definition in the given subscription with the given name.
+// Parameters:
+// policyDefinitionName - the name of the policy definition to delete.
+func (client DefinitionsClient) Delete(ctx context.Context, policyDefinitionName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, policyDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DefinitionsClient) DeletePreparer(ctx context.Context, policyDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) 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
+}
+
+// DeleteAtManagementGroup this operation deletes the policy definition in the given management group with the given
+// name.
+// Parameters:
+// policyDefinitionName - the name of the policy definition to delete.
+// managementGroupID - the ID of the management group.
+func (client DefinitionsClient) DeleteAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result autorest.Response, err error) {
+ req, err := client.DeleteAtManagementGroupPreparer(ctx, policyDefinitionName, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "DeleteAtManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteAtManagementGroupSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "DeleteAtManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteAtManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "DeleteAtManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteAtManagementGroupPreparer prepares the DeleteAtManagementGroup request.
+func (client DefinitionsClient) DeleteAtManagementGroupPreparer(ctx context.Context, policyDefinitionName string, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteAtManagementGroupSender sends the DeleteAtManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) DeleteAtManagementGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteAtManagementGroupResponder handles the response to the DeleteAtManagementGroup request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) DeleteAtManagementGroupResponder(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 this operation retrieves the policy definition in the given subscription with the given name.
+// Parameters:
+// policyDefinitionName - the name of the policy definition to get.
+func (client DefinitionsClient) Get(ctx context.Context, policyDefinitionName string) (result Definition, err error) {
+ req, err := client.GetPreparer(ctx, policyDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DefinitionsClient) GetPreparer(ctx context.Context, policyDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) GetResponder(resp *http.Response) (result Definition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAtManagementGroup this operation retrieves the policy definition in the given management group with the given
+// name.
+// Parameters:
+// policyDefinitionName - the name of the policy definition to get.
+// managementGroupID - the ID of the management group.
+func (client DefinitionsClient) GetAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result Definition, err error) {
+ req, err := client.GetAtManagementGroupPreparer(ctx, policyDefinitionName, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "GetAtManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAtManagementGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "GetAtManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAtManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "GetAtManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetAtManagementGroupPreparer prepares the GetAtManagementGroup request.
+func (client DefinitionsClient) GetAtManagementGroupPreparer(ctx context.Context, policyDefinitionName string, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAtManagementGroupSender sends the GetAtManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) GetAtManagementGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetAtManagementGroupResponder handles the response to the GetAtManagementGroup request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) GetAtManagementGroupResponder(resp *http.Response) (result Definition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetBuiltIn this operation retrieves the built-in policy definition with the given name.
+// Parameters:
+// policyDefinitionName - the name of the built-in policy definition to get.
+func (client DefinitionsClient) GetBuiltIn(ctx context.Context, policyDefinitionName string) (result Definition, err error) {
+ req, err := client.GetBuiltInPreparer(ctx, policyDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "GetBuiltIn", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetBuiltInSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "GetBuiltIn", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetBuiltInResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "GetBuiltIn", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetBuiltInPreparer prepares the GetBuiltIn request.
+func (client DefinitionsClient) GetBuiltInPreparer(ctx context.Context, policyDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policyDefinitionName": autorest.Encode("path", policyDefinitionName),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetBuiltInSender sends the GetBuiltIn request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) GetBuiltInSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetBuiltInResponder handles the response to the GetBuiltIn request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) GetBuiltInResponder(resp *http.Response) (result Definition, 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 this operation retrieves a list of all the policy definitions in a given subscription.
+func (client DefinitionsClient) List(ctx context.Context) (result DefinitionListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.dlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.dlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client DefinitionsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) ListResponder(resp *http.Response) (result DefinitionListResult, 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 DefinitionsClient) listNextResults(lastResults DefinitionListResult) (result DefinitionListResult, err error) {
+ req, err := lastResults.definitionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listNextResults", 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, "policy.DefinitionsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DefinitionsClient) ListComplete(ctx context.Context) (result DefinitionListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListBuiltIn this operation retrieves a list of all the built-in policy definitions.
+func (client DefinitionsClient) ListBuiltIn(ctx context.Context) (result DefinitionListResultPage, err error) {
+ result.fn = client.listBuiltInNextResults
+ req, err := client.ListBuiltInPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "ListBuiltIn", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBuiltInSender(req)
+ if err != nil {
+ result.dlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "ListBuiltIn", resp, "Failure sending request")
+ return
+ }
+
+ result.dlr, err = client.ListBuiltInResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "ListBuiltIn", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListBuiltInPreparer prepares the ListBuiltIn request.
+func (client DefinitionsClient) ListBuiltInPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Authorization/policyDefinitions"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBuiltInSender sends the ListBuiltIn request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) ListBuiltInSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListBuiltInResponder handles the response to the ListBuiltIn request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) ListBuiltInResponder(resp *http.Response) (result DefinitionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBuiltInNextResults retrieves the next set of results, if any.
+func (client DefinitionsClient) listBuiltInNextResults(lastResults DefinitionListResult) (result DefinitionListResult, err error) {
+ req, err := lastResults.definitionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listBuiltInNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBuiltInSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listBuiltInNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBuiltInResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listBuiltInNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBuiltInComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DefinitionsClient) ListBuiltInComplete(ctx context.Context) (result DefinitionListResultIterator, err error) {
+ result.page, err = client.ListBuiltIn(ctx)
+ return
+}
+
+// ListByManagementGroup gets all the policy definitions in a management group.
+// Parameters:
+// managementGroupID - the ID of the management group.
+func (client DefinitionsClient) ListByManagementGroup(ctx context.Context, managementGroupID string) (result DefinitionListResultPage, err error) {
+ result.fn = client.listByManagementGroupNextResults
+ req, err := client.ListByManagementGroupPreparer(ctx, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "ListByManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByManagementGroupSender(req)
+ if err != nil {
+ result.dlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "ListByManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.dlr, err = client.ListByManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "ListByManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByManagementGroupPreparer prepares the ListByManagementGroup request.
+func (client DefinitionsClient) ListByManagementGroupPreparer(ctx context.Context, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByManagementGroupSender sends the ListByManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DefinitionsClient) ListByManagementGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListByManagementGroupResponder handles the response to the ListByManagementGroup request. The method always
+// closes the http.Response Body.
+func (client DefinitionsClient) ListByManagementGroupResponder(resp *http.Response) (result DefinitionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByManagementGroupNextResults retrieves the next set of results, if any.
+func (client DefinitionsClient) listByManagementGroupNextResults(lastResults DefinitionListResult) (result DefinitionListResult, err error) {
+ req, err := lastResults.definitionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listByManagementGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByManagementGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listByManagementGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.DefinitionsClient", "listByManagementGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByManagementGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DefinitionsClient) ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result DefinitionListResultIterator, err error) {
+ result.page, err = client.ListByManagementGroup(ctx, managementGroupID)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/models.go
new file mode 100644
index 000000000..f90fd7939
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/models.go
@@ -0,0 +1,704 @@
+package policy
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/to"
+ "net/http"
+)
+
+// Mode enumerates the values for mode.
+type Mode string
+
+const (
+ // All ...
+ All Mode = "All"
+ // Indexed ...
+ Indexed Mode = "Indexed"
+ // NotSpecified ...
+ NotSpecified Mode = "NotSpecified"
+)
+
+// PossibleModeValues returns an array of possible values for the Mode const type.
+func PossibleModeValues() []Mode {
+ return []Mode{All, Indexed, NotSpecified}
+}
+
+// Type enumerates the values for type.
+type Type string
+
+const (
+ // TypeBuiltIn ...
+ TypeBuiltIn Type = "BuiltIn"
+ // TypeCustom ...
+ TypeCustom Type = "Custom"
+ // TypeNotSpecified ...
+ TypeNotSpecified Type = "NotSpecified"
+)
+
+// PossibleTypeValues returns an array of possible values for the Type const type.
+func PossibleTypeValues() []Type {
+ return []Type{TypeBuiltIn, TypeCustom, TypeNotSpecified}
+}
+
+// Assignment the policy assignment.
+type Assignment struct {
+ autorest.Response `json:"-"`
+ // AssignmentProperties - Properties for the policy assignment.
+ *AssignmentProperties `json:"properties,omitempty"`
+ // ID - The ID of the policy assignment.
+ ID *string `json:"id,omitempty"`
+ // Type - The type of the policy assignment.
+ Type *string `json:"type,omitempty"`
+ // Name - The name of the policy assignment.
+ Name *string `json:"name,omitempty"`
+ // Sku - The policy sku.
+ Sku *Sku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Assignment.
+func (a Assignment) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if a.AssignmentProperties != nil {
+ objectMap["properties"] = a.AssignmentProperties
+ }
+ if a.ID != nil {
+ objectMap["id"] = a.ID
+ }
+ if a.Type != nil {
+ objectMap["type"] = a.Type
+ }
+ if a.Name != nil {
+ objectMap["name"] = a.Name
+ }
+ if a.Sku != nil {
+ objectMap["sku"] = a.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Assignment struct.
+func (a *Assignment) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var assignmentProperties AssignmentProperties
+ err = json.Unmarshal(*v, &assignmentProperties)
+ if err != nil {
+ return err
+ }
+ a.AssignmentProperties = &assignmentProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ a.ID = &ID
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ a.Type = &typeVar
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ a.Name = &name
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ a.Sku = &sku
+ }
+ }
+ }
+
+ return nil
+}
+
+// AssignmentListResult list of policy assignments.
+type AssignmentListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of policy assignments.
+ Value *[]Assignment `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// AssignmentListResultIterator provides access to a complete listing of Assignment values.
+type AssignmentListResultIterator struct {
+ i int
+ page AssignmentListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *AssignmentListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter AssignmentListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter AssignmentListResultIterator) Response() AssignmentListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter AssignmentListResultIterator) Value() Assignment {
+ if !iter.page.NotDone() {
+ return Assignment{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (alr AssignmentListResult) IsEmpty() bool {
+ return alr.Value == nil || len(*alr.Value) == 0
+}
+
+// assignmentListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (alr AssignmentListResult) assignmentListResultPreparer() (*http.Request, error) {
+ if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(alr.NextLink)))
+}
+
+// AssignmentListResultPage contains a page of Assignment values.
+type AssignmentListResultPage struct {
+ fn func(AssignmentListResult) (AssignmentListResult, error)
+ alr AssignmentListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *AssignmentListResultPage) Next() error {
+ next, err := page.fn(page.alr)
+ if err != nil {
+ return err
+ }
+ page.alr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page AssignmentListResultPage) NotDone() bool {
+ return !page.alr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page AssignmentListResultPage) Response() AssignmentListResult {
+ return page.alr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page AssignmentListResultPage) Values() []Assignment {
+ if page.alr.IsEmpty() {
+ return nil
+ }
+ return *page.alr.Value
+}
+
+// AssignmentProperties the policy assignment properties.
+type AssignmentProperties struct {
+ // DisplayName - The display name of the policy assignment.
+ DisplayName *string `json:"displayName,omitempty"`
+ // PolicyDefinitionID - The ID of the policy definition.
+ PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"`
+ // Scope - The scope for the policy assignment.
+ Scope *string `json:"scope,omitempty"`
+ // NotScopes - The policy's excluded scopes.
+ NotScopes *[]string `json:"notScopes,omitempty"`
+ // Parameters - Required if a parameter is used in policy rule.
+ Parameters interface{} `json:"parameters,omitempty"`
+ // Description - This message will be part of response in case of policy violation.
+ Description *string `json:"description,omitempty"`
+ // Metadata - The policy assignment metadata.
+ Metadata interface{} `json:"metadata,omitempty"`
+}
+
+// Definition the policy definition.
+type Definition struct {
+ autorest.Response `json:"-"`
+ // DefinitionProperties - The policy definition properties.
+ *DefinitionProperties `json:"properties,omitempty"`
+ // ID - The ID of the policy definition.
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the policy definition.
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource (Microsoft.Authorization/policyDefinitions).
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Definition.
+func (d Definition) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if d.DefinitionProperties != nil {
+ objectMap["properties"] = d.DefinitionProperties
+ }
+ if d.ID != nil {
+ objectMap["id"] = d.ID
+ }
+ if d.Name != nil {
+ objectMap["name"] = d.Name
+ }
+ if d.Type != nil {
+ objectMap["type"] = d.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Definition struct.
+func (d *Definition) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var definitionProperties DefinitionProperties
+ err = json.Unmarshal(*v, &definitionProperties)
+ if err != nil {
+ return err
+ }
+ d.DefinitionProperties = &definitionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ d.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ d.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ d.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// DefinitionListResult list of policy definitions.
+type DefinitionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of policy definitions.
+ Value *[]Definition `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DefinitionListResultIterator provides access to a complete listing of Definition values.
+type DefinitionListResultIterator struct {
+ i int
+ page DefinitionListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DefinitionListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DefinitionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DefinitionListResultIterator) Response() DefinitionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DefinitionListResultIterator) Value() Definition {
+ if !iter.page.NotDone() {
+ return Definition{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dlr DefinitionListResult) IsEmpty() bool {
+ return dlr.Value == nil || len(*dlr.Value) == 0
+}
+
+// definitionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dlr DefinitionListResult) definitionListResultPreparer() (*http.Request, error) {
+ if dlr.NextLink == nil || len(to.String(dlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dlr.NextLink)))
+}
+
+// DefinitionListResultPage contains a page of Definition values.
+type DefinitionListResultPage struct {
+ fn func(DefinitionListResult) (DefinitionListResult, error)
+ dlr DefinitionListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DefinitionListResultPage) Next() error {
+ next, err := page.fn(page.dlr)
+ if err != nil {
+ return err
+ }
+ page.dlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DefinitionListResultPage) NotDone() bool {
+ return !page.dlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DefinitionListResultPage) Response() DefinitionListResult {
+ return page.dlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DefinitionListResultPage) Values() []Definition {
+ if page.dlr.IsEmpty() {
+ return nil
+ }
+ return *page.dlr.Value
+}
+
+// DefinitionProperties the policy definition properties.
+type DefinitionProperties struct {
+ // PolicyType - The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'TypeNotSpecified', 'TypeBuiltIn', 'TypeCustom'
+ PolicyType Type `json:"policyType,omitempty"`
+ // Mode - The policy definition mode. Possible values are NotSpecified, Indexed, and All. Possible values include: 'NotSpecified', 'Indexed', 'All'
+ Mode Mode `json:"mode,omitempty"`
+ // DisplayName - The display name of the policy definition.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Description - The policy definition description.
+ Description *string `json:"description,omitempty"`
+ // PolicyRule - The policy rule.
+ PolicyRule interface{} `json:"policyRule,omitempty"`
+ // Metadata - The policy definition metadata.
+ Metadata interface{} `json:"metadata,omitempty"`
+ // Parameters - Required if a parameter is used in policy rule.
+ Parameters interface{} `json:"parameters,omitempty"`
+}
+
+// DefinitionReference the policy definition reference.
+type DefinitionReference struct {
+ // PolicyDefinitionID - The ID of the policy definition or policy set definition.
+ PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"`
+ // Parameters - Required if a parameter is used in policy rule.
+ Parameters interface{} `json:"parameters,omitempty"`
+}
+
+// ErrorResponse error reponse indicates ARM is not able to process the incoming request. The reason is provided in
+// the error message.
+type ErrorResponse struct {
+ // HTTPStatus - Http status code.
+ HTTPStatus *string `json:"httpStatus,omitempty"`
+ // ErrorCode - Error code.
+ ErrorCode *string `json:"errorCode,omitempty"`
+ // ErrorMessage - Error message indicating why the operation failed.
+ ErrorMessage *string `json:"errorMessage,omitempty"`
+}
+
+// SetDefinition the policy set definition.
+type SetDefinition struct {
+ autorest.Response `json:"-"`
+ // SetDefinitionProperties - The policy definition properties.
+ *SetDefinitionProperties `json:"properties,omitempty"`
+ // ID - The ID of the policy set definition.
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the policy set definition.
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource (Microsoft.Authorization/policySetDefinitions).
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SetDefinition.
+func (sd SetDefinition) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sd.SetDefinitionProperties != nil {
+ objectMap["properties"] = sd.SetDefinitionProperties
+ }
+ if sd.ID != nil {
+ objectMap["id"] = sd.ID
+ }
+ if sd.Name != nil {
+ objectMap["name"] = sd.Name
+ }
+ if sd.Type != nil {
+ objectMap["type"] = sd.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SetDefinition struct.
+func (sd *SetDefinition) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var setDefinitionProperties SetDefinitionProperties
+ err = json.Unmarshal(*v, &setDefinitionProperties)
+ if err != nil {
+ return err
+ }
+ sd.SetDefinitionProperties = &setDefinitionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ sd.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ sd.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ sd.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// SetDefinitionListResult list of policy set definitions.
+type SetDefinitionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of policy set definitions.
+ Value *[]SetDefinition `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SetDefinitionListResultIterator provides access to a complete listing of SetDefinition values.
+type SetDefinitionListResultIterator struct {
+ i int
+ page SetDefinitionListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SetDefinitionListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SetDefinitionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SetDefinitionListResultIterator) Response() SetDefinitionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SetDefinitionListResultIterator) Value() SetDefinition {
+ if !iter.page.NotDone() {
+ return SetDefinition{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (sdlr SetDefinitionListResult) IsEmpty() bool {
+ return sdlr.Value == nil || len(*sdlr.Value) == 0
+}
+
+// setDefinitionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (sdlr SetDefinitionListResult) setDefinitionListResultPreparer() (*http.Request, error) {
+ if sdlr.NextLink == nil || len(to.String(sdlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(sdlr.NextLink)))
+}
+
+// SetDefinitionListResultPage contains a page of SetDefinition values.
+type SetDefinitionListResultPage struct {
+ fn func(SetDefinitionListResult) (SetDefinitionListResult, error)
+ sdlr SetDefinitionListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *SetDefinitionListResultPage) Next() error {
+ next, err := page.fn(page.sdlr)
+ if err != nil {
+ return err
+ }
+ page.sdlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SetDefinitionListResultPage) NotDone() bool {
+ return !page.sdlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SetDefinitionListResultPage) Response() SetDefinitionListResult {
+ return page.sdlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SetDefinitionListResultPage) Values() []SetDefinition {
+ if page.sdlr.IsEmpty() {
+ return nil
+ }
+ return *page.sdlr.Value
+}
+
+// SetDefinitionProperties the policy set definition properties.
+type SetDefinitionProperties struct {
+ // PolicyType - The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'TypeNotSpecified', 'TypeBuiltIn', 'TypeCustom'
+ PolicyType Type `json:"policyType,omitempty"`
+ // DisplayName - The display name of the policy set definition.
+ DisplayName *string `json:"displayName,omitempty"`
+ // Description - The policy set definition description.
+ Description *string `json:"description,omitempty"`
+ // Metadata - The policy set definition metadata.
+ Metadata interface{} `json:"metadata,omitempty"`
+ // Parameters - The policy set definition parameters that can be used in policy definition references.
+ Parameters interface{} `json:"parameters,omitempty"`
+ // PolicyDefinitions - An array of policy definition references.
+ PolicyDefinitions *[]DefinitionReference `json:"policyDefinitions,omitempty"`
+}
+
+// Sku the policy sku.
+type Sku struct {
+ // Name - The name of the policy sku. Possible values are A0 and A1.
+ Name *string `json:"name,omitempty"`
+ // Tier - The policy sku tier. Possible values are Free and Standard.
+ Tier *string `json:"tier,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/setdefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/setdefinitions.go
new file mode 100644
index 000000000..010250127
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/setdefinitions.go
@@ -0,0 +1,790 @@
+package policy
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// SetDefinitionsClient is the to manage and control access to your resources, you can define customized policies and
+// assign them at a scope.
+type SetDefinitionsClient struct {
+ BaseClient
+}
+
+// NewSetDefinitionsClient creates an instance of the SetDefinitionsClient client.
+func NewSetDefinitionsClient(subscriptionID string) SetDefinitionsClient {
+ return NewSetDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client.
+func NewSetDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) SetDefinitionsClient {
+ return SetDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate this operation creates or updates a policy set definition in the given subscription with the given
+// name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to create.
+// parameters - the policy set definition properties.
+func (client SetDefinitionsClient) CreateOrUpdate(ctx context.Context, policySetDefinitionName string, parameters SetDefinition) (result SetDefinition, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.SetDefinitionProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.SetDefinitionProperties.PolicyDefinitions", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("policy.SetDefinitionsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, policySetDefinitionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client SetDefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, policySetDefinitionName string, parameters SetDefinition) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result SetDefinition, 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
+}
+
+// CreateOrUpdateAtManagementGroup this operation creates or updates a policy set definition in the given management
+// group with the given name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to create.
+// parameters - the policy set definition properties.
+// managementGroupID - the ID of the management group.
+func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroup(ctx context.Context, policySetDefinitionName string, parameters SetDefinition, managementGroupID string) (result SetDefinition, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.SetDefinitionProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.SetDefinitionProperties.PolicyDefinitions", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("policy.SetDefinitionsClient", "CreateOrUpdateAtManagementGroup", err.Error())
+ }
+
+ req, err := client.CreateOrUpdateAtManagementGroupPreparer(ctx, policySetDefinitionName, parameters, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "CreateOrUpdateAtManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateAtManagementGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "CreateOrUpdateAtManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateAtManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "CreateOrUpdateAtManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdateAtManagementGroupPreparer prepares the CreateOrUpdateAtManagementGroup request.
+func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroupPreparer(ctx context.Context, policySetDefinitionName string, parameters SetDefinition, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateAtManagementGroupSender sends the CreateOrUpdateAtManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateOrUpdateAtManagementGroupResponder handles the response to the CreateOrUpdateAtManagementGroup request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroupResponder(resp *http.Response) (result SetDefinition, 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 this operation deletes the policy set definition in the given subscription with the given name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to delete.
+func (client SetDefinitionsClient) Delete(ctx context.Context, policySetDefinitionName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, policySetDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client SetDefinitionsClient) DeletePreparer(ctx context.Context, policySetDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) 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
+}
+
+// DeleteAtManagementGroup this operation deletes the policy set definition in the given management group with the
+// given name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to delete.
+// managementGroupID - the ID of the management group.
+func (client SetDefinitionsClient) DeleteAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result autorest.Response, err error) {
+ req, err := client.DeleteAtManagementGroupPreparer(ctx, policySetDefinitionName, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "DeleteAtManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteAtManagementGroupSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "DeleteAtManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteAtManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "DeleteAtManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteAtManagementGroupPreparer prepares the DeleteAtManagementGroup request.
+func (client SetDefinitionsClient) DeleteAtManagementGroupPreparer(ctx context.Context, policySetDefinitionName string, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteAtManagementGroupSender sends the DeleteAtManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) DeleteAtManagementGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteAtManagementGroupResponder handles the response to the DeleteAtManagementGroup request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) DeleteAtManagementGroupResponder(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 this operation retrieves the policy set definition in the given subscription with the given name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to get.
+func (client SetDefinitionsClient) Get(ctx context.Context, policySetDefinitionName string) (result SetDefinition, err error) {
+ req, err := client.GetPreparer(ctx, policySetDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SetDefinitionsClient) GetPreparer(ctx context.Context, policySetDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) GetResponder(resp *http.Response) (result SetDefinition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAtManagementGroup this operation retrieves the policy set definition in the given management group with the given
+// name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to get.
+// managementGroupID - the ID of the management group.
+func (client SetDefinitionsClient) GetAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result SetDefinition, err error) {
+ req, err := client.GetAtManagementGroupPreparer(ctx, policySetDefinitionName, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "GetAtManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAtManagementGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "GetAtManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAtManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "GetAtManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetAtManagementGroupPreparer prepares the GetAtManagementGroup request.
+func (client SetDefinitionsClient) GetAtManagementGroupPreparer(ctx context.Context, policySetDefinitionName string, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAtManagementGroupSender sends the GetAtManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) GetAtManagementGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetAtManagementGroupResponder handles the response to the GetAtManagementGroup request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) GetAtManagementGroupResponder(resp *http.Response) (result SetDefinition, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetBuiltIn this operation retrieves the built-in policy set definition with the given name.
+// Parameters:
+// policySetDefinitionName - the name of the policy set definition to get.
+func (client SetDefinitionsClient) GetBuiltIn(ctx context.Context, policySetDefinitionName string) (result SetDefinition, err error) {
+ req, err := client.GetBuiltInPreparer(ctx, policySetDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "GetBuiltIn", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetBuiltInSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "GetBuiltIn", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetBuiltInResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "GetBuiltIn", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetBuiltInPreparer prepares the GetBuiltIn request.
+func (client SetDefinitionsClient) GetBuiltInPreparer(ctx context.Context, policySetDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "policySetDefinitionName": autorest.Encode("path", policySetDefinitionName),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetBuiltInSender sends the GetBuiltIn request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) GetBuiltInSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetBuiltInResponder handles the response to the GetBuiltIn request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) GetBuiltInResponder(resp *http.Response) (result SetDefinition, 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 this operation retrieves a list of all the policy set definitions in the given subscription.
+func (client SetDefinitionsClient) List(ctx context.Context) (result SetDefinitionListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.sdlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.sdlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client SetDefinitionsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) ListResponder(resp *http.Response) (result SetDefinitionListResult, 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 SetDefinitionsClient) listNextResults(lastResults SetDefinitionListResult) (result SetDefinitionListResult, err error) {
+ req, err := lastResults.setDefinitionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listNextResults", 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, "policy.SetDefinitionsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SetDefinitionsClient) ListComplete(ctx context.Context) (result SetDefinitionListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListBuiltIn this operation retrieves a list of all the built-in policy set definitions.
+func (client SetDefinitionsClient) ListBuiltIn(ctx context.Context) (result SetDefinitionListResultPage, err error) {
+ result.fn = client.listBuiltInNextResults
+ req, err := client.ListBuiltInPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "ListBuiltIn", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBuiltInSender(req)
+ if err != nil {
+ result.sdlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "ListBuiltIn", resp, "Failure sending request")
+ return
+ }
+
+ result.sdlr, err = client.ListBuiltInResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "ListBuiltIn", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListBuiltInPreparer prepares the ListBuiltIn request.
+func (client SetDefinitionsClient) ListBuiltInPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Authorization/policySetDefinitions"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBuiltInSender sends the ListBuiltIn request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) ListBuiltInSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListBuiltInResponder handles the response to the ListBuiltIn request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) ListBuiltInResponder(resp *http.Response) (result SetDefinitionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBuiltInNextResults retrieves the next set of results, if any.
+func (client SetDefinitionsClient) listBuiltInNextResults(lastResults SetDefinitionListResult) (result SetDefinitionListResult, err error) {
+ req, err := lastResults.setDefinitionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listBuiltInNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBuiltInSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listBuiltInNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBuiltInResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listBuiltInNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBuiltInComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SetDefinitionsClient) ListBuiltInComplete(ctx context.Context) (result SetDefinitionListResultIterator, err error) {
+ result.page, err = client.ListBuiltIn(ctx)
+ return
+}
+
+// ListByManagementGroup this operation retrieves a list of all the a policy set definition in the given management
+// group.
+// Parameters:
+// managementGroupID - the ID of the management group.
+func (client SetDefinitionsClient) ListByManagementGroup(ctx context.Context, managementGroupID string) (result SetDefinitionListResultPage, err error) {
+ result.fn = client.listByManagementGroupNextResults
+ req, err := client.ListByManagementGroupPreparer(ctx, managementGroupID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "ListByManagementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByManagementGroupSender(req)
+ if err != nil {
+ result.sdlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "ListByManagementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.sdlr, err = client.ListByManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "ListByManagementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByManagementGroupPreparer prepares the ListByManagementGroup request.
+func (client SetDefinitionsClient) ListByManagementGroupPreparer(ctx context.Context, managementGroupID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "managementGroupId": autorest.Encode("path", managementGroupID),
+ }
+
+ const APIVersion = "2018-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByManagementGroupSender sends the ListByManagementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client SetDefinitionsClient) ListByManagementGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListByManagementGroupResponder handles the response to the ListByManagementGroup request. The method always
+// closes the http.Response Body.
+func (client SetDefinitionsClient) ListByManagementGroupResponder(resp *http.Response) (result SetDefinitionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByManagementGroupNextResults retrieves the next set of results, if any.
+func (client SetDefinitionsClient) listByManagementGroupNextResults(lastResults SetDefinitionListResult) (result SetDefinitionListResult, err error) {
+ req, err := lastResults.setDefinitionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listByManagementGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByManagementGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listByManagementGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByManagementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "policy.SetDefinitionsClient", "listByManagementGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByManagementGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SetDefinitionsClient) ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result SetDefinitionListResultIterator, err error) {
+ result.page, err = client.ListByManagementGroup(ctx, managementGroupID)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/version.go
new file mode 100644
index 000000000..f048c0c7f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy/version.go
@@ -0,0 +1,30 @@
+package policy
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " policy/2018-03-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/client.go
new file mode 100644
index 000000000..db48ee8e8
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/client.go
@@ -0,0 +1,51 @@
+// Package resources implements the Azure ARM Resources service API version 2018-05-01.
+//
+// Provides operations for working with resources and resource groups.
+package resources
+
+// 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 Resources
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Resources.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deploymentoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deploymentoperations.go
new file mode 100644
index 000000000..a0e0c53cb
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deploymentoperations.go
@@ -0,0 +1,413 @@
+package resources
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// DeploymentOperationsClient is the provides operations for working with resources and resource groups.
+type DeploymentOperationsClient struct {
+ BaseClient
+}
+
+// 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.
+func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient {
+ return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets a deployments operation.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// deploymentName - the name of the deployment.
+// operationID - the ID of the operation to get.
+func (client DeploymentOperationsClient) Get(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (result DeploymentOperation, 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: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentOperationsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, deploymentName, operationID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DeploymentOperationsClient) GetPreparer(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "operationId": autorest.Encode("path", operationID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentOperationsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DeploymentOperationsClient) GetResponder(resp *http.Response) (result DeploymentOperation, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAtSubscriptionScope gets a deployments operation.
+// Parameters:
+// deploymentName - the name of the deployment.
+// operationID - the ID of the operation to get.
+func (client DeploymentOperationsClient) GetAtSubscriptionScope(ctx context.Context, deploymentName string, operationID string) (result DeploymentOperation, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentOperationsClient", "GetAtSubscriptionScope", err.Error())
+ }
+
+ req, err := client.GetAtSubscriptionScopePreparer(ctx, deploymentName, operationID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "GetAtSubscriptionScope", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAtSubscriptionScopeSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "GetAtSubscriptionScope", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAtSubscriptionScopeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "GetAtSubscriptionScope", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetAtSubscriptionScopePreparer prepares the GetAtSubscriptionScope request.
+func (client DeploymentOperationsClient) GetAtSubscriptionScopePreparer(ctx context.Context, deploymentName string, operationID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "operationId": autorest.Encode("path", operationID),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAtSubscriptionScopeSender sends the GetAtSubscriptionScope request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentOperationsClient) GetAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetAtSubscriptionScopeResponder handles the response to the GetAtSubscriptionScope request. The method always
+// closes the http.Response Body.
+func (client DeploymentOperationsClient) GetAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentOperation, 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 deployments operations for a deployment.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// deploymentName - the name of the deployment with the operation to get.
+// top - the number of results to return.
+func (client DeploymentOperationsClient) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result DeploymentOperationsListResultPage, 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: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentOperationsClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, deploymentName, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.dolr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.dolr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client DeploymentOperationsClient) ListPreparer(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentOperationsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client DeploymentOperationsClient) ListResponder(resp *http.Response) (result DeploymentOperationsListResult, 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 DeploymentOperationsClient) listNextResults(lastResults DeploymentOperationsListResult) (result DeploymentOperationsListResult, err error) {
+ req, err := lastResults.deploymentOperationsListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listNextResults", 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, "resources.DeploymentOperationsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DeploymentOperationsClient) ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result DeploymentOperationsListResultIterator, err error) {
+ result.page, err = client.List(ctx, resourceGroupName, deploymentName, top)
+ return
+}
+
+// ListAtSubscriptionScope gets all deployments operations for a deployment.
+// Parameters:
+// deploymentName - the name of the deployment with the operation to get.
+// top - the number of results to return.
+func (client DeploymentOperationsClient) ListAtSubscriptionScope(ctx context.Context, deploymentName string, top *int32) (result DeploymentOperationsListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentOperationsClient", "ListAtSubscriptionScope", err.Error())
+ }
+
+ result.fn = client.listAtSubscriptionScopeNextResults
+ req, err := client.ListAtSubscriptionScopePreparer(ctx, deploymentName, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "ListAtSubscriptionScope", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAtSubscriptionScopeSender(req)
+ if err != nil {
+ result.dolr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "ListAtSubscriptionScope", resp, "Failure sending request")
+ return
+ }
+
+ result.dolr, err = client.ListAtSubscriptionScopeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "ListAtSubscriptionScope", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAtSubscriptionScopePreparer prepares the ListAtSubscriptionScope request.
+func (client DeploymentOperationsClient) ListAtSubscriptionScopePreparer(ctx context.Context, deploymentName string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAtSubscriptionScopeSender sends the ListAtSubscriptionScope request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentOperationsClient) ListAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAtSubscriptionScopeResponder handles the response to the ListAtSubscriptionScope request. The method always
+// closes the http.Response Body.
+func (client DeploymentOperationsClient) ListAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentOperationsListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAtSubscriptionScopeNextResults retrieves the next set of results, if any.
+func (client DeploymentOperationsClient) listAtSubscriptionScopeNextResults(lastResults DeploymentOperationsListResult) (result DeploymentOperationsListResult, err error) {
+ req, err := lastResults.deploymentOperationsListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listAtSubscriptionScopeNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAtSubscriptionScopeSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listAtSubscriptionScopeNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAtSubscriptionScopeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listAtSubscriptionScopeNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAtSubscriptionScopeComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DeploymentOperationsClient) ListAtSubscriptionScopeComplete(ctx context.Context, deploymentName string, top *int32) (result DeploymentOperationsListResultIterator, err error) {
+ result.page, err = client.ListAtSubscriptionScope(ctx, deploymentName, top)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deployments.go
new file mode 100644
index 000000000..084343295
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deployments.go
@@ -0,0 +1,1388 @@
+package resources
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// DeploymentsClient is the provides operations for working with resources and resource groups.
+type DeploymentsClient struct {
+ BaseClient
+}
+
+// NewDeploymentsClient creates an instance of the DeploymentsClient client.
+func NewDeploymentsClient(subscriptionID string) DeploymentsClient {
+ return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// 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
+// template deployment and leaves the resource group partially deployed.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// deploymentName - the name of the deployment to cancel.
+func (client DeploymentsClient) Cancel(ctx context.Context, resourceGroupName string, deploymentName 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: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "Cancel", err.Error())
+ }
+
+ req, err := client.CancelPreparer(ctx, resourceGroupName, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CancelSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CancelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CancelPreparer prepares the Cancel request.
+func (client DeploymentsClient) CancelPreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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.Resources/deployments/{deploymentName}/cancel", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CancelSender sends the Cancel request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) CancelSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CancelResponder handles the response to the Cancel request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) CancelResponder(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
+}
+
+// CancelAtSubscriptionScope 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 resources partially deployed.
+// Parameters:
+// deploymentName - the name of the deployment to cancel.
+func (client DeploymentsClient) CancelAtSubscriptionScope(ctx context.Context, deploymentName string) (result autorest.Response, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "CancelAtSubscriptionScope", err.Error())
+ }
+
+ req, err := client.CancelAtSubscriptionScopePreparer(ctx, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CancelAtSubscriptionScope", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CancelAtSubscriptionScopeSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CancelAtSubscriptionScope", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CancelAtSubscriptionScopeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CancelAtSubscriptionScope", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CancelAtSubscriptionScopePreparer prepares the CancelAtSubscriptionScope request.
+func (client DeploymentsClient) CancelAtSubscriptionScopePreparer(ctx context.Context, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CancelAtSubscriptionScopeSender sends the CancelAtSubscriptionScope request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) CancelAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CancelAtSubscriptionScopeResponder handles the response to the CancelAtSubscriptionScope request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) CancelAtSubscriptionScopeResponder(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
+}
+
+// CheckExistence checks whether the deployment exists.
+// Parameters:
+// resourceGroupName - the name of the resource group with the deployment to check. The name is case
+// insensitive.
+// deploymentName - the name of the deployment to check.
+func (client DeploymentsClient) CheckExistence(ctx context.Context, resourceGroupName string, deploymentName 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: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "CheckExistence", err.Error())
+ }
+
+ req, err := client.CheckExistencePreparer(ctx, resourceGroupName, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckExistenceSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckExistenceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckExistencePreparer prepares the CheckExistence request.
+func (client DeploymentsClient) CheckExistencePreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsHead(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CheckExistenceSender sends the CheckExistence request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) CheckExistenceSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CheckExistenceResponder handles the response to the CheckExistence request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) CheckExistenceResponder(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
+}
+
+// CheckExistenceAtSubscriptionScope checks whether the deployment exists.
+// Parameters:
+// deploymentName - the name of the deployment to check.
+func (client DeploymentsClient) CheckExistenceAtSubscriptionScope(ctx context.Context, deploymentName string) (result autorest.Response, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "CheckExistenceAtSubscriptionScope", err.Error())
+ }
+
+ req, err := client.CheckExistenceAtSubscriptionScopePreparer(ctx, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistenceAtSubscriptionScope", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckExistenceAtSubscriptionScopeSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistenceAtSubscriptionScope", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckExistenceAtSubscriptionScopeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistenceAtSubscriptionScope", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckExistenceAtSubscriptionScopePreparer prepares the CheckExistenceAtSubscriptionScope request.
+func (client DeploymentsClient) CheckExistenceAtSubscriptionScopePreparer(ctx context.Context, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsHead(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CheckExistenceAtSubscriptionScopeSender sends the CheckExistenceAtSubscriptionScope request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) CheckExistenceAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CheckExistenceAtSubscriptionScopeResponder handles the response to the CheckExistenceAtSubscriptionScope request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) CheckExistenceAtSubscriptionScopeResponder(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
+}
+
+// CreateOrUpdate you can provide the template and parameters directly in the request or link to JSON files.
+// Parameters:
+// resourceGroupName - the name of the resource group to deploy the resources to. The name is case insensitive.
+// The resource group must already exist.
+// deploymentName - the name of the deployment.
+// parameters - additional parameters supplied to the operation.
+func (client DeploymentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (result DeploymentsCreateOrUpdateFuture, 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: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, deploymentName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future DeploymentsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) CreateOrUpdateResponder(resp *http.Response) (result DeploymentExtended, 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
+}
+
+// CreateOrUpdateAtSubscriptionScope you can provide the template and parameters directly in the request or link to
+// JSON files.
+// Parameters:
+// deploymentName - the name of the deployment.
+// parameters - additional parameters supplied to the operation.
+func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScope(ctx context.Context, deploymentName string, parameters Deployment) (result DeploymentsCreateOrUpdateAtSubscriptionScopeFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "CreateOrUpdateAtSubscriptionScope", err.Error())
+ }
+
+ req, err := client.CreateOrUpdateAtSubscriptionScopePreparer(ctx, deploymentName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdateAtSubscriptionScope", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateAtSubscriptionScopeSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdateAtSubscriptionScope", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdateAtSubscriptionScopePreparer prepares the CreateOrUpdateAtSubscriptionScope request.
+func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScopePreparer(ctx context.Context, deploymentName string, parameters Deployment) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateAtSubscriptionScopeSender sends the CreateOrUpdateAtSubscriptionScope request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScopeSender(req *http.Request) (future DeploymentsCreateOrUpdateAtSubscriptionScopeFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateAtSubscriptionScopeResponder handles the response to the CreateOrUpdateAtSubscriptionScope request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentExtended, 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 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.
+// Parameters:
+// resourceGroupName - the name of the resource group with the deployment to delete. The name is case
+// insensitive.
+// deploymentName - the name of the deployment to delete.
+func (client DeploymentsClient) Delete(ctx context.Context, resourceGroupName string, deploymentName string) (result DeploymentsDeleteFuture, 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: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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.Resources/deployments/{deploymentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) DeleteSender(req *http.Request) (future DeploymentsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) 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
+}
+
+// DeleteAtSubscriptionScope a template deployment that is currently running cannot be deleted. Deleting a template
+// deployment removes the associated deployment operations. 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.
+// Parameters:
+// deploymentName - the name of the deployment to delete.
+func (client DeploymentsClient) DeleteAtSubscriptionScope(ctx context.Context, deploymentName string) (result DeploymentsDeleteAtSubscriptionScopeFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "DeleteAtSubscriptionScope", err.Error())
+ }
+
+ req, err := client.DeleteAtSubscriptionScopePreparer(ctx, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "DeleteAtSubscriptionScope", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteAtSubscriptionScopeSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "DeleteAtSubscriptionScope", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeleteAtSubscriptionScopePreparer prepares the DeleteAtSubscriptionScope request.
+func (client DeploymentsClient) DeleteAtSubscriptionScopePreparer(ctx context.Context, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteAtSubscriptionScopeSender sends the DeleteAtSubscriptionScope request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) DeleteAtSubscriptionScopeSender(req *http.Request) (future DeploymentsDeleteAtSubscriptionScopeFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteAtSubscriptionScopeResponder handles the response to the DeleteAtSubscriptionScope request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) DeleteAtSubscriptionScopeResponder(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
+}
+
+// ExportTemplate exports the template used for specified deployment.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// deploymentName - the name of the deployment from which to get the template.
+func (client DeploymentsClient) ExportTemplate(ctx context.Context, resourceGroupName string, deploymentName string) (result DeploymentExportResult, 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: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "ExportTemplate", err.Error())
+ }
+
+ req, err := client.ExportTemplatePreparer(ctx, resourceGroupName, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ExportTemplateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ExportTemplateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ExportTemplatePreparer prepares the ExportTemplate request.
+func (client DeploymentsClient) ExportTemplatePreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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.Resources/deployments/{deploymentName}/exportTemplate", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ExportTemplateSender sends the ExportTemplate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) ExportTemplateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ExportTemplateResponder handles the response to the ExportTemplate request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) ExportTemplateResponder(resp *http.Response) (result DeploymentExportResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ExportTemplateAtSubscriptionScope exports the template used for specified deployment.
+// Parameters:
+// deploymentName - the name of the deployment from which to get the template.
+func (client DeploymentsClient) ExportTemplateAtSubscriptionScope(ctx context.Context, deploymentName string) (result DeploymentExportResult, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "ExportTemplateAtSubscriptionScope", err.Error())
+ }
+
+ req, err := client.ExportTemplateAtSubscriptionScopePreparer(ctx, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplateAtSubscriptionScope", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ExportTemplateAtSubscriptionScopeSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplateAtSubscriptionScope", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ExportTemplateAtSubscriptionScopeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplateAtSubscriptionScope", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ExportTemplateAtSubscriptionScopePreparer prepares the ExportTemplateAtSubscriptionScope request.
+func (client DeploymentsClient) ExportTemplateAtSubscriptionScopePreparer(ctx context.Context, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ExportTemplateAtSubscriptionScopeSender sends the ExportTemplateAtSubscriptionScope request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) ExportTemplateAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ExportTemplateAtSubscriptionScopeResponder handles the response to the ExportTemplateAtSubscriptionScope request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) ExportTemplateAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentExportResult, 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 deployment.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// deploymentName - the name of the deployment to get.
+func (client DeploymentsClient) Get(ctx context.Context, resourceGroupName string, deploymentName string) (result DeploymentExtended, 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: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DeploymentsClient) GetPreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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.Resources/deployments/{deploymentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) GetResponder(resp *http.Response) (result DeploymentExtended, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAtSubscriptionScope gets a deployment.
+// Parameters:
+// deploymentName - the name of the deployment to get.
+func (client DeploymentsClient) GetAtSubscriptionScope(ctx context.Context, deploymentName string) (result DeploymentExtended, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "GetAtSubscriptionScope", err.Error())
+ }
+
+ req, err := client.GetAtSubscriptionScopePreparer(ctx, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "GetAtSubscriptionScope", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAtSubscriptionScopeSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "GetAtSubscriptionScope", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAtSubscriptionScopeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "GetAtSubscriptionScope", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetAtSubscriptionScopePreparer prepares the GetAtSubscriptionScope request.
+func (client DeploymentsClient) GetAtSubscriptionScopePreparer(ctx context.Context, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAtSubscriptionScopeSender sends the GetAtSubscriptionScope request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) GetAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetAtSubscriptionScopeResponder handles the response to the GetAtSubscriptionScope request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) GetAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentExtended, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListAtSubscriptionScope get all the deployments for a subscription.
+// Parameters:
+// filter - the filter to apply on the operation. For example, you can use $filter=provisioningState eq
+// '{state}'.
+// top - the number of results to get. If null is passed, returns all deployments.
+func (client DeploymentsClient) ListAtSubscriptionScope(ctx context.Context, filter string, top *int32) (result DeploymentListResultPage, err error) {
+ result.fn = client.listAtSubscriptionScopeNextResults
+ req, err := client.ListAtSubscriptionScopePreparer(ctx, filter, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListAtSubscriptionScope", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAtSubscriptionScopeSender(req)
+ if err != nil {
+ result.dlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListAtSubscriptionScope", resp, "Failure sending request")
+ return
+ }
+
+ result.dlr, err = client.ListAtSubscriptionScopeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListAtSubscriptionScope", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAtSubscriptionScopePreparer prepares the ListAtSubscriptionScope request.
+func (client DeploymentsClient) ListAtSubscriptionScopePreparer(ctx context.Context, filter string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAtSubscriptionScopeSender sends the ListAtSubscriptionScope request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) ListAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAtSubscriptionScopeResponder handles the response to the ListAtSubscriptionScope request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) ListAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAtSubscriptionScopeNextResults retrieves the next set of results, if any.
+func (client DeploymentsClient) listAtSubscriptionScopeNextResults(lastResults DeploymentListResult) (result DeploymentListResult, err error) {
+ req, err := lastResults.deploymentListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listAtSubscriptionScopeNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAtSubscriptionScopeSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listAtSubscriptionScopeNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAtSubscriptionScopeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listAtSubscriptionScopeNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAtSubscriptionScopeComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DeploymentsClient) ListAtSubscriptionScopeComplete(ctx context.Context, filter string, top *int32) (result DeploymentListResultIterator, err error) {
+ result.page, err = client.ListAtSubscriptionScope(ctx, filter, top)
+ return
+}
+
+// ListByResourceGroup get all the deployments for a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group with the deployments to get. The name is case
+// insensitive.
+// filter - the filter to apply on the operation. For example, you can use $filter=provisioningState eq
+// '{state}'.
+// top - the number of results to get. If null is passed, returns all deployments.
+func (client DeploymentsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result DeploymentListResultPage, 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.NewError("resources.DeploymentsClient", "ListByResourceGroup", err.Error())
+ }
+
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, filter, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.dlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.dlr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client DeploymentsClient) ListByResourceGroupPreparer(ctx context.Context, 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 = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) ListByResourceGroupResponder(resp *http.Response) (result DeploymentListResult, 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 DeploymentsClient) listByResourceGroupNextResults(lastResults DeploymentListResult) (result DeploymentListResult, err error) {
+ req, err := lastResults.deploymentListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listByResourceGroupNextResults", 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.DeploymentsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DeploymentsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result DeploymentListResultIterator, err error) {
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, filter, top)
+ return
+}
+
+// Validate validates whether the specified template is syntactically correct and will be accepted by Azure Resource
+// Manager..
+// Parameters:
+// resourceGroupName - the name of the resource group the template will be deployed to. The name is case
+// insensitive.
+// deploymentName - the name of the deployment.
+// parameters - parameters to validate.
+func (client DeploymentsClient) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (result DeploymentValidateResult, 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: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "Validate", err.Error())
+ }
+
+ req, err := client.ValidatePreparer(ctx, resourceGroupName, deploymentName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ValidateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ValidateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ValidatePreparer prepares the Validate request.
+func (client DeploymentsClient) ValidatePreparer(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ValidateSender sends the Validate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) ValidateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ValidateResponder handles the response to the Validate request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) ValidateResponder(resp *http.Response) (result DeploymentValidateResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusBadRequest),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ValidateAtSubscriptionScope validates whether the specified template is syntactically correct and will be accepted
+// by Azure Resource Manager..
+// Parameters:
+// deploymentName - the name of the deployment.
+// parameters - parameters to validate.
+func (client DeploymentsClient) ValidateAtSubscriptionScope(ctx context.Context, deploymentName string, parameters Deployment) (result DeploymentValidateResult, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "ValidateAtSubscriptionScope", err.Error())
+ }
+
+ req, err := client.ValidateAtSubscriptionScopePreparer(ctx, deploymentName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ValidateAtSubscriptionScope", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ValidateAtSubscriptionScopeSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ValidateAtSubscriptionScope", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ValidateAtSubscriptionScopeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ValidateAtSubscriptionScope", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ValidateAtSubscriptionScopePreparer prepares the ValidateAtSubscriptionScope request.
+func (client DeploymentsClient) ValidateAtSubscriptionScopePreparer(ctx context.Context, deploymentName string, parameters Deployment) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ValidateAtSubscriptionScopeSender sends the ValidateAtSubscriptionScope request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) ValidateAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ValidateAtSubscriptionScopeResponder handles the response to the ValidateAtSubscriptionScope request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) ValidateAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentValidateResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusBadRequest),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/groups.go
new file mode 100644
index 000000000..7f04ebc0f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/groups.go
@@ -0,0 +1,593 @@
+package resources
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// GroupsClient is the provides operations for working with resources and resource groups.
+type GroupsClient struct {
+ BaseClient
+}
+
+// NewGroupsClient creates an instance of the GroupsClient client.
+func NewGroupsClient(subscriptionID string) GroupsClient {
+ return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client.
+func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient {
+ return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CheckExistence checks whether a resource group exists.
+// Parameters:
+// resourceGroupName - the name of the resource group to check. The name is case insensitive.
+func (client GroupsClient) CheckExistence(ctx context.Context, 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.NewError("resources.GroupsClient", "CheckExistence", err.Error())
+ }
+
+ req, err := client.CheckExistencePreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CheckExistence", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckExistenceSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CheckExistence", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckExistenceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CheckExistence", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckExistencePreparer prepares the CheckExistence request.
+func (client GroupsClient) CheckExistencePreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsHead(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CheckExistenceSender sends the CheckExistence request. The method will close the
+// http.Response Body if it receives an error.
+func (client GroupsClient) CheckExistenceSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CheckExistenceResponder handles the response to the CheckExistence request. The method always
+// closes the http.Response Body.
+func (client GroupsClient) CheckExistenceResponder(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
+}
+
+// CreateOrUpdate creates or updates a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group to create or update.
+// parameters - parameters supplied to the create or update a resource group.
+func (client GroupsClient) CreateOrUpdate(ctx context.Context, 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}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.GroupsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client GroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, parameters Group) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client GroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client GroupsClient) CreateOrUpdateResponder(resp *http.Response) (result Group, 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 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.
+// Parameters:
+// resourceGroupName - the name of the resource group to delete. The name is case insensitive.
+func (client GroupsClient) Delete(ctx context.Context, resourceGroupName string) (result GroupsDeleteFuture, 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.NewError("resources.GroupsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client GroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client GroupsClient) 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
+}
+
+// ExportTemplate captures the specified resource group as a template.
+// Parameters:
+// resourceGroupName - the name of the resource group to export as a template.
+// parameters - parameters for exporting the template.
+func (client GroupsClient) ExportTemplate(ctx context.Context, resourceGroupName string, parameters ExportTemplateRequest) (result GroupExportResult, 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.NewError("resources.GroupsClient", "ExportTemplate", err.Error())
+ }
+
+ req, err := client.ExportTemplatePreparer(ctx, resourceGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ExportTemplate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ExportTemplateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ExportTemplate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ExportTemplateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ExportTemplate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ExportTemplatePreparer prepares the ExportTemplate request.
+func (client GroupsClient) ExportTemplatePreparer(ctx context.Context, resourceGroupName string, parameters ExportTemplateRequest) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ExportTemplateSender sends the ExportTemplate request. The method will close the
+// http.Response Body if it receives an error.
+func (client GroupsClient) ExportTemplateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ExportTemplateResponder handles the response to the ExportTemplate request. The method always
+// closes the http.Response Body.
+func (client GroupsClient) ExportTemplateResponder(resp *http.Response) (result GroupExportResult, 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 resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group to get. The name is case insensitive.
+func (client GroupsClient) Get(ctx context.Context, resourceGroupName string) (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.NewError("resources.GroupsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client GroupsClient) GetPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client GroupsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client GroupsClient) GetResponder(resp *http.Response) (result Group, 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 resource groups for a subscription.
+// Parameters:
+// filter - the filter to apply on the operation.
+// top - the number of results to return. If null is passed, returns all resource groups.
+func (client GroupsClient) List(ctx context.Context, filter string, top *int32) (result GroupListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, filter, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.glr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.glr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client GroupsClient) ListPreparer(ctx context.Context, filter string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client GroupsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client GroupsClient) ListResponder(resp *http.Response) (result GroupListResult, 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 GroupsClient) listNextResults(lastResults GroupListResult) (result GroupListResult, err error) {
+ req, err := lastResults.groupListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.GroupsClient", "listNextResults", 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, "resources.GroupsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GroupsClient) ListComplete(ctx context.Context, filter string, top *int32) (result GroupListResultIterator, err error) {
+ result.page, err = client.List(ctx, filter, top)
+ return
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group to update. The name is case insensitive.
+// parameters - parameters supplied to update a resource group.
+func (client GroupsClient) Update(ctx context.Context, 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.NewError("resources.GroupsClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, parameters GroupPatchable) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GroupsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client GroupsClient) UpdateResponder(resp *http.Response) (result Group, 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/services/resources/mgmt/2018-05-01/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/models.go
new file mode 100644
index 000000000..f16c235dd
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/models.go
@@ -0,0 +1,1599 @@
+package resources
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "net/http"
+)
+
+// DeploymentMode enumerates the values for deployment mode.
+type DeploymentMode string
+
+const (
+ // Complete ...
+ Complete DeploymentMode = "Complete"
+ // Incremental ...
+ Incremental DeploymentMode = "Incremental"
+)
+
+// PossibleDeploymentModeValues returns an array of possible values for the DeploymentMode const type.
+func PossibleDeploymentModeValues() []DeploymentMode {
+ return []DeploymentMode{Complete, Incremental}
+}
+
+// OnErrorDeploymentType enumerates the values for on error deployment type.
+type OnErrorDeploymentType string
+
+const (
+ // LastSuccessful ...
+ LastSuccessful OnErrorDeploymentType = "LastSuccessful"
+ // SpecificDeployment ...
+ SpecificDeployment OnErrorDeploymentType = "SpecificDeployment"
+)
+
+// PossibleOnErrorDeploymentTypeValues returns an array of possible values for the OnErrorDeploymentType const type.
+func PossibleOnErrorDeploymentTypeValues() []OnErrorDeploymentType {
+ return []OnErrorDeploymentType{LastSuccessful, SpecificDeployment}
+}
+
+// ResourceIdentityType enumerates the values for resource identity type.
+type ResourceIdentityType string
+
+const (
+ // None ...
+ None ResourceIdentityType = "None"
+ // SystemAssigned ...
+ SystemAssigned ResourceIdentityType = "SystemAssigned"
+ // SystemAssignedUserAssigned ...
+ SystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned"
+ // UserAssigned ...
+ UserAssigned ResourceIdentityType = "UserAssigned"
+)
+
+// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type.
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return []ResourceIdentityType{None, SystemAssigned, SystemAssignedUserAssigned, UserAssigned}
+}
+
+// AliasPathType the type of the paths for alias.
+type AliasPathType struct {
+ // Path - The path of an alias.
+ Path *string `json:"path,omitempty"`
+ // APIVersions - The API versions.
+ APIVersions *[]string `json:"apiVersions,omitempty"`
+}
+
+// AliasType the alias type.
+type AliasType struct {
+ // Name - The alias name.
+ Name *string `json:"name,omitempty"`
+ // Paths - The paths for an alias.
+ Paths *[]AliasPathType `json:"paths,omitempty"`
+}
+
+// BasicDependency deployment dependency information.
+type BasicDependency struct {
+ // ID - The ID of the dependency.
+ ID *string `json:"id,omitempty"`
+ // ResourceType - The dependency resource type.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // ResourceName - The dependency resource name.
+ ResourceName *string `json:"resourceName,omitempty"`
+}
+
+// CreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type CreateOrUpdateByIDFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateByIDFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateOrUpdateByIDResponder(gr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type CreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *CreateOrUpdateFuture) Result(client Client) (gr GenericResource, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateOrUpdateResponder(gr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DebugSetting ...
+type DebugSetting struct {
+ // DetailLevel - Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information you are passing in during deployment. By logging information about the request or response, you could potentially expose sensitive data that is retrieved through the deployment operations.
+ DetailLevel *string `json:"detailLevel,omitempty"`
+}
+
+// DeleteByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type DeleteByIDFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *DeleteByIDFuture) Result(client Client) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeleteByIDFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type DeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// Dependency deployment dependency information.
+type Dependency struct {
+ // DependsOn - The list of dependencies.
+ DependsOn *[]BasicDependency `json:"dependsOn,omitempty"`
+ // ID - The ID of the dependency.
+ ID *string `json:"id,omitempty"`
+ // ResourceType - The dependency resource type.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // ResourceName - The dependency resource name.
+ ResourceName *string `json:"resourceName,omitempty"`
+}
+
+// Deployment deployment operation parameters.
+type Deployment struct {
+ // Location - The location to store the deployment data.
+ Location *string `json:"location,omitempty"`
+ // Properties - The deployment properties.
+ Properties *DeploymentProperties `json:"properties,omitempty"`
+}
+
+// DeploymentExportResult the deployment export result.
+type DeploymentExportResult struct {
+ autorest.Response `json:"-"`
+ // Template - The template content.
+ Template interface{} `json:"template,omitempty"`
+}
+
+// DeploymentExtended deployment information.
+type DeploymentExtended struct {
+ autorest.Response `json:"-"`
+ // ID - The ID of the deployment.
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the deployment.
+ Name *string `json:"name,omitempty"`
+ // Location - the location of the deployment.
+ Location *string `json:"location,omitempty"`
+ // Properties - Deployment properties.
+ Properties *DeploymentPropertiesExtended `json:"properties,omitempty"`
+}
+
+// DeploymentExtendedFilter deployment filter.
+type DeploymentExtendedFilter struct {
+ // ProvisioningState - The provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// DeploymentListResult list of deployments.
+type DeploymentListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of deployments.
+ Value *[]DeploymentExtended `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DeploymentListResultIterator provides access to a complete listing of DeploymentExtended values.
+type DeploymentListResultIterator struct {
+ i int
+ page DeploymentListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DeploymentListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DeploymentListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DeploymentListResultIterator) Response() DeploymentListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DeploymentListResultIterator) Value() DeploymentExtended {
+ if !iter.page.NotDone() {
+ return DeploymentExtended{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dlr DeploymentListResult) IsEmpty() bool {
+ return dlr.Value == nil || len(*dlr.Value) == 0
+}
+
+// deploymentListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dlr DeploymentListResult) deploymentListResultPreparer() (*http.Request, error) {
+ if dlr.NextLink == nil || len(to.String(dlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dlr.NextLink)))
+}
+
+// DeploymentListResultPage contains a page of DeploymentExtended values.
+type DeploymentListResultPage struct {
+ fn func(DeploymentListResult) (DeploymentListResult, error)
+ dlr DeploymentListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DeploymentListResultPage) Next() error {
+ next, err := page.fn(page.dlr)
+ if err != nil {
+ return err
+ }
+ page.dlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DeploymentListResultPage) NotDone() bool {
+ return !page.dlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DeploymentListResultPage) Response() DeploymentListResult {
+ return page.dlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DeploymentListResultPage) Values() []DeploymentExtended {
+ if page.dlr.IsEmpty() {
+ return nil
+ }
+ return *page.dlr.Value
+}
+
+// DeploymentOperation deployment operation information.
+type DeploymentOperation struct {
+ autorest.Response `json:"-"`
+ // ID - Full deployment operation ID.
+ ID *string `json:"id,omitempty"`
+ // OperationID - Deployment operation ID.
+ OperationID *string `json:"operationId,omitempty"`
+ // Properties - Deployment properties.
+ Properties *DeploymentOperationProperties `json:"properties,omitempty"`
+}
+
+// DeploymentOperationProperties deployment operation properties.
+type DeploymentOperationProperties struct {
+ // ProvisioningState - The state of the provisioning.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // Timestamp - The date and time of the operation.
+ Timestamp *date.Time `json:"timestamp,omitempty"`
+ // ServiceRequestID - Deployment operation service request id.
+ ServiceRequestID *string `json:"serviceRequestId,omitempty"`
+ // StatusCode - Operation status code.
+ StatusCode *string `json:"statusCode,omitempty"`
+ // StatusMessage - Operation status message.
+ StatusMessage interface{} `json:"statusMessage,omitempty"`
+ // TargetResource - The target resource.
+ TargetResource *TargetResource `json:"targetResource,omitempty"`
+ // Request - The HTTP request message.
+ Request *HTTPMessage `json:"request,omitempty"`
+ // Response - The HTTP response message.
+ Response *HTTPMessage `json:"response,omitempty"`
+}
+
+// DeploymentOperationsListResult list of deployment operations.
+type DeploymentOperationsListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of deployment operations.
+ Value *[]DeploymentOperation `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DeploymentOperationsListResultIterator provides access to a complete listing of DeploymentOperation values.
+type DeploymentOperationsListResultIterator struct {
+ i int
+ page DeploymentOperationsListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DeploymentOperationsListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DeploymentOperationsListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DeploymentOperationsListResultIterator) Response() DeploymentOperationsListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DeploymentOperationsListResultIterator) Value() DeploymentOperation {
+ if !iter.page.NotDone() {
+ return DeploymentOperation{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dolr DeploymentOperationsListResult) IsEmpty() bool {
+ return dolr.Value == nil || len(*dolr.Value) == 0
+}
+
+// deploymentOperationsListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dolr DeploymentOperationsListResult) deploymentOperationsListResultPreparer() (*http.Request, error) {
+ if dolr.NextLink == nil || len(to.String(dolr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dolr.NextLink)))
+}
+
+// DeploymentOperationsListResultPage contains a page of DeploymentOperation values.
+type DeploymentOperationsListResultPage struct {
+ fn func(DeploymentOperationsListResult) (DeploymentOperationsListResult, error)
+ dolr DeploymentOperationsListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DeploymentOperationsListResultPage) Next() error {
+ next, err := page.fn(page.dolr)
+ if err != nil {
+ return err
+ }
+ page.dolr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DeploymentOperationsListResultPage) NotDone() bool {
+ return !page.dolr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DeploymentOperationsListResultPage) Response() DeploymentOperationsListResult {
+ return page.dolr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DeploymentOperationsListResultPage) Values() []DeploymentOperation {
+ if page.dolr.IsEmpty() {
+ return nil
+ }
+ return *page.dolr.Value
+}
+
+// DeploymentProperties deployment properties.
+type DeploymentProperties struct {
+ // Template - The template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both.
+ Template interface{} `json:"template,omitempty"`
+ // TemplateLink - The URI of the template. Use either the templateLink property or the template property, but not both.
+ TemplateLink *TemplateLink `json:"templateLink,omitempty"`
+ // Parameters - Name and value pairs that define the deployment parameters for the template. You use this element when you want to provide the parameter values directly in the request rather than link to an existing parameter file. Use either the parametersLink property or the parameters property, but not both. It can be a JObject or a well formed JSON string.
+ Parameters interface{} `json:"parameters,omitempty"`
+ // ParametersLink - The URI of parameters file. You use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both.
+ ParametersLink *ParametersLink `json:"parametersLink,omitempty"`
+ // Mode - The mode that is used to deploy resources. This value can be either Incremental or Complete. In Incremental mode, resources are deployed without deleting existing resources that are not included in the template. In Complete mode, resources are deployed and existing resources in the resource group that are not included in the template are deleted. Be careful when using Complete mode as you may unintentionally delete resources. Possible values include: 'Incremental', 'Complete'
+ Mode DeploymentMode `json:"mode,omitempty"`
+ // DebugSetting - The debug setting of the deployment.
+ DebugSetting *DebugSetting `json:"debugSetting,omitempty"`
+ // OnErrorDeployment - The deployment on error behavior.
+ OnErrorDeployment *OnErrorDeployment `json:"onErrorDeployment,omitempty"`
+}
+
+// DeploymentPropertiesExtended deployment properties with additional details.
+type DeploymentPropertiesExtended struct {
+ // ProvisioningState - The state of the provisioning.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // CorrelationID - The correlation ID of the deployment.
+ CorrelationID *string `json:"correlationId,omitempty"`
+ // Timestamp - The timestamp of the template deployment.
+ Timestamp *date.Time `json:"timestamp,omitempty"`
+ // Outputs - Key/value pairs that represent deploymentoutput.
+ Outputs interface{} `json:"outputs,omitempty"`
+ // Providers - The list of resource providers needed for the deployment.
+ Providers *[]Provider `json:"providers,omitempty"`
+ // Dependencies - The list of deployment dependencies.
+ Dependencies *[]Dependency `json:"dependencies,omitempty"`
+ // Template - The template content. Use only one of Template or TemplateLink.
+ Template interface{} `json:"template,omitempty"`
+ // TemplateLink - The URI referencing the template. Use only one of Template or TemplateLink.
+ TemplateLink *TemplateLink `json:"templateLink,omitempty"`
+ // Parameters - Deployment parameters. Use only one of Parameters or ParametersLink.
+ Parameters interface{} `json:"parameters,omitempty"`
+ // ParametersLink - The URI referencing the parameters. Use only one of Parameters or ParametersLink.
+ ParametersLink *ParametersLink `json:"parametersLink,omitempty"`
+ // Mode - The deployment mode. Possible values are Incremental and Complete. Possible values include: 'Incremental', 'Complete'
+ Mode DeploymentMode `json:"mode,omitempty"`
+ // DebugSetting - The debug setting of the deployment.
+ DebugSetting *DebugSetting `json:"debugSetting,omitempty"`
+ // OnErrorDeployment - The deployment on error behavior.
+ OnErrorDeployment *OnErrorDeploymentExtended `json:"onErrorDeployment,omitempty"`
+}
+
+// DeploymentsCreateOrUpdateAtSubscriptionScopeFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type DeploymentsCreateOrUpdateAtSubscriptionScopeFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *DeploymentsCreateOrUpdateAtSubscriptionScopeFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
+ de, err = client.CreateOrUpdateAtSubscriptionScopeResponder(de.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture", "Result", de.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DeploymentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type DeploymentsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
+ de, err = client.CreateOrUpdateResponder(de.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", de.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DeploymentsDeleteAtSubscriptionScopeFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type DeploymentsDeleteAtSubscriptionScopeFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *DeploymentsDeleteAtSubscriptionScopeFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteAtSubscriptionScopeFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteAtSubscriptionScopeFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// DeploymentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type DeploymentsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// DeploymentValidateResult information from validate template deployment response.
+type DeploymentValidateResult struct {
+ autorest.Response `json:"-"`
+ // Error - Validation error.
+ Error *ManagementErrorWithDetails `json:"error,omitempty"`
+ // Properties - The template deployment properties.
+ Properties *DeploymentPropertiesExtended `json:"properties,omitempty"`
+}
+
+// ExportTemplateRequest export resource group template request parameters.
+type ExportTemplateRequest struct {
+ // ResourcesProperty - The IDs of the resources. The only supported string currently is '*' (all resources). Future updates will support exporting specific resources.
+ ResourcesProperty *[]string `json:"resources,omitempty"`
+ // Options - The export template options. Supported values include 'IncludeParameterDefaultValue', 'IncludeComments' or 'IncludeParameterDefaultValue, IncludeComments
+ Options *string `json:"options,omitempty"`
+}
+
+// GenericResource resource information.
+type GenericResource struct {
+ autorest.Response `json:"-"`
+ // Plan - The plan of the resource.
+ Plan *Plan `json:"plan,omitempty"`
+ // Properties - The resource properties.
+ Properties interface{} `json:"properties,omitempty"`
+ // Kind - The kind of the resource.
+ Kind *string `json:"kind,omitempty"`
+ // ManagedBy - ID of the resource that manages this resource.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ // Sku - The SKU of the resource.
+ Sku *Sku `json:"sku,omitempty"`
+ // Identity - The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // ID - Resource ID
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GenericResource.
+func (gr GenericResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gr.Plan != nil {
+ objectMap["plan"] = gr.Plan
+ }
+ objectMap["properties"] = gr.Properties
+ if gr.Kind != nil {
+ objectMap["kind"] = gr.Kind
+ }
+ if gr.ManagedBy != nil {
+ objectMap["managedBy"] = gr.ManagedBy
+ }
+ if gr.Sku != nil {
+ objectMap["sku"] = gr.Sku
+ }
+ if gr.Identity != nil {
+ objectMap["identity"] = gr.Identity
+ }
+ if gr.ID != nil {
+ objectMap["id"] = gr.ID
+ }
+ if gr.Name != nil {
+ objectMap["name"] = gr.Name
+ }
+ if gr.Type != nil {
+ objectMap["type"] = gr.Type
+ }
+ if gr.Location != nil {
+ objectMap["location"] = gr.Location
+ }
+ if gr.Tags != nil {
+ objectMap["tags"] = gr.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// GenericResourceFilter resource filter.
+type GenericResourceFilter struct {
+ // ResourceType - The resource type.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // Tagname - The tag name.
+ Tagname *string `json:"tagname,omitempty"`
+ // Tagvalue - The tag value.
+ Tagvalue *string `json:"tagvalue,omitempty"`
+}
+
+// Group resource group information.
+type Group struct {
+ autorest.Response `json:"-"`
+ // ID - The ID of the resource group.
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource group.
+ Name *string `json:"name,omitempty"`
+ Properties *GroupProperties `json:"properties,omitempty"`
+ // Location - The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
+ Location *string `json:"location,omitempty"`
+ // ManagedBy - The ID of the resource that manages this resource group.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ // Tags - The tags attached to the resource group.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Group.
+func (g Group) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if g.ID != nil {
+ objectMap["id"] = g.ID
+ }
+ if g.Name != nil {
+ objectMap["name"] = g.Name
+ }
+ if g.Properties != nil {
+ objectMap["properties"] = g.Properties
+ }
+ if g.Location != nil {
+ objectMap["location"] = g.Location
+ }
+ if g.ManagedBy != nil {
+ objectMap["managedBy"] = g.ManagedBy
+ }
+ if g.Tags != nil {
+ objectMap["tags"] = g.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// GroupExportResult resource group export result.
+type GroupExportResult struct {
+ autorest.Response `json:"-"`
+ // Template - The template content.
+ Template interface{} `json:"template,omitempty"`
+ // Error - The error.
+ Error *ManagementErrorWithDetails `json:"error,omitempty"`
+}
+
+// GroupFilter resource group filter.
+type GroupFilter struct {
+ // TagName - The tag name.
+ TagName *string `json:"tagName,omitempty"`
+ // TagValue - The tag value.
+ TagValue *string `json:"tagValue,omitempty"`
+}
+
+// GroupListResult list of resource groups.
+type GroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of resource groups.
+ Value *[]Group `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// GroupListResultIterator provides access to a complete listing of Group values.
+type GroupListResultIterator struct {
+ i int
+ page GroupListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *GroupListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter GroupListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter GroupListResultIterator) Response() GroupListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter GroupListResultIterator) Value() Group {
+ if !iter.page.NotDone() {
+ return Group{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (glr GroupListResult) IsEmpty() bool {
+ return glr.Value == nil || len(*glr.Value) == 0
+}
+
+// groupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (glr GroupListResult) groupListResultPreparer() (*http.Request, error) {
+ if glr.NextLink == nil || len(to.String(glr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(glr.NextLink)))
+}
+
+// GroupListResultPage contains a page of Group values.
+type GroupListResultPage struct {
+ fn func(GroupListResult) (GroupListResult, error)
+ glr GroupListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *GroupListResultPage) Next() error {
+ next, err := page.fn(page.glr)
+ if err != nil {
+ return err
+ }
+ page.glr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page GroupListResultPage) NotDone() bool {
+ return !page.glr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page GroupListResultPage) Response() GroupListResult {
+ return page.glr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page GroupListResultPage) Values() []Group {
+ if page.glr.IsEmpty() {
+ return nil
+ }
+ return *page.glr.Value
+}
+
+// GroupPatchable resource group information.
+type GroupPatchable struct {
+ // Name - The name of the resource group.
+ Name *string `json:"name,omitempty"`
+ Properties *GroupProperties `json:"properties,omitempty"`
+ // ManagedBy - The ID of the resource that manages this resource group.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ // Tags - The tags attached to the resource group.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GroupPatchable.
+func (gp GroupPatchable) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gp.Name != nil {
+ objectMap["name"] = gp.Name
+ }
+ if gp.Properties != nil {
+ objectMap["properties"] = gp.Properties
+ }
+ if gp.ManagedBy != nil {
+ objectMap["managedBy"] = gp.ManagedBy
+ }
+ if gp.Tags != nil {
+ objectMap["tags"] = gp.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// GroupProperties the resource group properties.
+type GroupProperties struct {
+ // ProvisioningState - The provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// GroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type GroupsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// HTTPMessage HTTP message.
+type HTTPMessage struct {
+ // Content - HTTP message content.
+ Content interface{} `json:"content,omitempty"`
+}
+
+// Identity identity for the resource.
+type Identity struct {
+ // PrincipalID - The principal ID of resource identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - The tenant ID of resource.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The identity type. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssignedUserAssigned', 'None'
+ Type ResourceIdentityType `json:"type,omitempty"`
+}
+
+// ListResult list of resource groups.
+type ListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of resources.
+ Value *[]GenericResource `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListResultIterator provides access to a complete listing of GenericResource values.
+type ListResultIterator struct {
+ i int
+ page ListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ListResultIterator) Response() ListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ListResultIterator) Value() GenericResource {
+ if !iter.page.NotDone() {
+ return GenericResource{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lr ListResult) IsEmpty() bool {
+ return lr.Value == nil || len(*lr.Value) == 0
+}
+
+// listResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lr ListResult) listResultPreparer() (*http.Request, error) {
+ if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lr.NextLink)))
+}
+
+// ListResultPage contains a page of GenericResource values.
+type ListResultPage struct {
+ fn func(ListResult) (ListResult, error)
+ lr ListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ListResultPage) Next() error {
+ next, err := page.fn(page.lr)
+ if err != nil {
+ return err
+ }
+ page.lr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListResultPage) NotDone() bool {
+ return !page.lr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListResultPage) Response() ListResult {
+ return page.lr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListResultPage) Values() []GenericResource {
+ if page.lr.IsEmpty() {
+ return nil
+ }
+ return *page.lr.Value
+}
+
+// ManagementErrorWithDetails the detailed error message of resource management.
+type ManagementErrorWithDetails struct {
+ // Code - The error code returned when exporting the template.
+ Code *string `json:"code,omitempty"`
+ // Message - The error message describing the export error.
+ Message *string `json:"message,omitempty"`
+ // Target - The target of the error.
+ Target *string `json:"target,omitempty"`
+ // Details - Validation error.
+ Details *[]ManagementErrorWithDetails `json:"details,omitempty"`
+}
+
+// MoveInfo parameters of move resources.
+type MoveInfo struct {
+ // ResourcesProperty - The IDs of the resources.
+ ResourcesProperty *[]string `json:"resources,omitempty"`
+ // TargetResourceGroup - The target resource group.
+ TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
+}
+
+// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type MoveResourcesFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// OnErrorDeployment deployment on error behavior.
+type OnErrorDeployment struct {
+ // Type - The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment. Possible values include: 'LastSuccessful', 'SpecificDeployment'
+ Type OnErrorDeploymentType `json:"type,omitempty"`
+ // DeploymentName - The deployment to be used on error case.
+ DeploymentName *string `json:"deploymentName,omitempty"`
+}
+
+// OnErrorDeploymentExtended deployment on error behavior with additional details.
+type OnErrorDeploymentExtended struct {
+ // ProvisioningState - The state of the provisioning for the on error deployment.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // Type - The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment. Possible values include: 'LastSuccessful', 'SpecificDeployment'
+ Type OnErrorDeploymentType `json:"type,omitempty"`
+ // DeploymentName - The deployment to be used on error case.
+ DeploymentName *string `json:"deploymentName,omitempty"`
+}
+
+// ParametersLink entity representing the reference to the deployment paramaters.
+type ParametersLink struct {
+ // URI - The URI of the parameters file.
+ URI *string `json:"uri,omitempty"`
+ // ContentVersion - If included, must match the ContentVersion in the template.
+ ContentVersion *string `json:"contentVersion,omitempty"`
+}
+
+// Plan plan for the resource.
+type Plan struct {
+ // Name - The plan ID.
+ Name *string `json:"name,omitempty"`
+ // Publisher - The publisher ID.
+ Publisher *string `json:"publisher,omitempty"`
+ // Product - The offer ID.
+ Product *string `json:"product,omitempty"`
+ // PromotionCode - The promotion code.
+ PromotionCode *string `json:"promotionCode,omitempty"`
+ // Version - The plan's version.
+ Version *string `json:"version,omitempty"`
+}
+
+// Provider resource provider information.
+type Provider struct {
+ autorest.Response `json:"-"`
+ // ID - The provider ID.
+ ID *string `json:"id,omitempty"`
+ // Namespace - The namespace of the resource provider.
+ Namespace *string `json:"namespace,omitempty"`
+ // RegistrationState - The registration state of the provider.
+ RegistrationState *string `json:"registrationState,omitempty"`
+ // ResourceTypes - The collection of provider resource types.
+ ResourceTypes *[]ProviderResourceType `json:"resourceTypes,omitempty"`
+}
+
+// ProviderListResult list of resource providers.
+type ProviderListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of resource providers.
+ Value *[]Provider `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ProviderListResultIterator provides access to a complete listing of Provider values.
+type ProviderListResultIterator struct {
+ i int
+ page ProviderListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ProviderListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ProviderListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ProviderListResultIterator) Response() ProviderListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ProviderListResultIterator) Value() Provider {
+ if !iter.page.NotDone() {
+ return Provider{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (plr ProviderListResult) IsEmpty() bool {
+ return plr.Value == nil || len(*plr.Value) == 0
+}
+
+// providerListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (plr ProviderListResult) providerListResultPreparer() (*http.Request, error) {
+ if plr.NextLink == nil || len(to.String(plr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(plr.NextLink)))
+}
+
+// ProviderListResultPage contains a page of Provider values.
+type ProviderListResultPage struct {
+ fn func(ProviderListResult) (ProviderListResult, error)
+ plr ProviderListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ProviderListResultPage) Next() error {
+ next, err := page.fn(page.plr)
+ if err != nil {
+ return err
+ }
+ page.plr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ProviderListResultPage) NotDone() bool {
+ return !page.plr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ProviderListResultPage) Response() ProviderListResult {
+ return page.plr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ProviderListResultPage) Values() []Provider {
+ if page.plr.IsEmpty() {
+ return nil
+ }
+ return *page.plr.Value
+}
+
+// ProviderOperationDisplayProperties resource provider operation's display properties.
+type ProviderOperationDisplayProperties struct {
+ // Publisher - Operation description.
+ Publisher *string `json:"publisher,omitempty"`
+ // Provider - Operation provider.
+ Provider *string `json:"provider,omitempty"`
+ // Resource - Operation resource.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - Operation.
+ Operation *string `json:"operation,omitempty"`
+ // Description - Operation description.
+ Description *string `json:"description,omitempty"`
+}
+
+// ProviderResourceType resource type managed by the resource provider.
+type ProviderResourceType struct {
+ // ResourceType - The resource type.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // Locations - The collection of locations where this resource type can be created.
+ Locations *[]string `json:"locations,omitempty"`
+ // Aliases - The aliases that are supported by this resource type.
+ Aliases *[]AliasType `json:"aliases,omitempty"`
+ // APIVersions - The API version.
+ APIVersions *[]string `json:"apiVersions,omitempty"`
+ // Properties - The properties.
+ Properties map[string]*string `json:"properties"`
+}
+
+// MarshalJSON is the custom marshaler for ProviderResourceType.
+func (prt ProviderResourceType) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if prt.ResourceType != nil {
+ objectMap["resourceType"] = prt.ResourceType
+ }
+ if prt.Locations != nil {
+ objectMap["locations"] = prt.Locations
+ }
+ if prt.Aliases != nil {
+ objectMap["aliases"] = prt.Aliases
+ }
+ if prt.APIVersions != nil {
+ objectMap["apiVersions"] = prt.APIVersions
+ }
+ if prt.Properties != nil {
+ objectMap["properties"] = prt.Properties
+ }
+ return json.Marshal(objectMap)
+}
+
+// Resource resource.
+type Resource struct {
+ // ID - Resource ID
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.ID != nil {
+ objectMap["id"] = r.ID
+ }
+ if r.Name != nil {
+ objectMap["name"] = r.Name
+ }
+ if r.Type != nil {
+ objectMap["type"] = r.Type
+ }
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// Sku SKU for the resource.
+type Sku struct {
+ // Name - The SKU name.
+ Name *string `json:"name,omitempty"`
+ // Tier - The SKU tier.
+ Tier *string `json:"tier,omitempty"`
+ // Size - The SKU size.
+ Size *string `json:"size,omitempty"`
+ // Family - The SKU family.
+ Family *string `json:"family,omitempty"`
+ // Model - The SKU model.
+ Model *string `json:"model,omitempty"`
+ // Capacity - The SKU capacity.
+ Capacity *int32 `json:"capacity,omitempty"`
+}
+
+// SubResource sub-resource.
+type SubResource struct {
+ // ID - Resource ID
+ ID *string `json:"id,omitempty"`
+}
+
+// TagCount tag count.
+type TagCount struct {
+ // Type - Type of count.
+ Type *string `json:"type,omitempty"`
+ // Value - Value of count.
+ Value *int32 `json:"value,omitempty"`
+}
+
+// TagDetails tag details.
+type TagDetails struct {
+ autorest.Response `json:"-"`
+ // ID - The tag ID.
+ ID *string `json:"id,omitempty"`
+ // TagName - The tag name.
+ TagName *string `json:"tagName,omitempty"`
+ // Count - The total number of resources that use the resource tag. When a tag is initially created and has no associated resources, the value is 0.
+ Count *TagCount `json:"count,omitempty"`
+ // Values - The list of tag values.
+ Values *[]TagValue `json:"values,omitempty"`
+}
+
+// TagsListResult list of subscription tags.
+type TagsListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of tags.
+ Value *[]TagDetails `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// TagsListResultIterator provides access to a complete listing of TagDetails values.
+type TagsListResultIterator struct {
+ i int
+ page TagsListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *TagsListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter TagsListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter TagsListResultIterator) Response() TagsListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter TagsListResultIterator) Value() TagDetails {
+ if !iter.page.NotDone() {
+ return TagDetails{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (tlr TagsListResult) IsEmpty() bool {
+ return tlr.Value == nil || len(*tlr.Value) == 0
+}
+
+// tagsListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (tlr TagsListResult) tagsListResultPreparer() (*http.Request, error) {
+ if tlr.NextLink == nil || len(to.String(tlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(tlr.NextLink)))
+}
+
+// TagsListResultPage contains a page of TagDetails values.
+type TagsListResultPage struct {
+ fn func(TagsListResult) (TagsListResult, error)
+ tlr TagsListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *TagsListResultPage) Next() error {
+ next, err := page.fn(page.tlr)
+ if err != nil {
+ return err
+ }
+ page.tlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page TagsListResultPage) NotDone() bool {
+ return !page.tlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page TagsListResultPage) Response() TagsListResult {
+ return page.tlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page TagsListResultPage) Values() []TagDetails {
+ if page.tlr.IsEmpty() {
+ return nil
+ }
+ return *page.tlr.Value
+}
+
+// TagValue tag information.
+type TagValue struct {
+ autorest.Response `json:"-"`
+ // ID - The tag ID.
+ ID *string `json:"id,omitempty"`
+ // TagValue - The tag value.
+ TagValue *string `json:"tagValue,omitempty"`
+ // Count - The tag value count.
+ Count *TagCount `json:"count,omitempty"`
+}
+
+// TargetResource target resource.
+type TargetResource struct {
+ // ID - The ID of the resource.
+ ID *string `json:"id,omitempty"`
+ // ResourceName - The name of the resource.
+ ResourceName *string `json:"resourceName,omitempty"`
+ // ResourceType - The type of the resource.
+ ResourceType *string `json:"resourceType,omitempty"`
+}
+
+// TemplateLink entity representing the reference to the template.
+type TemplateLink struct {
+ // URI - The URI of the template to deploy.
+ URI *string `json:"uri,omitempty"`
+ // ContentVersion - If included, must match the ContentVersion in the template.
+ ContentVersion *string `json:"contentVersion,omitempty"`
+}
+
+// UpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type UpdateByIDFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *UpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateByIDFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateByIDResponder(gr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type UpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *UpdateFuture) Result(client Client) (gr GenericResource, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateResponder(gr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ValidateMoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ValidateMoveResourcesFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ValidateMoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ValidateMoveResourcesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.ValidateMoveResourcesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/providers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/providers.go
new file mode 100644
index 000000000..04cd1493b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/providers.go
@@ -0,0 +1,341 @@
+package resources
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ProvidersClient is the provides operations for working with resources and resource groups.
+type ProvidersClient struct {
+ BaseClient
+}
+
+// NewProvidersClient creates an instance of the ProvidersClient client.
+func NewProvidersClient(subscriptionID string) ProvidersClient {
+ return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// 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.
+// Parameters:
+// resourceProviderNamespace - the namespace of the resource provider.
+// expand - the $expand query parameter. For example, to include property aliases in response, use
+// $expand=resourceTypes/aliases.
+func (client ProvidersClient) Get(ctx context.Context, resourceProviderNamespace string, expand string) (result Provider, err error) {
+ req, err := client.GetPreparer(ctx, resourceProviderNamespace, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ProvidersClient) GetPreparer(ctx context.Context, resourceProviderNamespace string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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}/providers/{resourceProviderNamespace}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProvidersClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ProvidersClient) GetResponder(resp *http.Response) (result Provider, 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 resource providers for a subscription.
+// Parameters:
+// top - the number of results to return. If null is passed returns all deployments.
+// expand - 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(ctx context.Context, top *int32, expand string) (result ProviderListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, top, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.plr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.plr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ProvidersClient) ListPreparer(ctx context.Context, top *int32, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProvidersClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ProvidersClient) ListResponder(resp *http.Response) (result ProviderListResult, 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 ProvidersClient) listNextResults(lastResults ProviderListResult) (result ProviderListResult, err error) {
+ req, err := lastResults.providerListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.ProvidersClient", "listNextResults", 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, "resources.ProvidersClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ProvidersClient) ListComplete(ctx context.Context, top *int32, expand string) (result ProviderListResultIterator, err error) {
+ result.page, err = client.List(ctx, top, expand)
+ return
+}
+
+// Register registers a subscription with a resource provider.
+// Parameters:
+// resourceProviderNamespace - the namespace of the resource provider to register.
+func (client ProvidersClient) Register(ctx context.Context, resourceProviderNamespace string) (result Provider, err error) {
+ req, err := client.RegisterPreparer(ctx, resourceProviderNamespace)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Register", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.RegisterSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Register", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.RegisterResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Register", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// RegisterPreparer prepares the Register request.
+func (client ProvidersClient) RegisterPreparer(ctx context.Context, resourceProviderNamespace string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RegisterSender sends the Register request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProvidersClient) RegisterSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// RegisterResponder handles the response to the Register request. The method always
+// closes the http.Response Body.
+func (client ProvidersClient) RegisterResponder(resp *http.Response) (result Provider, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Unregister unregisters a subscription from a resource provider.
+// Parameters:
+// resourceProviderNamespace - the namespace of the resource provider to unregister.
+func (client ProvidersClient) Unregister(ctx context.Context, resourceProviderNamespace string) (result Provider, err error) {
+ req, err := client.UnregisterPreparer(ctx, resourceProviderNamespace)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Unregister", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UnregisterSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Unregister", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UnregisterResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Unregister", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UnregisterPreparer prepares the Unregister request.
+func (client ProvidersClient) UnregisterPreparer(ctx context.Context, resourceProviderNamespace string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UnregisterSender sends the Unregister request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProvidersClient) UnregisterSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UnregisterResponder handles the response to the Unregister request. The method always
+// closes the http.Response Body.
+func (client ProvidersClient) UnregisterResponder(resp *http.Response) (result Provider, 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/services/resources/mgmt/2018-05-01/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/resources.go
new file mode 100644
index 000000000..bc1394b01
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/resources.go
@@ -0,0 +1,1201 @@
+package resources
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// Client is the provides operations for working with resources and resource groups.
+type Client struct {
+ BaseClient
+}
+
+// NewClient creates an instance of the Client client.
+func NewClient(subscriptionID string) Client {
+ return NewClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewClientWithBaseURI creates an instance of the Client client.
+func NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
+ return Client{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CheckExistence checks whether a resource exists.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the resource to check. The name is case
+// insensitive.
+// resourceProviderNamespace - the resource provider of the resource to check.
+// parentResourcePath - the parent resource identity.
+// resourceType - the resource type.
+// resourceName - the name of the resource to check whether it exists.
+func (client Client) CheckExistence(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName 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.NewError("resources.Client", "CheckExistence", err.Error())
+ }
+
+ req, err := client.CheckExistencePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckExistenceSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckExistenceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckExistencePreparer prepares the CheckExistence request.
+func (client Client) CheckExistencePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "parentResourcePath": parentResourcePath,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "resourceType": resourceType,
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsHead(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CheckExistenceSender sends the CheckExistence request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) CheckExistenceSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CheckExistenceResponder handles the response to the CheckExistence request. The method always
+// closes the http.Response Body.
+func (client Client) CheckExistenceResponder(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
+}
+
+// CheckExistenceByID checks by ID whether a resource exists.
+// Parameters:
+// resourceID - 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 Client) CheckExistenceByID(ctx context.Context, resourceID string) (result autorest.Response, err error) {
+ req, err := client.CheckExistenceByIDPreparer(ctx, resourceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckExistenceByIDSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckExistenceByIDResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckExistenceByIDPreparer prepares the CheckExistenceByID request.
+func (client Client) CheckExistenceByIDPreparer(ctx context.Context, resourceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsHead(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CheckExistenceByIDSender sends the CheckExistenceByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) CheckExistenceByIDSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CheckExistenceByIDResponder handles the response to the CheckExistenceByID request. The method always
+// closes the http.Response Body.
+func (client Client) CheckExistenceByIDResponder(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
+}
+
+// CreateOrUpdate creates a resource.
+// Parameters:
+// resourceGroupName - the name of the resource group for the resource. The name is case insensitive.
+// resourceProviderNamespace - the namespace of the resource provider.
+// parentResourcePath - the parent resource identity.
+// resourceType - the resource type of the resource to create.
+// resourceName - the name of the resource to create.
+// parameters - parameters for creating or updating the resource.
+func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource) (result CreateOrUpdateFuture, 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.Kind", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Pattern, Rule: `^[-\w\._,\(\)]+$`, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("resources.Client", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "parentResourcePath": parentResourcePath,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "resourceType": resourceType,
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client Client) CreateOrUpdateResponder(resp *http.Response) (result GenericResource, 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
+}
+
+// CreateOrUpdateByID create a resource by ID.
+// Parameters:
+// resourceID - 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 - create or update resource parameters.
+func (client Client) CreateOrUpdateByID(ctx context.Context, resourceID string, parameters GenericResource) (result CreateOrUpdateByIDFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Pattern, Rule: `^[-\w\._,\(\)]+$`, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("resources.Client", "CreateOrUpdateByID", err.Error())
+ }
+
+ req, err := client.CreateOrUpdateByIDPreparer(ctx, resourceID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdateByID", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateByIDSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdateByID", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdateByIDPreparer prepares the CreateOrUpdateByID request.
+func (client Client) CreateOrUpdateByIDPreparer(ctx context.Context, resourceID string, parameters GenericResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) CreateOrUpdateByIDSender(req *http.Request) (future CreateOrUpdateByIDFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateByIDResponder handles the response to the CreateOrUpdateByID request. The method always
+// closes the http.Response Body.
+func (client Client) CreateOrUpdateByIDResponder(resp *http.Response) (result GenericResource, 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 resource.
+// Parameters:
+// resourceGroupName - the name of the resource group that contains the resource to delete. The name is case
+// insensitive.
+// resourceProviderNamespace - the namespace of the resource provider.
+// parentResourcePath - the parent resource identity.
+// resourceType - the resource type.
+// resourceName - the name of the resource to delete.
+func (client Client) Delete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result DeleteFuture, 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.NewError("resources.Client", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client Client) DeletePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "parentResourcePath": parentResourcePath,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "resourceType": resourceType,
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client Client) 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
+}
+
+// DeleteByID deletes a resource by ID.
+// Parameters:
+// resourceID - 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 Client) DeleteByID(ctx context.Context, resourceID string) (result DeleteByIDFuture, err error) {
+ req, err := client.DeleteByIDPreparer(ctx, resourceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "DeleteByID", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteByIDSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "DeleteByID", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeleteByIDPreparer prepares the DeleteByID request.
+func (client Client) DeleteByIDPreparer(ctx context.Context, resourceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteByIDSender sends the DeleteByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) DeleteByIDSender(req *http.Request) (future DeleteByIDFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteByIDResponder handles the response to the DeleteByID request. The method always
+// closes the http.Response Body.
+func (client Client) DeleteByIDResponder(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 resource.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the resource to get. The name is case
+// insensitive.
+// resourceProviderNamespace - the namespace of the resource provider.
+// parentResourcePath - the parent resource identity.
+// resourceType - the resource type of the resource.
+// resourceName - the name of the resource to get.
+func (client Client) Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result GenericResource, 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.NewError("resources.Client", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.Client", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "parentResourcePath": parentResourcePath,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "resourceType": resourceType,
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client Client) GetResponder(resp *http.Response) (result GenericResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetByID gets a resource by ID.
+// Parameters:
+// resourceID - 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 Client) GetByID(ctx context.Context, resourceID string) (result GenericResource, err error) {
+ req, err := client.GetByIDPreparer(ctx, resourceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetByIDSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetByIDResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetByIDPreparer prepares the GetByID request.
+func (client Client) GetByIDPreparer(ctx context.Context, resourceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetByIDSender sends the GetByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) GetByIDSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetByIDResponder handles the response to the GetByID request. The method always
+// closes the http.Response Body.
+func (client Client) GetByIDResponder(resp *http.Response) (result GenericResource, 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 the resources in a subscription.
+// Parameters:
+// filter - the filter to apply on the operation.
+// expand - the $expand query parameter.
+// top - the number of results to return. If null is passed, returns all resource groups.
+func (client Client) List(ctx context.Context, filter string, expand string, top *int32) (result ListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, filter, expand, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.Client", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client Client) ListPreparer(ctx context.Context, filter string, expand string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-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}/resources", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client Client) ListResponder(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
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client Client) listNextResults(lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.Client", "listNextResults", 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, "resources.Client", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client Client) ListComplete(ctx context.Context, filter string, expand string, top *int32) (result ListResultIterator, err error) {
+ result.page, err = client.List(ctx, filter, expand, top)
+ return
+}
+
+// ListByResourceGroup get all the resources for a resource group.
+// Parameters:
+// resourceGroupName - the resource group with the resources to get.
+// filter - the filter to apply on the operation.
+// expand - the $expand query parameter
+// top - the number of results to return. If null is passed, returns all resources.
+func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result ListResultPage, 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.NewError("resources.Client", "ListByResourceGroup", err.Error())
+ }
+
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, filter, expand, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.lr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.Client", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.lr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client Client) ListByResourceGroupPreparer(ctx context.Context, 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 = "2018-05-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{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client Client) 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 Client) listByResourceGroupNextResults(lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.Client", "listByResourceGroupNextResults", 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.Client", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client Client) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result ListResultIterator, err error) {
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, filter, expand, top)
+ 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.
+// Parameters:
+// sourceResourceGroupName - the name of the resource group containing the resources to move.
+// parameters - parameters for moving resources.
+func (client Client) MoveResources(ctx context.Context, sourceResourceGroupName string, parameters MoveInfo) (result MoveResourcesFuture, err error) {
+ 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 {
+ return result, validation.NewError("resources.Client", "MoveResources", err.Error())
+ }
+
+ req, err := client.MoveResourcesPreparer(ctx, sourceResourceGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "MoveResources", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.MoveResourcesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "MoveResources", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// MoveResourcesPreparer prepares the MoveResources request.
+func (client Client) MoveResourcesPreparer(ctx context.Context, sourceResourceGroupName string, parameters MoveInfo) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "sourceResourceGroupName": autorest.Encode("path", sourceResourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// MoveResourcesSender sends the MoveResources request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) MoveResourcesSender(req *http.Request) (future MoveResourcesFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// MoveResourcesResponder handles the response to the MoveResources request. The method always
+// closes the http.Response Body.
+func (client Client) MoveResourcesResponder(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
+}
+
+// Update updates a resource.
+// Parameters:
+// resourceGroupName - the name of the resource group for the resource. The name is case insensitive.
+// resourceProviderNamespace - the namespace of the resource provider.
+// parentResourcePath - the parent resource identity.
+// resourceType - the resource type of the resource to update.
+// resourceName - the name of the resource to update.
+// parameters - parameters for updating the resource.
+func (client Client) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource) (result UpdateFuture, 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.NewError("resources.Client", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "parentResourcePath": parentResourcePath,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "resourceType": resourceType,
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client Client) UpdateResponder(resp *http.Response) (result GenericResource, 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
+}
+
+// UpdateByID updates a resource by ID.
+// Parameters:
+// resourceID - 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 - update resource parameters.
+func (client Client) UpdateByID(ctx context.Context, resourceID string, parameters GenericResource) (result UpdateByIDFuture, err error) {
+ req, err := client.UpdateByIDPreparer(ctx, resourceID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "UpdateByID", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateByIDSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "UpdateByID", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateByIDPreparer prepares the UpdateByID request.
+func (client Client) UpdateByIDPreparer(ctx context.Context, resourceID string, parameters GenericResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateByIDSender sends the UpdateByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) UpdateByIDSender(req *http.Request) (future UpdateByIDFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateByIDResponder handles the response to the UpdateByID request. The method always
+// closes the http.Response Body.
+func (client Client) UpdateByIDResponder(resp *http.Response) (result GenericResource, 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
+}
+
+// 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.
+// Parameters:
+// sourceResourceGroupName - the name of the resource group containing the resources to validate for move.
+// parameters - parameters for moving resources.
+func (client Client) ValidateMoveResources(ctx context.Context, sourceResourceGroupName string, parameters MoveInfo) (result ValidateMoveResourcesFuture, err error) {
+ 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 {
+ return result, validation.NewError("resources.Client", "ValidateMoveResources", err.Error())
+ }
+
+ req, err := client.ValidateMoveResourcesPreparer(ctx, sourceResourceGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "ValidateMoveResources", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ValidateMoveResourcesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "ValidateMoveResources", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ValidateMoveResourcesPreparer prepares the ValidateMoveResources request.
+func (client Client) ValidateMoveResourcesPreparer(ctx context.Context, sourceResourceGroupName string, parameters MoveInfo) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "sourceResourceGroupName": autorest.Encode("path", sourceResourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ 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{}).WithContext(ctx))
+}
+
+// ValidateMoveResourcesSender sends the ValidateMoveResources request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ValidateMoveResourcesSender(req *http.Request) (future ValidateMoveResourcesFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ValidateMoveResourcesResponder handles the response to the ValidateMoveResources request. The method always
+// closes the http.Response Body.
+func (client Client) 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/services/resources/mgmt/2018-05-01/resources/tags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/tags.go
new file mode 100644
index 000000000..cd369fe5f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/tags.go
@@ -0,0 +1,393 @@
+package resources
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// TagsClient is the provides operations for working with resources and resource groups.
+type TagsClient struct {
+ BaseClient
+}
+
+// NewTagsClient creates an instance of the TagsClient client.
+func NewTagsClient(subscriptionID string) TagsClient {
+ return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewTagsClientWithBaseURI creates an instance of the TagsClient client.
+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.
+// Parameters:
+// tagName - the name of the tag to create.
+func (client TagsClient) CreateOrUpdate(ctx context.Context, tagName string) (result TagDetails, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, tagName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client TagsClient) CreateOrUpdatePreparer(ctx context.Context, tagName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tagName": autorest.Encode("path", tagName),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames/{tagName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client TagsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client TagsClient) CreateOrUpdateResponder(resp *http.Response) (result TagDetails, 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
+}
+
+// CreateOrUpdateValue creates a tag value. The name of the tag must already exist.
+// Parameters:
+// tagName - the name of the tag.
+// tagValue - the value of the tag to create.
+func (client TagsClient) CreateOrUpdateValue(ctx context.Context, tagName string, tagValue string) (result TagValue, err error) {
+ req, err := client.CreateOrUpdateValuePreparer(ctx, tagName, tagValue)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdateValue", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateValueSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdateValue", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateValueResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdateValue", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdateValuePreparer prepares the CreateOrUpdateValue request.
+func (client TagsClient) CreateOrUpdateValuePreparer(ctx context.Context, tagName string, tagValue string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tagName": autorest.Encode("path", tagName),
+ "tagValue": autorest.Encode("path", tagValue),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateValueSender sends the CreateOrUpdateValue request. The method will close the
+// http.Response Body if it receives an error.
+func (client TagsClient) CreateOrUpdateValueSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateValueResponder handles the response to the CreateOrUpdateValue request. The method always
+// closes the http.Response Body.
+func (client TagsClient) CreateOrUpdateValueResponder(resp *http.Response) (result TagValue, 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 you must remove all values from a resource tag before you can delete it.
+// Parameters:
+// tagName - the name of the tag.
+func (client TagsClient) Delete(ctx context.Context, tagName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, tagName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client TagsClient) DeletePreparer(ctx context.Context, tagName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tagName": autorest.Encode("path", tagName),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames/{tagName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client TagsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client TagsClient) 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
+}
+
+// DeleteValue deletes a tag value.
+// Parameters:
+// tagName - the name of the tag.
+// tagValue - the value of the tag to delete.
+func (client TagsClient) DeleteValue(ctx context.Context, tagName string, tagValue string) (result autorest.Response, err error) {
+ req, err := client.DeleteValuePreparer(ctx, tagName, tagValue)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "DeleteValue", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteValueSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "DeleteValue", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteValueResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "DeleteValue", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteValuePreparer prepares the DeleteValue request.
+func (client TagsClient) DeleteValuePreparer(ctx context.Context, tagName string, tagValue string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tagName": autorest.Encode("path", tagName),
+ "tagValue": autorest.Encode("path", tagValue),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteValueSender sends the DeleteValue request. The method will close the
+// http.Response Body if it receives an error.
+func (client TagsClient) DeleteValueSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteValueResponder handles the response to the DeleteValue request. The method always
+// closes the http.Response Body.
+func (client TagsClient) DeleteValueResponder(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
+}
+
+// List gets the names and values of all resource tags that are defined in a subscription.
+func (client TagsClient) List(ctx context.Context) (result TagsListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.tlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.tlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client TagsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-05-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client TagsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client TagsClient) ListResponder(resp *http.Response) (result TagsListResult, 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 TagsClient) listNextResults(lastResults TagsListResult) (result TagsListResult, err error) {
+ req, err := lastResults.tagsListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.TagsClient", "listNextResults", 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, "resources.TagsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client TagsClient) ListComplete(ctx context.Context) (result TagsListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/version.go
new file mode 100644
index 000000000..0664b564c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/version.go
@@ -0,0 +1,30 @@
+package resources
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " resources/2018-05-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/applicationdefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/applicationdefinitions.go
new file mode 100644
index 000000000..12abd9322
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/applicationdefinitions.go
@@ -0,0 +1,604 @@
+package managedapplications
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// ApplicationDefinitionsClient is the ARM applications
+type ApplicationDefinitionsClient struct {
+ BaseClient
+}
+
+// NewApplicationDefinitionsClient creates an instance of the ApplicationDefinitionsClient client.
+func NewApplicationDefinitionsClient(subscriptionID string) ApplicationDefinitionsClient {
+ return NewApplicationDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewApplicationDefinitionsClientWithBaseURI creates an instance of the ApplicationDefinitionsClient client.
+func NewApplicationDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationDefinitionsClient {
+ return ApplicationDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates a new managed application definition.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// applicationDefinitionName - the name of the managed application definition.
+// parameters - parameters supplied to the create or update an managed application definition.
+func (client ApplicationDefinitionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters ApplicationDefinition) (result ApplicationDefinitionsCreateOrUpdateFuture, 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: applicationDefinitionName,
+ Constraints: []validation.Constraint{{Target: "applicationDefinitionName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "applicationDefinitionName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties.Authorizations", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, applicationDefinitionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ApplicationDefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters ApplicationDefinition) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationDefinitionName": autorest.Encode("path", applicationDefinitionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationDefinitionsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationDefinitionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ApplicationDefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result ApplicationDefinition, 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
+}
+
+// CreateOrUpdateByID creates a new managed application definition.
+// Parameters:
+// applicationDefinitionID - the fully qualified ID of the managed application definition, including the
+// managed application name and the managed application definition resource type. Use the format,
+// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
+// parameters - parameters supplied to the create or update a managed application definition.
+func (client ApplicationDefinitionsClient) CreateOrUpdateByID(ctx context.Context, applicationDefinitionID string, parameters ApplicationDefinition) (result ApplicationDefinitionsCreateOrUpdateByIDFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties.Authorizations", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "CreateOrUpdateByID", err.Error())
+ }
+
+ req, err := client.CreateOrUpdateByIDPreparer(ctx, applicationDefinitionID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "CreateOrUpdateByID", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateByIDSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "CreateOrUpdateByID", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdateByIDPreparer prepares the CreateOrUpdateByID request.
+func (client ApplicationDefinitionsClient) CreateOrUpdateByIDPreparer(ctx context.Context, applicationDefinitionID string, parameters ApplicationDefinition) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationDefinitionId": applicationDefinitionID,
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{applicationDefinitionId}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationDefinitionsClient) CreateOrUpdateByIDSender(req *http.Request) (future ApplicationDefinitionsCreateOrUpdateByIDFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateByIDResponder handles the response to the CreateOrUpdateByID request. The method always
+// closes the http.Response Body.
+func (client ApplicationDefinitionsClient) CreateOrUpdateByIDResponder(resp *http.Response) (result ApplicationDefinition, 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 the managed application definition.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// applicationDefinitionName - the name of the managed application definition to delete.
+func (client ApplicationDefinitionsClient) Delete(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result ApplicationDefinitionsDeleteFuture, 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: applicationDefinitionName,
+ Constraints: []validation.Constraint{{Target: "applicationDefinitionName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "applicationDefinitionName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, applicationDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ApplicationDefinitionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationDefinitionName": autorest.Encode("path", applicationDefinitionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.Solutions/applicationDefinitions/{applicationDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationDefinitionsClient) DeleteSender(req *http.Request) (future ApplicationDefinitionsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ApplicationDefinitionsClient) 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
+}
+
+// DeleteByID deletes the managed application definition.
+// Parameters:
+// applicationDefinitionID - the fully qualified ID of the managed application definition, including the
+// managed application name and the managed application definition resource type. Use the format,
+// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
+func (client ApplicationDefinitionsClient) DeleteByID(ctx context.Context, applicationDefinitionID string) (result ApplicationDefinitionsDeleteByIDFuture, err error) {
+ req, err := client.DeleteByIDPreparer(ctx, applicationDefinitionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "DeleteByID", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteByIDSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "DeleteByID", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeleteByIDPreparer prepares the DeleteByID request.
+func (client ApplicationDefinitionsClient) DeleteByIDPreparer(ctx context.Context, applicationDefinitionID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationDefinitionId": applicationDefinitionID,
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{applicationDefinitionId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteByIDSender sends the DeleteByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationDefinitionsClient) DeleteByIDSender(req *http.Request) (future ApplicationDefinitionsDeleteByIDFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteByIDResponder handles the response to the DeleteByID request. The method always
+// closes the http.Response Body.
+func (client ApplicationDefinitionsClient) DeleteByIDResponder(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 managed application definition.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// applicationDefinitionName - the name of the managed application definition.
+func (client ApplicationDefinitionsClient) Get(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result ApplicationDefinition, 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: applicationDefinitionName,
+ Constraints: []validation.Constraint{{Target: "applicationDefinitionName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "applicationDefinitionName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, applicationDefinitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ApplicationDefinitionsClient) GetPreparer(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationDefinitionName": autorest.Encode("path", applicationDefinitionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.Solutions/applicationDefinitions/{applicationDefinitionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationDefinitionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ApplicationDefinitionsClient) GetResponder(resp *http.Response) (result ApplicationDefinition, 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
+}
+
+// GetByID gets the managed application definition.
+// Parameters:
+// applicationDefinitionID - the fully qualified ID of the managed application definition, including the
+// managed application name and the managed application definition resource type. Use the format,
+// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
+func (client ApplicationDefinitionsClient) GetByID(ctx context.Context, applicationDefinitionID string) (result ApplicationDefinition, err error) {
+ req, err := client.GetByIDPreparer(ctx, applicationDefinitionID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "GetByID", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetByIDSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "GetByID", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetByIDResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "GetByID", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetByIDPreparer prepares the GetByID request.
+func (client ApplicationDefinitionsClient) GetByIDPreparer(ctx context.Context, applicationDefinitionID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationDefinitionId": applicationDefinitionID,
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{applicationDefinitionId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetByIDSender sends the GetByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationDefinitionsClient) GetByIDSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetByIDResponder handles the response to the GetByID request. The method always
+// closes the http.Response Body.
+func (client ApplicationDefinitionsClient) GetByIDResponder(resp *http.Response) (result ApplicationDefinition, 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 lists the managed application definitions in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+func (client ApplicationDefinitionsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ApplicationDefinitionListResultPage, 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.NewError("managedapplications.ApplicationDefinitionsClient", "ListByResourceGroup", err.Error())
+ }
+
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.adlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.adlr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ApplicationDefinitionsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.Solutions/applicationDefinitions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationDefinitionsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client ApplicationDefinitionsClient) ListByResourceGroupResponder(resp *http.Response) (result ApplicationDefinitionListResult, 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 ApplicationDefinitionsClient) listByResourceGroupNextResults(lastResults ApplicationDefinitionListResult) (result ApplicationDefinitionListResult, err error) {
+ req, err := lastResults.applicationDefinitionListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "listByResourceGroupNextResults", 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, "managedapplications.ApplicationDefinitionsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ApplicationDefinitionsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ApplicationDefinitionListResultIterator, err error) {
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/applications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/applications.go
new file mode 100644
index 000000000..bac1fdfed
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/applications.go
@@ -0,0 +1,867 @@
+package managedapplications
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// ApplicationsClient is the ARM applications
+type ApplicationsClient struct {
+ BaseClient
+}
+
+// NewApplicationsClient creates an instance of the ApplicationsClient client.
+func NewApplicationsClient(subscriptionID string) ApplicationsClient {
+ return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client.
+func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient {
+ return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates a new managed application.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// applicationName - the name of the managed application.
+// parameters - parameters supplied to the create or update a managed application.
+func (client ApplicationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationName string, parameters Application) (result ApplicationsCreateOrUpdateFuture, 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: applicationName,
+ Constraints: []validation.Constraint{{Target: "applicationName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "applicationName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ApplicationProperties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ApplicationProperties.ManagedResourceGroupID", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.Plan", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Plan.Name", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.Plan.Publisher", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.Plan.Product", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.Plan.Version", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "parameters.Kind", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Pattern, Rule: `^[-\w\._,\(\)]+$`, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("managedapplications.ApplicationsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, applicationName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ApplicationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, applicationName string, parameters Application) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationName": autorest.Encode("path", applicationName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) CreateOrUpdateResponder(resp *http.Response) (result Application, 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
+}
+
+// CreateOrUpdateByID creates a new managed application.
+// Parameters:
+// applicationID - the fully qualified ID of the managed application, including the managed application name
+// and the managed application resource type. Use the format,
+// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
+// parameters - parameters supplied to the create or update a managed application.
+func (client ApplicationsClient) CreateOrUpdateByID(ctx context.Context, applicationID string, parameters Application) (result ApplicationsCreateOrUpdateByIDFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ApplicationProperties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ApplicationProperties.ManagedResourceGroupID", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.Plan", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Plan.Name", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.Plan.Publisher", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.Plan.Product", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.Plan.Version", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "parameters.Kind", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Pattern, Rule: `^[-\w\._,\(\)]+$`, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("managedapplications.ApplicationsClient", "CreateOrUpdateByID", err.Error())
+ }
+
+ req, err := client.CreateOrUpdateByIDPreparer(ctx, applicationID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "CreateOrUpdateByID", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateByIDSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "CreateOrUpdateByID", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdateByIDPreparer prepares the CreateOrUpdateByID request.
+func (client ApplicationsClient) CreateOrUpdateByIDPreparer(ctx context.Context, applicationID string, parameters Application) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationId": applicationID,
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{applicationId}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) CreateOrUpdateByIDSender(req *http.Request) (future ApplicationsCreateOrUpdateByIDFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateByIDResponder handles the response to the CreateOrUpdateByID request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) CreateOrUpdateByIDResponder(resp *http.Response) (result Application, 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 the managed application.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// applicationName - the name of the managed application.
+func (client ApplicationsClient) Delete(ctx context.Context, resourceGroupName string, applicationName string) (result ApplicationsDeleteFuture, 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: applicationName,
+ Constraints: []validation.Constraint{{Target: "applicationName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "applicationName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("managedapplications.ApplicationsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, applicationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ApplicationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, applicationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationName": autorest.Encode("path", applicationName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.Solutions/applications/{applicationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) DeleteSender(req *http.Request) (future ApplicationsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) 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
+}
+
+// DeleteByID deletes the managed application.
+// Parameters:
+// applicationID - the fully qualified ID of the managed application, including the managed application name
+// and the managed application resource type. Use the format,
+// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
+func (client ApplicationsClient) DeleteByID(ctx context.Context, applicationID string) (result ApplicationsDeleteByIDFuture, err error) {
+ req, err := client.DeleteByIDPreparer(ctx, applicationID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "DeleteByID", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteByIDSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "DeleteByID", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeleteByIDPreparer prepares the DeleteByID request.
+func (client ApplicationsClient) DeleteByIDPreparer(ctx context.Context, applicationID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationId": applicationID,
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{applicationId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteByIDSender sends the DeleteByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) DeleteByIDSender(req *http.Request) (future ApplicationsDeleteByIDFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteByIDResponder handles the response to the DeleteByID request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) DeleteByIDResponder(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 managed application.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// applicationName - the name of the managed application.
+func (client ApplicationsClient) Get(ctx context.Context, resourceGroupName string, applicationName string) (result Application, 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: applicationName,
+ Constraints: []validation.Constraint{{Target: "applicationName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "applicationName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("managedapplications.ApplicationsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, applicationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ApplicationsClient) GetPreparer(ctx context.Context, resourceGroupName string, applicationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationName": autorest.Encode("path", applicationName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.Solutions/applications/{applicationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) GetResponder(resp *http.Response) (result Application, 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
+}
+
+// GetByID gets the managed application.
+// Parameters:
+// applicationID - the fully qualified ID of the managed application, including the managed application name
+// and the managed application resource type. Use the format,
+// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
+func (client ApplicationsClient) GetByID(ctx context.Context, applicationID string) (result Application, err error) {
+ req, err := client.GetByIDPreparer(ctx, applicationID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "GetByID", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetByIDSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "GetByID", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetByIDResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "GetByID", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetByIDPreparer prepares the GetByID request.
+func (client ApplicationsClient) GetByIDPreparer(ctx context.Context, applicationID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationId": applicationID,
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{applicationId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetByIDSender sends the GetByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) GetByIDSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetByIDResponder handles the response to the GetByID request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) GetByIDResponder(resp *http.Response) (result Application, 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 the applications within a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+func (client ApplicationsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ApplicationListResultPage, 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.NewError("managedapplications.ApplicationsClient", "ListByResourceGroup", err.Error())
+ }
+
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.alr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.alr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ApplicationsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-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.Solutions/applications", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) ListByResourceGroupResponder(resp *http.Response) (result ApplicationListResult, 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 ApplicationsClient) listByResourceGroupNextResults(lastResults ApplicationListResult) (result ApplicationListResult, err error) {
+ req, err := lastResults.applicationListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "listByResourceGroupNextResults", 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, "managedapplications.ApplicationsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ApplicationsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ApplicationListResultIterator, err error) {
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListBySubscription gets all the applications within a subscription.
+func (client ApplicationsClient) ListBySubscription(ctx context.Context) (result ApplicationListResultPage, err error) {
+ result.fn = client.listBySubscriptionNextResults
+ req, err := client.ListBySubscriptionPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.alr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result.alr, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "ListBySubscription", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client ApplicationsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Solutions/applications", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) ListBySubscriptionResponder(resp *http.Response) (result ApplicationListResult, 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 ApplicationsClient) listBySubscriptionNextResults(lastResults ApplicationListResult) (result ApplicationListResult, err error) {
+ req, err := lastResults.applicationListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "listBySubscriptionNextResults", 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, "managedapplications.ApplicationsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ApplicationsClient) ListBySubscriptionComplete(ctx context.Context) (result ApplicationListResultIterator, err error) {
+ result.page, err = client.ListBySubscription(ctx)
+ return
+}
+
+// Update updates an existing managed application. The only value that can be updated via PATCH currently is the tags.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// applicationName - the name of the managed application.
+// parameters - parameters supplied to update an existing managed application.
+func (client ApplicationsClient) Update(ctx context.Context, resourceGroupName string, applicationName string, parameters *Application) (result Application, 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: applicationName,
+ Constraints: []validation.Constraint{{Target: "applicationName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "applicationName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("managedapplications.ApplicationsClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, applicationName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client ApplicationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, applicationName string, parameters *Application) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationName": autorest.Encode("path", applicationName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) UpdateResponder(resp *http.Response) (result Application, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateByID updates an existing managed application. The only value that can be updated via PATCH currently is the
+// tags.
+// Parameters:
+// applicationID - the fully qualified ID of the managed application, including the managed application name
+// and the managed application resource type. Use the format,
+// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
+// parameters - parameters supplied to update an existing managed application.
+func (client ApplicationsClient) UpdateByID(ctx context.Context, applicationID string, parameters *Application) (result Application, err error) {
+ req, err := client.UpdateByIDPreparer(ctx, applicationID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "UpdateByID", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateByIDSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "UpdateByID", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateByIDResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "UpdateByID", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdateByIDPreparer prepares the UpdateByID request.
+func (client ApplicationsClient) UpdateByIDPreparer(ctx context.Context, applicationID string, parameters *Application) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationId": applicationID,
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{applicationId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateByIDSender sends the UpdateByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) UpdateByIDSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateByIDResponder handles the response to the UpdateByID request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) UpdateByIDResponder(resp *http.Response) (result Application, 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/services/resources/mgmt/2018-06-01/managedapplications/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/client.go
new file mode 100644
index 000000000..5ba727777
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/client.go
@@ -0,0 +1,51 @@
+// Package managedapplications implements the Azure ARM Managedapplications service API version 2018-06-01.
+//
+// ARM applications
+package managedapplications
+
+// 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 Managedapplications
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Managedapplications.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/models.go
new file mode 100644
index 000000000..4500cab6f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/models.go
@@ -0,0 +1,1244 @@
+package managedapplications
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/to"
+ "net/http"
+)
+
+// ApplicationArtifactType enumerates the values for application artifact type.
+type ApplicationArtifactType string
+
+const (
+ // Custom ...
+ Custom ApplicationArtifactType = "Custom"
+ // Template ...
+ Template ApplicationArtifactType = "Template"
+)
+
+// PossibleApplicationArtifactTypeValues returns an array of possible values for the ApplicationArtifactType const type.
+func PossibleApplicationArtifactTypeValues() []ApplicationArtifactType {
+ return []ApplicationArtifactType{Custom, Template}
+}
+
+// ApplicationLockLevel enumerates the values for application lock level.
+type ApplicationLockLevel string
+
+const (
+ // CanNotDelete ...
+ CanNotDelete ApplicationLockLevel = "CanNotDelete"
+ // None ...
+ None ApplicationLockLevel = "None"
+ // ReadOnly ...
+ ReadOnly ApplicationLockLevel = "ReadOnly"
+)
+
+// PossibleApplicationLockLevelValues returns an array of possible values for the ApplicationLockLevel const type.
+func PossibleApplicationLockLevelValues() []ApplicationLockLevel {
+ return []ApplicationLockLevel{CanNotDelete, None, ReadOnly}
+}
+
+// ProvisioningState enumerates the values for provisioning state.
+type ProvisioningState string
+
+const (
+ // Accepted ...
+ Accepted ProvisioningState = "Accepted"
+ // Canceled ...
+ Canceled ProvisioningState = "Canceled"
+ // Created ...
+ Created ProvisioningState = "Created"
+ // Creating ...
+ Creating ProvisioningState = "Creating"
+ // Deleted ...
+ Deleted ProvisioningState = "Deleted"
+ // Deleting ...
+ Deleting ProvisioningState = "Deleting"
+ // Failed ...
+ Failed ProvisioningState = "Failed"
+ // Ready ...
+ Ready ProvisioningState = "Ready"
+ // Running ...
+ Running ProvisioningState = "Running"
+ // Succeeded ...
+ Succeeded ProvisioningState = "Succeeded"
+ // Updating ...
+ Updating ProvisioningState = "Updating"
+)
+
+// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
+func PossibleProvisioningStateValues() []ProvisioningState {
+ return []ProvisioningState{Accepted, Canceled, Created, Creating, Deleted, Deleting, Failed, Ready, Running, Succeeded, Updating}
+}
+
+// ResourceIdentityType enumerates the values for resource identity type.
+type ResourceIdentityType string
+
+const (
+ // SystemAssigned ...
+ SystemAssigned ResourceIdentityType = "SystemAssigned"
+)
+
+// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type.
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return []ResourceIdentityType{SystemAssigned}
+}
+
+// Application information about managed application.
+type Application struct {
+ autorest.Response `json:"-"`
+ // ApplicationProperties - The managed application properties.
+ *ApplicationProperties `json:"properties,omitempty"`
+ // Plan - The plan information.
+ Plan *Plan `json:"plan,omitempty"`
+ // Kind - The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog.
+ Kind *string `json:"kind,omitempty"`
+ // ManagedBy - ID of the resource that manages this resource.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ // Sku - The SKU of the resource.
+ Sku *Sku `json:"sku,omitempty"`
+ // Identity - The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // ID - Resource ID
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Application.
+func (a Application) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if a.ApplicationProperties != nil {
+ objectMap["properties"] = a.ApplicationProperties
+ }
+ if a.Plan != nil {
+ objectMap["plan"] = a.Plan
+ }
+ if a.Kind != nil {
+ objectMap["kind"] = a.Kind
+ }
+ if a.ManagedBy != nil {
+ objectMap["managedBy"] = a.ManagedBy
+ }
+ if a.Sku != nil {
+ objectMap["sku"] = a.Sku
+ }
+ if a.Identity != nil {
+ objectMap["identity"] = a.Identity
+ }
+ if a.ID != nil {
+ objectMap["id"] = a.ID
+ }
+ if a.Name != nil {
+ objectMap["name"] = a.Name
+ }
+ if a.Type != nil {
+ objectMap["type"] = a.Type
+ }
+ if a.Location != nil {
+ objectMap["location"] = a.Location
+ }
+ if a.Tags != nil {
+ objectMap["tags"] = a.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Application struct.
+func (a *Application) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationProperties ApplicationProperties
+ err = json.Unmarshal(*v, &applicationProperties)
+ if err != nil {
+ return err
+ }
+ a.ApplicationProperties = &applicationProperties
+ }
+ case "plan":
+ if v != nil {
+ var plan Plan
+ err = json.Unmarshal(*v, &plan)
+ if err != nil {
+ return err
+ }
+ a.Plan = &plan
+ }
+ case "kind":
+ if v != nil {
+ var kind string
+ err = json.Unmarshal(*v, &kind)
+ if err != nil {
+ return err
+ }
+ a.Kind = &kind
+ }
+ case "managedBy":
+ if v != nil {
+ var managedBy string
+ err = json.Unmarshal(*v, &managedBy)
+ if err != nil {
+ return err
+ }
+ a.ManagedBy = &managedBy
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ a.Sku = &sku
+ }
+ case "identity":
+ if v != nil {
+ var identity Identity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ a.Identity = &identity
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ a.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ a.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ a.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ a.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ a.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationArtifact managed application artifact.
+type ApplicationArtifact struct {
+ // Name - The managed application artifact name.
+ Name *string `json:"name,omitempty"`
+ // URI - The managed application artifact blob uri.
+ URI *string `json:"uri,omitempty"`
+ // Type - The managed application artifact type. Possible values include: 'Template', 'Custom'
+ Type ApplicationArtifactType `json:"type,omitempty"`
+}
+
+// ApplicationDefinition information about managed application definition.
+type ApplicationDefinition struct {
+ autorest.Response `json:"-"`
+ // ApplicationDefinitionProperties - The managed application definition properties.
+ *ApplicationDefinitionProperties `json:"properties,omitempty"`
+ // ManagedBy - ID of the resource that manages this resource.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ // Sku - The SKU of the resource.
+ Sku *Sku `json:"sku,omitempty"`
+ // Identity - The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // ID - Resource ID
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationDefinition.
+func (ad ApplicationDefinition) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ad.ApplicationDefinitionProperties != nil {
+ objectMap["properties"] = ad.ApplicationDefinitionProperties
+ }
+ if ad.ManagedBy != nil {
+ objectMap["managedBy"] = ad.ManagedBy
+ }
+ if ad.Sku != nil {
+ objectMap["sku"] = ad.Sku
+ }
+ if ad.Identity != nil {
+ objectMap["identity"] = ad.Identity
+ }
+ if ad.ID != nil {
+ objectMap["id"] = ad.ID
+ }
+ if ad.Name != nil {
+ objectMap["name"] = ad.Name
+ }
+ if ad.Type != nil {
+ objectMap["type"] = ad.Type
+ }
+ if ad.Location != nil {
+ objectMap["location"] = ad.Location
+ }
+ if ad.Tags != nil {
+ objectMap["tags"] = ad.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationDefinition struct.
+func (ad *ApplicationDefinition) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationDefinitionProperties ApplicationDefinitionProperties
+ err = json.Unmarshal(*v, &applicationDefinitionProperties)
+ if err != nil {
+ return err
+ }
+ ad.ApplicationDefinitionProperties = &applicationDefinitionProperties
+ }
+ case "managedBy":
+ if v != nil {
+ var managedBy string
+ err = json.Unmarshal(*v, &managedBy)
+ if err != nil {
+ return err
+ }
+ ad.ManagedBy = &managedBy
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ ad.Sku = &sku
+ }
+ case "identity":
+ if v != nil {
+ var identity Identity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ ad.Identity = &identity
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ad.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ad.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ad.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ ad.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ad.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationDefinitionListResult list of managed application definitions.
+type ApplicationDefinitionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The array of managed application definitions.
+ Value *[]ApplicationDefinition `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ApplicationDefinitionListResultIterator provides access to a complete listing of ApplicationDefinition values.
+type ApplicationDefinitionListResultIterator struct {
+ i int
+ page ApplicationDefinitionListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ApplicationDefinitionListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ApplicationDefinitionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ApplicationDefinitionListResultIterator) Response() ApplicationDefinitionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ApplicationDefinitionListResultIterator) Value() ApplicationDefinition {
+ if !iter.page.NotDone() {
+ return ApplicationDefinition{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (adlr ApplicationDefinitionListResult) IsEmpty() bool {
+ return adlr.Value == nil || len(*adlr.Value) == 0
+}
+
+// applicationDefinitionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (adlr ApplicationDefinitionListResult) applicationDefinitionListResultPreparer() (*http.Request, error) {
+ if adlr.NextLink == nil || len(to.String(adlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(adlr.NextLink)))
+}
+
+// ApplicationDefinitionListResultPage contains a page of ApplicationDefinition values.
+type ApplicationDefinitionListResultPage struct {
+ fn func(ApplicationDefinitionListResult) (ApplicationDefinitionListResult, error)
+ adlr ApplicationDefinitionListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ApplicationDefinitionListResultPage) Next() error {
+ next, err := page.fn(page.adlr)
+ if err != nil {
+ return err
+ }
+ page.adlr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ApplicationDefinitionListResultPage) NotDone() bool {
+ return !page.adlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ApplicationDefinitionListResultPage) Response() ApplicationDefinitionListResult {
+ return page.adlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ApplicationDefinitionListResultPage) Values() []ApplicationDefinition {
+ if page.adlr.IsEmpty() {
+ return nil
+ }
+ return *page.adlr.Value
+}
+
+// ApplicationDefinitionProperties the managed application definition properties.
+type ApplicationDefinitionProperties struct {
+ // LockLevel - The managed application lock level. Possible values include: 'CanNotDelete', 'ReadOnly', 'None'
+ LockLevel ApplicationLockLevel `json:"lockLevel,omitempty"`
+ // DisplayName - The managed application definition display name.
+ DisplayName *string `json:"displayName,omitempty"`
+ // IsEnabled - A value indicating whether the package is enabled or not.
+ IsEnabled *string `json:"isEnabled,omitempty"`
+ // Authorizations - The managed application provider authorizations.
+ Authorizations *[]ApplicationProviderAuthorization `json:"authorizations,omitempty"`
+ // Artifacts - The collection of managed application artifacts. The portal will use the files specified as artifacts to construct the user experience of creating a managed application from a managed application definition.
+ Artifacts *[]ApplicationArtifact `json:"artifacts,omitempty"`
+ // Description - The managed application definition description.
+ Description *string `json:"description,omitempty"`
+ // PackageFileURI - The managed application definition package file Uri. Use this element
+ PackageFileURI *string `json:"packageFileUri,omitempty"`
+ // MainTemplate - The inline main template json which has resources to be provisioned. It can be a JObject or well-formed JSON string.
+ MainTemplate interface{} `json:"mainTemplate,omitempty"`
+ // CreateUIDefinition - The createUiDefinition json for the backing template with Microsoft.Solutions/applications resource. It can be a JObject or well-formed JSON string.
+ CreateUIDefinition interface{} `json:"createUiDefinition,omitempty"`
+}
+
+// ApplicationDefinitionsCreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ApplicationDefinitionsCreateOrUpdateByIDFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationDefinitionsCreateOrUpdateByIDFuture) Result(client ApplicationDefinitionsClient) (ad ApplicationDefinition, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ad.Response.Response, err = future.GetResult(sender); err == nil && ad.Response.Response.StatusCode != http.StatusNoContent {
+ ad, err = client.CreateOrUpdateByIDResponder(ad.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture", "Result", ad.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ApplicationDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ApplicationDefinitionsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationDefinitionsCreateOrUpdateFuture) Result(client ApplicationDefinitionsClient) (ad ApplicationDefinition, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ad.Response.Response, err = future.GetResult(sender); err == nil && ad.Response.Response.StatusCode != http.StatusNoContent {
+ ad, err = client.CreateOrUpdateResponder(ad.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateFuture", "Result", ad.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ApplicationDefinitionsDeleteByIDFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ApplicationDefinitionsDeleteByIDFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationDefinitionsDeleteByIDFuture) Result(client ApplicationDefinitionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsDeleteByIDFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsDeleteByIDFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ApplicationDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ApplicationDefinitionsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationDefinitionsDeleteFuture) Result(client ApplicationDefinitionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ApplicationListResult list of managed applications.
+type ApplicationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The array of managed applications.
+ Value *[]Application `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ApplicationListResultIterator provides access to a complete listing of Application values.
+type ApplicationListResultIterator struct {
+ i int
+ page ApplicationListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ApplicationListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ApplicationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ApplicationListResultIterator) Response() ApplicationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ApplicationListResultIterator) Value() Application {
+ if !iter.page.NotDone() {
+ return Application{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (alr ApplicationListResult) IsEmpty() bool {
+ return alr.Value == nil || len(*alr.Value) == 0
+}
+
+// applicationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (alr ApplicationListResult) applicationListResultPreparer() (*http.Request, error) {
+ if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(alr.NextLink)))
+}
+
+// ApplicationListResultPage contains a page of Application values.
+type ApplicationListResultPage struct {
+ fn func(ApplicationListResult) (ApplicationListResult, error)
+ alr ApplicationListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ApplicationListResultPage) Next() error {
+ next, err := page.fn(page.alr)
+ if err != nil {
+ return err
+ }
+ page.alr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ApplicationListResultPage) NotDone() bool {
+ return !page.alr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ApplicationListResultPage) Response() ApplicationListResult {
+ return page.alr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ApplicationListResultPage) Values() []Application {
+ if page.alr.IsEmpty() {
+ return nil
+ }
+ return *page.alr.Value
+}
+
+// ApplicationPatchable information about managed application.
+type ApplicationPatchable struct {
+ // ApplicationPropertiesPatchable - The managed application properties.
+ *ApplicationPropertiesPatchable `json:"properties,omitempty"`
+ // Plan - The plan information.
+ Plan *PlanPatchable `json:"plan,omitempty"`
+ // Kind - The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog.
+ Kind *string `json:"kind,omitempty"`
+ // ManagedBy - ID of the resource that manages this resource.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ // Sku - The SKU of the resource.
+ Sku *Sku `json:"sku,omitempty"`
+ // Identity - The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // ID - Resource ID
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationPatchable.
+func (ap ApplicationPatchable) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ap.ApplicationPropertiesPatchable != nil {
+ objectMap["properties"] = ap.ApplicationPropertiesPatchable
+ }
+ if ap.Plan != nil {
+ objectMap["plan"] = ap.Plan
+ }
+ if ap.Kind != nil {
+ objectMap["kind"] = ap.Kind
+ }
+ if ap.ManagedBy != nil {
+ objectMap["managedBy"] = ap.ManagedBy
+ }
+ if ap.Sku != nil {
+ objectMap["sku"] = ap.Sku
+ }
+ if ap.Identity != nil {
+ objectMap["identity"] = ap.Identity
+ }
+ if ap.ID != nil {
+ objectMap["id"] = ap.ID
+ }
+ if ap.Name != nil {
+ objectMap["name"] = ap.Name
+ }
+ if ap.Type != nil {
+ objectMap["type"] = ap.Type
+ }
+ if ap.Location != nil {
+ objectMap["location"] = ap.Location
+ }
+ if ap.Tags != nil {
+ objectMap["tags"] = ap.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationPatchable struct.
+func (ap *ApplicationPatchable) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationPropertiesPatchable ApplicationPropertiesPatchable
+ err = json.Unmarshal(*v, &applicationPropertiesPatchable)
+ if err != nil {
+ return err
+ }
+ ap.ApplicationPropertiesPatchable = &applicationPropertiesPatchable
+ }
+ case "plan":
+ if v != nil {
+ var plan PlanPatchable
+ err = json.Unmarshal(*v, &plan)
+ if err != nil {
+ return err
+ }
+ ap.Plan = &plan
+ }
+ case "kind":
+ if v != nil {
+ var kind string
+ err = json.Unmarshal(*v, &kind)
+ if err != nil {
+ return err
+ }
+ ap.Kind = &kind
+ }
+ case "managedBy":
+ if v != nil {
+ var managedBy string
+ err = json.Unmarshal(*v, &managedBy)
+ if err != nil {
+ return err
+ }
+ ap.ManagedBy = &managedBy
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ ap.Sku = &sku
+ }
+ case "identity":
+ if v != nil {
+ var identity Identity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ ap.Identity = &identity
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ap.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ap.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ap.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ ap.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ap.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationProperties the managed application properties.
+type ApplicationProperties struct {
+ // ManagedResourceGroupID - The managed resource group Id.
+ ManagedResourceGroupID *string `json:"managedResourceGroupId,omitempty"`
+ // ApplicationDefinitionID - The fully qualified path of managed application definition Id.
+ ApplicationDefinitionID *string `json:"applicationDefinitionId,omitempty"`
+ // Parameters - Name and value pairs that define the managed application parameters. It can be a JObject or a well formed JSON string.
+ Parameters interface{} `json:"parameters,omitempty"`
+ // Outputs - Name and value pairs that define the managed application outputs.
+ Outputs interface{} `json:"outputs,omitempty"`
+ // ProvisioningState - The managed application provisioning state. Possible values include: 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+}
+
+// ApplicationPropertiesPatchable the managed application properties.
+type ApplicationPropertiesPatchable struct {
+ // ManagedResourceGroupID - The managed resource group Id.
+ ManagedResourceGroupID *string `json:"managedResourceGroupId,omitempty"`
+ // ApplicationDefinitionID - The fully qualified path of managed application definition Id.
+ ApplicationDefinitionID *string `json:"applicationDefinitionId,omitempty"`
+ // Parameters - Name and value pairs that define the managed application parameters. It can be a JObject or a well formed JSON string.
+ Parameters interface{} `json:"parameters,omitempty"`
+ // Outputs - Name and value pairs that define the managed application outputs.
+ Outputs interface{} `json:"outputs,omitempty"`
+ // ProvisioningState - The managed application provisioning state. Possible values include: 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+}
+
+// ApplicationProviderAuthorization the managed application provider authorization.
+type ApplicationProviderAuthorization struct {
+ // PrincipalID - The provider's principal identifier. This is the identity that the provider will use to call ARM to manage the managed application resources.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // RoleDefinitionID - The provider's role definition identifier. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group.
+ RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
+}
+
+// ApplicationsCreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ApplicationsCreateOrUpdateByIDFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationsCreateOrUpdateByIDFuture) Result(client ApplicationsClient) (a Application, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateByIDFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsCreateOrUpdateByIDFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateOrUpdateByIDResponder(a.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateByIDFuture", "Result", a.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ApplicationsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationsCreateOrUpdateFuture) Result(client ApplicationsClient) (a Application, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateOrUpdateResponder(a.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateFuture", "Result", a.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ApplicationsDeleteByIDFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ApplicationsDeleteByIDFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationsDeleteByIDFuture) Result(client ApplicationsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsDeleteByIDFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsDeleteByIDFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ApplicationsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationsDeleteFuture) Result(client ApplicationsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ErrorResponse error reponse indicates managed application is not able to process the incoming request. The
+// reason is provided in the error message.
+type ErrorResponse struct {
+ // HTTPStatus - Http status code.
+ HTTPStatus *string `json:"httpStatus,omitempty"`
+ // ErrorCode - Error code.
+ ErrorCode *string `json:"errorCode,omitempty"`
+ // ErrorMessage - Error message indicating why the operation failed.
+ ErrorMessage *string `json:"errorMessage,omitempty"`
+}
+
+// GenericResource resource information.
+type GenericResource struct {
+ // ManagedBy - ID of the resource that manages this resource.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ // Sku - The SKU of the resource.
+ Sku *Sku `json:"sku,omitempty"`
+ // Identity - The identity of the resource.
+ Identity *Identity `json:"identity,omitempty"`
+ // ID - Resource ID
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GenericResource.
+func (gr GenericResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gr.ManagedBy != nil {
+ objectMap["managedBy"] = gr.ManagedBy
+ }
+ if gr.Sku != nil {
+ objectMap["sku"] = gr.Sku
+ }
+ if gr.Identity != nil {
+ objectMap["identity"] = gr.Identity
+ }
+ if gr.ID != nil {
+ objectMap["id"] = gr.ID
+ }
+ if gr.Name != nil {
+ objectMap["name"] = gr.Name
+ }
+ if gr.Type != nil {
+ objectMap["type"] = gr.Type
+ }
+ if gr.Location != nil {
+ objectMap["location"] = gr.Location
+ }
+ if gr.Tags != nil {
+ objectMap["tags"] = gr.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// Identity identity for the resource.
+type Identity struct {
+ // PrincipalID - The principal ID of resource identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - The tenant ID of resource.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The identity type. Possible values include: 'SystemAssigned'
+ Type ResourceIdentityType `json:"type,omitempty"`
+}
+
+// Plan plan for the managed application.
+type Plan struct {
+ // Name - The plan name.
+ Name *string `json:"name,omitempty"`
+ // Publisher - The publisher ID.
+ Publisher *string `json:"publisher,omitempty"`
+ // Product - The product code.
+ Product *string `json:"product,omitempty"`
+ // PromotionCode - The promotion code.
+ PromotionCode *string `json:"promotionCode,omitempty"`
+ // Version - The plan's version.
+ Version *string `json:"version,omitempty"`
+}
+
+// PlanPatchable plan for the managed application.
+type PlanPatchable struct {
+ // Name - The plan name.
+ Name *string `json:"name,omitempty"`
+ // Publisher - The publisher ID.
+ Publisher *string `json:"publisher,omitempty"`
+ // Product - The product code.
+ Product *string `json:"product,omitempty"`
+ // PromotionCode - The promotion code.
+ PromotionCode *string `json:"promotionCode,omitempty"`
+ // Version - The plan's version.
+ Version *string `json:"version,omitempty"`
+}
+
+// Resource resource information.
+type Resource struct {
+ // ID - Resource ID
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.ID != nil {
+ objectMap["id"] = r.ID
+ }
+ if r.Name != nil {
+ objectMap["name"] = r.Name
+ }
+ if r.Type != nil {
+ objectMap["type"] = r.Type
+ }
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// Sku SKU for the resource.
+type Sku struct {
+ // Name - The SKU name.
+ Name *string `json:"name,omitempty"`
+ // Tier - The SKU tier.
+ Tier *string `json:"tier,omitempty"`
+ // Size - The SKU size.
+ Size *string `json:"size,omitempty"`
+ // Family - The SKU family.
+ Family *string `json:"family,omitempty"`
+ // Model - The SKU model.
+ Model *string `json:"model,omitempty"`
+ // Capacity - The SKU capacity.
+ Capacity *int32 `json:"capacity,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/version.go
new file mode 100644
index 000000000..6f37b5048
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/version.go
@@ -0,0 +1,30 @@
+package managedapplications
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " managedapplications/2018-06-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler/jobcollections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler/jobcollections.go
index 70ea9c497..69420001a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler/jobcollections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler/jobcollections.go
@@ -153,15 +153,17 @@ func (client JobCollectionsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client JobCollectionsClient) DeleteSender(req *http.Request) (future JobCollectionsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -221,15 +223,17 @@ func (client JobCollectionsClient) DisablePreparer(ctx context.Context, resource
// DisableSender sends the Disable request. The method will close the
// http.Response Body if it receives an error.
func (client JobCollectionsClient) DisableSender(req *http.Request) (future JobCollectionsDisableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -289,15 +293,17 @@ func (client JobCollectionsClient) EnablePreparer(ctx context.Context, resourceG
// EnableSender sends the Enable request. The method will close the
// http.Response Body if it receives an error.
func (client JobCollectionsClient) EnableSender(req *http.Request) (future JobCollectionsEnableFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler/models.go
index 05df9ac07..cdbaa23e2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler/models.go
@@ -760,12 +760,11 @@ type JobCollectionQuota struct {
// JobCollectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobCollectionsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobCollectionsDeleteFuture) Result(client JobCollectionsClient) (ar autorest.Response, err error) {
+func (future *JobCollectionsDeleteFuture) Result(client JobCollectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -773,35 +772,10 @@ func (future JobCollectionsDeleteFuture) Result(client JobCollectionsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("scheduler.JobCollectionsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "scheduler.JobCollectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("scheduler.JobCollectionsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "scheduler.JobCollectionsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "scheduler.JobCollectionsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -809,12 +783,11 @@ func (future JobCollectionsDeleteFuture) Result(client JobCollectionsClient) (ar
// operation.
type JobCollectionsDisableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobCollectionsDisableFuture) Result(client JobCollectionsClient) (ar autorest.Response, err error) {
+func (future *JobCollectionsDisableFuture) Result(client JobCollectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -822,47 +795,21 @@ func (future JobCollectionsDisableFuture) Result(client JobCollectionsClient) (a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("scheduler.JobCollectionsDisableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DisableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "scheduler.JobCollectionsDisableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("scheduler.JobCollectionsDisableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "scheduler.JobCollectionsDisableFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DisableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "scheduler.JobCollectionsDisableFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// JobCollectionsEnableFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobCollectionsEnableFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobCollectionsEnableFuture) Result(client JobCollectionsClient) (ar autorest.Response, err error) {
+func (future *JobCollectionsEnableFuture) Result(client JobCollectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -870,35 +817,10 @@ func (future JobCollectionsEnableFuture) Result(client JobCollectionsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("scheduler.JobCollectionsEnableFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.EnableResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "scheduler.JobCollectionsEnableFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("scheduler.JobCollectionsEnableFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "scheduler.JobCollectionsEnableFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.EnableResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "scheduler.JobCollectionsEnableFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search/models.go
index 15f10f106..69d2976bc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search/models.go
@@ -408,12 +408,11 @@ type ServiceProperties struct {
// operation.
type ServicesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Service, err error) {
+func (future *ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Service, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -421,34 +420,15 @@ func (future ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Serv
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("search.ServicesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "search.ServicesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("search.ServicesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "search.ServicesCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "search.ServicesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "search.ServicesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search/services.go b/vendor/github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search/services.go
index b7f1d5bd3..56ddc928d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search/services.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search/services.go
@@ -195,15 +195,17 @@ func (client ServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// 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) (future ServicesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2015-08-01/servicebus/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2015-08-01/servicebus/models.go
index e4408291d..a3ef2ae79 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2015-08-01/servicebus/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2015-08-01/servicebus/models.go
@@ -558,12 +558,11 @@ func (nr *NamespaceResource) UnmarshalJSON(body []byte) error {
// operation.
type NamespacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (nr NamespaceResource, err error) {
+func (future *NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (nr NamespaceResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -571,34 +570,15 @@ func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (nr
return
}
if !done {
- return nr, azure.NewAsyncOpIncompleteError("servicebus.NamespacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- nr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.NamespacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicebus.NamespacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nr.Response.Response, err = future.GetResult(sender); err == nil && nr.Response.Response.StatusCode != http.StatusNoContent {
+ nr, err = client.CreateOrUpdateResponder(nr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servicebus.NamespacesCreateOrUpdateFuture", "Result", nr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.NamespacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- nr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.NamespacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -606,12 +586,11 @@ func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (nr
// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type NamespacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
+func (future *NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -619,35 +598,10 @@ func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("servicebus.NamespacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.NamespacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicebus.NamespacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.NamespacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.NamespacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2015-08-01/servicebus/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2015-08-01/servicebus/namespaces.go
index a49847686..4b3eed670 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2015-08-01/servicebus/namespaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2015-08-01/servicebus/namespaces.go
@@ -169,15 +169,17 @@ func (client NamespacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) CreateOrUpdateSender(req *http.Request) (future NamespacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -336,15 +338,17 @@ func (client NamespacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) DeleteSender(req *http.Request) (future NamespacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/migrationconfigs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/migrationconfigs.go
index cb865975d..0849340f3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/migrationconfigs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/migrationconfigs.go
@@ -183,15 +183,17 @@ func (client MigrationConfigsClient) CreateAndStartMigrationPreparer(ctx context
// CreateAndStartMigrationSender sends the CreateAndStartMigration request. The method will close the
// http.Response Body if it receives an error.
func (client MigrationConfigsClient) CreateAndStartMigrationSender(req *http.Request) (future MigrationConfigsCreateAndStartMigrationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/models.go
index 11fb5f557..b65c94052 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/models.go
@@ -1018,12 +1018,11 @@ type MigrationConfigPropertiesProperties struct {
// long-running operation.
type MigrationConfigsCreateAndStartMigrationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future MigrationConfigsCreateAndStartMigrationFuture) Result(client MigrationConfigsClient) (mcp MigrationConfigProperties, err error) {
+func (future *MigrationConfigsCreateAndStartMigrationFuture) Result(client MigrationConfigsClient) (mcp MigrationConfigProperties, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1031,34 +1030,15 @@ func (future MigrationConfigsCreateAndStartMigrationFuture) Result(client Migrat
return
}
if !done {
- return mcp, azure.NewAsyncOpIncompleteError("servicebus.MigrationConfigsCreateAndStartMigrationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mcp, err = client.CreateAndStartMigrationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.MigrationConfigsCreateAndStartMigrationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicebus.MigrationConfigsCreateAndStartMigrationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mcp.Response.Response, err = future.GetResult(sender); err == nil && mcp.Response.Response.StatusCode != http.StatusNoContent {
+ mcp, err = client.CreateAndStartMigrationResponder(mcp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servicebus.MigrationConfigsCreateAndStartMigrationFuture", "Result", mcp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.MigrationConfigsCreateAndStartMigrationFuture", "Result", resp, "Failure sending request")
- return
- }
- mcp, err = client.CreateAndStartMigrationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.MigrationConfigsCreateAndStartMigrationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1067,12 +1047,11 @@ func (future MigrationConfigsCreateAndStartMigrationFuture) Result(client Migrat
// operation.
type NamespacesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (sn SBNamespace, err error) {
+func (future *NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (sn SBNamespace, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1080,34 +1059,15 @@ func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (sn
return
}
if !done {
- return sn, azure.NewAsyncOpIncompleteError("servicebus.NamespacesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sn, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.NamespacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicebus.NamespacesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sn.Response.Response, err = future.GetResult(sender); err == nil && sn.Response.Response.StatusCode != http.StatusNoContent {
+ sn, err = client.CreateOrUpdateResponder(sn.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servicebus.NamespacesCreateOrUpdateFuture", "Result", sn.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.NamespacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sn, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.NamespacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1115,12 +1075,11 @@ func (future NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (sn
// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type NamespacesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
+func (future *NamespacesDeleteFuture) Result(client NamespacesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1128,35 +1087,10 @@ func (future NamespacesDeleteFuture) Result(client NamespacesClient) (ar autores
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("servicebus.NamespacesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.NamespacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicebus.NamespacesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.NamespacesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicebus.NamespacesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/namespaces.go
index 6ff40a7ff..1bbefa9b8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/namespaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/namespaces.go
@@ -167,15 +167,17 @@ func (client NamespacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) CreateOrUpdateSender(req *http.Request) (future NamespacesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -334,15 +336,17 @@ func (client NamespacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client NamespacesClient) DeleteSender(req *http.Request) (future NamespacesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/client.go
index cfc397efe..2587cb965 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/client.go
@@ -1,6 +1,6 @@
// Package servicefabric implements the Azure ARM Servicefabric service API version 2016-09-01.
//
-//
+// Service Fabric Management Client
package servicefabric
// Copyright (c) Microsoft and contributors. All rights reserved.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go
index baaad6615..c504c44bb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go
@@ -25,7 +25,7 @@ import (
"net/http"
)
-// ClustersClient is the client for the Clusters methods of the Servicefabric service.
+// ClustersClient is the service Fabric Management Client
type ClustersClient struct {
BaseClient
}
@@ -139,15 +139,17 @@ func (client ClustersClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) CreateSender(req *http.Request) (future ClustersCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -528,15 +530,17 @@ func (client ClustersClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ClustersClient) UpdateSender(req *http.Request) (future ClustersUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/clusterversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/clusterversions.go
index e5f3d7c06..09e3be2cf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/clusterversions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/clusterversions.go
@@ -24,7 +24,7 @@ import (
"net/http"
)
-// ClusterVersionsClient is the client for the ClusterVersions methods of the Servicefabric service.
+// ClusterVersionsClient is the service Fabric Management Client
type ClusterVersionsClient struct {
BaseClient
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/models.go
index 9e1c2387f..8b0081708 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/models.go
@@ -719,12 +719,11 @@ type ClusterPropertiesUpdateParameters struct {
// ClustersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err error) {
+func (future *ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -732,34 +731,15 @@ func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err
return
}
if !done {
- return c, azure.NewAsyncOpIncompleteError("servicefabric.ClustersCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- c, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ClustersCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ClustersCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.CreateResponder(c.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersCreateFuture", "Result", c.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ClustersCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- c, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ClustersCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -767,12 +747,11 @@ func (future ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err
// ClustersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ClustersUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ClustersUpdateFuture) Result(client ClustersClient) (c Cluster, err error) {
+func (future *ClustersUpdateFuture) Result(client ClustersClient) (c Cluster, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -780,34 +759,15 @@ func (future ClustersUpdateFuture) Result(client ClustersClient) (c Cluster, err
return
}
if !done {
- return c, azure.NewAsyncOpIncompleteError("servicefabric.ClustersUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- c, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ClustersUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ClustersUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.UpdateResponder(c.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersUpdateFuture", "Result", c.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ClustersUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- c, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "servicefabric.ClustersUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/operations.go
index b4d0b1358..acea9b554 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2016-09-01/servicefabric/operations.go
@@ -24,7 +24,7 @@ import (
"net/http"
)
-// OperationsClient is the client for the Operations methods of the Servicefabric service.
+// OperationsClient is the service Fabric Management Client
type OperationsClient struct {
BaseClient
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/applications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/applications.go
new file mode 100644
index 000000000..b7bb79b05
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/applications.go
@@ -0,0 +1,402 @@
+package servicefabric
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ApplicationsClient is the service Fabric Management Client
+type ApplicationsClient struct {
+ BaseClient
+}
+
+// NewApplicationsClient creates an instance of the ApplicationsClient client.
+func NewApplicationsClient(subscriptionID string) ApplicationsClient {
+ return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client.
+func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient {
+ return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create create or update a Service Fabric application resource with the specified name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationName - the name of the application resource.
+// parameters - the application resource.
+func (client ApplicationsClient) Create(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, parameters ApplicationResource) (result ApplicationsCreateFuture, err error) {
+ req, err := client.CreatePreparer(ctx, resourceGroupName, clusterName, applicationName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Create", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client ApplicationsClient) CreatePreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, parameters ApplicationResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationName": autorest.Encode("path", applicationName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) CreateSender(req *http.Request) (future ApplicationsCreateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) CreateResponder(resp *http.Response) (result ApplicationResource, 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 delete a Service Fabric application resource with the specified name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationName - the name of the application resource.
+func (client ApplicationsClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (result ApplicationsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, clusterName, applicationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ApplicationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationName": autorest.Encode("path", applicationName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-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.ServiceFabric/clusters/{clusterName}/applications/{applicationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) DeleteSender(req *http.Request) (future ApplicationsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get get a Service Fabric application resource created or in the process of being created in the Service Fabric
+// cluster resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationName - the name of the application resource.
+func (client ApplicationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (result ApplicationResource, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, clusterName, applicationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "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.ApplicationsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ApplicationsClient) GetPreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationName": autorest.Encode("path", applicationName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-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.ServiceFabric/clusters/{clusterName}/applications/{applicationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) GetResponder(resp *http.Response) (result ApplicationResource, 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 application resources created or in the process of being created in the Service Fabric cluster
+// resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+func (client ApplicationsClient) List(ctx context.Context, resourceGroupName string, clusterName string) (result ApplicationResourceList, err error) {
+ req, err := client.ListPreparer(ctx, resourceGroupName, clusterName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ApplicationsClient) ListPreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-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.ServiceFabric/clusters/{clusterName}/applications", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) ListResponder(resp *http.Response) (result ApplicationResourceList, 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 update a Service Fabric application resource with the specified name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationName - the name of the application resource.
+// parameters - the application resource for patch operations.
+func (client ApplicationsClient) Update(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, parameters ApplicationResourceUpdate) (result ApplicationsUpdateFuture, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, clusterName, applicationName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client ApplicationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, parameters ApplicationResourceUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationName": autorest.Encode("path", applicationName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) UpdateSender(req *http.Request) (future ApplicationsUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) UpdateResponder(resp *http.Response) (result ApplicationResourceUpdate, 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/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypes.go
new file mode 100644
index 000000000..a552ffd62
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypes.go
@@ -0,0 +1,322 @@
+package servicefabric
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ApplicationTypesClient is the service Fabric Management Client
+type ApplicationTypesClient struct {
+ BaseClient
+}
+
+// NewApplicationTypesClient creates an instance of the ApplicationTypesClient client.
+func NewApplicationTypesClient(subscriptionID string) ApplicationTypesClient {
+ return NewApplicationTypesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewApplicationTypesClientWithBaseURI creates an instance of the ApplicationTypesClient client.
+func NewApplicationTypesClientWithBaseURI(baseURI string, subscriptionID string) ApplicationTypesClient {
+ return ApplicationTypesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create create or update a Service Fabric application type name resource with the specified name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationTypeName - the name of the application type name resource.
+// parameters - the application type name resource.
+func (client ApplicationTypesClient) Create(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, parameters ApplicationTypeResource) (result ApplicationTypeResource, err error) {
+ req, err := client.CreatePreparer(ctx, resourceGroupName, clusterName, applicationTypeName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "Create", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "Create", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client ApplicationTypesClient) CreatePreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, parameters ApplicationTypeResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationTypeName": autorest.Encode("path", applicationTypeName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationTypesClient) CreateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client ApplicationTypesClient) CreateResponder(resp *http.Response) (result ApplicationTypeResource, 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 a Service Fabric application type name resource with the specified name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationTypeName - the name of the application type name resource.
+func (client ApplicationTypesClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string) (result ApplicationTypesDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, clusterName, applicationTypeName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ApplicationTypesClient) DeletePreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationTypeName": autorest.Encode("path", applicationTypeName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-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.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationTypesClient) DeleteSender(req *http.Request) (future ApplicationTypesDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ApplicationTypesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get get a Service Fabric application type name resource created or in the process of being created in the Service
+// Fabric cluster resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationTypeName - the name of the application type name resource.
+func (client ApplicationTypesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string) (result ApplicationTypeResource, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, clusterName, applicationTypeName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "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.ApplicationTypesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ApplicationTypesClient) GetPreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationTypeName": autorest.Encode("path", applicationTypeName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-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.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationTypesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ApplicationTypesClient) GetResponder(resp *http.Response) (result ApplicationTypeResource, 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 application type name resources created or in the process of being created in the Service Fabric
+// cluster resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+func (client ApplicationTypesClient) List(ctx context.Context, resourceGroupName string, clusterName string) (result ApplicationTypeResourceList, err error) {
+ req, err := client.ListPreparer(ctx, resourceGroupName, clusterName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ApplicationTypesClient) ListPreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-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.ServiceFabric/clusters/{clusterName}/applicationTypes", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationTypesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ApplicationTypesClient) ListResponder(resp *http.Response) (result ApplicationTypeResourceList, 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/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypeversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypeversions.go
new file mode 100644
index 000000000..ea1b41580
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypeversions.go
@@ -0,0 +1,342 @@
+package servicefabric
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// ApplicationTypeVersionsClient is the service Fabric Management Client
+type ApplicationTypeVersionsClient struct {
+ BaseClient
+}
+
+// NewApplicationTypeVersionsClient creates an instance of the ApplicationTypeVersionsClient client.
+func NewApplicationTypeVersionsClient(subscriptionID string) ApplicationTypeVersionsClient {
+ return NewApplicationTypeVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewApplicationTypeVersionsClientWithBaseURI creates an instance of the ApplicationTypeVersionsClient client.
+func NewApplicationTypeVersionsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationTypeVersionsClient {
+ return ApplicationTypeVersionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create create or update a Service Fabric application type version resource with the specified name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationTypeName - the name of the application type name resource.
+// version - the application type version.
+// parameters - the application type version resource.
+func (client ApplicationTypeVersionsClient) Create(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, version string, parameters ApplicationTypeVersionResource) (result ApplicationTypeVersionsCreateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ApplicationTypeVersionResourceProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ApplicationTypeVersionResourceProperties.AppPackageURL", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("servicefabric.ApplicationTypeVersionsClient", "Create", err.Error())
+ }
+
+ req, err := client.CreatePreparer(ctx, resourceGroupName, clusterName, applicationTypeName, version, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Create", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client ApplicationTypeVersionsClient) CreatePreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, version string, parameters ApplicationTypeVersionResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationTypeName": autorest.Encode("path", applicationTypeName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "version": autorest.Encode("path", version),
+ }
+
+ const APIVersion = "2017-07-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationTypeVersionsClient) CreateSender(req *http.Request) (future ApplicationTypeVersionsCreateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client ApplicationTypeVersionsClient) CreateResponder(resp *http.Response) (result ApplicationTypeVersionResource, 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 delete a Service Fabric application type version resource with the specified name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationTypeName - the name of the application type name resource.
+// version - the application type version.
+func (client ApplicationTypeVersionsClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, version string) (result ApplicationTypeVersionsDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, clusterName, applicationTypeName, version)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ApplicationTypeVersionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, version string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationTypeName": autorest.Encode("path", applicationTypeName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "version": autorest.Encode("path", version),
+ }
+
+ const APIVersion = "2017-07-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.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationTypeVersionsClient) DeleteSender(req *http.Request) (future ApplicationTypeVersionsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ApplicationTypeVersionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get get a Service Fabric application type version resource created or in the process of being created in the Service
+// Fabric application type name resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationTypeName - the name of the application type name resource.
+// version - the application type version.
+func (client ApplicationTypeVersionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, version string) (result ApplicationTypeVersionResource, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, clusterName, applicationTypeName, version)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "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.ApplicationTypeVersionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ApplicationTypeVersionsClient) GetPreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, version string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationTypeName": autorest.Encode("path", applicationTypeName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "version": autorest.Encode("path", version),
+ }
+
+ const APIVersion = "2017-07-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.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationTypeVersionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ApplicationTypeVersionsClient) GetResponder(resp *http.Response) (result ApplicationTypeVersionResource, 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 application type version resources created or in the process of being created in the Service Fabric
+// application type name resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationTypeName - the name of the application type name resource.
+func (client ApplicationTypeVersionsClient) List(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string) (result ApplicationTypeVersionResourceList, err error) {
+ req, err := client.ListPreparer(ctx, resourceGroupName, clusterName, applicationTypeName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ApplicationTypeVersionsClient) ListPreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationTypeName": autorest.Encode("path", applicationTypeName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-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.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}/versions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationTypeVersionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ApplicationTypeVersionsClient) ListResponder(resp *http.Response) (result ApplicationTypeVersionResourceList, 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/services/servicefabric/mgmt/2018-02-01/servicefabric/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/client.go
new file mode 100644
index 000000000..5d0f53e07
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/client.go
@@ -0,0 +1,51 @@
+// Package servicefabric implements the Azure ARM Servicefabric service API version .
+//
+// Service Fabric Management Client
+package servicefabric
+
+// 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 Servicefabric
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Servicefabric.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/clusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/clusters.go
new file mode 100644
index 000000000..9b0d6c108
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/clusters.go
@@ -0,0 +1,504 @@
+package servicefabric
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "net/http"
+)
+
+// ClustersClient is the service Fabric Management Client
+type ClustersClient struct {
+ BaseClient
+}
+
+// NewClustersClient creates an instance of the ClustersClient client.
+func NewClustersClient(subscriptionID string) ClustersClient {
+ return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewClustersClientWithBaseURI creates an instance of the ClustersClient client.
+func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient {
+ return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create create or update a Service Fabric cluster resource with the specified name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// parameters - the cluster resource.
+func (client ClustersClient) Create(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster) (result ClustersCreateFuture, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ClusterProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.Certificate", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.Certificate.Thumbprint", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.ClusterProperties.DiagnosticsStorageAccountConfig", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.DiagnosticsStorageAccountConfig.StorageAccountName", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ClusterProperties.DiagnosticsStorageAccountConfig.ProtectedAccountKeyName", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ClusterProperties.DiagnosticsStorageAccountConfig.BlobEndpoint", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ClusterProperties.DiagnosticsStorageAccountConfig.QueueEndpoint", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ClusterProperties.DiagnosticsStorageAccountConfig.TableEndpoint", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "parameters.ClusterProperties.ManagementEndpoint", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ClusterProperties.NodeTypes", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ClusterProperties.ReverseProxyCertificate", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.ReverseProxyCertificate.Thumbprint", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.ClusterProperties.UpgradeDescription", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.UpgradeReplicaSetCheckTimeout", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.HealthCheckWaitDuration", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.HealthCheckStableDuration", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.HealthCheckRetryTimeout", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.UpgradeTimeout", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.UpgradeDomainTimeout", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }},
+ }},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil},
+ {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }},
+ }},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("servicefabric.ClustersClient", "Create", err.Error())
+ }
+
+ req, err := client.CreatePreparer(ctx, resourceGroupName, clusterName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Create", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client ClustersClient) CreatePreparer(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client ClustersClient) CreateSender(req *http.Request) (future ClustersCreateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client ClustersClient) CreateResponder(resp *http.Response) (result Cluster, 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 delete a Service Fabric cluster resource with the specified name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+func (client ClustersClient) Delete(ctx context.Context, resourceGroupName string, clusterName string) (result autorest.Response, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, clusterName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ClustersClient) DeletePreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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.ServiceFabric/clusters/{clusterName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ClustersClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ClustersClient) 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 get a Service Fabric cluster resource created or in the process of being created in the specified resource
+// group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+func (client ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string) (result Cluster, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, clusterName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "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.ClustersClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ClustersClient) GetPreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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.ServiceFabric/clusters/{clusterName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ClustersClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ClustersClient) GetResponder(resp *http.Response) (result Cluster, 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 Service Fabric cluster resources created or in the process of being created in the subscription.
+func (client ClustersClient) List(ctx context.Context) (result ClusterListResult, err error) {
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ClustersClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/clusters", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ClustersClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ClustersClient) ListResponder(resp *http.Response) (result ClusterListResult, 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 gets all Service Fabric cluster resources created or in the process of being created in the
+// resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ClusterListResult, err error) {
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ClustersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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.ServiceFabric/clusters", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client ClustersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client ClustersClient) ListByResourceGroupResponder(resp *http.Response) (result ClusterListResult, 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 update the configuration of a Service Fabric cluster resource with the specified name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// parameters - the parameters which contains the property value and property name which used to update the
+// cluster configuration.
+func (client ClustersClient) Update(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterUpdateParameters) (result ClustersUpdateFuture, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, clusterName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client ClustersClient) UpdatePreparer(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterUpdateParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client ClustersClient) UpdateSender(req *http.Request) (future ClustersUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client ClustersClient) UpdateResponder(resp *http.Response) (result Cluster, 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/services/servicefabric/mgmt/2018-02-01/servicefabric/clusterversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/clusterversions.go
new file mode 100644
index 000000000..05c12964c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/clusterversions.go
@@ -0,0 +1,308 @@
+package servicefabric
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ClusterVersionsClient is the service Fabric Management Client
+type ClusterVersionsClient struct {
+ BaseClient
+}
+
+// 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.
+func NewClusterVersionsClientWithBaseURI(baseURI string, subscriptionID string) ClusterVersionsClient {
+ return ClusterVersionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets information about an available Service Fabric cluster code version.
+// Parameters:
+// location - the location for the cluster code versions. This is different from cluster location.
+// clusterVersion - the cluster code version.
+func (client ClusterVersionsClient) Get(ctx context.Context, location string, clusterVersion string) (result ClusterCodeVersionsListResult, err error) {
+ req, err := client.GetPreparer(ctx, location, 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(ctx context.Context, 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 = "2018-02-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ClusterVersionsClient) GetResponder(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
+}
+
+// GetByEnvironment gets information about an available Service Fabric cluster code version by environment.
+// Parameters:
+// location - the location for the cluster code versions. This is different from cluster location.
+// environment - the operating system of the cluster. The default means all.
+// clusterVersion - the cluster code version.
+func (client ClusterVersionsClient) GetByEnvironment(ctx context.Context, location string, environment string, clusterVersion string) (result ClusterCodeVersionsListResult, err error) {
+ req, err := client.GetByEnvironmentPreparer(ctx, location, environment, clusterVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "GetByEnvironment", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetByEnvironmentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "GetByEnvironment", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetByEnvironmentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "GetByEnvironment", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetByEnvironmentPreparer prepares the GetByEnvironment request.
+func (client ClusterVersionsClient) GetByEnvironmentPreparer(ctx context.Context, 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 = "2018-02-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{}).WithContext(ctx))
+}
+
+// GetByEnvironmentSender sends the GetByEnvironment request. The method will close the
+// http.Response Body if it receives an error.
+func (client ClusterVersionsClient) GetByEnvironmentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetByEnvironmentResponder handles the response to the GetByEnvironment request. The method always
+// closes the http.Response Body.
+func (client ClusterVersionsClient) GetByEnvironmentResponder(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
+}
+
+// List gets all available code versions for Service Fabric cluster resources by location.
+// Parameters:
+// location - the location for the cluster code versions. This is different from cluster location.
+func (client ClusterVersionsClient) List(ctx context.Context, location string) (result ClusterCodeVersionsListResult, err error) {
+ req, err := client.ListPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ClusterVersionsClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ClusterVersionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ClusterVersionsClient) ListResponder(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
+}
+
+// ListByEnvironment gets all available code versions for Service Fabric cluster resources by environment.
+// Parameters:
+// location - the location for the cluster code versions. This is different from cluster location.
+// environment - the operating system of the cluster. The default means all.
+func (client ClusterVersionsClient) ListByEnvironment(ctx context.Context, location string, environment string) (result ClusterCodeVersionsListResult, err error) {
+ req, err := client.ListByEnvironmentPreparer(ctx, 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(ctx context.Context, 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 = "2018-02-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/models.go
new file mode 100644
index 000000000..1bef98636
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/models.go
@@ -0,0 +1,3982 @@
+package servicefabric
+
+// 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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "net/http"
+)
+
+// ClusterState enumerates the values for cluster state.
+type ClusterState string
+
+const (
+ // AutoScale ...
+ AutoScale ClusterState = "AutoScale"
+ // BaselineUpgrade ...
+ BaselineUpgrade ClusterState = "BaselineUpgrade"
+ // Deploying ...
+ Deploying ClusterState = "Deploying"
+ // EnforcingClusterVersion ...
+ EnforcingClusterVersion ClusterState = "EnforcingClusterVersion"
+ // Ready ...
+ Ready ClusterState = "Ready"
+ // UpdatingInfrastructure ...
+ UpdatingInfrastructure ClusterState = "UpdatingInfrastructure"
+ // UpdatingUserCertificate ...
+ UpdatingUserCertificate ClusterState = "UpdatingUserCertificate"
+ // UpdatingUserConfiguration ...
+ UpdatingUserConfiguration ClusterState = "UpdatingUserConfiguration"
+ // UpgradeServiceUnreachable ...
+ UpgradeServiceUnreachable ClusterState = "UpgradeServiceUnreachable"
+ // WaitingForNodes ...
+ WaitingForNodes ClusterState = "WaitingForNodes"
+)
+
+// PossibleClusterStateValues returns an array of possible values for the ClusterState const type.
+func PossibleClusterStateValues() []ClusterState {
+ return []ClusterState{AutoScale, BaselineUpgrade, Deploying, EnforcingClusterVersion, Ready, UpdatingInfrastructure, UpdatingUserCertificate, UpdatingUserConfiguration, UpgradeServiceUnreachable, WaitingForNodes}
+}
+
+// DurabilityLevel enumerates the values for durability level.
+type DurabilityLevel string
+
+const (
+ // Bronze ...
+ Bronze DurabilityLevel = "Bronze"
+ // Gold ...
+ Gold DurabilityLevel = "Gold"
+ // Silver ...
+ Silver DurabilityLevel = "Silver"
+)
+
+// PossibleDurabilityLevelValues returns an array of possible values for the DurabilityLevel const type.
+func PossibleDurabilityLevelValues() []DurabilityLevel {
+ return []DurabilityLevel{Bronze, Gold, Silver}
+}
+
+// Environment enumerates the values for environment.
+type Environment string
+
+const (
+ // Linux ...
+ Linux Environment = "Linux"
+ // Windows ...
+ Windows Environment = "Windows"
+)
+
+// PossibleEnvironmentValues returns an array of possible values for the Environment const type.
+func PossibleEnvironmentValues() []Environment {
+ return []Environment{Linux, Windows}
+}
+
+// MoveCost enumerates the values for move cost.
+type MoveCost string
+
+const (
+ // High Specifies the move cost of the service as High. The value is 3.
+ High MoveCost = "High"
+ // Low Specifies the move cost of the service as Low. The value is 1.
+ Low MoveCost = "Low"
+ // Medium Specifies the move cost of the service as Medium. The value is 2.
+ Medium MoveCost = "Medium"
+ // Zero Zero move cost. This value is zero.
+ Zero MoveCost = "Zero"
+)
+
+// PossibleMoveCostValues returns an array of possible values for the MoveCost const type.
+func PossibleMoveCostValues() []MoveCost {
+ return []MoveCost{High, Low, Medium, Zero}
+}
+
+// PartitionScheme enumerates the values for partition scheme.
+type PartitionScheme string
+
+const (
+ // Invalid Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type.
+ // The value is zero.
+ Invalid PartitionScheme = "Invalid"
+ // Named Indicates that the partition is based on string names, and is a NamedPartitionSchemeDescription
+ // object. The value is 3
+ Named PartitionScheme = "Named"
+ // Singleton Indicates that the partition is based on string names, and is a
+ // SingletonPartitionSchemeDescription object, The value is 1.
+ Singleton PartitionScheme = "Singleton"
+ // UniformInt64Range Indicates that the partition is based on Int64 key ranges, and is a
+ // UniformInt64RangePartitionSchemeDescription object. The value is 2.
+ UniformInt64Range PartitionScheme = "UniformInt64Range"
+)
+
+// PossiblePartitionSchemeValues returns an array of possible values for the PartitionScheme const type.
+func PossiblePartitionSchemeValues() []PartitionScheme {
+ return []PartitionScheme{Invalid, Named, Singleton, UniformInt64Range}
+}
+
+// PartitionSchemeBasicPartitionSchemeDescription enumerates the values for partition scheme basic partition
+// scheme description.
+type PartitionSchemeBasicPartitionSchemeDescription string
+
+const (
+ // PartitionSchemeNamed ...
+ PartitionSchemeNamed PartitionSchemeBasicPartitionSchemeDescription = "Named"
+ // PartitionSchemePartitionSchemeDescription ...
+ PartitionSchemePartitionSchemeDescription PartitionSchemeBasicPartitionSchemeDescription = "PartitionSchemeDescription"
+ // PartitionSchemeSingleton ...
+ PartitionSchemeSingleton PartitionSchemeBasicPartitionSchemeDescription = "Singleton"
+ // PartitionSchemeUniformInt64Range ...
+ PartitionSchemeUniformInt64Range PartitionSchemeBasicPartitionSchemeDescription = "UniformInt64Range"
+)
+
+// PossiblePartitionSchemeBasicPartitionSchemeDescriptionValues returns an array of possible values for the PartitionSchemeBasicPartitionSchemeDescription const type.
+func PossiblePartitionSchemeBasicPartitionSchemeDescriptionValues() []PartitionSchemeBasicPartitionSchemeDescription {
+ return []PartitionSchemeBasicPartitionSchemeDescription{PartitionSchemeNamed, PartitionSchemePartitionSchemeDescription, PartitionSchemeSingleton, PartitionSchemeUniformInt64Range}
+}
+
+// ProvisioningState enumerates the values for provisioning state.
+type ProvisioningState string
+
+const (
+ // Canceled ...
+ Canceled ProvisioningState = "Canceled"
+ // Failed ...
+ Failed ProvisioningState = "Failed"
+ // Succeeded ...
+ Succeeded ProvisioningState = "Succeeded"
+ // Updating ...
+ Updating ProvisioningState = "Updating"
+)
+
+// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
+func PossibleProvisioningStateValues() []ProvisioningState {
+ return []ProvisioningState{Canceled, Failed, Succeeded, Updating}
+}
+
+// ReliabilityLevel enumerates the values for reliability level.
+type ReliabilityLevel string
+
+const (
+ // ReliabilityLevelBronze ...
+ ReliabilityLevelBronze ReliabilityLevel = "Bronze"
+ // ReliabilityLevelGold ...
+ ReliabilityLevelGold ReliabilityLevel = "Gold"
+ // ReliabilityLevelNone ...
+ ReliabilityLevelNone ReliabilityLevel = "None"
+ // ReliabilityLevelPlatinum ...
+ ReliabilityLevelPlatinum ReliabilityLevel = "Platinum"
+ // ReliabilityLevelSilver ...
+ ReliabilityLevelSilver ReliabilityLevel = "Silver"
+)
+
+// PossibleReliabilityLevelValues returns an array of possible values for the ReliabilityLevel const type.
+func PossibleReliabilityLevelValues() []ReliabilityLevel {
+ return []ReliabilityLevel{ReliabilityLevelBronze, ReliabilityLevelGold, ReliabilityLevelNone, ReliabilityLevelPlatinum, ReliabilityLevelSilver}
+}
+
+// ReliabilityLevel1 enumerates the values for reliability level 1.
+type ReliabilityLevel1 string
+
+const (
+ // ReliabilityLevel1Bronze ...
+ ReliabilityLevel1Bronze ReliabilityLevel1 = "Bronze"
+ // ReliabilityLevel1Gold ...
+ ReliabilityLevel1Gold ReliabilityLevel1 = "Gold"
+ // ReliabilityLevel1None ...
+ ReliabilityLevel1None ReliabilityLevel1 = "None"
+ // ReliabilityLevel1Platinum ...
+ ReliabilityLevel1Platinum ReliabilityLevel1 = "Platinum"
+ // ReliabilityLevel1Silver ...
+ ReliabilityLevel1Silver ReliabilityLevel1 = "Silver"
+)
+
+// PossibleReliabilityLevel1Values returns an array of possible values for the ReliabilityLevel1 const type.
+func PossibleReliabilityLevel1Values() []ReliabilityLevel1 {
+ return []ReliabilityLevel1{ReliabilityLevel1Bronze, ReliabilityLevel1Gold, ReliabilityLevel1None, ReliabilityLevel1Platinum, ReliabilityLevel1Silver}
+}
+
+// ServiceCorrelationScheme enumerates the values for service correlation scheme.
+type ServiceCorrelationScheme string
+
+const (
+ // ServiceCorrelationSchemeAffinity Indicates that this service has an affinity relationship with another
+ // service. Provided for backwards compatibility, consider preferring the Aligned or NonAlignedAffinity
+ // options. The value is 1.
+ ServiceCorrelationSchemeAffinity ServiceCorrelationScheme = "Affinity"
+ // ServiceCorrelationSchemeAlignedAffinity Aligned affinity ensures that the primaries of the partitions of
+ // the affinitized services are collocated on the same nodes. This is the default and is the same as
+ // selecting the Affinity scheme. The value is 2.
+ ServiceCorrelationSchemeAlignedAffinity ServiceCorrelationScheme = "AlignedAffinity"
+ // ServiceCorrelationSchemeInvalid An invalid correlation scheme. Cannot be used. The value is zero.
+ ServiceCorrelationSchemeInvalid ServiceCorrelationScheme = "Invalid"
+ // ServiceCorrelationSchemeNonAlignedAffinity Non-Aligned affinity guarantees that all replicas of each
+ // service will be placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas
+ // of particular role will be collocated. The value is 3.
+ ServiceCorrelationSchemeNonAlignedAffinity ServiceCorrelationScheme = "NonAlignedAffinity"
+)
+
+// PossibleServiceCorrelationSchemeValues returns an array of possible values for the ServiceCorrelationScheme const type.
+func PossibleServiceCorrelationSchemeValues() []ServiceCorrelationScheme {
+ return []ServiceCorrelationScheme{ServiceCorrelationSchemeAffinity, ServiceCorrelationSchemeAlignedAffinity, ServiceCorrelationSchemeInvalid, ServiceCorrelationSchemeNonAlignedAffinity}
+}
+
+// ServiceKind enumerates the values for service kind.
+type ServiceKind string
+
+const (
+ // ServiceKindInvalid Indicates the service kind is invalid. All Service Fabric enumerations have the
+ // invalid type. The value is zero.
+ ServiceKindInvalid ServiceKind = "Invalid"
+ // ServiceKindStateful Uses Service Fabric to make its state or part of its state highly available and
+ // reliable. The value is 2.
+ ServiceKindStateful ServiceKind = "Stateful"
+ // ServiceKindStateless Does not use Service Fabric to make its state highly available or reliable. The
+ // value is 1.
+ ServiceKindStateless ServiceKind = "Stateless"
+)
+
+// PossibleServiceKindValues returns an array of possible values for the ServiceKind const type.
+func PossibleServiceKindValues() []ServiceKind {
+ return []ServiceKind{ServiceKindInvalid, ServiceKindStateful, ServiceKindStateless}
+}
+
+// ServiceKindBasicServiceResourceProperties enumerates the values for service kind basic service resource
+// properties.
+type ServiceKindBasicServiceResourceProperties string
+
+const (
+ // ServiceKindServiceResourceProperties ...
+ ServiceKindServiceResourceProperties ServiceKindBasicServiceResourceProperties = "ServiceResourceProperties"
+ // ServiceKindStateful1 ...
+ ServiceKindStateful1 ServiceKindBasicServiceResourceProperties = "Stateful"
+ // ServiceKindStateless1 ...
+ ServiceKindStateless1 ServiceKindBasicServiceResourceProperties = "Stateless"
+)
+
+// PossibleServiceKindBasicServiceResourcePropertiesValues returns an array of possible values for the ServiceKindBasicServiceResourceProperties const type.
+func PossibleServiceKindBasicServiceResourcePropertiesValues() []ServiceKindBasicServiceResourceProperties {
+ return []ServiceKindBasicServiceResourceProperties{ServiceKindServiceResourceProperties, ServiceKindStateful1, ServiceKindStateless1}
+}
+
+// ServiceKindBasicServiceResourceUpdateProperties enumerates the values for service kind basic service
+// resource update properties.
+type ServiceKindBasicServiceResourceUpdateProperties string
+
+const (
+ // ServiceKindBasicServiceResourceUpdatePropertiesServiceKindServiceResourceUpdateProperties ...
+ ServiceKindBasicServiceResourceUpdatePropertiesServiceKindServiceResourceUpdateProperties ServiceKindBasicServiceResourceUpdateProperties = "ServiceResourceUpdateProperties"
+ // ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateful ...
+ ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateful ServiceKindBasicServiceResourceUpdateProperties = "Stateful"
+ // ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateless ...
+ ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateless ServiceKindBasicServiceResourceUpdateProperties = "Stateless"
+)
+
+// PossibleServiceKindBasicServiceResourceUpdatePropertiesValues returns an array of possible values for the ServiceKindBasicServiceResourceUpdateProperties const type.
+func PossibleServiceKindBasicServiceResourceUpdatePropertiesValues() []ServiceKindBasicServiceResourceUpdateProperties {
+ return []ServiceKindBasicServiceResourceUpdateProperties{ServiceKindBasicServiceResourceUpdatePropertiesServiceKindServiceResourceUpdateProperties, ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateful, ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateless}
+}
+
+// ServiceLoadMetricWeight enumerates the values for service load metric weight.
+type ServiceLoadMetricWeight string
+
+const (
+ // ServiceLoadMetricWeightHigh Specifies the metric weight of the service load as High. The value is 3.
+ ServiceLoadMetricWeightHigh ServiceLoadMetricWeight = "High"
+ // ServiceLoadMetricWeightLow Specifies the metric weight of the service load as Low. The value is 1.
+ ServiceLoadMetricWeightLow ServiceLoadMetricWeight = "Low"
+ // ServiceLoadMetricWeightMedium Specifies the metric weight of the service load as Medium. The value is 2.
+ ServiceLoadMetricWeightMedium ServiceLoadMetricWeight = "Medium"
+ // ServiceLoadMetricWeightZero Disables resource balancing for this metric. This value is zero.
+ ServiceLoadMetricWeightZero ServiceLoadMetricWeight = "Zero"
+)
+
+// PossibleServiceLoadMetricWeightValues returns an array of possible values for the ServiceLoadMetricWeight const type.
+func PossibleServiceLoadMetricWeightValues() []ServiceLoadMetricWeight {
+ return []ServiceLoadMetricWeight{ServiceLoadMetricWeightHigh, ServiceLoadMetricWeightLow, ServiceLoadMetricWeightMedium, ServiceLoadMetricWeightZero}
+}
+
+// ServicePlacementPolicyType enumerates the values for service placement policy type.
+type ServicePlacementPolicyType string
+
+const (
+ // ServicePlacementPolicyTypeInvalid Indicates the type of the placement policy is invalid. All Service
+ // Fabric enumerations have the invalid type. The value is zero.
+ ServicePlacementPolicyTypeInvalid ServicePlacementPolicyType = "Invalid"
+ // ServicePlacementPolicyTypeInvalidDomain Indicates that the ServicePlacementPolicyDescription is of type
+ // ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or upgrade
+ // domain cannot be used for placement of this service. The value is 1.
+ ServicePlacementPolicyTypeInvalidDomain ServicePlacementPolicyType = "InvalidDomain"
+ // ServicePlacementPolicyTypeNonPartiallyPlaceService Indicates that the ServicePlacementPolicyDescription
+ // is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible
+ // all replicas of a particular partition of the service should be placed atomically. The value is 5.
+ ServicePlacementPolicyTypeNonPartiallyPlaceService ServicePlacementPolicyType = "NonPartiallyPlaceService"
+ // ServicePlacementPolicyTypePreferredPrimaryDomain Indicates that the ServicePlacementPolicyDescription is
+ // of type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the
+ // Primary replica for the partitions of the service should be located in a particular domain as an
+ // optimization. The value is 3.
+ ServicePlacementPolicyTypePreferredPrimaryDomain ServicePlacementPolicyType = "PreferredPrimaryDomain"
+ // ServicePlacementPolicyTypeRequiredDomain Indicates that the ServicePlacementPolicyDescription is of type
+ // ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service
+ // must be placed in a specific domain. The value is 2.
+ ServicePlacementPolicyTypeRequiredDomain ServicePlacementPolicyType = "RequiredDomain"
+ // ServicePlacementPolicyTypeRequiredDomainDistribution Indicates that the
+ // ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription,
+ // indicating that the system will disallow placement of any two replicas from the same partition in the
+ // same domain at any time. The value is 4.
+ ServicePlacementPolicyTypeRequiredDomainDistribution ServicePlacementPolicyType = "RequiredDomainDistribution"
+)
+
+// PossibleServicePlacementPolicyTypeValues returns an array of possible values for the ServicePlacementPolicyType const type.
+func PossibleServicePlacementPolicyTypeValues() []ServicePlacementPolicyType {
+ return []ServicePlacementPolicyType{ServicePlacementPolicyTypeInvalid, ServicePlacementPolicyTypeInvalidDomain, ServicePlacementPolicyTypeNonPartiallyPlaceService, ServicePlacementPolicyTypePreferredPrimaryDomain, ServicePlacementPolicyTypeRequiredDomain, ServicePlacementPolicyTypeRequiredDomainDistribution}
+}
+
+// Type enumerates the values for type.
+type Type string
+
+const (
+ // TypeServicePlacementPolicyDescription ...
+ TypeServicePlacementPolicyDescription Type = "ServicePlacementPolicyDescription"
+)
+
+// PossibleTypeValues returns an array of possible values for the Type const type.
+func PossibleTypeValues() []Type {
+ return []Type{TypeServicePlacementPolicyDescription}
+}
+
+// UpgradeMode enumerates the values for upgrade mode.
+type UpgradeMode string
+
+const (
+ // Automatic ...
+ Automatic UpgradeMode = "Automatic"
+ // Manual ...
+ Manual UpgradeMode = "Manual"
+)
+
+// PossibleUpgradeModeValues returns an array of possible values for the UpgradeMode const type.
+func PossibleUpgradeModeValues() []UpgradeMode {
+ return []UpgradeMode{Automatic, Manual}
+}
+
+// UpgradeMode1 enumerates the values for upgrade mode 1.
+type UpgradeMode1 string
+
+const (
+ // UpgradeMode1Automatic ...
+ UpgradeMode1Automatic UpgradeMode1 = "Automatic"
+ // UpgradeMode1Manual ...
+ UpgradeMode1Manual UpgradeMode1 = "Manual"
+)
+
+// PossibleUpgradeMode1Values returns an array of possible values for the UpgradeMode1 const type.
+func PossibleUpgradeMode1Values() []UpgradeMode1 {
+ return []UpgradeMode1{UpgradeMode1Automatic, UpgradeMode1Manual}
+}
+
+// X509StoreName enumerates the values for x509 store name.
+type X509StoreName string
+
+const (
+ // AddressBook ...
+ AddressBook X509StoreName = "AddressBook"
+ // AuthRoot ...
+ AuthRoot X509StoreName = "AuthRoot"
+ // CertificateAuthority ...
+ CertificateAuthority X509StoreName = "CertificateAuthority"
+ // Disallowed ...
+ Disallowed X509StoreName = "Disallowed"
+ // My ...
+ My X509StoreName = "My"
+ // Root ...
+ Root X509StoreName = "Root"
+ // TrustedPeople ...
+ TrustedPeople X509StoreName = "TrustedPeople"
+ // TrustedPublisher ...
+ TrustedPublisher X509StoreName = "TrustedPublisher"
+)
+
+// PossibleX509StoreNameValues returns an array of possible values for the X509StoreName const type.
+func PossibleX509StoreNameValues() []X509StoreName {
+ return []X509StoreName{AddressBook, AuthRoot, CertificateAuthority, Disallowed, My, Root, TrustedPeople, TrustedPublisher}
+}
+
+// X509StoreName1 enumerates the values for x509 store name 1.
+type X509StoreName1 string
+
+const (
+ // X509StoreName1AddressBook ...
+ X509StoreName1AddressBook X509StoreName1 = "AddressBook"
+ // X509StoreName1AuthRoot ...
+ X509StoreName1AuthRoot X509StoreName1 = "AuthRoot"
+ // X509StoreName1CertificateAuthority ...
+ X509StoreName1CertificateAuthority X509StoreName1 = "CertificateAuthority"
+ // X509StoreName1Disallowed ...
+ X509StoreName1Disallowed X509StoreName1 = "Disallowed"
+ // X509StoreName1My ...
+ X509StoreName1My X509StoreName1 = "My"
+ // X509StoreName1Root ...
+ X509StoreName1Root X509StoreName1 = "Root"
+ // X509StoreName1TrustedPeople ...
+ X509StoreName1TrustedPeople X509StoreName1 = "TrustedPeople"
+ // X509StoreName1TrustedPublisher ...
+ X509StoreName1TrustedPublisher X509StoreName1 = "TrustedPublisher"
+)
+
+// PossibleX509StoreName1Values returns an array of possible values for the X509StoreName1 const type.
+func PossibleX509StoreName1Values() []X509StoreName1 {
+ return []X509StoreName1{X509StoreName1AddressBook, X509StoreName1AuthRoot, X509StoreName1CertificateAuthority, X509StoreName1Disallowed, X509StoreName1My, X509StoreName1Root, X509StoreName1TrustedPeople, X509StoreName1TrustedPublisher}
+}
+
+// ApplicationDeltaHealthPolicy defines a delta health policy used to evaluate the health of an application or one
+// of its child entities when upgrading the cluster.
+type ApplicationDeltaHealthPolicy struct {
+ // DefaultServiceTypeDeltaHealthPolicy - The delta health policy used by default to evaluate the health of a service type when upgrading the cluster.
+ DefaultServiceTypeDeltaHealthPolicy *ServiceTypeDeltaHealthPolicy `json:"defaultServiceTypeDeltaHealthPolicy,omitempty"`
+ // ServiceTypeDeltaHealthPolicies - The map with service type delta health policy per service type name. The map is empty by default.
+ ServiceTypeDeltaHealthPolicies map[string]*ServiceTypeDeltaHealthPolicy `json:"serviceTypeDeltaHealthPolicies"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationDeltaHealthPolicy.
+func (adhp ApplicationDeltaHealthPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if adhp.DefaultServiceTypeDeltaHealthPolicy != nil {
+ objectMap["defaultServiceTypeDeltaHealthPolicy"] = adhp.DefaultServiceTypeDeltaHealthPolicy
+ }
+ if adhp.ServiceTypeDeltaHealthPolicies != nil {
+ objectMap["serviceTypeDeltaHealthPolicies"] = adhp.ServiceTypeDeltaHealthPolicies
+ }
+ return json.Marshal(objectMap)
+}
+
+// ApplicationHealthPolicy defines a health policy used to evaluate the health of an application or one of its
+// children entities.
+type ApplicationHealthPolicy struct {
+ // DefaultServiceTypeHealthPolicy - The health policy used by default to evaluate the health of a service type.
+ DefaultServiceTypeHealthPolicy *ServiceTypeHealthPolicy `json:"defaultServiceTypeHealthPolicy,omitempty"`
+ // ServiceTypeHealthPolicies - The map with service type health policy per service type name. The map is empty by default.
+ ServiceTypeHealthPolicies map[string]*ServiceTypeHealthPolicy `json:"serviceTypeHealthPolicies"`
+ // ConsiderWarningAsError - Indicates whether warnings are treated with the same severity as errors.
+ ConsiderWarningAsError *bool `json:"ConsiderWarningAsError,omitempty"`
+ // MaxPercentUnhealthyDeployedApplications - The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100.
+ // The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error.
+ // This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster.
+ // The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.
+ MaxPercentUnhealthyDeployedApplications *int32 `json:"MaxPercentUnhealthyDeployedApplications,omitempty"`
+ // DefaultServiceTypeHealthPolicy1 - The health policy used by default to evaluate the health of a service type.
+ DefaultServiceTypeHealthPolicy1 *ServiceTypeHealthPolicy `json:"DefaultServiceTypeHealthPolicy,omitempty"`
+ // ServiceTypeHealthPolicyMap - The map with service type health policy per service type name. The map is empty by default.
+ ServiceTypeHealthPolicyMap map[string]*ServiceTypeHealthPolicy `json:"ServiceTypeHealthPolicyMap"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationHealthPolicy.
+func (ahp ApplicationHealthPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ahp.DefaultServiceTypeHealthPolicy != nil {
+ objectMap["defaultServiceTypeHealthPolicy"] = ahp.DefaultServiceTypeHealthPolicy
+ }
+ if ahp.ServiceTypeHealthPolicies != nil {
+ objectMap["serviceTypeHealthPolicies"] = ahp.ServiceTypeHealthPolicies
+ }
+ if ahp.ConsiderWarningAsError != nil {
+ objectMap["ConsiderWarningAsError"] = ahp.ConsiderWarningAsError
+ }
+ if ahp.MaxPercentUnhealthyDeployedApplications != nil {
+ objectMap["MaxPercentUnhealthyDeployedApplications"] = ahp.MaxPercentUnhealthyDeployedApplications
+ }
+ if ahp.DefaultServiceTypeHealthPolicy1 != nil {
+ objectMap["DefaultServiceTypeHealthPolicy"] = ahp.DefaultServiceTypeHealthPolicy1
+ }
+ if ahp.ServiceTypeHealthPolicyMap != nil {
+ objectMap["ServiceTypeHealthPolicyMap"] = ahp.ServiceTypeHealthPolicyMap
+ }
+ return json.Marshal(objectMap)
+}
+
+// ApplicationMetricDescription describes capacity information for a custom resource balancing metric. This can be
+// used to limit the total consumption of this metric by the services of this application.
+type ApplicationMetricDescription struct {
+ // Name - The name of the metric.
+ Name *string `json:"Name,omitempty"`
+ // MaximumCapacity - The maximum node capacity for Service Fabric application.
+ // This is the maximum Load for an instance of this application on a single node. Even if the capacity of node is greater than this value, Service Fabric will limit the total load of services within the application on each node to this value.
+ // If set to zero, capacity for this metric is unlimited on each node.
+ // When creating a new application with application capacity defined, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity.
+ // When updating existing application with application capacity, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity.
+ MaximumCapacity *int64 `json:"MaximumCapacity,omitempty"`
+ // ReservationCapacity - The node reservation capacity for Service Fabric application.
+ // This is the amount of load which is reserved on nodes which have instances of this application.
+ // If MinimumNodes is specified, then the product of these values will be the capacity reserved in the cluster for the application.
+ // If set to zero, no capacity is reserved for this metric.
+ // When setting application capacity or when updating application capacity; this value must be smaller than or equal to MaximumCapacity for each metric.
+ ReservationCapacity *int64 `json:"ReservationCapacity,omitempty"`
+ // TotalApplicationCapacity - The total metric capacity for Service Fabric application.
+ // This is the total metric capacity for this application in the cluster. Service Fabric will try to limit the sum of loads of services within the application to this value.
+ // When creating a new application with application capacity defined, the product of MaximumNodes and MaximumCapacity must always be smaller than or equal to this value.
+ TotalApplicationCapacity *int64 `json:"TotalApplicationCapacity,omitempty"`
+}
+
+// ApplicationResource the application resource.
+type ApplicationResource struct {
+ autorest.Response `json:"-"`
+ // ApplicationResourceProperties - The application resource properties.
+ *ApplicationResourceProperties `json:"properties,omitempty"`
+ // ID - Azure resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - Azure resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Azure resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Azure resource location.
+ Location *string `json:"location,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationResource.
+func (ar ApplicationResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ar.ApplicationResourceProperties != nil {
+ objectMap["properties"] = ar.ApplicationResourceProperties
+ }
+ if ar.ID != nil {
+ objectMap["id"] = ar.ID
+ }
+ if ar.Name != nil {
+ objectMap["name"] = ar.Name
+ }
+ if ar.Type != nil {
+ objectMap["type"] = ar.Type
+ }
+ if ar.Location != nil {
+ objectMap["location"] = ar.Location
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationResource struct.
+func (ar *ApplicationResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationResourceProperties ApplicationResourceProperties
+ err = json.Unmarshal(*v, &applicationResourceProperties)
+ if err != nil {
+ return err
+ }
+ ar.ApplicationResourceProperties = &applicationResourceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ar.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ar.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ar.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ ar.Location = &location
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationResourceList the list of application resources.
+type ApplicationResourceList struct {
+ autorest.Response `json:"-"`
+ Value *[]ApplicationResource `json:"value,omitempty"`
+}
+
+// ApplicationResourceProperties the application resource properties.
+type ApplicationResourceProperties struct {
+ // ProvisioningState - The current deployment or provisioning state, which only appears in the response
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // TypeName - The application type name as defined in the application manifest.
+ TypeName *string `json:"typeName,omitempty"`
+ // TypeVersion - The version of the application type as defined in the application manifest.
+ TypeVersion *string `json:"typeVersion,omitempty"`
+ // Parameters - List of application parameters with overridden values from their default values specified in the application manifest.
+ Parameters map[string]*string `json:"parameters"`
+ // UpgradePolicy - Describes the policy for a monitored application upgrade.
+ UpgradePolicy *ApplicationUpgradePolicy `json:"upgradePolicy,omitempty"`
+ // MinimumNodes - The minimum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. The value of this property cannot be more than the value of the MaximumNodes property.
+ MinimumNodes *int64 `json:"minimumNodes,omitempty"`
+ // MaximumNodes - The maximum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. By default, the value of this property is zero and it means that the services can be placed on any node.
+ MaximumNodes *int64 `json:"maximumNodes,omitempty"`
+ // RemoveApplicationCapacity - Remove the current application capacity settings.
+ RemoveApplicationCapacity *bool `json:"removeApplicationCapacity,omitempty"`
+ // Metrics - List of application capacity metric description.
+ Metrics *[]ApplicationMetricDescription `json:"metrics,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationResourceProperties.
+func (arp ApplicationResourceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if arp.ProvisioningState != nil {
+ objectMap["provisioningState"] = arp.ProvisioningState
+ }
+ if arp.TypeName != nil {
+ objectMap["typeName"] = arp.TypeName
+ }
+ if arp.TypeVersion != nil {
+ objectMap["typeVersion"] = arp.TypeVersion
+ }
+ if arp.Parameters != nil {
+ objectMap["parameters"] = arp.Parameters
+ }
+ if arp.UpgradePolicy != nil {
+ objectMap["upgradePolicy"] = arp.UpgradePolicy
+ }
+ if arp.MinimumNodes != nil {
+ objectMap["minimumNodes"] = arp.MinimumNodes
+ }
+ if arp.MaximumNodes != nil {
+ objectMap["maximumNodes"] = arp.MaximumNodes
+ }
+ if arp.RemoveApplicationCapacity != nil {
+ objectMap["removeApplicationCapacity"] = arp.RemoveApplicationCapacity
+ }
+ if arp.Metrics != nil {
+ objectMap["metrics"] = arp.Metrics
+ }
+ return json.Marshal(objectMap)
+}
+
+// ApplicationResourceUpdate the application resource for patch operations.
+type ApplicationResourceUpdate struct {
+ autorest.Response `json:"-"`
+ // ApplicationResourceUpdateProperties - The application resource properties for patch operations.
+ *ApplicationResourceUpdateProperties `json:"properties,omitempty"`
+ // ID - Azure resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - Azure resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Azure resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Azure resource location.
+ Location *string `json:"location,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationResourceUpdate.
+func (aru ApplicationResourceUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if aru.ApplicationResourceUpdateProperties != nil {
+ objectMap["properties"] = aru.ApplicationResourceUpdateProperties
+ }
+ if aru.ID != nil {
+ objectMap["id"] = aru.ID
+ }
+ if aru.Name != nil {
+ objectMap["name"] = aru.Name
+ }
+ if aru.Type != nil {
+ objectMap["type"] = aru.Type
+ }
+ if aru.Location != nil {
+ objectMap["location"] = aru.Location
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationResourceUpdate struct.
+func (aru *ApplicationResourceUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationResourceUpdateProperties ApplicationResourceUpdateProperties
+ err = json.Unmarshal(*v, &applicationResourceUpdateProperties)
+ if err != nil {
+ return err
+ }
+ aru.ApplicationResourceUpdateProperties = &applicationResourceUpdateProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ aru.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ aru.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ aru.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ aru.Location = &location
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationResourceUpdateProperties the application resource properties for patch operations.
+type ApplicationResourceUpdateProperties struct {
+ // TypeVersion - The version of the application type as defined in the application manifest.
+ TypeVersion *string `json:"typeVersion,omitempty"`
+ // Parameters - List of application parameters with overridden values from their default values specified in the application manifest.
+ Parameters map[string]*string `json:"parameters"`
+ // UpgradePolicy - Describes the policy for a monitored application upgrade.
+ UpgradePolicy *ApplicationUpgradePolicy `json:"upgradePolicy,omitempty"`
+ // MinimumNodes - The minimum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. The value of this property cannot be more than the value of the MaximumNodes property.
+ MinimumNodes *int64 `json:"minimumNodes,omitempty"`
+ // MaximumNodes - The maximum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. By default, the value of this property is zero and it means that the services can be placed on any node.
+ MaximumNodes *int64 `json:"maximumNodes,omitempty"`
+ // RemoveApplicationCapacity - Remove the current application capacity settings.
+ RemoveApplicationCapacity *bool `json:"removeApplicationCapacity,omitempty"`
+ // Metrics - List of application capacity metric description.
+ Metrics *[]ApplicationMetricDescription `json:"metrics,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationResourceUpdateProperties.
+func (arup ApplicationResourceUpdateProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if arup.TypeVersion != nil {
+ objectMap["typeVersion"] = arup.TypeVersion
+ }
+ if arup.Parameters != nil {
+ objectMap["parameters"] = arup.Parameters
+ }
+ if arup.UpgradePolicy != nil {
+ objectMap["upgradePolicy"] = arup.UpgradePolicy
+ }
+ if arup.MinimumNodes != nil {
+ objectMap["minimumNodes"] = arup.MinimumNodes
+ }
+ if arup.MaximumNodes != nil {
+ objectMap["maximumNodes"] = arup.MaximumNodes
+ }
+ if arup.RemoveApplicationCapacity != nil {
+ objectMap["removeApplicationCapacity"] = arup.RemoveApplicationCapacity
+ }
+ if arup.Metrics != nil {
+ objectMap["metrics"] = arup.Metrics
+ }
+ return json.Marshal(objectMap)
+}
+
+// ApplicationsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ApplicationsCreateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationsCreateFuture) Result(client ApplicationsClient) (ar ApplicationResource, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsCreateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ApplicationsCreateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ar.Response.Response, err = future.GetResult(sender); err == nil && ar.Response.Response.StatusCode != http.StatusNoContent {
+ ar, err = client.CreateResponder(ar.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsCreateFuture", "Result", ar.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ApplicationsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationsDeleteFuture) Result(client ApplicationsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ApplicationsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ApplicationsUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationsUpdateFuture) Result(client ApplicationsClient) (aru ApplicationResourceUpdate, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ApplicationsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if aru.Response.Response, err = future.GetResult(sender); err == nil && aru.Response.Response.StatusCode != http.StatusNoContent {
+ aru, err = client.UpdateResponder(aru.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsUpdateFuture", "Result", aru.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ApplicationTypeResource the application type name resource
+type ApplicationTypeResource struct {
+ autorest.Response `json:"-"`
+ // ApplicationTypeResourceProperties - The application type name properties
+ *ApplicationTypeResourceProperties `json:"properties,omitempty"`
+ // ID - Azure resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - Azure resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Azure resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Azure resource location.
+ Location *string `json:"location,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationTypeResource.
+func (atr ApplicationTypeResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if atr.ApplicationTypeResourceProperties != nil {
+ objectMap["properties"] = atr.ApplicationTypeResourceProperties
+ }
+ if atr.ID != nil {
+ objectMap["id"] = atr.ID
+ }
+ if atr.Name != nil {
+ objectMap["name"] = atr.Name
+ }
+ if atr.Type != nil {
+ objectMap["type"] = atr.Type
+ }
+ if atr.Location != nil {
+ objectMap["location"] = atr.Location
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationTypeResource struct.
+func (atr *ApplicationTypeResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationTypeResourceProperties ApplicationTypeResourceProperties
+ err = json.Unmarshal(*v, &applicationTypeResourceProperties)
+ if err != nil {
+ return err
+ }
+ atr.ApplicationTypeResourceProperties = &applicationTypeResourceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ atr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ atr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ atr.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ atr.Location = &location
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationTypeResourceList the list of application type names.
+type ApplicationTypeResourceList struct {
+ autorest.Response `json:"-"`
+ Value *[]ApplicationTypeResource `json:"value,omitempty"`
+}
+
+// ApplicationTypeResourceProperties the application type name properties
+type ApplicationTypeResourceProperties struct {
+ // ProvisioningState - The current deployment or provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationTypesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ApplicationTypesDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationTypesDeleteFuture) Result(client ApplicationTypesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ApplicationTypesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ApplicationTypeVersionResource an application type version resource for the specified application type name
+// resource.
+type ApplicationTypeVersionResource struct {
+ autorest.Response `json:"-"`
+ // ApplicationTypeVersionResourceProperties - The properties of the application type version resource.
+ *ApplicationTypeVersionResourceProperties `json:"properties,omitempty"`
+ // ID - Azure resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - Azure resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Azure resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Azure resource location.
+ Location *string `json:"location,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationTypeVersionResource.
+func (atvr ApplicationTypeVersionResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if atvr.ApplicationTypeVersionResourceProperties != nil {
+ objectMap["properties"] = atvr.ApplicationTypeVersionResourceProperties
+ }
+ if atvr.ID != nil {
+ objectMap["id"] = atvr.ID
+ }
+ if atvr.Name != nil {
+ objectMap["name"] = atvr.Name
+ }
+ if atvr.Type != nil {
+ objectMap["type"] = atvr.Type
+ }
+ if atvr.Location != nil {
+ objectMap["location"] = atvr.Location
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationTypeVersionResource struct.
+func (atvr *ApplicationTypeVersionResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var applicationTypeVersionResourceProperties ApplicationTypeVersionResourceProperties
+ err = json.Unmarshal(*v, &applicationTypeVersionResourceProperties)
+ if err != nil {
+ return err
+ }
+ atvr.ApplicationTypeVersionResourceProperties = &applicationTypeVersionResourceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ atvr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ atvr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ atvr.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ atvr.Location = &location
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationTypeVersionResourceList the list of application type version resources for the specified application
+// type name resource.
+type ApplicationTypeVersionResourceList struct {
+ autorest.Response `json:"-"`
+ Value *[]ApplicationTypeVersionResource `json:"value,omitempty"`
+}
+
+// ApplicationTypeVersionResourceProperties the properties of the application type version resource.
+type ApplicationTypeVersionResourceProperties struct {
+ // ProvisioningState - The current deployment or provisioning state, which only appears in the response
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // AppPackageURL - The URL to the application package
+ AppPackageURL *string `json:"appPackageUrl,omitempty"`
+ // DefaultParameterList - List of application type parameters that can be overridden when creating or updating the application.
+ DefaultParameterList map[string]*string `json:"defaultParameterList"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationTypeVersionResourceProperties.
+func (atvrp ApplicationTypeVersionResourceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if atvrp.ProvisioningState != nil {
+ objectMap["provisioningState"] = atvrp.ProvisioningState
+ }
+ if atvrp.AppPackageURL != nil {
+ objectMap["appPackageUrl"] = atvrp.AppPackageURL
+ }
+ if atvrp.DefaultParameterList != nil {
+ objectMap["defaultParameterList"] = atvrp.DefaultParameterList
+ }
+ return json.Marshal(objectMap)
+}
+
+// ApplicationTypeVersionsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ApplicationTypeVersionsCreateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationTypeVersionsCreateFuture) Result(client ApplicationTypeVersionsClient) (atvr ApplicationTypeVersionResource, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsCreateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ApplicationTypeVersionsCreateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if atvr.Response.Response, err = future.GetResult(sender); err == nil && atvr.Response.Response.StatusCode != http.StatusNoContent {
+ atvr, err = client.CreateResponder(atvr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsCreateFuture", "Result", atvr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ApplicationTypeVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ApplicationTypeVersionsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ApplicationTypeVersionsDeleteFuture) Result(client ApplicationTypeVersionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ApplicationTypeVersionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ApplicationUpgradePolicy describes the policy for a monitored application upgrade.
+type ApplicationUpgradePolicy struct {
+ // UpgradeReplicaSetCheckTimeout - The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer).
+ UpgradeReplicaSetCheckTimeout *int64 `json:"upgradeReplicaSetCheckTimeout,omitempty"`
+ // ForceRestart - If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).
+ ForceRestart *bool `json:"forceRestart,omitempty"`
+ // RollingUpgradeMonitoringPolicy - The policy used for monitoring the application upgrade
+ RollingUpgradeMonitoringPolicy *RollingUpgradeMonitoringPolicy `json:"rollingUpgradeMonitoringPolicy,omitempty"`
+ // ApplicationHealthPolicy - Defines a health policy used to evaluate the health of an application or one of its children entities.
+ ApplicationHealthPolicy *ApplicationHealthPolicy `json:"applicationHealthPolicy,omitempty"`
+}
+
+// AvailableOperationDisplay operation supported by Service Fabric resource provider
+type AvailableOperationDisplay struct {
+ // Provider - The name of the provider.
+ Provider *string `json:"provider,omitempty"`
+ // Resource - The resource on which the operation is performed
+ Resource *string `json:"resource,omitempty"`
+ // Operation - The operation that can be performed.
+ Operation *string `json:"operation,omitempty"`
+ // Description - Operation description
+ Description *string `json:"description,omitempty"`
+}
+
+// AzureActiveDirectory the settings to enable AAD authentication on the cluster.
+type AzureActiveDirectory struct {
+ // TenantID - Azure active directory tenant id.
+ TenantID *string `json:"tenantId,omitempty"`
+ // ClusterApplication - Azure active directory cluster application id.
+ ClusterApplication *string `json:"clusterApplication,omitempty"`
+ // ClientApplication - Azure active directory client application id.
+ ClientApplication *string `json:"clientApplication,omitempty"`
+}
+
+// CertificateDescription describes the certificate details.
+type CertificateDescription struct {
+ // Thumbprint - Thumbprint of the primary certificate.
+ Thumbprint *string `json:"thumbprint,omitempty"`
+ // ThumbprintSecondary - Thumbprint of the secondary certificate.
+ ThumbprintSecondary *string `json:"thumbprintSecondary,omitempty"`
+ // X509StoreName - The local certificate store location. Possible values include: 'AddressBook', 'AuthRoot', 'CertificateAuthority', 'Disallowed', 'My', 'Root', 'TrustedPeople', 'TrustedPublisher'
+ X509StoreName X509StoreName `json:"x509StoreName,omitempty"`
+}
+
+// ClientCertificateCommonName describes the client certificate details using common name.
+type ClientCertificateCommonName struct {
+ // IsAdmin - Indicates if the client certificate has admin access to the cluster. Non admin clients can perform only read only operations on the cluster.
+ IsAdmin *bool `json:"isAdmin,omitempty"`
+ // CertificateCommonName - The common name of the client certificate.
+ CertificateCommonName *string `json:"certificateCommonName,omitempty"`
+ // CertificateIssuerThumbprint - The issuer thumbprint of the client certificate.
+ CertificateIssuerThumbprint *string `json:"certificateIssuerThumbprint,omitempty"`
+}
+
+// ClientCertificateThumbprint describes the client certificate details using thumbprint.
+type ClientCertificateThumbprint struct {
+ // IsAdmin - Indicates if the client certificate has admin access to the cluster. Non admin clients can perform only read only operations on the cluster.
+ IsAdmin *bool `json:"isAdmin,omitempty"`
+ // CertificateThumbprint - The thumbprint of the client certificate.
+ CertificateThumbprint *string `json:"certificateThumbprint,omitempty"`
+}
+
+// Cluster the cluster resource
+type Cluster struct {
+ autorest.Response `json:"-"`
+ // ClusterProperties - The cluster resource properties
+ *ClusterProperties `json:"properties,omitempty"`
+ // ID - Azure resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - Azure resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Azure resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Azure resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Azure resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Cluster.
+func (c Cluster) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if c.ClusterProperties != nil {
+ objectMap["properties"] = c.ClusterProperties
+ }
+ if c.ID != nil {
+ objectMap["id"] = c.ID
+ }
+ if c.Name != nil {
+ objectMap["name"] = c.Name
+ }
+ if c.Type != nil {
+ objectMap["type"] = c.Type
+ }
+ if c.Location != nil {
+ objectMap["location"] = c.Location
+ }
+ if c.Tags != nil {
+ objectMap["tags"] = c.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Cluster struct.
+func (c *Cluster) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var clusterProperties ClusterProperties
+ err = json.Unmarshal(*v, &clusterProperties)
+ if err != nil {
+ return err
+ }
+ c.ClusterProperties = &clusterProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ c.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ c.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ c.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ c.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ c.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ClusterCodeVersionsListResult the list results of the ServiceFabric runtime versions.
+type ClusterCodeVersionsListResult struct {
+ autorest.Response `json:"-"`
+ Value *[]ClusterCodeVersionsResult `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ClusterCodeVersionsResult the result of the ServiceFabric runtime versions
+type ClusterCodeVersionsResult struct {
+ // ID - The identification of the result
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the result
+ Name *string `json:"name,omitempty"`
+ // Type - The result resource type
+ Type *string `json:"type,omitempty"`
+ // ClusterVersionDetails - The detail of the Service Fabric runtime version result
+ *ClusterVersionDetails `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ClusterCodeVersionsResult.
+func (ccvr ClusterCodeVersionsResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ccvr.ID != nil {
+ objectMap["id"] = ccvr.ID
+ }
+ if ccvr.Name != nil {
+ objectMap["name"] = ccvr.Name
+ }
+ if ccvr.Type != nil {
+ objectMap["type"] = ccvr.Type
+ }
+ if ccvr.ClusterVersionDetails != nil {
+ objectMap["properties"] = ccvr.ClusterVersionDetails
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ClusterCodeVersionsResult struct.
+func (ccvr *ClusterCodeVersionsResult) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ccvr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ccvr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ccvr.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var clusterVersionDetails ClusterVersionDetails
+ err = json.Unmarshal(*v, &clusterVersionDetails)
+ if err != nil {
+ return err
+ }
+ ccvr.ClusterVersionDetails = &clusterVersionDetails
+ }
+ }
+ }
+
+ return nil
+}
+
+// ClusterHealthPolicy defines a health policy used to evaluate the health of the cluster or of a cluster node.
+type ClusterHealthPolicy struct {
+ // MaxPercentUnhealthyNodes - The maximum allowed percentage of unhealthy nodes before reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10.
+ // The percentage represents the maximum tolerated percentage of nodes that can be unhealthy before the cluster is considered in error.
+ // If the percentage is respected but there is at least one unhealthy node, the health is evaluated as Warning.
+ // The percentage is calculated by dividing the number of unhealthy nodes over the total number of nodes in the cluster.
+ // The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.
+ // In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that.
+ MaxPercentUnhealthyNodes *int32 `json:"maxPercentUnhealthyNodes,omitempty"`
+ // MaxPercentUnhealthyApplications - The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10.
+ // The percentage represents the maximum tolerated percentage of applications that can be unhealthy before the cluster is considered in error.
+ // If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning.
+ // This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap.
+ // The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero.
+ MaxPercentUnhealthyApplications *int32 `json:"maxPercentUnhealthyApplications,omitempty"`
+ // ApplicationHealthPolicies - Defines the application health policy map used to evaluate the health of an application or one of its children entities.
+ ApplicationHealthPolicies map[string]*ApplicationHealthPolicy `json:"applicationHealthPolicies"`
+}
+
+// MarshalJSON is the custom marshaler for ClusterHealthPolicy.
+func (chp ClusterHealthPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if chp.MaxPercentUnhealthyNodes != nil {
+ objectMap["maxPercentUnhealthyNodes"] = chp.MaxPercentUnhealthyNodes
+ }
+ if chp.MaxPercentUnhealthyApplications != nil {
+ objectMap["maxPercentUnhealthyApplications"] = chp.MaxPercentUnhealthyApplications
+ }
+ if chp.ApplicationHealthPolicies != nil {
+ objectMap["applicationHealthPolicies"] = chp.ApplicationHealthPolicies
+ }
+ return json.Marshal(objectMap)
+}
+
+// ClusterListResult cluster list results
+type ClusterListResult struct {
+ autorest.Response `json:"-"`
+ Value *[]Cluster `json:"value,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ClusterProperties describes the cluster resource properties.
+type ClusterProperties struct {
+ // AddOnFeatures - The list of add-on features to enable in the cluster.
+ AddOnFeatures *[]string `json:"addOnFeatures,omitempty"`
+ // AvailableClusterVersions - The Service Fabric runtime versions available for this cluster.
+ AvailableClusterVersions *[]ClusterVersionDetails `json:"availableClusterVersions,omitempty"`
+ // AzureActiveDirectory - The AAD authentication settings of the cluster.
+ AzureActiveDirectory *AzureActiveDirectory `json:"azureActiveDirectory,omitempty"`
+ // Certificate - The certificate to use for securing the cluster. The certificate provided will be used for node to node security within the cluster, SSL certificate for cluster management endpoint and default admin client.
+ Certificate *CertificateDescription `json:"certificate,omitempty"`
+ // CertificateCommonNames - Describes a list of server certificates referenced by common name that are used to secure the cluster.
+ CertificateCommonNames *ServerCertificateCommonNames `json:"certificateCommonNames,omitempty"`
+ // ClientCertificateCommonNames - The list of client certificates referenced by common name that are allowed to manage the cluster.
+ ClientCertificateCommonNames *[]ClientCertificateCommonName `json:"clientCertificateCommonNames,omitempty"`
+ // ClientCertificateThumbprints - The list of client certificates referenced by thumbprint that are allowed to manage the cluster.
+ ClientCertificateThumbprints *[]ClientCertificateThumbprint `json:"clientCertificateThumbprints,omitempty"`
+ // ClusterCodeVersion - The Service Fabric runtime version of the cluster. This property can only by set the user when **upgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**.
+ ClusterCodeVersion *string `json:"clusterCodeVersion,omitempty"`
+ // ClusterEndpoint - The Azure Resource Provider endpoint. A system service in the cluster connects to this endpoint.
+ ClusterEndpoint *string `json:"clusterEndpoint,omitempty"`
+ // ClusterID - A service generated unique identifier for the cluster resource.
+ ClusterID *string `json:"clusterId,omitempty"`
+ // ClusterState - The current state of the cluster.
+ // - WaitingForNodes - Indicates that the cluster resource is created and the resource provider is waiting for Service Fabric VM extension to boot up and report to it.
+ // - Deploying - Indicates that the Service Fabric runtime is being installed on the VMs. Cluster resource will be in this state until the cluster boots up and system services are up.
+ // - BaselineUpgrade - Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is automatically initiated when the cluster boots up for the first time.
+ // - UpdatingUserConfiguration - Indicates that the cluster is being upgraded with the user provided configuration.
+ // - UpdatingUserCertificate - Indicates that the cluster is being upgraded with the user provided certificate.
+ // - UpdatingInfrastructure - Indicates that the cluster is being upgraded with the latest Service Fabric runtime version. This happens only when the **upgradeMode** is set to 'Automatic'.
+ // - EnforcingClusterVersion - Indicates that cluster is on a different version than expected and the cluster is being upgraded to the expected version.
+ // - UpgradeServiceUnreachable - Indicates that the system service in the cluster is no longer polling the Resource Provider. Clusters in this state cannot be managed by the Resource Provider.
+ // - AutoScale - Indicates that the ReliabilityLevel of the cluster is being adjusted.
+ // - Ready - Indicates that the cluster is in a stable state.
+ // . Possible values include: 'WaitingForNodes', 'Deploying', 'BaselineUpgrade', 'UpdatingUserConfiguration', 'UpdatingUserCertificate', 'UpdatingInfrastructure', 'EnforcingClusterVersion', 'UpgradeServiceUnreachable', 'AutoScale', 'Ready'
+ ClusterState ClusterState `json:"clusterState,omitempty"`
+ // DiagnosticsStorageAccountConfig - The storage account information for storing Service Fabric diagnostic logs.
+ DiagnosticsStorageAccountConfig *DiagnosticsStorageAccountConfig `json:"diagnosticsStorageAccountConfig,omitempty"`
+ // FabricSettings - The list of custom fabric settings to configure the cluster.
+ FabricSettings *[]SettingsSectionDescription `json:"fabricSettings,omitempty"`
+ // ManagementEndpoint - The http management endpoint of the cluster.
+ ManagementEndpoint *string `json:"managementEndpoint,omitempty"`
+ // NodeTypes - The list of node types in the cluster.
+ NodeTypes *[]NodeTypeDescription `json:"nodeTypes,omitempty"`
+ // ProvisioningState - The provisioning state of the cluster resource. Possible values include: 'Updating', 'Succeeded', 'Failed', 'Canceled'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity).
+ // - None - Run the System services with a target replica set count of 1. This should only be used for test clusters.
+ // - Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters.
+ // - Silver - Run the System services with a target replica set count of 5.
+ // - Gold - Run the System services with a target replica set count of 7.
+ // - Platinum - Run the System services with a target replica set count of 9.
+ // . Possible values include: 'ReliabilityLevelNone', 'ReliabilityLevelBronze', 'ReliabilityLevelSilver', 'ReliabilityLevelGold', 'ReliabilityLevelPlatinum'
+ ReliabilityLevel ReliabilityLevel `json:"reliabilityLevel,omitempty"`
+ // ReverseProxyCertificate - The server certificate used by reverse proxy.
+ ReverseProxyCertificate *CertificateDescription `json:"reverseProxyCertificate,omitempty"`
+ // ReverseProxyCertificateCommonNames - Describes a list of server certificates referenced by common name that are used to secure the cluster.
+ ReverseProxyCertificateCommonNames *ServerCertificateCommonNames `json:"reverseProxyCertificateCommonNames,omitempty"`
+ // UpgradeDescription - The policy to use when upgrading the cluster.
+ UpgradeDescription *ClusterUpgradePolicy `json:"upgradeDescription,omitempty"`
+ // UpgradeMode - The upgrade mode of the cluster when new Service Fabric runtime version is available.
+ // - Automatic - The cluster will be automatically upgraded to the latest Service Fabric runtime version as soon as it is available.
+ // - Manual - The cluster will not be automatically upgraded to the latest Service Fabric runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource.
+ // . Possible values include: 'Automatic', 'Manual'
+ UpgradeMode UpgradeMode `json:"upgradeMode,omitempty"`
+ // VMImage - The VM image VMSS has been configured with. Generic names such as Windows or Linux can be used.
+ VMImage *string `json:"vmImage,omitempty"`
+}
+
+// ClusterPropertiesUpdateParameters describes the cluster resource properties that can be updated during PATCH
+// operation.
+type ClusterPropertiesUpdateParameters struct {
+ // AddOnFeatures - The list of add-on features to enable in the cluster.
+ AddOnFeatures *[]string `json:"addOnFeatures,omitempty"`
+ // Certificate - The certificate to use for securing the cluster. The certificate provided will be used for node to node security within the cluster, SSL certificate for cluster management endpoint and default admin client.
+ Certificate *CertificateDescription `json:"certificate,omitempty"`
+ // CertificateCommonNames - Describes a list of server certificates referenced by common name that are used to secure the cluster.
+ CertificateCommonNames *ServerCertificateCommonNames `json:"certificateCommonNames,omitempty"`
+ // ClientCertificateCommonNames - The list of client certificates referenced by common name that are allowed to manage the cluster. This will overwrite the existing list.
+ ClientCertificateCommonNames *[]ClientCertificateCommonName `json:"clientCertificateCommonNames,omitempty"`
+ // ClientCertificateThumbprints - The list of client certificates referenced by thumbprint that are allowed to manage the cluster. This will overwrite the existing list.
+ ClientCertificateThumbprints *[]ClientCertificateThumbprint `json:"clientCertificateThumbprints,omitempty"`
+ // ClusterCodeVersion - The Service Fabric runtime version of the cluster. This property can only by set the user when **upgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**.
+ ClusterCodeVersion *string `json:"clusterCodeVersion,omitempty"`
+ // FabricSettings - The list of custom fabric settings to configure the cluster. This will overwrite the existing list.
+ FabricSettings *[]SettingsSectionDescription `json:"fabricSettings,omitempty"`
+ // NodeTypes - The list of node types in the cluster. This will overwrite the existing list.
+ NodeTypes *[]NodeTypeDescription `json:"nodeTypes,omitempty"`
+ // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity).
+ // - None - Run the System services with a target replica set count of 1. This should only be used for test clusters.
+ // - Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters.
+ // - Silver - Run the System services with a target replica set count of 5.
+ // - Gold - Run the System services with a target replica set count of 7.
+ // - Platinum - Run the System services with a target replica set count of 9.
+ // . Possible values include: 'ReliabilityLevel1None', 'ReliabilityLevel1Bronze', 'ReliabilityLevel1Silver', 'ReliabilityLevel1Gold', 'ReliabilityLevel1Platinum'
+ ReliabilityLevel ReliabilityLevel1 `json:"reliabilityLevel,omitempty"`
+ // ReverseProxyCertificate - The server certificate used by reverse proxy.
+ ReverseProxyCertificate *CertificateDescription `json:"reverseProxyCertificate,omitempty"`
+ // UpgradeDescription - The policy to use when upgrading the cluster.
+ UpgradeDescription *ClusterUpgradePolicy `json:"upgradeDescription,omitempty"`
+ // UpgradeMode - The upgrade mode of the cluster when new Service Fabric runtime version is available.
+ // - Automatic - The cluster will be automatically upgraded to the latest Service Fabric runtime version as soon as it is available.
+ // - Manual - The cluster will not be automatically upgraded to the latest Service Fabric runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource.
+ // . Possible values include: 'UpgradeMode1Automatic', 'UpgradeMode1Manual'
+ UpgradeMode UpgradeMode1 `json:"upgradeMode,omitempty"`
+}
+
+// ClustersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ClustersCreateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ClustersCreateFuture) Result(client ClustersClient) (c Cluster, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersCreateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ClustersCreateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.CreateResponder(c.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersCreateFuture", "Result", c.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ClustersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ClustersUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ClustersUpdateFuture) Result(client ClustersClient) (c Cluster, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ClustersUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent {
+ c, err = client.UpdateResponder(c.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ClustersUpdateFuture", "Result", c.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ClusterUpdateParameters cluster update request
+type ClusterUpdateParameters struct {
+ // ClusterPropertiesUpdateParameters - Describes the cluster resource properties that can be updated during PATCH operation.
+ *ClusterPropertiesUpdateParameters `json:"properties,omitempty"`
+ // Tags - Cluster update parameters
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ClusterUpdateParameters.
+func (cup ClusterUpdateParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cup.ClusterPropertiesUpdateParameters != nil {
+ objectMap["properties"] = cup.ClusterPropertiesUpdateParameters
+ }
+ if cup.Tags != nil {
+ objectMap["tags"] = cup.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ClusterUpdateParameters struct.
+func (cup *ClusterUpdateParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var clusterPropertiesUpdateParameters ClusterPropertiesUpdateParameters
+ err = json.Unmarshal(*v, &clusterPropertiesUpdateParameters)
+ if err != nil {
+ return err
+ }
+ cup.ClusterPropertiesUpdateParameters = &clusterPropertiesUpdateParameters
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ cup.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ClusterUpgradeDeltaHealthPolicy describes the delta health policies for the cluster upgrade.
+type ClusterUpgradeDeltaHealthPolicy struct {
+ // MaxPercentDeltaUnhealthyNodes - The maximum allowed percentage of nodes health degradation allowed during cluster upgrades.
+ // The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation.
+ // The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits.
+ MaxPercentDeltaUnhealthyNodes *int32 `json:"maxPercentDeltaUnhealthyNodes,omitempty"`
+ // MaxPercentUpgradeDomainDeltaUnhealthyNodes - The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades.
+ // The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation.
+ // The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits.
+ MaxPercentUpgradeDomainDeltaUnhealthyNodes *int32 `json:"maxPercentUpgradeDomainDeltaUnhealthyNodes,omitempty"`
+ // MaxPercentDeltaUnhealthyApplications - The maximum allowed percentage of applications health degradation allowed during cluster upgrades.
+ // The delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation.
+ // The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this.
+ MaxPercentDeltaUnhealthyApplications *int32 `json:"maxPercentDeltaUnhealthyApplications,omitempty"`
+ // ApplicationDeltaHealthPolicies - Defines the application delta health policy map used to evaluate the health of an application or one of its child entities when upgrading the cluster.
+ ApplicationDeltaHealthPolicies map[string]*ApplicationDeltaHealthPolicy `json:"applicationDeltaHealthPolicies"`
+}
+
+// MarshalJSON is the custom marshaler for ClusterUpgradeDeltaHealthPolicy.
+func (cudhp ClusterUpgradeDeltaHealthPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cudhp.MaxPercentDeltaUnhealthyNodes != nil {
+ objectMap["maxPercentDeltaUnhealthyNodes"] = cudhp.MaxPercentDeltaUnhealthyNodes
+ }
+ if cudhp.MaxPercentUpgradeDomainDeltaUnhealthyNodes != nil {
+ objectMap["maxPercentUpgradeDomainDeltaUnhealthyNodes"] = cudhp.MaxPercentUpgradeDomainDeltaUnhealthyNodes
+ }
+ if cudhp.MaxPercentDeltaUnhealthyApplications != nil {
+ objectMap["maxPercentDeltaUnhealthyApplications"] = cudhp.MaxPercentDeltaUnhealthyApplications
+ }
+ if cudhp.ApplicationDeltaHealthPolicies != nil {
+ objectMap["applicationDeltaHealthPolicies"] = cudhp.ApplicationDeltaHealthPolicies
+ }
+ return json.Marshal(objectMap)
+}
+
+// ClusterUpgradePolicy describes the policy used when upgrading the cluster.
+type ClusterUpgradePolicy struct {
+ // ForceRestart - If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).
+ ForceRestart *bool `json:"forceRestart,omitempty"`
+ // UpgradeReplicaSetCheckTimeout - The maximum amount of time to block processing of an upgrade domain and revent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
+ UpgradeReplicaSetCheckTimeout *string `json:"upgradeReplicaSetCheckTimeout,omitempty"`
+ // HealthCheckWaitDuration - The length of time to wait after completing an upgrade domain before performing health checks. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
+ HealthCheckWaitDuration *string `json:"healthCheckWaitDuration,omitempty"`
+ // HealthCheckStableDuration - The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
+ HealthCheckStableDuration *string `json:"healthCheckStableDuration,omitempty"`
+ // HealthCheckRetryTimeout - The amount of time to retry health evaluation when the application or cluster is unhealthy before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
+ HealthCheckRetryTimeout *string `json:"healthCheckRetryTimeout,omitempty"`
+ // UpgradeTimeout - The amount of time the overall upgrade has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
+ UpgradeTimeout *string `json:"upgradeTimeout,omitempty"`
+ // UpgradeDomainTimeout - The amount of time each upgrade domain has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
+ UpgradeDomainTimeout *string `json:"upgradeDomainTimeout,omitempty"`
+ // HealthPolicy - The cluster health policy used when upgrading the cluster.
+ HealthPolicy *ClusterHealthPolicy `json:"healthPolicy,omitempty"`
+ // DeltaHealthPolicy - The cluster delta health policy used when upgrading the cluster.
+ DeltaHealthPolicy *ClusterUpgradeDeltaHealthPolicy `json:"deltaHealthPolicy,omitempty"`
+}
+
+// ClusterVersionDetails the detail of the Service Fabric runtime version result
+type ClusterVersionDetails struct {
+ // CodeVersion - The Service Fabric runtime version of the cluster.
+ CodeVersion *string `json:"codeVersion,omitempty"`
+ // SupportExpiryUtc - The date of expiry of support of the version.
+ SupportExpiryUtc *string `json:"supportExpiryUtc,omitempty"`
+ // Environment - Indicates if this version is for Windows or Linux operating system. Possible values include: 'Windows', 'Linux'
+ Environment Environment `json:"environment,omitempty"`
+}
+
+// DiagnosticsStorageAccountConfig the storage account information for storing Service Fabric diagnostic logs.
+type DiagnosticsStorageAccountConfig struct {
+ // StorageAccountName - The Azure storage account name.
+ StorageAccountName *string `json:"storageAccountName,omitempty"`
+ // ProtectedAccountKeyName - The protected diagnostics storage key name.
+ ProtectedAccountKeyName *string `json:"protectedAccountKeyName,omitempty"`
+ // BlobEndpoint - The blob endpoint of the azure storage account.
+ BlobEndpoint *string `json:"blobEndpoint,omitempty"`
+ // QueueEndpoint - The queue endpoint of the azure storage account.
+ QueueEndpoint *string `json:"queueEndpoint,omitempty"`
+ // TableEndpoint - The table endpoint of the azure storage account.
+ TableEndpoint *string `json:"tableEndpoint,omitempty"`
+}
+
+// EndpointRangeDescription port range details
+type EndpointRangeDescription struct {
+ // StartPort - Starting port of a range of ports
+ StartPort *int32 `json:"startPort,omitempty"`
+ // EndPort - End port of a range of ports
+ EndPort *int32 `json:"endPort,omitempty"`
+}
+
+// ErrorModel the structure of the error.
+type ErrorModel struct {
+ // Error - The error details.
+ Error *ErrorModelError `json:"error,omitempty"`
+}
+
+// ErrorModelError the error details.
+type ErrorModelError struct {
+ // Code - The error code.
+ Code *string `json:"code,omitempty"`
+ // Message - The error message.
+ Message *string `json:"message,omitempty"`
+}
+
+// NamedPartitionSchemeDescription describes the named partition scheme of the service.
+type NamedPartitionSchemeDescription struct {
+ // Count - The number of partitions.
+ Count *int32 `json:"Count,omitempty"`
+ // Names - Array of size specified by the ‘Count’ parameter, for the names of the partitions.
+ Names *[]string `json:"Names,omitempty"`
+ // PartitionScheme - Possible values include: 'PartitionSchemePartitionSchemeDescription', 'PartitionSchemeNamed', 'PartitionSchemeSingleton', 'PartitionSchemeUniformInt64Range'
+ PartitionScheme PartitionSchemeBasicPartitionSchemeDescription `json:"PartitionScheme,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for NamedPartitionSchemeDescription.
+func (npsd NamedPartitionSchemeDescription) MarshalJSON() ([]byte, error) {
+ npsd.PartitionScheme = PartitionSchemeNamed
+ objectMap := make(map[string]interface{})
+ if npsd.Count != nil {
+ objectMap["Count"] = npsd.Count
+ }
+ if npsd.Names != nil {
+ objectMap["Names"] = npsd.Names
+ }
+ if npsd.PartitionScheme != "" {
+ objectMap["PartitionScheme"] = npsd.PartitionScheme
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsNamedPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription.
+func (npsd NamedPartitionSchemeDescription) AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) {
+ return &npsd, true
+}
+
+// AsSingletonPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription.
+func (npsd NamedPartitionSchemeDescription) AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) {
+ return nil, false
+}
+
+// AsUniformInt64RangePartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription.
+func (npsd NamedPartitionSchemeDescription) AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) {
+ return nil, false
+}
+
+// AsPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription.
+func (npsd NamedPartitionSchemeDescription) AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) {
+ return nil, false
+}
+
+// AsBasicPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription.
+func (npsd NamedPartitionSchemeDescription) AsBasicPartitionSchemeDescription() (BasicPartitionSchemeDescription, bool) {
+ return &npsd, true
+}
+
+// NodeTypeDescription describes a node type in the cluster, each node type represents sub set of nodes in the
+// cluster.
+type NodeTypeDescription struct {
+ // Name - The name of the node type.
+ Name *string `json:"name,omitempty"`
+ // PlacementProperties - The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.
+ PlacementProperties map[string]*string `json:"placementProperties"`
+ // Capacities - The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.
+ Capacities map[string]*string `json:"capacities"`
+ // ClientConnectionEndpointPort - The TCP cluster management endpoint port.
+ ClientConnectionEndpointPort *int32 `json:"clientConnectionEndpointPort,omitempty"`
+ // HTTPGatewayEndpointPort - The HTTP cluster management endpoint port.
+ HTTPGatewayEndpointPort *int32 `json:"httpGatewayEndpointPort,omitempty"`
+ // DurabilityLevel - The durability level of the node type. Learn about [DurabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity).
+ // - Bronze - No privileges. This is the default.
+ // - Silver - The infrastructure jobs can be paused for a duration of 10 minutes per UD.
+ // - Gold - The infrastructure jobs can be paused for a duration of 2 hours per UD. Gold durability can be enabled only on full node VM skus like D15_V2, G5 etc.
+ // . Possible values include: 'Bronze', 'Silver', 'Gold'
+ DurabilityLevel DurabilityLevel `json:"durabilityLevel,omitempty"`
+ // ApplicationPorts - The range of ports from which cluster assigned port to Service Fabric applications.
+ ApplicationPorts *EndpointRangeDescription `json:"applicationPorts,omitempty"`
+ // EphemeralPorts - The range of empheral ports that nodes in this node type should be configured with.
+ EphemeralPorts *EndpointRangeDescription `json:"ephemeralPorts,omitempty"`
+ // IsPrimary - The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.
+ IsPrimary *bool `json:"isPrimary,omitempty"`
+ // VMInstanceCount - The number of nodes in the node type. This count should match the capacity property in the corresponding VirtualMachineScaleSet resource.
+ VMInstanceCount *int32 `json:"vmInstanceCount,omitempty"`
+ // ReverseProxyEndpointPort - The endpoint used by reverse proxy.
+ ReverseProxyEndpointPort *int32 `json:"reverseProxyEndpointPort,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for NodeTypeDescription.
+func (ntd NodeTypeDescription) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ntd.Name != nil {
+ objectMap["name"] = ntd.Name
+ }
+ if ntd.PlacementProperties != nil {
+ objectMap["placementProperties"] = ntd.PlacementProperties
+ }
+ if ntd.Capacities != nil {
+ objectMap["capacities"] = ntd.Capacities
+ }
+ if ntd.ClientConnectionEndpointPort != nil {
+ objectMap["clientConnectionEndpointPort"] = ntd.ClientConnectionEndpointPort
+ }
+ if ntd.HTTPGatewayEndpointPort != nil {
+ objectMap["httpGatewayEndpointPort"] = ntd.HTTPGatewayEndpointPort
+ }
+ if ntd.DurabilityLevel != "" {
+ objectMap["durabilityLevel"] = ntd.DurabilityLevel
+ }
+ if ntd.ApplicationPorts != nil {
+ objectMap["applicationPorts"] = ntd.ApplicationPorts
+ }
+ if ntd.EphemeralPorts != nil {
+ objectMap["ephemeralPorts"] = ntd.EphemeralPorts
+ }
+ if ntd.IsPrimary != nil {
+ objectMap["isPrimary"] = ntd.IsPrimary
+ }
+ if ntd.VMInstanceCount != nil {
+ objectMap["vmInstanceCount"] = ntd.VMInstanceCount
+ }
+ if ntd.ReverseProxyEndpointPort != nil {
+ objectMap["reverseProxyEndpointPort"] = ntd.ReverseProxyEndpointPort
+ }
+ return json.Marshal(objectMap)
+}
+
+// OperationListResult describes the result of the request to list Service Fabric operations.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of Service Fabric operations supported by the Microsoft.ServiceFabric resource provider.
+ Value *[]OperationResult `json:"value,omitempty"`
+ // NextLink - URL to get the next set of operation list results if there are any.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// OperationListResultIterator provides access to a complete listing of OperationResult values.
+type OperationListResultIterator struct {
+ i int
+ page OperationListResultPage
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OperationListResultIterator) Next() error {
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err := iter.page.Next()
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OperationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OperationListResultIterator) Response() OperationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OperationListResultIterator) Value() OperationResult {
+ if !iter.page.NotDone() {
+ return OperationResult{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (olr OperationListResult) IsEmpty() bool {
+ return olr.Value == nil || len(*olr.Value) == 0
+}
+
+// operationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+ if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare(&http.Request{},
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(olr.NextLink)))
+}
+
+// OperationListResultPage contains a page of OperationResult values.
+type OperationListResultPage struct {
+ fn func(OperationListResult) (OperationListResult, error)
+ olr OperationListResult
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OperationListResultPage) Next() error {
+ next, err := page.fn(page.olr)
+ if err != nil {
+ return err
+ }
+ page.olr = next
+ return nil
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OperationListResultPage) NotDone() bool {
+ return !page.olr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OperationListResultPage) Response() OperationListResult {
+ return page.olr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OperationListResultPage) Values() []OperationResult {
+ if page.olr.IsEmpty() {
+ return nil
+ }
+ return *page.olr.Value
+}
+
+// OperationResult available operation list result
+type OperationResult struct {
+ // Name - The name of the operation.
+ Name *string `json:"name,omitempty"`
+ // Display - The object that represents the operation.
+ Display *AvailableOperationDisplay `json:"display,omitempty"`
+ // Origin - Origin result
+ Origin *string `json:"origin,omitempty"`
+ // NextLink - The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// BasicPartitionSchemeDescription describes how the service is partitioned.
+type BasicPartitionSchemeDescription interface {
+ AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool)
+ AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool)
+ AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool)
+ AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool)
+}
+
+// PartitionSchemeDescription describes how the service is partitioned.
+type PartitionSchemeDescription struct {
+ // PartitionScheme - Possible values include: 'PartitionSchemePartitionSchemeDescription', 'PartitionSchemeNamed', 'PartitionSchemeSingleton', 'PartitionSchemeUniformInt64Range'
+ PartitionScheme PartitionSchemeBasicPartitionSchemeDescription `json:"PartitionScheme,omitempty"`
+}
+
+func unmarshalBasicPartitionSchemeDescription(body []byte) (BasicPartitionSchemeDescription, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["PartitionScheme"] {
+ case string(PartitionSchemeNamed):
+ var npsd NamedPartitionSchemeDescription
+ err := json.Unmarshal(body, &npsd)
+ return npsd, err
+ case string(PartitionSchemeSingleton):
+ var spsd SingletonPartitionSchemeDescription
+ err := json.Unmarshal(body, &spsd)
+ return spsd, err
+ case string(PartitionSchemeUniformInt64Range):
+ var ui6rpsd UniformInt64RangePartitionSchemeDescription
+ err := json.Unmarshal(body, &ui6rpsd)
+ return ui6rpsd, err
+ default:
+ var psd PartitionSchemeDescription
+ err := json.Unmarshal(body, &psd)
+ return psd, err
+ }
+}
+func unmarshalBasicPartitionSchemeDescriptionArray(body []byte) ([]BasicPartitionSchemeDescription, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ psdArray := make([]BasicPartitionSchemeDescription, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ psd, err := unmarshalBasicPartitionSchemeDescription(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ psdArray[index] = psd
+ }
+ return psdArray, nil
+}
+
+// MarshalJSON is the custom marshaler for PartitionSchemeDescription.
+func (psd PartitionSchemeDescription) MarshalJSON() ([]byte, error) {
+ psd.PartitionScheme = PartitionSchemePartitionSchemeDescription
+ objectMap := make(map[string]interface{})
+ if psd.PartitionScheme != "" {
+ objectMap["PartitionScheme"] = psd.PartitionScheme
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsNamedPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription.
+func (psd PartitionSchemeDescription) AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) {
+ return nil, false
+}
+
+// AsSingletonPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription.
+func (psd PartitionSchemeDescription) AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) {
+ return nil, false
+}
+
+// AsUniformInt64RangePartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription.
+func (psd PartitionSchemeDescription) AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) {
+ return nil, false
+}
+
+// AsPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription.
+func (psd PartitionSchemeDescription) AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) {
+ return &psd, true
+}
+
+// AsBasicPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription.
+func (psd PartitionSchemeDescription) AsBasicPartitionSchemeDescription() (BasicPartitionSchemeDescription, bool) {
+ return &psd, true
+}
+
+// ProxyResource the resource model definition for proxy-only resource.
+type ProxyResource struct {
+ // ID - Azure resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - Azure resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Azure resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Azure resource location.
+ Location *string `json:"location,omitempty"`
+}
+
+// Resource the resource model definition.
+type Resource struct {
+ // ID - Azure resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - Azure resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Azure resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Azure resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Azure resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.ID != nil {
+ objectMap["id"] = r.ID
+ }
+ if r.Name != nil {
+ objectMap["name"] = r.Name
+ }
+ if r.Type != nil {
+ objectMap["type"] = r.Type
+ }
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// RollingUpgradeMonitoringPolicy the policy used for monitoring the application upgrade
+type RollingUpgradeMonitoringPolicy struct {
+ // HealthCheckWaitDuration - The amount of time to wait after completing an upgrade domain before applying health policies. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.
+ HealthCheckWaitDuration *string `json:"healthCheckWaitDuration,omitempty"`
+ // HealthCheckStableDuration - The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.
+ HealthCheckStableDuration *string `json:"healthCheckStableDuration,omitempty"`
+ // HealthCheckRetryTimeout - The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.
+ HealthCheckRetryTimeout *string `json:"healthCheckRetryTimeout,omitempty"`
+ // UpgradeTimeout - The amount of time the overall upgrade has to complete before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.
+ UpgradeTimeout *string `json:"upgradeTimeout,omitempty"`
+ // UpgradeDomainTimeout - The amount of time each upgrade domain has to complete before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.
+ UpgradeDomainTimeout *string `json:"upgradeDomainTimeout,omitempty"`
+}
+
+// ServerCertificateCommonName describes the server certificate details using common name.
+type ServerCertificateCommonName struct {
+ // CertificateCommonName - The common name of the server certificate.
+ CertificateCommonName *string `json:"certificateCommonName,omitempty"`
+ // CertificateIssuerThumbprint - The issuer thumbprint of the server certificate.
+ CertificateIssuerThumbprint *string `json:"certificateIssuerThumbprint,omitempty"`
+}
+
+// ServerCertificateCommonNames describes a list of server certificates referenced by common name that are used to
+// secure the cluster.
+type ServerCertificateCommonNames struct {
+ // CommonNames - The list of server certificates referenced by common name that are used to secure the cluster.
+ CommonNames *[]ServerCertificateCommonName `json:"commonNames,omitempty"`
+ // X509StoreName - The local certificate store location. Possible values include: 'X509StoreName1AddressBook', 'X509StoreName1AuthRoot', 'X509StoreName1CertificateAuthority', 'X509StoreName1Disallowed', 'X509StoreName1My', 'X509StoreName1Root', 'X509StoreName1TrustedPeople', 'X509StoreName1TrustedPublisher'
+ X509StoreName X509StoreName1 `json:"x509StoreName,omitempty"`
+}
+
+// ServiceCorrelationDescription creates a particular correlation between services.
+type ServiceCorrelationDescription struct {
+ // Scheme - The ServiceCorrelationScheme which describes the relationship between this service and the service specified via ServiceName. Possible values include: 'ServiceCorrelationSchemeInvalid', 'ServiceCorrelationSchemeAffinity', 'ServiceCorrelationSchemeAlignedAffinity', 'ServiceCorrelationSchemeNonAlignedAffinity'
+ Scheme ServiceCorrelationScheme `json:"Scheme,omitempty"`
+ // ServiceName - The name of the service that the correlation relationship is established with.
+ ServiceName *string `json:"ServiceName,omitempty"`
+}
+
+// ServiceLoadMetricDescription specifies a metric to load balance a service during runtime.
+type ServiceLoadMetricDescription struct {
+ // Name - The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive.
+ Name *string `json:"Name,omitempty"`
+ // Weight - The service load metric relative weight, compared to other metrics configured for this service, as a number. Possible values include: 'ServiceLoadMetricWeightZero', 'ServiceLoadMetricWeightLow', 'ServiceLoadMetricWeightMedium', 'ServiceLoadMetricWeightHigh'
+ Weight ServiceLoadMetricWeight `json:"Weight,omitempty"`
+ // PrimaryDefaultLoad - Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica.
+ PrimaryDefaultLoad *int32 `json:"PrimaryDefaultLoad,omitempty"`
+ // SecondaryDefaultLoad - Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica.
+ SecondaryDefaultLoad *int32 `json:"SecondaryDefaultLoad,omitempty"`
+ // DefaultLoad - Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric.
+ DefaultLoad *int32 `json:"DefaultLoad,omitempty"`
+}
+
+// BasicServicePlacementPolicyDescription describes the policy to be used for placement of a Service Fabric service.
+type BasicServicePlacementPolicyDescription interface {
+ AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool)
+}
+
+// ServicePlacementPolicyDescription describes the policy to be used for placement of a Service Fabric service.
+type ServicePlacementPolicyDescription struct {
+ // Type - Possible values include: 'TypeServicePlacementPolicyDescription'
+ Type Type `json:"Type,omitempty"`
+}
+
+func unmarshalBasicServicePlacementPolicyDescription(body []byte) (BasicServicePlacementPolicyDescription, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["Type"] {
+ default:
+ var sppd ServicePlacementPolicyDescription
+ err := json.Unmarshal(body, &sppd)
+ return sppd, err
+ }
+}
+func unmarshalBasicServicePlacementPolicyDescriptionArray(body []byte) ([]BasicServicePlacementPolicyDescription, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ sppdArray := make([]BasicServicePlacementPolicyDescription, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ sppd, err := unmarshalBasicServicePlacementPolicyDescription(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ sppdArray[index] = sppd
+ }
+ return sppdArray, nil
+}
+
+// MarshalJSON is the custom marshaler for ServicePlacementPolicyDescription.
+func (sppd ServicePlacementPolicyDescription) MarshalJSON() ([]byte, error) {
+ sppd.Type = TypeServicePlacementPolicyDescription
+ objectMap := make(map[string]interface{})
+ if sppd.Type != "" {
+ objectMap["Type"] = sppd.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription.
+func (sppd ServicePlacementPolicyDescription) AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) {
+ return &sppd, true
+}
+
+// AsBasicServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription.
+func (sppd ServicePlacementPolicyDescription) AsBasicServicePlacementPolicyDescription() (BasicServicePlacementPolicyDescription, bool) {
+ return &sppd, true
+}
+
+// ServiceResource the service resource.
+type ServiceResource struct {
+ autorest.Response `json:"-"`
+ // BasicServiceResourceProperties - The service resource properties.
+ BasicServiceResourceProperties `json:"properties,omitempty"`
+ // ID - Azure resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - Azure resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Azure resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Azure resource location.
+ Location *string `json:"location,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ServiceResource.
+func (sr ServiceResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ objectMap["properties"] = sr.BasicServiceResourceProperties
+ if sr.ID != nil {
+ objectMap["id"] = sr.ID
+ }
+ if sr.Name != nil {
+ objectMap["name"] = sr.Name
+ }
+ if sr.Type != nil {
+ objectMap["type"] = sr.Type
+ }
+ if sr.Location != nil {
+ objectMap["location"] = sr.Location
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ServiceResource struct.
+func (sr *ServiceResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ basicServiceResourceProperties, err := unmarshalBasicServiceResourceProperties(*v)
+ if err != nil {
+ return err
+ }
+ sr.BasicServiceResourceProperties = basicServiceResourceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ sr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ sr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ sr.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ sr.Location = &location
+ }
+ }
+ }
+
+ return nil
+}
+
+// ServiceResourceList the list of service resources.
+type ServiceResourceList struct {
+ autorest.Response `json:"-"`
+ Value *[]ServiceResource `json:"value,omitempty"`
+}
+
+// BasicServiceResourceProperties the service resource properties.
+type BasicServiceResourceProperties interface {
+ AsStatefulServiceProperties() (*StatefulServiceProperties, bool)
+ AsStatelessServiceProperties() (*StatelessServiceProperties, bool)
+ AsServiceResourceProperties() (*ServiceResourceProperties, bool)
+}
+
+// ServiceResourceProperties the service resource properties.
+type ServiceResourceProperties struct {
+ // ProvisioningState - The current deployment or provisioning state, which only appears in the response
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // ServiceTypeName - The name of the service type
+ ServiceTypeName *string `json:"serviceTypeName,omitempty"`
+ // PartitionDescription - Describes how the service is partitioned.
+ PartitionDescription BasicPartitionSchemeDescription `json:"partitionDescription,omitempty"`
+ // ServiceKind - Possible values include: 'ServiceKindServiceResourceProperties', 'ServiceKindStateful1', 'ServiceKindStateless1'
+ ServiceKind ServiceKindBasicServiceResourceProperties `json:"serviceKind,omitempty"`
+ // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".
+ PlacementConstraints *string `json:"placementConstraints,omitempty"`
+ // CorrelationScheme - A list that describes the correlation of the service with other services.
+ CorrelationScheme *[]ServiceCorrelationDescription `json:"correlationScheme,omitempty"`
+ // ServiceLoadMetrics - The service load metrics is given as an array of ServiceLoadMetricDescription objects.
+ ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"serviceLoadMetrics,omitempty"`
+ // ServicePlacementPolicies - A list that describes the correlation of the service with other services.
+ ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"`
+ // DefaultMoveCost - Specifies the move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High'
+ DefaultMoveCost MoveCost `json:"defaultMoveCost,omitempty"`
+}
+
+func unmarshalBasicServiceResourceProperties(body []byte) (BasicServiceResourceProperties, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["serviceKind"] {
+ case string(ServiceKindStateful1):
+ var ssp StatefulServiceProperties
+ err := json.Unmarshal(body, &ssp)
+ return ssp, err
+ case string(ServiceKindStateless1):
+ var ssp StatelessServiceProperties
+ err := json.Unmarshal(body, &ssp)
+ return ssp, err
+ default:
+ var srp ServiceResourceProperties
+ err := json.Unmarshal(body, &srp)
+ return srp, err
+ }
+}
+func unmarshalBasicServiceResourcePropertiesArray(body []byte) ([]BasicServiceResourceProperties, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ srpArray := make([]BasicServiceResourceProperties, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ srp, err := unmarshalBasicServiceResourceProperties(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ srpArray[index] = srp
+ }
+ return srpArray, nil
+}
+
+// MarshalJSON is the custom marshaler for ServiceResourceProperties.
+func (srp ServiceResourceProperties) MarshalJSON() ([]byte, error) {
+ srp.ServiceKind = ServiceKindServiceResourceProperties
+ objectMap := make(map[string]interface{})
+ if srp.ProvisioningState != nil {
+ objectMap["provisioningState"] = srp.ProvisioningState
+ }
+ if srp.ServiceTypeName != nil {
+ objectMap["serviceTypeName"] = srp.ServiceTypeName
+ }
+ objectMap["partitionDescription"] = srp.PartitionDescription
+ if srp.ServiceKind != "" {
+ objectMap["serviceKind"] = srp.ServiceKind
+ }
+ if srp.PlacementConstraints != nil {
+ objectMap["placementConstraints"] = srp.PlacementConstraints
+ }
+ if srp.CorrelationScheme != nil {
+ objectMap["correlationScheme"] = srp.CorrelationScheme
+ }
+ if srp.ServiceLoadMetrics != nil {
+ objectMap["serviceLoadMetrics"] = srp.ServiceLoadMetrics
+ }
+ if srp.ServicePlacementPolicies != nil {
+ objectMap["servicePlacementPolicies"] = srp.ServicePlacementPolicies
+ }
+ if srp.DefaultMoveCost != "" {
+ objectMap["defaultMoveCost"] = srp.DefaultMoveCost
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsStatefulServiceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
+func (srp ServiceResourceProperties) AsStatefulServiceProperties() (*StatefulServiceProperties, bool) {
+ return nil, false
+}
+
+// AsStatelessServiceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
+func (srp ServiceResourceProperties) AsStatelessServiceProperties() (*StatelessServiceProperties, bool) {
+ return nil, false
+}
+
+// AsServiceResourceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
+func (srp ServiceResourceProperties) AsServiceResourceProperties() (*ServiceResourceProperties, bool) {
+ return &srp, true
+}
+
+// AsBasicServiceResourceProperties is the BasicServiceResourceProperties implementation for ServiceResourceProperties.
+func (srp ServiceResourceProperties) AsBasicServiceResourceProperties() (BasicServiceResourceProperties, bool) {
+ return &srp, true
+}
+
+// UnmarshalJSON is the custom unmarshaler for ServiceResourceProperties struct.
+func (srp *ServiceResourceProperties) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "provisioningState":
+ if v != nil {
+ var provisioningState string
+ err = json.Unmarshal(*v, &provisioningState)
+ if err != nil {
+ return err
+ }
+ srp.ProvisioningState = &provisioningState
+ }
+ case "serviceTypeName":
+ if v != nil {
+ var serviceTypeName string
+ err = json.Unmarshal(*v, &serviceTypeName)
+ if err != nil {
+ return err
+ }
+ srp.ServiceTypeName = &serviceTypeName
+ }
+ case "partitionDescription":
+ if v != nil {
+ partitionDescription, err := unmarshalBasicPartitionSchemeDescription(*v)
+ if err != nil {
+ return err
+ }
+ srp.PartitionDescription = partitionDescription
+ }
+ case "serviceKind":
+ if v != nil {
+ var serviceKind ServiceKindBasicServiceResourceProperties
+ err = json.Unmarshal(*v, &serviceKind)
+ if err != nil {
+ return err
+ }
+ srp.ServiceKind = serviceKind
+ }
+ case "placementConstraints":
+ if v != nil {
+ var placementConstraints string
+ err = json.Unmarshal(*v, &placementConstraints)
+ if err != nil {
+ return err
+ }
+ srp.PlacementConstraints = &placementConstraints
+ }
+ case "correlationScheme":
+ if v != nil {
+ var correlationScheme []ServiceCorrelationDescription
+ err = json.Unmarshal(*v, &correlationScheme)
+ if err != nil {
+ return err
+ }
+ srp.CorrelationScheme = &correlationScheme
+ }
+ case "serviceLoadMetrics":
+ if v != nil {
+ var serviceLoadMetrics []ServiceLoadMetricDescription
+ err = json.Unmarshal(*v, &serviceLoadMetrics)
+ if err != nil {
+ return err
+ }
+ srp.ServiceLoadMetrics = &serviceLoadMetrics
+ }
+ case "servicePlacementPolicies":
+ if v != nil {
+ servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v)
+ if err != nil {
+ return err
+ }
+ srp.ServicePlacementPolicies = &servicePlacementPolicies
+ }
+ case "defaultMoveCost":
+ if v != nil {
+ var defaultMoveCost MoveCost
+ err = json.Unmarshal(*v, &defaultMoveCost)
+ if err != nil {
+ return err
+ }
+ srp.DefaultMoveCost = defaultMoveCost
+ }
+ }
+ }
+
+ return nil
+}
+
+// ServiceResourcePropertiesBase the common service resource properties.
+type ServiceResourcePropertiesBase struct {
+ // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".
+ PlacementConstraints *string `json:"placementConstraints,omitempty"`
+ // CorrelationScheme - A list that describes the correlation of the service with other services.
+ CorrelationScheme *[]ServiceCorrelationDescription `json:"correlationScheme,omitempty"`
+ // ServiceLoadMetrics - The service load metrics is given as an array of ServiceLoadMetricDescription objects.
+ ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"serviceLoadMetrics,omitempty"`
+ // ServicePlacementPolicies - A list that describes the correlation of the service with other services.
+ ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"`
+ // DefaultMoveCost - Specifies the move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High'
+ DefaultMoveCost MoveCost `json:"defaultMoveCost,omitempty"`
+}
+
+// UnmarshalJSON is the custom unmarshaler for ServiceResourcePropertiesBase struct.
+func (srpb *ServiceResourcePropertiesBase) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "placementConstraints":
+ if v != nil {
+ var placementConstraints string
+ err = json.Unmarshal(*v, &placementConstraints)
+ if err != nil {
+ return err
+ }
+ srpb.PlacementConstraints = &placementConstraints
+ }
+ case "correlationScheme":
+ if v != nil {
+ var correlationScheme []ServiceCorrelationDescription
+ err = json.Unmarshal(*v, &correlationScheme)
+ if err != nil {
+ return err
+ }
+ srpb.CorrelationScheme = &correlationScheme
+ }
+ case "serviceLoadMetrics":
+ if v != nil {
+ var serviceLoadMetrics []ServiceLoadMetricDescription
+ err = json.Unmarshal(*v, &serviceLoadMetrics)
+ if err != nil {
+ return err
+ }
+ srpb.ServiceLoadMetrics = &serviceLoadMetrics
+ }
+ case "servicePlacementPolicies":
+ if v != nil {
+ servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v)
+ if err != nil {
+ return err
+ }
+ srpb.ServicePlacementPolicies = &servicePlacementPolicies
+ }
+ case "defaultMoveCost":
+ if v != nil {
+ var defaultMoveCost MoveCost
+ err = json.Unmarshal(*v, &defaultMoveCost)
+ if err != nil {
+ return err
+ }
+ srpb.DefaultMoveCost = defaultMoveCost
+ }
+ }
+ }
+
+ return nil
+}
+
+// ServiceResourceUpdate the service resource for patch operations.
+type ServiceResourceUpdate struct {
+ autorest.Response `json:"-"`
+ // BasicServiceResourceUpdateProperties - The service resource properties for patch operations.
+ BasicServiceResourceUpdateProperties `json:"properties,omitempty"`
+ // ID - Azure resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Name - Azure resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Azure resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Azure resource location.
+ Location *string `json:"location,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ServiceResourceUpdate.
+func (sru ServiceResourceUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ objectMap["properties"] = sru.BasicServiceResourceUpdateProperties
+ if sru.ID != nil {
+ objectMap["id"] = sru.ID
+ }
+ if sru.Name != nil {
+ objectMap["name"] = sru.Name
+ }
+ if sru.Type != nil {
+ objectMap["type"] = sru.Type
+ }
+ if sru.Location != nil {
+ objectMap["location"] = sru.Location
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ServiceResourceUpdate struct.
+func (sru *ServiceResourceUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ basicServiceResourceUpdateProperties, err := unmarshalBasicServiceResourceUpdateProperties(*v)
+ if err != nil {
+ return err
+ }
+ sru.BasicServiceResourceUpdateProperties = basicServiceResourceUpdateProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ sru.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ sru.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ sru.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ sru.Location = &location
+ }
+ }
+ }
+
+ return nil
+}
+
+// BasicServiceResourceUpdateProperties the service resource properties for patch operations.
+type BasicServiceResourceUpdateProperties interface {
+ AsStatefulServiceUpdateProperties() (*StatefulServiceUpdateProperties, bool)
+ AsStatelessServiceUpdateProperties() (*StatelessServiceUpdateProperties, bool)
+ AsServiceResourceUpdateProperties() (*ServiceResourceUpdateProperties, bool)
+}
+
+// ServiceResourceUpdateProperties the service resource properties for patch operations.
+type ServiceResourceUpdateProperties struct {
+ // ServiceKind - Possible values include: 'ServiceKindBasicServiceResourceUpdatePropertiesServiceKindServiceResourceUpdateProperties', 'ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateful', 'ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateless'
+ ServiceKind ServiceKindBasicServiceResourceUpdateProperties `json:"serviceKind,omitempty"`
+ // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".
+ PlacementConstraints *string `json:"placementConstraints,omitempty"`
+ // CorrelationScheme - A list that describes the correlation of the service with other services.
+ CorrelationScheme *[]ServiceCorrelationDescription `json:"correlationScheme,omitempty"`
+ // ServiceLoadMetrics - The service load metrics is given as an array of ServiceLoadMetricDescription objects.
+ ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"serviceLoadMetrics,omitempty"`
+ // ServicePlacementPolicies - A list that describes the correlation of the service with other services.
+ ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"`
+ // DefaultMoveCost - Specifies the move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High'
+ DefaultMoveCost MoveCost `json:"defaultMoveCost,omitempty"`
+}
+
+func unmarshalBasicServiceResourceUpdateProperties(body []byte) (BasicServiceResourceUpdateProperties, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["serviceKind"] {
+ case string(ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateful):
+ var ssup StatefulServiceUpdateProperties
+ err := json.Unmarshal(body, &ssup)
+ return ssup, err
+ case string(ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateless):
+ var ssup StatelessServiceUpdateProperties
+ err := json.Unmarshal(body, &ssup)
+ return ssup, err
+ default:
+ var srup ServiceResourceUpdateProperties
+ err := json.Unmarshal(body, &srup)
+ return srup, err
+ }
+}
+func unmarshalBasicServiceResourceUpdatePropertiesArray(body []byte) ([]BasicServiceResourceUpdateProperties, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ srupArray := make([]BasicServiceResourceUpdateProperties, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ srup, err := unmarshalBasicServiceResourceUpdateProperties(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ srupArray[index] = srup
+ }
+ return srupArray, nil
+}
+
+// MarshalJSON is the custom marshaler for ServiceResourceUpdateProperties.
+func (srup ServiceResourceUpdateProperties) MarshalJSON() ([]byte, error) {
+ srup.ServiceKind = ServiceKindBasicServiceResourceUpdatePropertiesServiceKindServiceResourceUpdateProperties
+ objectMap := make(map[string]interface{})
+ if srup.ServiceKind != "" {
+ objectMap["serviceKind"] = srup.ServiceKind
+ }
+ if srup.PlacementConstraints != nil {
+ objectMap["placementConstraints"] = srup.PlacementConstraints
+ }
+ if srup.CorrelationScheme != nil {
+ objectMap["correlationScheme"] = srup.CorrelationScheme
+ }
+ if srup.ServiceLoadMetrics != nil {
+ objectMap["serviceLoadMetrics"] = srup.ServiceLoadMetrics
+ }
+ if srup.ServicePlacementPolicies != nil {
+ objectMap["servicePlacementPolicies"] = srup.ServicePlacementPolicies
+ }
+ if srup.DefaultMoveCost != "" {
+ objectMap["defaultMoveCost"] = srup.DefaultMoveCost
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsStatefulServiceUpdateProperties is the BasicServiceResourceUpdateProperties implementation for ServiceResourceUpdateProperties.
+func (srup ServiceResourceUpdateProperties) AsStatefulServiceUpdateProperties() (*StatefulServiceUpdateProperties, bool) {
+ return nil, false
+}
+
+// AsStatelessServiceUpdateProperties is the BasicServiceResourceUpdateProperties implementation for ServiceResourceUpdateProperties.
+func (srup ServiceResourceUpdateProperties) AsStatelessServiceUpdateProperties() (*StatelessServiceUpdateProperties, bool) {
+ return nil, false
+}
+
+// AsServiceResourceUpdateProperties is the BasicServiceResourceUpdateProperties implementation for ServiceResourceUpdateProperties.
+func (srup ServiceResourceUpdateProperties) AsServiceResourceUpdateProperties() (*ServiceResourceUpdateProperties, bool) {
+ return &srup, true
+}
+
+// AsBasicServiceResourceUpdateProperties is the BasicServiceResourceUpdateProperties implementation for ServiceResourceUpdateProperties.
+func (srup ServiceResourceUpdateProperties) AsBasicServiceResourceUpdateProperties() (BasicServiceResourceUpdateProperties, bool) {
+ return &srup, true
+}
+
+// UnmarshalJSON is the custom unmarshaler for ServiceResourceUpdateProperties struct.
+func (srup *ServiceResourceUpdateProperties) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "serviceKind":
+ if v != nil {
+ var serviceKind ServiceKindBasicServiceResourceUpdateProperties
+ err = json.Unmarshal(*v, &serviceKind)
+ if err != nil {
+ return err
+ }
+ srup.ServiceKind = serviceKind
+ }
+ case "placementConstraints":
+ if v != nil {
+ var placementConstraints string
+ err = json.Unmarshal(*v, &placementConstraints)
+ if err != nil {
+ return err
+ }
+ srup.PlacementConstraints = &placementConstraints
+ }
+ case "correlationScheme":
+ if v != nil {
+ var correlationScheme []ServiceCorrelationDescription
+ err = json.Unmarshal(*v, &correlationScheme)
+ if err != nil {
+ return err
+ }
+ srup.CorrelationScheme = &correlationScheme
+ }
+ case "serviceLoadMetrics":
+ if v != nil {
+ var serviceLoadMetrics []ServiceLoadMetricDescription
+ err = json.Unmarshal(*v, &serviceLoadMetrics)
+ if err != nil {
+ return err
+ }
+ srup.ServiceLoadMetrics = &serviceLoadMetrics
+ }
+ case "servicePlacementPolicies":
+ if v != nil {
+ servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v)
+ if err != nil {
+ return err
+ }
+ srup.ServicePlacementPolicies = &servicePlacementPolicies
+ }
+ case "defaultMoveCost":
+ if v != nil {
+ var defaultMoveCost MoveCost
+ err = json.Unmarshal(*v, &defaultMoveCost)
+ if err != nil {
+ return err
+ }
+ srup.DefaultMoveCost = defaultMoveCost
+ }
+ }
+ }
+
+ return nil
+}
+
+// ServicesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ServicesCreateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ServicesCreateFuture) Result(client ServicesClient) (sr ServiceResource, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesCreateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ServicesCreateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateResponder(sr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesCreateFuture", "Result", sr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ServicesDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ServicesDeleteFuture) Result(client ServicesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ServicesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ServicesUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ServicesUpdateFuture) Result(client ServicesClient) (sru ServiceResourceUpdate, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("servicefabric.ServicesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sru.Response.Response, err = future.GetResult(sender); err == nil && sru.Response.Response.StatusCode != http.StatusNoContent {
+ sru, err = client.UpdateResponder(sru.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesUpdateFuture", "Result", sru.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ServiceTypeDeltaHealthPolicy represents the delta health policy used to evaluate the health of services
+// belonging to a service type when upgrading the cluster.
+type ServiceTypeDeltaHealthPolicy struct {
+ // MaxPercentDeltaUnhealthyServices - The maximum allowed percentage of services health degradation allowed during cluster upgrades.
+ // The delta is measured between the state of the services at the beginning of upgrade and the state of the services at the time of the health evaluation.
+ // The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits.
+ MaxPercentDeltaUnhealthyServices *int32 `json:"maxPercentDeltaUnhealthyServices,omitempty"`
+}
+
+// ServiceTypeHealthPolicy represents the health policy used to evaluate the health of services belonging to a
+// service type.
+type ServiceTypeHealthPolicy struct {
+ // MaxPercentUnhealthyServices - The maximum percentage of services allowed to be unhealthy before your application is considered in error.
+ MaxPercentUnhealthyServices *int32 `json:"maxPercentUnhealthyServices,omitempty"`
+}
+
+// SettingsParameterDescription describes a parameter in fabric settings of the cluster.
+type SettingsParameterDescription struct {
+ // Name - The parameter name of fabric setting.
+ Name *string `json:"name,omitempty"`
+ // Value - The parameter value of fabric setting.
+ Value *string `json:"value,omitempty"`
+}
+
+// SettingsSectionDescription describes a section in the fabric settings of the cluster.
+type SettingsSectionDescription struct {
+ // Name - The section name of the fabric settings.
+ Name *string `json:"name,omitempty"`
+ // Parameters - The collection of parameters in the section.
+ Parameters *[]SettingsParameterDescription `json:"parameters,omitempty"`
+}
+
+// SingletonPartitionSchemeDescription describes the partition scheme of a singleton-partitioned, or
+// non-partitioned service.
+type SingletonPartitionSchemeDescription struct {
+ // PartitionScheme - Possible values include: 'PartitionSchemePartitionSchemeDescription', 'PartitionSchemeNamed', 'PartitionSchemeSingleton', 'PartitionSchemeUniformInt64Range'
+ PartitionScheme PartitionSchemeBasicPartitionSchemeDescription `json:"PartitionScheme,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SingletonPartitionSchemeDescription.
+func (spsd SingletonPartitionSchemeDescription) MarshalJSON() ([]byte, error) {
+ spsd.PartitionScheme = PartitionSchemeSingleton
+ objectMap := make(map[string]interface{})
+ if spsd.PartitionScheme != "" {
+ objectMap["PartitionScheme"] = spsd.PartitionScheme
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsNamedPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription.
+func (spsd SingletonPartitionSchemeDescription) AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) {
+ return nil, false
+}
+
+// AsSingletonPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription.
+func (spsd SingletonPartitionSchemeDescription) AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) {
+ return &spsd, true
+}
+
+// AsUniformInt64RangePartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription.
+func (spsd SingletonPartitionSchemeDescription) AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) {
+ return nil, false
+}
+
+// AsPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription.
+func (spsd SingletonPartitionSchemeDescription) AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) {
+ return nil, false
+}
+
+// AsBasicPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription.
+func (spsd SingletonPartitionSchemeDescription) AsBasicPartitionSchemeDescription() (BasicPartitionSchemeDescription, bool) {
+ return &spsd, true
+}
+
+// StatefulServiceProperties the properties of a stateful service resource.
+type StatefulServiceProperties struct {
+ // HasPersistedState - A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false.
+ HasPersistedState *bool `json:"hasPersistedState,omitempty"`
+ // TargetReplicaSetSize - The target replica set size as a number.
+ TargetReplicaSetSize *int32 `json:"targetReplicaSetSize,omitempty"`
+ // MinReplicaSetSize - The minimum replica set size as a number.
+ MinReplicaSetSize *int32 `json:"minReplicaSetSize,omitempty"`
+ // ReplicaRestartWaitDuration - The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s).
+ ReplicaRestartWaitDuration *date.Time `json:"replicaRestartWaitDuration,omitempty"`
+ // QuorumLossWaitDuration - The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format (hh:mm:ss.s).
+ QuorumLossWaitDuration *date.Time `json:"quorumLossWaitDuration,omitempty"`
+ // StandByReplicaKeepDuration - The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s).
+ StandByReplicaKeepDuration *date.Time `json:"standByReplicaKeepDuration,omitempty"`
+ // ProvisioningState - The current deployment or provisioning state, which only appears in the response
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // ServiceTypeName - The name of the service type
+ ServiceTypeName *string `json:"serviceTypeName,omitempty"`
+ // PartitionDescription - Describes how the service is partitioned.
+ PartitionDescription BasicPartitionSchemeDescription `json:"partitionDescription,omitempty"`
+ // ServiceKind - Possible values include: 'ServiceKindServiceResourceProperties', 'ServiceKindStateful1', 'ServiceKindStateless1'
+ ServiceKind ServiceKindBasicServiceResourceProperties `json:"serviceKind,omitempty"`
+ // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".
+ PlacementConstraints *string `json:"placementConstraints,omitempty"`
+ // CorrelationScheme - A list that describes the correlation of the service with other services.
+ CorrelationScheme *[]ServiceCorrelationDescription `json:"correlationScheme,omitempty"`
+ // ServiceLoadMetrics - The service load metrics is given as an array of ServiceLoadMetricDescription objects.
+ ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"serviceLoadMetrics,omitempty"`
+ // ServicePlacementPolicies - A list that describes the correlation of the service with other services.
+ ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"`
+ // DefaultMoveCost - Specifies the move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High'
+ DefaultMoveCost MoveCost `json:"defaultMoveCost,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for StatefulServiceProperties.
+func (ssp StatefulServiceProperties) MarshalJSON() ([]byte, error) {
+ ssp.ServiceKind = ServiceKindStateful1
+ objectMap := make(map[string]interface{})
+ if ssp.HasPersistedState != nil {
+ objectMap["hasPersistedState"] = ssp.HasPersistedState
+ }
+ if ssp.TargetReplicaSetSize != nil {
+ objectMap["targetReplicaSetSize"] = ssp.TargetReplicaSetSize
+ }
+ if ssp.MinReplicaSetSize != nil {
+ objectMap["minReplicaSetSize"] = ssp.MinReplicaSetSize
+ }
+ if ssp.ReplicaRestartWaitDuration != nil {
+ objectMap["replicaRestartWaitDuration"] = ssp.ReplicaRestartWaitDuration
+ }
+ if ssp.QuorumLossWaitDuration != nil {
+ objectMap["quorumLossWaitDuration"] = ssp.QuorumLossWaitDuration
+ }
+ if ssp.StandByReplicaKeepDuration != nil {
+ objectMap["standByReplicaKeepDuration"] = ssp.StandByReplicaKeepDuration
+ }
+ if ssp.ProvisioningState != nil {
+ objectMap["provisioningState"] = ssp.ProvisioningState
+ }
+ if ssp.ServiceTypeName != nil {
+ objectMap["serviceTypeName"] = ssp.ServiceTypeName
+ }
+ objectMap["partitionDescription"] = ssp.PartitionDescription
+ if ssp.ServiceKind != "" {
+ objectMap["serviceKind"] = ssp.ServiceKind
+ }
+ if ssp.PlacementConstraints != nil {
+ objectMap["placementConstraints"] = ssp.PlacementConstraints
+ }
+ if ssp.CorrelationScheme != nil {
+ objectMap["correlationScheme"] = ssp.CorrelationScheme
+ }
+ if ssp.ServiceLoadMetrics != nil {
+ objectMap["serviceLoadMetrics"] = ssp.ServiceLoadMetrics
+ }
+ if ssp.ServicePlacementPolicies != nil {
+ objectMap["servicePlacementPolicies"] = ssp.ServicePlacementPolicies
+ }
+ if ssp.DefaultMoveCost != "" {
+ objectMap["defaultMoveCost"] = ssp.DefaultMoveCost
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsStatefulServiceProperties is the BasicServiceResourceProperties implementation for StatefulServiceProperties.
+func (ssp StatefulServiceProperties) AsStatefulServiceProperties() (*StatefulServiceProperties, bool) {
+ return &ssp, true
+}
+
+// AsStatelessServiceProperties is the BasicServiceResourceProperties implementation for StatefulServiceProperties.
+func (ssp StatefulServiceProperties) AsStatelessServiceProperties() (*StatelessServiceProperties, bool) {
+ return nil, false
+}
+
+// AsServiceResourceProperties is the BasicServiceResourceProperties implementation for StatefulServiceProperties.
+func (ssp StatefulServiceProperties) AsServiceResourceProperties() (*ServiceResourceProperties, bool) {
+ return nil, false
+}
+
+// AsBasicServiceResourceProperties is the BasicServiceResourceProperties implementation for StatefulServiceProperties.
+func (ssp StatefulServiceProperties) AsBasicServiceResourceProperties() (BasicServiceResourceProperties, bool) {
+ return &ssp, true
+}
+
+// UnmarshalJSON is the custom unmarshaler for StatefulServiceProperties struct.
+func (ssp *StatefulServiceProperties) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "hasPersistedState":
+ if v != nil {
+ var hasPersistedState bool
+ err = json.Unmarshal(*v, &hasPersistedState)
+ if err != nil {
+ return err
+ }
+ ssp.HasPersistedState = &hasPersistedState
+ }
+ case "targetReplicaSetSize":
+ if v != nil {
+ var targetReplicaSetSize int32
+ err = json.Unmarshal(*v, &targetReplicaSetSize)
+ if err != nil {
+ return err
+ }
+ ssp.TargetReplicaSetSize = &targetReplicaSetSize
+ }
+ case "minReplicaSetSize":
+ if v != nil {
+ var minReplicaSetSize int32
+ err = json.Unmarshal(*v, &minReplicaSetSize)
+ if err != nil {
+ return err
+ }
+ ssp.MinReplicaSetSize = &minReplicaSetSize
+ }
+ case "replicaRestartWaitDuration":
+ if v != nil {
+ var replicaRestartWaitDuration date.Time
+ err = json.Unmarshal(*v, &replicaRestartWaitDuration)
+ if err != nil {
+ return err
+ }
+ ssp.ReplicaRestartWaitDuration = &replicaRestartWaitDuration
+ }
+ case "quorumLossWaitDuration":
+ if v != nil {
+ var quorumLossWaitDuration date.Time
+ err = json.Unmarshal(*v, &quorumLossWaitDuration)
+ if err != nil {
+ return err
+ }
+ ssp.QuorumLossWaitDuration = &quorumLossWaitDuration
+ }
+ case "standByReplicaKeepDuration":
+ if v != nil {
+ var standByReplicaKeepDuration date.Time
+ err = json.Unmarshal(*v, &standByReplicaKeepDuration)
+ if err != nil {
+ return err
+ }
+ ssp.StandByReplicaKeepDuration = &standByReplicaKeepDuration
+ }
+ case "provisioningState":
+ if v != nil {
+ var provisioningState string
+ err = json.Unmarshal(*v, &provisioningState)
+ if err != nil {
+ return err
+ }
+ ssp.ProvisioningState = &provisioningState
+ }
+ case "serviceTypeName":
+ if v != nil {
+ var serviceTypeName string
+ err = json.Unmarshal(*v, &serviceTypeName)
+ if err != nil {
+ return err
+ }
+ ssp.ServiceTypeName = &serviceTypeName
+ }
+ case "partitionDescription":
+ if v != nil {
+ partitionDescription, err := unmarshalBasicPartitionSchemeDescription(*v)
+ if err != nil {
+ return err
+ }
+ ssp.PartitionDescription = partitionDescription
+ }
+ case "serviceKind":
+ if v != nil {
+ var serviceKind ServiceKindBasicServiceResourceProperties
+ err = json.Unmarshal(*v, &serviceKind)
+ if err != nil {
+ return err
+ }
+ ssp.ServiceKind = serviceKind
+ }
+ case "placementConstraints":
+ if v != nil {
+ var placementConstraints string
+ err = json.Unmarshal(*v, &placementConstraints)
+ if err != nil {
+ return err
+ }
+ ssp.PlacementConstraints = &placementConstraints
+ }
+ case "correlationScheme":
+ if v != nil {
+ var correlationScheme []ServiceCorrelationDescription
+ err = json.Unmarshal(*v, &correlationScheme)
+ if err != nil {
+ return err
+ }
+ ssp.CorrelationScheme = &correlationScheme
+ }
+ case "serviceLoadMetrics":
+ if v != nil {
+ var serviceLoadMetrics []ServiceLoadMetricDescription
+ err = json.Unmarshal(*v, &serviceLoadMetrics)
+ if err != nil {
+ return err
+ }
+ ssp.ServiceLoadMetrics = &serviceLoadMetrics
+ }
+ case "servicePlacementPolicies":
+ if v != nil {
+ servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v)
+ if err != nil {
+ return err
+ }
+ ssp.ServicePlacementPolicies = &servicePlacementPolicies
+ }
+ case "defaultMoveCost":
+ if v != nil {
+ var defaultMoveCost MoveCost
+ err = json.Unmarshal(*v, &defaultMoveCost)
+ if err != nil {
+ return err
+ }
+ ssp.DefaultMoveCost = defaultMoveCost
+ }
+ }
+ }
+
+ return nil
+}
+
+// StatefulServiceUpdateProperties the properties of a stateful service resource for patch operations.
+type StatefulServiceUpdateProperties struct {
+ // TargetReplicaSetSize - The target replica set size as a number.
+ TargetReplicaSetSize *int32 `json:"targetReplicaSetSize,omitempty"`
+ // MinReplicaSetSize - The minimum replica set size as a number.
+ MinReplicaSetSize *int32 `json:"minReplicaSetSize,omitempty"`
+ // ReplicaRestartWaitDuration - The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s).
+ ReplicaRestartWaitDuration *date.Time `json:"replicaRestartWaitDuration,omitempty"`
+ // QuorumLossWaitDuration - The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format (hh:mm:ss.s).
+ QuorumLossWaitDuration *date.Time `json:"quorumLossWaitDuration,omitempty"`
+ // StandByReplicaKeepDuration - The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s).
+ StandByReplicaKeepDuration *date.Time `json:"standByReplicaKeepDuration,omitempty"`
+ // ServiceKind - Possible values include: 'ServiceKindBasicServiceResourceUpdatePropertiesServiceKindServiceResourceUpdateProperties', 'ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateful', 'ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateless'
+ ServiceKind ServiceKindBasicServiceResourceUpdateProperties `json:"serviceKind,omitempty"`
+ // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".
+ PlacementConstraints *string `json:"placementConstraints,omitempty"`
+ // CorrelationScheme - A list that describes the correlation of the service with other services.
+ CorrelationScheme *[]ServiceCorrelationDescription `json:"correlationScheme,omitempty"`
+ // ServiceLoadMetrics - The service load metrics is given as an array of ServiceLoadMetricDescription objects.
+ ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"serviceLoadMetrics,omitempty"`
+ // ServicePlacementPolicies - A list that describes the correlation of the service with other services.
+ ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"`
+ // DefaultMoveCost - Specifies the move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High'
+ DefaultMoveCost MoveCost `json:"defaultMoveCost,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for StatefulServiceUpdateProperties.
+func (ssup StatefulServiceUpdateProperties) MarshalJSON() ([]byte, error) {
+ ssup.ServiceKind = ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateful
+ objectMap := make(map[string]interface{})
+ if ssup.TargetReplicaSetSize != nil {
+ objectMap["targetReplicaSetSize"] = ssup.TargetReplicaSetSize
+ }
+ if ssup.MinReplicaSetSize != nil {
+ objectMap["minReplicaSetSize"] = ssup.MinReplicaSetSize
+ }
+ if ssup.ReplicaRestartWaitDuration != nil {
+ objectMap["replicaRestartWaitDuration"] = ssup.ReplicaRestartWaitDuration
+ }
+ if ssup.QuorumLossWaitDuration != nil {
+ objectMap["quorumLossWaitDuration"] = ssup.QuorumLossWaitDuration
+ }
+ if ssup.StandByReplicaKeepDuration != nil {
+ objectMap["standByReplicaKeepDuration"] = ssup.StandByReplicaKeepDuration
+ }
+ if ssup.ServiceKind != "" {
+ objectMap["serviceKind"] = ssup.ServiceKind
+ }
+ if ssup.PlacementConstraints != nil {
+ objectMap["placementConstraints"] = ssup.PlacementConstraints
+ }
+ if ssup.CorrelationScheme != nil {
+ objectMap["correlationScheme"] = ssup.CorrelationScheme
+ }
+ if ssup.ServiceLoadMetrics != nil {
+ objectMap["serviceLoadMetrics"] = ssup.ServiceLoadMetrics
+ }
+ if ssup.ServicePlacementPolicies != nil {
+ objectMap["servicePlacementPolicies"] = ssup.ServicePlacementPolicies
+ }
+ if ssup.DefaultMoveCost != "" {
+ objectMap["defaultMoveCost"] = ssup.DefaultMoveCost
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsStatefulServiceUpdateProperties is the BasicServiceResourceUpdateProperties implementation for StatefulServiceUpdateProperties.
+func (ssup StatefulServiceUpdateProperties) AsStatefulServiceUpdateProperties() (*StatefulServiceUpdateProperties, bool) {
+ return &ssup, true
+}
+
+// AsStatelessServiceUpdateProperties is the BasicServiceResourceUpdateProperties implementation for StatefulServiceUpdateProperties.
+func (ssup StatefulServiceUpdateProperties) AsStatelessServiceUpdateProperties() (*StatelessServiceUpdateProperties, bool) {
+ return nil, false
+}
+
+// AsServiceResourceUpdateProperties is the BasicServiceResourceUpdateProperties implementation for StatefulServiceUpdateProperties.
+func (ssup StatefulServiceUpdateProperties) AsServiceResourceUpdateProperties() (*ServiceResourceUpdateProperties, bool) {
+ return nil, false
+}
+
+// AsBasicServiceResourceUpdateProperties is the BasicServiceResourceUpdateProperties implementation for StatefulServiceUpdateProperties.
+func (ssup StatefulServiceUpdateProperties) AsBasicServiceResourceUpdateProperties() (BasicServiceResourceUpdateProperties, bool) {
+ return &ssup, true
+}
+
+// UnmarshalJSON is the custom unmarshaler for StatefulServiceUpdateProperties struct.
+func (ssup *StatefulServiceUpdateProperties) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "targetReplicaSetSize":
+ if v != nil {
+ var targetReplicaSetSize int32
+ err = json.Unmarshal(*v, &targetReplicaSetSize)
+ if err != nil {
+ return err
+ }
+ ssup.TargetReplicaSetSize = &targetReplicaSetSize
+ }
+ case "minReplicaSetSize":
+ if v != nil {
+ var minReplicaSetSize int32
+ err = json.Unmarshal(*v, &minReplicaSetSize)
+ if err != nil {
+ return err
+ }
+ ssup.MinReplicaSetSize = &minReplicaSetSize
+ }
+ case "replicaRestartWaitDuration":
+ if v != nil {
+ var replicaRestartWaitDuration date.Time
+ err = json.Unmarshal(*v, &replicaRestartWaitDuration)
+ if err != nil {
+ return err
+ }
+ ssup.ReplicaRestartWaitDuration = &replicaRestartWaitDuration
+ }
+ case "quorumLossWaitDuration":
+ if v != nil {
+ var quorumLossWaitDuration date.Time
+ err = json.Unmarshal(*v, &quorumLossWaitDuration)
+ if err != nil {
+ return err
+ }
+ ssup.QuorumLossWaitDuration = &quorumLossWaitDuration
+ }
+ case "standByReplicaKeepDuration":
+ if v != nil {
+ var standByReplicaKeepDuration date.Time
+ err = json.Unmarshal(*v, &standByReplicaKeepDuration)
+ if err != nil {
+ return err
+ }
+ ssup.StandByReplicaKeepDuration = &standByReplicaKeepDuration
+ }
+ case "serviceKind":
+ if v != nil {
+ var serviceKind ServiceKindBasicServiceResourceUpdateProperties
+ err = json.Unmarshal(*v, &serviceKind)
+ if err != nil {
+ return err
+ }
+ ssup.ServiceKind = serviceKind
+ }
+ case "placementConstraints":
+ if v != nil {
+ var placementConstraints string
+ err = json.Unmarshal(*v, &placementConstraints)
+ if err != nil {
+ return err
+ }
+ ssup.PlacementConstraints = &placementConstraints
+ }
+ case "correlationScheme":
+ if v != nil {
+ var correlationScheme []ServiceCorrelationDescription
+ err = json.Unmarshal(*v, &correlationScheme)
+ if err != nil {
+ return err
+ }
+ ssup.CorrelationScheme = &correlationScheme
+ }
+ case "serviceLoadMetrics":
+ if v != nil {
+ var serviceLoadMetrics []ServiceLoadMetricDescription
+ err = json.Unmarshal(*v, &serviceLoadMetrics)
+ if err != nil {
+ return err
+ }
+ ssup.ServiceLoadMetrics = &serviceLoadMetrics
+ }
+ case "servicePlacementPolicies":
+ if v != nil {
+ servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v)
+ if err != nil {
+ return err
+ }
+ ssup.ServicePlacementPolicies = &servicePlacementPolicies
+ }
+ case "defaultMoveCost":
+ if v != nil {
+ var defaultMoveCost MoveCost
+ err = json.Unmarshal(*v, &defaultMoveCost)
+ if err != nil {
+ return err
+ }
+ ssup.DefaultMoveCost = defaultMoveCost
+ }
+ }
+ }
+
+ return nil
+}
+
+// StatelessServiceProperties the properties of a stateless service resource.
+type StatelessServiceProperties struct {
+ // InstanceCount - The instance count.
+ InstanceCount *int32 `json:"instanceCount,omitempty"`
+ // ProvisioningState - The current deployment or provisioning state, which only appears in the response
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // ServiceTypeName - The name of the service type
+ ServiceTypeName *string `json:"serviceTypeName,omitempty"`
+ // PartitionDescription - Describes how the service is partitioned.
+ PartitionDescription BasicPartitionSchemeDescription `json:"partitionDescription,omitempty"`
+ // ServiceKind - Possible values include: 'ServiceKindServiceResourceProperties', 'ServiceKindStateful1', 'ServiceKindStateless1'
+ ServiceKind ServiceKindBasicServiceResourceProperties `json:"serviceKind,omitempty"`
+ // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".
+ PlacementConstraints *string `json:"placementConstraints,omitempty"`
+ // CorrelationScheme - A list that describes the correlation of the service with other services.
+ CorrelationScheme *[]ServiceCorrelationDescription `json:"correlationScheme,omitempty"`
+ // ServiceLoadMetrics - The service load metrics is given as an array of ServiceLoadMetricDescription objects.
+ ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"serviceLoadMetrics,omitempty"`
+ // ServicePlacementPolicies - A list that describes the correlation of the service with other services.
+ ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"`
+ // DefaultMoveCost - Specifies the move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High'
+ DefaultMoveCost MoveCost `json:"defaultMoveCost,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for StatelessServiceProperties.
+func (ssp StatelessServiceProperties) MarshalJSON() ([]byte, error) {
+ ssp.ServiceKind = ServiceKindStateless1
+ objectMap := make(map[string]interface{})
+ if ssp.InstanceCount != nil {
+ objectMap["instanceCount"] = ssp.InstanceCount
+ }
+ if ssp.ProvisioningState != nil {
+ objectMap["provisioningState"] = ssp.ProvisioningState
+ }
+ if ssp.ServiceTypeName != nil {
+ objectMap["serviceTypeName"] = ssp.ServiceTypeName
+ }
+ objectMap["partitionDescription"] = ssp.PartitionDescription
+ if ssp.ServiceKind != "" {
+ objectMap["serviceKind"] = ssp.ServiceKind
+ }
+ if ssp.PlacementConstraints != nil {
+ objectMap["placementConstraints"] = ssp.PlacementConstraints
+ }
+ if ssp.CorrelationScheme != nil {
+ objectMap["correlationScheme"] = ssp.CorrelationScheme
+ }
+ if ssp.ServiceLoadMetrics != nil {
+ objectMap["serviceLoadMetrics"] = ssp.ServiceLoadMetrics
+ }
+ if ssp.ServicePlacementPolicies != nil {
+ objectMap["servicePlacementPolicies"] = ssp.ServicePlacementPolicies
+ }
+ if ssp.DefaultMoveCost != "" {
+ objectMap["defaultMoveCost"] = ssp.DefaultMoveCost
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsStatefulServiceProperties is the BasicServiceResourceProperties implementation for StatelessServiceProperties.
+func (ssp StatelessServiceProperties) AsStatefulServiceProperties() (*StatefulServiceProperties, bool) {
+ return nil, false
+}
+
+// AsStatelessServiceProperties is the BasicServiceResourceProperties implementation for StatelessServiceProperties.
+func (ssp StatelessServiceProperties) AsStatelessServiceProperties() (*StatelessServiceProperties, bool) {
+ return &ssp, true
+}
+
+// AsServiceResourceProperties is the BasicServiceResourceProperties implementation for StatelessServiceProperties.
+func (ssp StatelessServiceProperties) AsServiceResourceProperties() (*ServiceResourceProperties, bool) {
+ return nil, false
+}
+
+// AsBasicServiceResourceProperties is the BasicServiceResourceProperties implementation for StatelessServiceProperties.
+func (ssp StatelessServiceProperties) AsBasicServiceResourceProperties() (BasicServiceResourceProperties, bool) {
+ return &ssp, true
+}
+
+// UnmarshalJSON is the custom unmarshaler for StatelessServiceProperties struct.
+func (ssp *StatelessServiceProperties) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "instanceCount":
+ if v != nil {
+ var instanceCount int32
+ err = json.Unmarshal(*v, &instanceCount)
+ if err != nil {
+ return err
+ }
+ ssp.InstanceCount = &instanceCount
+ }
+ case "provisioningState":
+ if v != nil {
+ var provisioningState string
+ err = json.Unmarshal(*v, &provisioningState)
+ if err != nil {
+ return err
+ }
+ ssp.ProvisioningState = &provisioningState
+ }
+ case "serviceTypeName":
+ if v != nil {
+ var serviceTypeName string
+ err = json.Unmarshal(*v, &serviceTypeName)
+ if err != nil {
+ return err
+ }
+ ssp.ServiceTypeName = &serviceTypeName
+ }
+ case "partitionDescription":
+ if v != nil {
+ partitionDescription, err := unmarshalBasicPartitionSchemeDescription(*v)
+ if err != nil {
+ return err
+ }
+ ssp.PartitionDescription = partitionDescription
+ }
+ case "serviceKind":
+ if v != nil {
+ var serviceKind ServiceKindBasicServiceResourceProperties
+ err = json.Unmarshal(*v, &serviceKind)
+ if err != nil {
+ return err
+ }
+ ssp.ServiceKind = serviceKind
+ }
+ case "placementConstraints":
+ if v != nil {
+ var placementConstraints string
+ err = json.Unmarshal(*v, &placementConstraints)
+ if err != nil {
+ return err
+ }
+ ssp.PlacementConstraints = &placementConstraints
+ }
+ case "correlationScheme":
+ if v != nil {
+ var correlationScheme []ServiceCorrelationDescription
+ err = json.Unmarshal(*v, &correlationScheme)
+ if err != nil {
+ return err
+ }
+ ssp.CorrelationScheme = &correlationScheme
+ }
+ case "serviceLoadMetrics":
+ if v != nil {
+ var serviceLoadMetrics []ServiceLoadMetricDescription
+ err = json.Unmarshal(*v, &serviceLoadMetrics)
+ if err != nil {
+ return err
+ }
+ ssp.ServiceLoadMetrics = &serviceLoadMetrics
+ }
+ case "servicePlacementPolicies":
+ if v != nil {
+ servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v)
+ if err != nil {
+ return err
+ }
+ ssp.ServicePlacementPolicies = &servicePlacementPolicies
+ }
+ case "defaultMoveCost":
+ if v != nil {
+ var defaultMoveCost MoveCost
+ err = json.Unmarshal(*v, &defaultMoveCost)
+ if err != nil {
+ return err
+ }
+ ssp.DefaultMoveCost = defaultMoveCost
+ }
+ }
+ }
+
+ return nil
+}
+
+// StatelessServiceUpdateProperties the properties of a stateless service resource for patch operations.
+type StatelessServiceUpdateProperties struct {
+ // InstanceCount - The instance count.
+ InstanceCount *int32 `json:"instanceCount,omitempty"`
+ // ServiceKind - Possible values include: 'ServiceKindBasicServiceResourceUpdatePropertiesServiceKindServiceResourceUpdateProperties', 'ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateful', 'ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateless'
+ ServiceKind ServiceKindBasicServiceResourceUpdateProperties `json:"serviceKind,omitempty"`
+ // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".
+ PlacementConstraints *string `json:"placementConstraints,omitempty"`
+ // CorrelationScheme - A list that describes the correlation of the service with other services.
+ CorrelationScheme *[]ServiceCorrelationDescription `json:"correlationScheme,omitempty"`
+ // ServiceLoadMetrics - The service load metrics is given as an array of ServiceLoadMetricDescription objects.
+ ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"serviceLoadMetrics,omitempty"`
+ // ServicePlacementPolicies - A list that describes the correlation of the service with other services.
+ ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"`
+ // DefaultMoveCost - Specifies the move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High'
+ DefaultMoveCost MoveCost `json:"defaultMoveCost,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for StatelessServiceUpdateProperties.
+func (ssup StatelessServiceUpdateProperties) MarshalJSON() ([]byte, error) {
+ ssup.ServiceKind = ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateless
+ objectMap := make(map[string]interface{})
+ if ssup.InstanceCount != nil {
+ objectMap["instanceCount"] = ssup.InstanceCount
+ }
+ if ssup.ServiceKind != "" {
+ objectMap["serviceKind"] = ssup.ServiceKind
+ }
+ if ssup.PlacementConstraints != nil {
+ objectMap["placementConstraints"] = ssup.PlacementConstraints
+ }
+ if ssup.CorrelationScheme != nil {
+ objectMap["correlationScheme"] = ssup.CorrelationScheme
+ }
+ if ssup.ServiceLoadMetrics != nil {
+ objectMap["serviceLoadMetrics"] = ssup.ServiceLoadMetrics
+ }
+ if ssup.ServicePlacementPolicies != nil {
+ objectMap["servicePlacementPolicies"] = ssup.ServicePlacementPolicies
+ }
+ if ssup.DefaultMoveCost != "" {
+ objectMap["defaultMoveCost"] = ssup.DefaultMoveCost
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsStatefulServiceUpdateProperties is the BasicServiceResourceUpdateProperties implementation for StatelessServiceUpdateProperties.
+func (ssup StatelessServiceUpdateProperties) AsStatefulServiceUpdateProperties() (*StatefulServiceUpdateProperties, bool) {
+ return nil, false
+}
+
+// AsStatelessServiceUpdateProperties is the BasicServiceResourceUpdateProperties implementation for StatelessServiceUpdateProperties.
+func (ssup StatelessServiceUpdateProperties) AsStatelessServiceUpdateProperties() (*StatelessServiceUpdateProperties, bool) {
+ return &ssup, true
+}
+
+// AsServiceResourceUpdateProperties is the BasicServiceResourceUpdateProperties implementation for StatelessServiceUpdateProperties.
+func (ssup StatelessServiceUpdateProperties) AsServiceResourceUpdateProperties() (*ServiceResourceUpdateProperties, bool) {
+ return nil, false
+}
+
+// AsBasicServiceResourceUpdateProperties is the BasicServiceResourceUpdateProperties implementation for StatelessServiceUpdateProperties.
+func (ssup StatelessServiceUpdateProperties) AsBasicServiceResourceUpdateProperties() (BasicServiceResourceUpdateProperties, bool) {
+ return &ssup, true
+}
+
+// UnmarshalJSON is the custom unmarshaler for StatelessServiceUpdateProperties struct.
+func (ssup *StatelessServiceUpdateProperties) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "instanceCount":
+ if v != nil {
+ var instanceCount int32
+ err = json.Unmarshal(*v, &instanceCount)
+ if err != nil {
+ return err
+ }
+ ssup.InstanceCount = &instanceCount
+ }
+ case "serviceKind":
+ if v != nil {
+ var serviceKind ServiceKindBasicServiceResourceUpdateProperties
+ err = json.Unmarshal(*v, &serviceKind)
+ if err != nil {
+ return err
+ }
+ ssup.ServiceKind = serviceKind
+ }
+ case "placementConstraints":
+ if v != nil {
+ var placementConstraints string
+ err = json.Unmarshal(*v, &placementConstraints)
+ if err != nil {
+ return err
+ }
+ ssup.PlacementConstraints = &placementConstraints
+ }
+ case "correlationScheme":
+ if v != nil {
+ var correlationScheme []ServiceCorrelationDescription
+ err = json.Unmarshal(*v, &correlationScheme)
+ if err != nil {
+ return err
+ }
+ ssup.CorrelationScheme = &correlationScheme
+ }
+ case "serviceLoadMetrics":
+ if v != nil {
+ var serviceLoadMetrics []ServiceLoadMetricDescription
+ err = json.Unmarshal(*v, &serviceLoadMetrics)
+ if err != nil {
+ return err
+ }
+ ssup.ServiceLoadMetrics = &serviceLoadMetrics
+ }
+ case "servicePlacementPolicies":
+ if v != nil {
+ servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v)
+ if err != nil {
+ return err
+ }
+ ssup.ServicePlacementPolicies = &servicePlacementPolicies
+ }
+ case "defaultMoveCost":
+ if v != nil {
+ var defaultMoveCost MoveCost
+ err = json.Unmarshal(*v, &defaultMoveCost)
+ if err != nil {
+ return err
+ }
+ ssup.DefaultMoveCost = defaultMoveCost
+ }
+ }
+ }
+
+ return nil
+}
+
+// UniformInt64RangePartitionSchemeDescription describes a partitioning scheme where an integer range is allocated
+// evenly across a number of partitions.
+type UniformInt64RangePartitionSchemeDescription struct {
+ // Count - The number of partitions.
+ Count *int32 `json:"Count,omitempty"`
+ // LowKey - String indicating the lower bound of the partition key range that
+ // should be split between the partition ‘Count’
+ LowKey *string `json:"LowKey,omitempty"`
+ // HighKey - String indicating the upper bound of the partition key range that
+ // should be split between the partition ‘Count’
+ HighKey *string `json:"HighKey,omitempty"`
+ // PartitionScheme - Possible values include: 'PartitionSchemePartitionSchemeDescription', 'PartitionSchemeNamed', 'PartitionSchemeSingleton', 'PartitionSchemeUniformInt64Range'
+ PartitionScheme PartitionSchemeBasicPartitionSchemeDescription `json:"PartitionScheme,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for UniformInt64RangePartitionSchemeDescription.
+func (ui6rpsd UniformInt64RangePartitionSchemeDescription) MarshalJSON() ([]byte, error) {
+ ui6rpsd.PartitionScheme = PartitionSchemeUniformInt64Range
+ objectMap := make(map[string]interface{})
+ if ui6rpsd.Count != nil {
+ objectMap["Count"] = ui6rpsd.Count
+ }
+ if ui6rpsd.LowKey != nil {
+ objectMap["LowKey"] = ui6rpsd.LowKey
+ }
+ if ui6rpsd.HighKey != nil {
+ objectMap["HighKey"] = ui6rpsd.HighKey
+ }
+ if ui6rpsd.PartitionScheme != "" {
+ objectMap["PartitionScheme"] = ui6rpsd.PartitionScheme
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsNamedPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription.
+func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) {
+ return nil, false
+}
+
+// AsSingletonPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription.
+func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) {
+ return nil, false
+}
+
+// AsUniformInt64RangePartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription.
+func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) {
+ return &ui6rpsd, true
+}
+
+// AsPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription.
+func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) {
+ return nil, false
+}
+
+// AsBasicPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription.
+func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsBasicPartitionSchemeDescription() (BasicPartitionSchemeDescription, bool) {
+ return &ui6rpsd, true
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/operations.go
new file mode 100644
index 000000000..617b66ddc
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/operations.go
@@ -0,0 +1,126 @@
+package servicefabric
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// OperationsClient is the service Fabric Management Client
+type OperationsClient struct {
+ BaseClient
+}
+
+// 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 get the list of available Service Fabric resource provider API operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.olr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "servicefabric.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.olr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = ""
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ServiceFabric/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// 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,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// 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, "servicefabric.OperationsClient", "listNextResults", 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, "servicefabric.OperationsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.OperationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ result.page, err = client.List(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/services.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/services.go
new file mode 100644
index 000000000..8cbc4ffed
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/services.go
@@ -0,0 +1,412 @@
+package servicefabric
+
+// 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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ServicesClient is the service Fabric Management Client
+type ServicesClient struct {
+ BaseClient
+}
+
+// NewServicesClient creates an instance of the ServicesClient client.
+func NewServicesClient(subscriptionID string) ServicesClient {
+ return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewServicesClientWithBaseURI creates an instance of the ServicesClient client.
+func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient {
+ return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create create or update a Service Fabric service resource with the specified name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationName - the name of the application resource.
+// serviceName - the name of the service resource in the format of {applicationName}~{serviceName}.
+// parameters - the service resource.
+func (client ServicesClient) Create(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, serviceName string, parameters ServiceResource) (result ServicesCreateFuture, err error) {
+ req, err := client.CreatePreparer(ctx, resourceGroupName, clusterName, applicationName, serviceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Create", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client ServicesClient) CreatePreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, serviceName string, parameters ServiceResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationName": autorest.Encode("path", applicationName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serviceName": autorest.Encode("path", serviceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}/services/{serviceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) CreateSender(req *http.Request) (future ServicesCreateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) CreateResponder(resp *http.Response) (result ServiceResource, 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 delete a Service Fabric service resource with the specified name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationName - the name of the application resource.
+// serviceName - the name of the service resource in the format of {applicationName}~{serviceName}.
+func (client ServicesClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, serviceName string) (result ServicesDeleteFuture, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, clusterName, applicationName, serviceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, serviceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationName": autorest.Encode("path", applicationName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serviceName": autorest.Encode("path", serviceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-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.ServiceFabric/clusters/{clusterName}/applications/{applicationName}/services/{serviceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) DeleteSender(req *http.Request) (future ServicesDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get get a Service Fabric service resource created or in the process of being created in the Service Fabric
+// application resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationName - the name of the application resource.
+// serviceName - the name of the service resource in the format of {applicationName}~{serviceName}.
+func (client ServicesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, serviceName string) (result ServiceResource, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, clusterName, applicationName, serviceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "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.ServicesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, serviceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationName": autorest.Encode("path", applicationName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serviceName": autorest.Encode("path", serviceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-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.ServiceFabric/clusters/{clusterName}/applications/{applicationName}/services/{serviceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) GetResponder(resp *http.Response) (result ServiceResource, 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 service resources created or in the process of being created in the Service Fabric application
+// resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationName - the name of the application resource.
+func (client ServicesClient) List(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (result ServiceResourceList, err error) {
+ req, err := client.ListPreparer(ctx, resourceGroupName, clusterName, applicationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ServicesClient) ListPreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationName": autorest.Encode("path", applicationName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-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.ServiceFabric/clusters/{clusterName}/applications/{applicationName}/services", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) ListResponder(resp *http.Response) (result ServiceResourceList, 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 update a Service Fabric service resource with the specified name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// clusterName - the name of the cluster resource.
+// applicationName - the name of the application resource.
+// serviceName - the name of the service resource in the format of {applicationName}~{serviceName}.
+// parameters - the service resource for patch operations.
+func (client ServicesClient) Update(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, serviceName string, parameters ServiceResourceUpdate) (result ServicesUpdateFuture, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, clusterName, applicationName, serviceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client ServicesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, serviceName string, parameters ServiceResourceUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationName": autorest.Encode("path", applicationName),
+ "clusterName": autorest.Encode("path", clusterName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serviceName": autorest.Encode("path", serviceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}/services/{serviceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicesClient) UpdateSender(req *http.Request) (future ServicesUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client ServicesClient) UpdateResponder(resp *http.Response) (result ServiceResourceUpdate, 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/services/servicefabric/mgmt/2018-02-01/servicefabric/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/version.go
new file mode 100644
index 000000000..9f2d3bd80
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric/version.go
@@ -0,0 +1,30 @@
+package servicefabric
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " servicefabric/2018-02-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/databases.go
index 206fb3a78..a2882c919 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/databases.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/databases.go
@@ -101,15 +101,17 @@ func (client DatabasesClient) CreateImportOperationPreparer(ctx context.Context,
// CreateImportOperationSender sends the CreateImportOperation request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) CreateImportOperationSender(req *http.Request) (future DatabasesCreateImportOperationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -176,15 +178,17 @@ func (client DatabasesClient) CreateOrUpdatePreparer(ctx context.Context, resour
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future DatabasesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -329,15 +333,17 @@ func (client DatabasesClient) ExportPreparer(ctx context.Context, resourceGroupN
// ExportSender sends the Export request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) ExportSender(req *http.Request) (future DatabasesExportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -628,15 +634,17 @@ func (client DatabasesClient) ImportPreparer(ctx context.Context, resourceGroupN
// ImportSender sends the Import request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) ImportSender(req *http.Request) (future DatabasesImportFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -917,15 +925,17 @@ func (client DatabasesClient) PausePreparer(ctx context.Context, resourceGroupNa
// PauseSender sends the Pause request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) PauseSender(req *http.Request) (future DatabasesPauseFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -988,15 +998,17 @@ func (client DatabasesClient) ResumePreparer(ctx context.Context, resourceGroupN
// ResumeSender sends the Resume request. The method will close the
// http.Response Body if it receives an error.
func (client DatabasesClient) ResumeSender(req *http.Request) (future DatabasesResumeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1062,15 +1074,17 @@ func (client DatabasesClient) UpdatePreparer(ctx context.Context, resourceGroupN
// 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) (future DatabasesUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/elasticpools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/elasticpools.go
index 74913f8e0..00d10c86d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/elasticpools.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/elasticpools.go
@@ -91,15 +91,17 @@ func (client ElasticPoolsClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) CreateOrUpdateSender(req *http.Request) (future ElasticPoolsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -373,15 +375,17 @@ func (client ElasticPoolsClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) UpdateSender(req *http.Request) (future ElasticPoolsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/models.go
index 7724c4e41..87b9da093 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/models.go
@@ -549,10 +549,10 @@ type Database struct {
Kind *string `json:"kind,omitempty"`
// DatabaseProperties - The properties representing the resource.
*DatabaseProperties `json:"properties,omitempty"`
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -570,12 +570,12 @@ func (d Database) MarshalJSON() ([]byte, error) {
if d.DatabaseProperties != nil {
objectMap["properties"] = d.DatabaseProperties
}
- if d.Tags != nil {
- objectMap["tags"] = d.Tags
- }
if d.Location != nil {
objectMap["location"] = d.Location
}
+ if d.Tags != nil {
+ objectMap["tags"] = d.Tags
+ }
if d.ID != nil {
objectMap["id"] = d.ID
}
@@ -615,15 +615,6 @@ func (d *Database) UnmarshalJSON(body []byte) error {
}
d.DatabaseProperties = &databaseProperties
}
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- d.Tags = tags
- }
case "location":
if v != nil {
var location string
@@ -633,6 +624,15 @@ func (d *Database) UnmarshalJSON(body []byte) error {
}
d.Location = &location
}
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ d.Tags = tags
+ }
case "id":
if v != nil {
var ID string
@@ -741,12 +741,11 @@ type DatabaseProperties struct {
// operation.
type DatabasesCreateImportOperationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesCreateImportOperationFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
+func (future *DatabasesCreateImportOperationFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -754,34 +753,15 @@ func (future DatabasesCreateImportOperationFuture) Result(client DatabasesClient
return
}
if !done {
- return ier, azure.NewAsyncOpIncompleteError("sql.DatabasesCreateImportOperationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ier, err = client.CreateImportOperationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesCreateImportOperationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent {
+ ier, err = client.CreateImportOperationResponder(ier.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", ier.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", resp, "Failure sending request")
- return
- }
- ier, err = client.CreateImportOperationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -790,12 +770,11 @@ func (future DatabasesCreateImportOperationFuture) Result(client DatabasesClient
// operation.
type DatabasesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
+func (future *DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -803,34 +782,15 @@ func (future DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Da
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("sql.DatabasesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -968,12 +928,11 @@ type DatabaseSecurityAlertPolicyProperties struct {
// DatabasesExportFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesExportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesExportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
+func (future *DatabasesExportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -981,34 +940,15 @@ func (future DatabasesExportFuture) Result(client DatabasesClient) (ier ImportEx
return
}
if !done {
- return ier, azure.NewAsyncOpIncompleteError("sql.DatabasesExportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ier, err = client.ExportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesExportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent {
+ ier, err = client.ExportResponder(ier.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", ier.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", resp, "Failure sending request")
- return
- }
- ier, err = client.ExportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1016,12 +956,11 @@ func (future DatabasesExportFuture) Result(client DatabasesClient) (ier ImportEx
// DatabasesImportFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesImportFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesImportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
+func (future *DatabasesImportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1029,34 +968,15 @@ func (future DatabasesImportFuture) Result(client DatabasesClient) (ier ImportEx
return
}
if !done {
- return ier, azure.NewAsyncOpIncompleteError("sql.DatabasesImportFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ier, err = client.ImportResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesImportFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent {
+ ier, err = client.ImportResponder(ier.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", ier.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", resp, "Failure sending request")
- return
- }
- ier, err = client.ImportResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1064,12 +984,11 @@ func (future DatabasesImportFuture) Result(client DatabasesClient) (ier ImportEx
// DatabasesPauseFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesPauseFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesPauseFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
+func (future *DatabasesPauseFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1077,47 +996,21 @@ func (future DatabasesPauseFuture) Result(client DatabasesClient) (ar autorest.R
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.DatabasesPauseFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.PauseResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesPauseFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.PauseResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DatabasesResumeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesResumeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesResumeFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
+func (future *DatabasesResumeFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1125,47 +1018,21 @@ func (future DatabasesResumeFuture) Result(client DatabasesClient) (ar autorest.
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.DatabasesResumeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesResumeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DatabasesUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DatabasesUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
+func (future *DatabasesUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1173,34 +1040,15 @@ func (future DatabasesUpdateFuture) Result(client DatabasesClient) (d Database,
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("sql.DatabasesUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.DatabasesUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.UpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1307,10 +1155,10 @@ type ElasticPool struct {
*ElasticPoolProperties `json:"properties,omitempty"`
// Kind - Kind of elastic pool. This is metadata used for the Azure portal experience.
Kind *string `json:"kind,omitempty"`
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -1328,12 +1176,12 @@ func (ep ElasticPool) MarshalJSON() ([]byte, error) {
if ep.Kind != nil {
objectMap["kind"] = ep.Kind
}
- if ep.Tags != nil {
- objectMap["tags"] = ep.Tags
- }
if ep.Location != nil {
objectMap["location"] = ep.Location
}
+ if ep.Tags != nil {
+ objectMap["tags"] = ep.Tags
+ }
if ep.ID != nil {
objectMap["id"] = ep.ID
}
@@ -1373,15 +1221,6 @@ func (ep *ElasticPool) UnmarshalJSON(body []byte) error {
}
ep.Kind = &kind
}
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- ep.Tags = tags
- }
case "location":
if v != nil {
var location string
@@ -1391,6 +1230,15 @@ func (ep *ElasticPool) UnmarshalJSON(body []byte) error {
}
ep.Location = &location
}
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ep.Tags = tags
+ }
case "id":
if v != nil {
var ID string
@@ -1737,12 +1585,11 @@ type ElasticPoolProperties struct {
// operation.
type ElasticPoolsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
+func (future *ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1750,34 +1597,15 @@ func (future ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient)
return
}
if !done {
- return ep, azure.NewAsyncOpIncompleteError("sql.ElasticPoolsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ep, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent {
+ ep, err = client.CreateOrUpdateResponder(ep.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", ep.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ep, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1785,12 +1613,11 @@ func (future ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient)
// ElasticPoolsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ElasticPoolsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ElasticPoolsUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
+func (future *ElasticPoolsUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1798,34 +1625,15 @@ func (future ElasticPoolsUpdateFuture) Result(client ElasticPoolsClient) (ep Ela
return
}
if !done {
- return ep, azure.NewAsyncOpIncompleteError("sql.ElasticPoolsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ep, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent {
+ ep, err = client.UpdateResponder(ep.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", ep.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- ep, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2674,12 +2482,11 @@ type ReplicationLinkProperties struct {
// long-running operation.
type ReplicationLinksFailoverAllowDataLossFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationLinksFailoverAllowDataLossFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
+func (future *ReplicationLinksFailoverAllowDataLossFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2687,35 +2494,10 @@ func (future ReplicationLinksFailoverAllowDataLossFuture) Result(client Replicat
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverAllowDataLossFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.FailoverAllowDataLossResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverAllowDataLossFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverAllowDataLossFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverAllowDataLossFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.FailoverAllowDataLossResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverAllowDataLossFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2723,12 +2505,11 @@ func (future ReplicationLinksFailoverAllowDataLossFuture) Result(client Replicat
// operation.
type ReplicationLinksFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future ReplicationLinksFailoverFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
+func (future *ReplicationLinksFailoverFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2736,35 +2517,10 @@ func (future ReplicationLinksFailoverFuture) Result(client ReplicationLinksClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.FailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.FailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2921,10 +2677,10 @@ type SloUsageMetric struct {
// TrackedResource ARM tracked top level resource.
type TrackedResource struct {
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
// Location - Resource location.
Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
// Name - Resource name.
@@ -2936,12 +2692,12 @@ type TrackedResource struct {
// MarshalJSON is the custom marshaler for TrackedResource.
func (tr TrackedResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
- if tr.Tags != nil {
- objectMap["tags"] = tr.Tags
- }
if tr.Location != nil {
objectMap["location"] = tr.Location
}
+ if tr.Tags != nil {
+ objectMap["tags"] = tr.Tags
+ }
if tr.ID != nil {
objectMap["id"] = tr.ID
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/replicationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/replicationlinks.go
index 38dd9bdad..d4560b265 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/replicationlinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql/replicationlinks.go
@@ -161,15 +161,17 @@ func (client ReplicationLinksClient) FailoverPreparer(ctx context.Context, resou
// 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) (future ReplicationLinksFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -235,15 +237,17 @@ func (client ReplicationLinksClient) FailoverAllowDataLossPreparer(ctx context.C
// 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) (future ReplicationLinksFailoverAllowDataLossFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2015-06-15/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2015-06-15/storage/accounts.go
index a69e1cd57..5d357d59f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2015-06-15/storage/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2015-06-15/storage/accounts.go
@@ -178,15 +178,17 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2015-06-15/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2015-06-15/storage/models.go
index be36b6681..5c13d25a9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2015-06-15/storage/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2015-06-15/storage/models.go
@@ -361,12 +361,11 @@ type AccountRegenerateKeyParameters struct {
// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
+func (future *AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -374,34 +373,15 @@ func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-01-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-01-01/storage/accounts.go
index d867dd05b..b9d2cbd99 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-01-01/storage/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-01-01/storage/accounts.go
@@ -181,15 +181,17 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-01-01/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-01-01/storage/models.go
index 748ee1544..4fdf467fa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-01-01/storage/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-01-01/storage/models.go
@@ -493,12 +493,11 @@ type AccountRegenerateKeyParameters struct {
// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
+func (future *AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -506,34 +505,15 @@ func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-05-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-05-01/storage/accounts.go
index f0403c8fd..70f89ad58 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-05-01/storage/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-05-01/storage/accounts.go
@@ -186,15 +186,17 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-05-01/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-05-01/storage/models.go
index efdf2191c..d24e586bf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-05-01/storage/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-05-01/storage/models.go
@@ -637,12 +637,11 @@ type AccountSasParameters struct {
// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
+func (future *AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -650,34 +649,15 @@ func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-12-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-12-01/storage/accounts.go
index c624e7e2c..fe1099e92 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-12-01/storage/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-12-01/storage/accounts.go
@@ -186,15 +186,17 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-12-01/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-12-01/storage/models.go
index d1766aad8..309032088 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-12-01/storage/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2016-12-01/storage/models.go
@@ -643,12 +643,11 @@ type AccountSasParameters struct {
// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
+func (future *AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -656,34 +655,15 @@ func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-06-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-06-01/storage/accounts.go
index 151b52fcb..b32d14850 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-06-01/storage/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-06-01/storage/accounts.go
@@ -186,15 +186,17 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-06-01/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-06-01/storage/models.go
index 453c12bee..425531804 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-06-01/storage/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-06-01/storage/models.go
@@ -753,12 +753,11 @@ type AccountSasParameters struct {
// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
+func (future *AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -766,34 +765,15 @@ func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/accounts.go
index c1ffd6b6e..56dc300ec 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/accounts.go
@@ -186,15 +186,17 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/models.go
index 9e31bb4e5..c215a75c8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/models.go
@@ -755,12 +755,11 @@ type AccountSasParameters struct {
// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
+func (future *AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -768,34 +767,15 @@ func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage/accounts.go
index cadaa7b73..5c2b4738c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage/accounts.go
@@ -190,15 +190,17 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage/models.go
index a3d2473fc..d9dd94375 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage/models.go
@@ -855,12 +855,11 @@ type AccountSasParameters struct {
// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsCreateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
+func (future *AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -868,34 +867,15 @@ func (future AccountsCreateFuture) Result(client AccountsClient) (a Account, err
return
}
if !done {
- return a, azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- a, err = client.CreateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
+ a, err = client.CreateResponder(a.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure sending request")
- return
- }
- a, err = client.CreateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage/usage.go
index a1830963f..474bc8127 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage/usage.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage/usage.go
@@ -107,3 +107,74 @@ func (client UsageClient) ListResponder(resp *http.Response) (result UsageListRe
result.Response = autorest.Response{Response: resp}
return
}
+
+// ListByLocation gets the current usage count and the limit for the resources of the location under the subscription.
+// Parameters:
+// location - the location of the Azure Storage resource.
+func (client UsageClient) ListByLocation(ctx context.Context, location string) (result UsageListResult, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.UsageClient", "ListByLocation", err.Error())
+ }
+
+ req, err := client.ListByLocationPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.UsageClient", "ListByLocation", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.UsageClient", "ListByLocation", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.UsageClient", "ListByLocation", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByLocationPreparer prepares the ListByLocation request.
+func (client UsageClient) ListByLocationPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByLocationSender sends the ListByLocation request. The method will close the
+// http.Response Body if it receives an error.
+func (client UsageClient) ListByLocationSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByLocationResponder handles the response to the ListByLocation request. The method always
+// closes the http.Response Body.
+func (client UsageClient) ListByLocationResponder(resp *http.Response) (result UsageListResult, 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/services/storsimple8000series/mgmt/2017-06-01/storsimple/accesscontrolrecords.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/accesscontrolrecords.go
index 2bb1d9af8..f72e9972e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/accesscontrolrecords.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/accesscontrolrecords.go
@@ -99,15 +99,17 @@ func (client AccessControlRecordsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client AccessControlRecordsClient) CreateOrUpdateSender(req *http.Request) (future AccessControlRecordsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -177,15 +179,17 @@ func (client AccessControlRecordsClient) DeletePreparer(ctx context.Context, acc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client AccessControlRecordsClient) DeleteSender(req *http.Request) (future AccessControlRecordsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/backuppolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/backuppolicies.go
index be9ccb198..184b31a1a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/backuppolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/backuppolicies.go
@@ -97,15 +97,17 @@ func (client BackupPoliciesClient) BackupNowPreparer(ctx context.Context, device
// BackupNowSender sends the BackupNow request. The method will close the
// http.Response Body if it receives an error.
func (client BackupPoliciesClient) BackupNowSender(req *http.Request) (future BackupPoliciesBackupNowFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -182,15 +184,17 @@ func (client BackupPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, d
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client BackupPoliciesClient) CreateOrUpdateSender(req *http.Request) (future BackupPoliciesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -262,15 +266,17 @@ func (client BackupPoliciesClient) DeletePreparer(ctx context.Context, deviceNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client BackupPoliciesClient) DeleteSender(req *http.Request) (future BackupPoliciesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/backups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/backups.go
index b9b4c672c..ecd95f1f2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/backups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/backups.go
@@ -112,15 +112,17 @@ func (client BackupsClient) ClonePreparer(ctx context.Context, deviceName string
// CloneSender sends the Clone request. The method will close the
// http.Response Body if it receives an error.
func (client BackupsClient) CloneSender(req *http.Request) (future BackupsCloneFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -191,15 +193,17 @@ func (client BackupsClient) DeletePreparer(ctx context.Context, deviceName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client BackupsClient) DeleteSender(req *http.Request) (future BackupsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -378,15 +382,17 @@ func (client BackupsClient) RestorePreparer(ctx context.Context, deviceName stri
// RestoreSender sends the Restore request. The method will close the
// http.Response Body if it receives an error.
func (client BackupsClient) RestoreSender(req *http.Request) (future BackupsRestoreFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/backupschedules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/backupschedules.go
index 5a2fcaa1c..38be04e83 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/backupschedules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/backupschedules.go
@@ -107,15 +107,17 @@ func (client BackupSchedulesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client BackupSchedulesClient) CreateOrUpdateSender(req *http.Request) (future BackupSchedulesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -189,15 +191,17 @@ func (client BackupSchedulesClient) DeletePreparer(ctx context.Context, deviceNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client BackupSchedulesClient) DeleteSender(req *http.Request) (future BackupSchedulesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/bandwidthsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/bandwidthsettings.go
index 5555fd051..4d90e25c9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/bandwidthsettings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/bandwidthsettings.go
@@ -99,15 +99,17 @@ func (client BandwidthSettingsClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client BandwidthSettingsClient) CreateOrUpdateSender(req *http.Request) (future BandwidthSettingsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -177,15 +179,17 @@ func (client BandwidthSettingsClient) DeletePreparer(ctx context.Context, bandwi
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client BandwidthSettingsClient) DeleteSender(req *http.Request) (future BandwidthSettingsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/cloudappliances.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/cloudappliances.go
index 69f6bb722..bbdb7b8eb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/cloudappliances.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/cloudappliances.go
@@ -171,15 +171,17 @@ func (client CloudAppliancesClient) ProvisionPreparer(ctx context.Context, param
// ProvisionSender sends the Provision request. The method will close the
// http.Response Body if it receives an error.
func (client CloudAppliancesClient) ProvisionSender(req *http.Request) (future CloudAppliancesProvisionFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/devices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/devices.go
index 4a229eacb..d9b1d5d3c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/devices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/devices.go
@@ -175,15 +175,17 @@ func (client DevicesClient) ConfigurePreparer(ctx context.Context, parameters Co
// ConfigureSender sends the Configure request. The method will close the
// http.Response Body if it receives an error.
func (client DevicesClient) ConfigureSender(req *http.Request) (future DevicesConfigureFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -252,15 +254,17 @@ func (client DevicesClient) DeactivatePreparer(ctx context.Context, deviceName s
// DeactivateSender sends the Deactivate request. The method will close the
// http.Response Body if it receives an error.
func (client DevicesClient) DeactivateSender(req *http.Request) (future DevicesDeactivateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -329,15 +333,17 @@ func (client DevicesClient) DeletePreparer(ctx context.Context, deviceName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DevicesClient) DeleteSender(req *http.Request) (future DevicesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -410,15 +416,17 @@ func (client DevicesClient) FailoverPreparer(ctx context.Context, sourceDeviceNa
// FailoverSender sends the Failover request. The method will close the
// http.Response Body if it receives an error.
func (client DevicesClient) FailoverSender(req *http.Request) (future DevicesFailoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -645,15 +653,17 @@ func (client DevicesClient) InstallUpdatesPreparer(ctx context.Context, deviceNa
// InstallUpdatesSender sends the InstallUpdates request. The method will close the
// http.Response Body if it receives an error.
func (client DevicesClient) InstallUpdatesSender(req *http.Request) (future DevicesInstallUpdatesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1114,15 +1124,17 @@ func (client DevicesClient) ScanForUpdatesPreparer(ctx context.Context, deviceNa
// ScanForUpdatesSender sends the ScanForUpdates request. The method will close the
// http.Response Body if it receives an error.
func (client DevicesClient) ScanForUpdatesSender(req *http.Request) (future DevicesScanForUpdatesFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/devicesettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/devicesettings.go
index d32e6061e..955ca9c3c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/devicesettings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/devicesettings.go
@@ -98,15 +98,17 @@ func (client DeviceSettingsClient) CreateOrUpdateAlertSettingsPreparer(ctx conte
// CreateOrUpdateAlertSettingsSender sends the CreateOrUpdateAlertSettings request. The method will close the
// http.Response Body if it receives an error.
func (client DeviceSettingsClient) CreateOrUpdateAlertSettingsSender(req *http.Request) (future DeviceSettingsCreateOrUpdateAlertSettingsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -182,15 +184,17 @@ func (client DeviceSettingsClient) CreateOrUpdateTimeSettingsPreparer(ctx contex
// CreateOrUpdateTimeSettingsSender sends the CreateOrUpdateTimeSettings request. The method will close the
// http.Response Body if it receives an error.
func (client DeviceSettingsClient) CreateOrUpdateTimeSettingsSender(req *http.Request) (future DeviceSettingsCreateOrUpdateTimeSettingsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -564,15 +568,17 @@ func (client DeviceSettingsClient) SyncRemotemanagementCertificatePreparer(ctx c
// SyncRemotemanagementCertificateSender sends the SyncRemotemanagementCertificate request. The method will close the
// http.Response Body if it receives an error.
func (client DeviceSettingsClient) SyncRemotemanagementCertificateSender(req *http.Request) (future DeviceSettingsSyncRemotemanagementCertificateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -644,15 +650,17 @@ func (client DeviceSettingsClient) UpdateNetworkSettingsPreparer(ctx context.Con
// UpdateNetworkSettingsSender sends the UpdateNetworkSettings request. The method will close the
// http.Response Body if it receives an error.
func (client DeviceSettingsClient) UpdateNetworkSettingsSender(req *http.Request) (future DeviceSettingsUpdateNetworkSettingsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -725,15 +733,17 @@ func (client DeviceSettingsClient) UpdateSecuritySettingsPreparer(ctx context.Co
// UpdateSecuritySettingsSender sends the UpdateSecuritySettings request. The method will close the
// http.Response Body if it receives an error.
func (client DeviceSettingsClient) UpdateSecuritySettingsSender(req *http.Request) (future DeviceSettingsUpdateSecuritySettingsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/hardwarecomponentgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/hardwarecomponentgroups.go
index 2e4b19c52..649259514 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/hardwarecomponentgroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/hardwarecomponentgroups.go
@@ -100,15 +100,17 @@ func (client HardwareComponentGroupsClient) ChangeControllerPowerStatePreparer(c
// ChangeControllerPowerStateSender sends the ChangeControllerPowerState request. The method will close the
// http.Response Body if it receives an error.
func (client HardwareComponentGroupsClient) ChangeControllerPowerStateSender(req *http.Request) (future HardwareComponentGroupsChangeControllerPowerStateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/jobs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/jobs.go
index a82e1f151..603d35fac 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/jobs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/jobs.go
@@ -95,15 +95,17 @@ func (client JobsClient) CancelPreparer(ctx context.Context, deviceName string,
// CancelSender sends the Cancel request. The method will close the
// http.Response Body if it receives an error.
func (client JobsClient) CancelSender(req *http.Request) (future JobsCancelFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/models.go
index 307ef04ce..6b134af9c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/models.go
@@ -1005,12 +1005,11 @@ type AccessControlRecordProperties struct {
// long-running operation.
type AccessControlRecordsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccessControlRecordsCreateOrUpdateFuture) Result(client AccessControlRecordsClient) (acr AccessControlRecord, err error) {
+func (future *AccessControlRecordsCreateOrUpdateFuture) Result(client AccessControlRecordsClient) (acr AccessControlRecord, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1018,34 +1017,15 @@ func (future AccessControlRecordsCreateOrUpdateFuture) Result(client AccessContr
return
}
if !done {
- return acr, azure.NewAsyncOpIncompleteError("storsimple.AccessControlRecordsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- acr, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.AccessControlRecordsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.AccessControlRecordsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if acr.Response.Response, err = future.GetResult(sender); err == nil && acr.Response.Response.StatusCode != http.StatusNoContent {
+ acr, err = client.CreateOrUpdateResponder(acr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storsimple.AccessControlRecordsCreateOrUpdateFuture", "Result", acr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.AccessControlRecordsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- acr, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.AccessControlRecordsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1054,12 +1034,11 @@ func (future AccessControlRecordsCreateOrUpdateFuture) Result(client AccessContr
// operation.
type AccessControlRecordsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AccessControlRecordsDeleteFuture) Result(client AccessControlRecordsClient) (ar autorest.Response, err error) {
+func (future *AccessControlRecordsDeleteFuture) Result(client AccessControlRecordsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1067,35 +1046,10 @@ func (future AccessControlRecordsDeleteFuture) Result(client AccessControlRecord
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.AccessControlRecordsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.AccessControlRecordsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.AccessControlRecordsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.AccessControlRecordsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.AccessControlRecordsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1896,12 +1850,11 @@ func (page BackupListPage) Values() []Backup {
// operation.
type BackupPoliciesBackupNowFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BackupPoliciesBackupNowFuture) Result(client BackupPoliciesClient) (ar autorest.Response, err error) {
+func (future *BackupPoliciesBackupNowFuture) Result(client BackupPoliciesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1909,35 +1862,10 @@ func (future BackupPoliciesBackupNowFuture) Result(client BackupPoliciesClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.BackupPoliciesBackupNowFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.BackupNowResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesBackupNowFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.BackupPoliciesBackupNowFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesBackupNowFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.BackupNowResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesBackupNowFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -1945,12 +1873,11 @@ func (future BackupPoliciesBackupNowFuture) Result(client BackupPoliciesClient)
// operation.
type BackupPoliciesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BackupPoliciesCreateOrUpdateFuture) Result(client BackupPoliciesClient) (bp BackupPolicy, err error) {
+func (future *BackupPoliciesCreateOrUpdateFuture) Result(client BackupPoliciesClient) (bp BackupPolicy, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1958,34 +1885,15 @@ func (future BackupPoliciesCreateOrUpdateFuture) Result(client BackupPoliciesCli
return
}
if !done {
- return bp, azure.NewAsyncOpIncompleteError("storsimple.BackupPoliciesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.BackupPoliciesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bp.Response.Response, err = future.GetResult(sender); err == nil && bp.Response.Response.StatusCode != http.StatusNoContent {
+ bp, err = client.CreateOrUpdateResponder(bp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesCreateOrUpdateFuture", "Result", bp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- bp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1993,12 +1901,11 @@ func (future BackupPoliciesCreateOrUpdateFuture) Result(client BackupPoliciesCli
// BackupPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type BackupPoliciesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BackupPoliciesDeleteFuture) Result(client BackupPoliciesClient) (ar autorest.Response, err error) {
+func (future *BackupPoliciesDeleteFuture) Result(client BackupPoliciesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2006,35 +1913,10 @@ func (future BackupPoliciesDeleteFuture) Result(client BackupPoliciesClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.BackupPoliciesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.BackupPoliciesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2300,12 +2182,11 @@ type BackupScheduleProperties struct {
// operation.
type BackupSchedulesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BackupSchedulesCreateOrUpdateFuture) Result(client BackupSchedulesClient) (bs BackupSchedule, err error) {
+func (future *BackupSchedulesCreateOrUpdateFuture) Result(client BackupSchedulesClient) (bs BackupSchedule, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2313,34 +2194,15 @@ func (future BackupSchedulesCreateOrUpdateFuture) Result(client BackupSchedulesC
return
}
if !done {
- return bs, azure.NewAsyncOpIncompleteError("storsimple.BackupSchedulesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bs, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupSchedulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.BackupSchedulesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bs.Response.Response, err = future.GetResult(sender); err == nil && bs.Response.Response.StatusCode != http.StatusNoContent {
+ bs, err = client.CreateOrUpdateResponder(bs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storsimple.BackupSchedulesCreateOrUpdateFuture", "Result", bs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupSchedulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- bs, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupSchedulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2349,12 +2211,11 @@ func (future BackupSchedulesCreateOrUpdateFuture) Result(client BackupSchedulesC
// operation.
type BackupSchedulesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BackupSchedulesDeleteFuture) Result(client BackupSchedulesClient) (ar autorest.Response, err error) {
+func (future *BackupSchedulesDeleteFuture) Result(client BackupSchedulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2362,47 +2223,21 @@ func (future BackupSchedulesDeleteFuture) Result(client BackupSchedulesClient) (
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.BackupSchedulesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupSchedulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.BackupSchedulesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupSchedulesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupSchedulesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// BackupsCloneFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type BackupsCloneFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BackupsCloneFuture) Result(client BackupsClient) (ar autorest.Response, err error) {
+func (future *BackupsCloneFuture) Result(client BackupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2410,47 +2245,21 @@ func (future BackupsCloneFuture) Result(client BackupsClient) (ar autorest.Respo
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.BackupsCloneFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.CloneResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupsCloneFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.BackupsCloneFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupsCloneFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.CloneResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupsCloneFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// BackupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type BackupsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BackupsDeleteFuture) Result(client BackupsClient) (ar autorest.Response, err error) {
+func (future *BackupsDeleteFuture) Result(client BackupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2458,47 +2267,21 @@ func (future BackupsDeleteFuture) Result(client BackupsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.BackupsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.BackupsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// BackupsRestoreFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type BackupsRestoreFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BackupsRestoreFuture) Result(client BackupsClient) (ar autorest.Response, err error) {
+func (future *BackupsRestoreFuture) Result(client BackupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2506,35 +2289,10 @@ func (future BackupsRestoreFuture) Result(client BackupsClient) (ar autorest.Res
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.BackupsRestoreFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RestoreResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupsRestoreFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.BackupsRestoreFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupsRestoreFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RestoreResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BackupsRestoreFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2665,12 +2423,11 @@ type BandwidthSettingList struct {
// operation.
type BandwidthSettingsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BandwidthSettingsCreateOrUpdateFuture) Result(client BandwidthSettingsClient) (bs BandwidthSetting, err error) {
+func (future *BandwidthSettingsCreateOrUpdateFuture) Result(client BandwidthSettingsClient) (bs BandwidthSetting, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2678,34 +2435,15 @@ func (future BandwidthSettingsCreateOrUpdateFuture) Result(client BandwidthSetti
return
}
if !done {
- return bs, azure.NewAsyncOpIncompleteError("storsimple.BandwidthSettingsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- bs, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BandwidthSettingsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.BandwidthSettingsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bs.Response.Response, err = future.GetResult(sender); err == nil && bs.Response.Response.StatusCode != http.StatusNoContent {
+ bs, err = client.CreateOrUpdateResponder(bs.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storsimple.BandwidthSettingsCreateOrUpdateFuture", "Result", bs.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BandwidthSettingsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- bs, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BandwidthSettingsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2714,12 +2452,11 @@ func (future BandwidthSettingsCreateOrUpdateFuture) Result(client BandwidthSetti
// operation.
type BandwidthSettingsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future BandwidthSettingsDeleteFuture) Result(client BandwidthSettingsClient) (ar autorest.Response, err error) {
+func (future *BandwidthSettingsDeleteFuture) Result(client BandwidthSettingsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2727,35 +2464,10 @@ func (future BandwidthSettingsDeleteFuture) Result(client BandwidthSettingsClien
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.BandwidthSettingsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BandwidthSettingsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.BandwidthSettingsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BandwidthSettingsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.BandwidthSettingsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -2961,12 +2673,11 @@ type CloudApplianceSettings struct {
// operation.
type CloudAppliancesProvisionFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future CloudAppliancesProvisionFuture) Result(client CloudAppliancesClient) (ar autorest.Response, err error) {
+func (future *CloudAppliancesProvisionFuture) Result(client CloudAppliancesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2974,35 +2685,10 @@ func (future CloudAppliancesProvisionFuture) Result(client CloudAppliancesClient
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.CloudAppliancesProvisionFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ProvisionResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.CloudAppliancesProvisionFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.CloudAppliancesProvisionFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.CloudAppliancesProvisionFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ProvisionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.CloudAppliancesProvisionFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3462,12 +3148,11 @@ type DeviceRolloverDetails struct {
// DevicesConfigureFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DevicesConfigureFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DevicesConfigureFuture) Result(client DevicesClient) (ar autorest.Response, err error) {
+func (future *DevicesConfigureFuture) Result(client DevicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3475,47 +3160,21 @@ func (future DevicesConfigureFuture) Result(client DevicesClient) (ar autorest.R
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.DevicesConfigureFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ConfigureResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesConfigureFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.DevicesConfigureFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesConfigureFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ConfigureResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesConfigureFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DevicesDeactivateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DevicesDeactivateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DevicesDeactivateFuture) Result(client DevicesClient) (ar autorest.Response, err error) {
+func (future *DevicesDeactivateFuture) Result(client DevicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3523,47 +3182,21 @@ func (future DevicesDeactivateFuture) Result(client DevicesClient) (ar autorest.
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.DevicesDeactivateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeactivateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesDeactivateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.DevicesDeactivateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesDeactivateFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeactivateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesDeactivateFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// DevicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DevicesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DevicesDeleteFuture) Result(client DevicesClient) (ar autorest.Response, err error) {
+func (future *DevicesDeleteFuture) Result(client DevicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3571,35 +3204,10 @@ func (future DevicesDeleteFuture) Result(client DevicesClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.DevicesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.DevicesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3607,12 +3215,11 @@ func (future DevicesDeleteFuture) Result(client DevicesClient) (ar autorest.Resp
// long-running operation.
type DeviceSettingsCreateOrUpdateAlertSettingsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeviceSettingsCreateOrUpdateAlertSettingsFuture) Result(client DeviceSettingsClient) (as AlertSettings, err error) {
+func (future *DeviceSettingsCreateOrUpdateAlertSettingsFuture) Result(client DeviceSettingsClient) (as AlertSettings, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3620,34 +3227,15 @@ func (future DeviceSettingsCreateOrUpdateAlertSettingsFuture) Result(client Devi
return
}
if !done {
- return as, azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsCreateOrUpdateAlertSettingsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- as, err = client.CreateOrUpdateAlertSettingsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsCreateOrUpdateAlertSettingsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsCreateOrUpdateAlertSettingsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if as.Response.Response, err = future.GetResult(sender); err == nil && as.Response.Response.StatusCode != http.StatusNoContent {
+ as, err = client.CreateOrUpdateAlertSettingsResponder(as.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsCreateOrUpdateAlertSettingsFuture", "Result", as.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsCreateOrUpdateAlertSettingsFuture", "Result", resp, "Failure sending request")
- return
- }
- as, err = client.CreateOrUpdateAlertSettingsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsCreateOrUpdateAlertSettingsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3656,12 +3244,11 @@ func (future DeviceSettingsCreateOrUpdateAlertSettingsFuture) Result(client Devi
// long-running operation.
type DeviceSettingsCreateOrUpdateTimeSettingsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeviceSettingsCreateOrUpdateTimeSettingsFuture) Result(client DeviceSettingsClient) (ts TimeSettings, err error) {
+func (future *DeviceSettingsCreateOrUpdateTimeSettingsFuture) Result(client DeviceSettingsClient) (ts TimeSettings, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3669,34 +3256,15 @@ func (future DeviceSettingsCreateOrUpdateTimeSettingsFuture) Result(client Devic
return
}
if !done {
- return ts, azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsCreateOrUpdateTimeSettingsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ts, err = client.CreateOrUpdateTimeSettingsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsCreateOrUpdateTimeSettingsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsCreateOrUpdateTimeSettingsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ts.Response.Response, err = future.GetResult(sender); err == nil && ts.Response.Response.StatusCode != http.StatusNoContent {
+ ts, err = client.CreateOrUpdateTimeSettingsResponder(ts.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsCreateOrUpdateTimeSettingsFuture", "Result", ts.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsCreateOrUpdateTimeSettingsFuture", "Result", resp, "Failure sending request")
- return
- }
- ts, err = client.CreateOrUpdateTimeSettingsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsCreateOrUpdateTimeSettingsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3705,12 +3273,11 @@ func (future DeviceSettingsCreateOrUpdateTimeSettingsFuture) Result(client Devic
// a long-running operation.
type DeviceSettingsSyncRemotemanagementCertificateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeviceSettingsSyncRemotemanagementCertificateFuture) Result(client DeviceSettingsClient) (ar autorest.Response, err error) {
+func (future *DeviceSettingsSyncRemotemanagementCertificateFuture) Result(client DeviceSettingsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3718,35 +3285,10 @@ func (future DeviceSettingsSyncRemotemanagementCertificateFuture) Result(client
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsSyncRemotemanagementCertificateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.SyncRemotemanagementCertificateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsSyncRemotemanagementCertificateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsSyncRemotemanagementCertificateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsSyncRemotemanagementCertificateFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.SyncRemotemanagementCertificateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsSyncRemotemanagementCertificateFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3754,12 +3296,11 @@ func (future DeviceSettingsSyncRemotemanagementCertificateFuture) Result(client
// long-running operation.
type DeviceSettingsUpdateNetworkSettingsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeviceSettingsUpdateNetworkSettingsFuture) Result(client DeviceSettingsClient) (ns NetworkSettings, err error) {
+func (future *DeviceSettingsUpdateNetworkSettingsFuture) Result(client DeviceSettingsClient) (ns NetworkSettings, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3767,34 +3308,15 @@ func (future DeviceSettingsUpdateNetworkSettingsFuture) Result(client DeviceSett
return
}
if !done {
- return ns, azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsUpdateNetworkSettingsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ns, err = client.UpdateNetworkSettingsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsUpdateNetworkSettingsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsUpdateNetworkSettingsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ns.Response.Response, err = future.GetResult(sender); err == nil && ns.Response.Response.StatusCode != http.StatusNoContent {
+ ns, err = client.UpdateNetworkSettingsResponder(ns.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsUpdateNetworkSettingsFuture", "Result", ns.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsUpdateNetworkSettingsFuture", "Result", resp, "Failure sending request")
- return
- }
- ns, err = client.UpdateNetworkSettingsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsUpdateNetworkSettingsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3803,12 +3325,11 @@ func (future DeviceSettingsUpdateNetworkSettingsFuture) Result(client DeviceSett
// long-running operation.
type DeviceSettingsUpdateSecuritySettingsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DeviceSettingsUpdateSecuritySettingsFuture) Result(client DeviceSettingsClient) (ss SecuritySettings, err error) {
+func (future *DeviceSettingsUpdateSecuritySettingsFuture) Result(client DeviceSettingsClient) (ss SecuritySettings, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3816,34 +3337,15 @@ func (future DeviceSettingsUpdateSecuritySettingsFuture) Result(client DeviceSet
return
}
if !done {
- return ss, azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsUpdateSecuritySettingsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ss, err = client.UpdateSecuritySettingsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsUpdateSecuritySettingsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsUpdateSecuritySettingsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ss.Response.Response, err = future.GetResult(sender); err == nil && ss.Response.Response.StatusCode != http.StatusNoContent {
+ ss, err = client.UpdateSecuritySettingsResponder(ss.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsUpdateSecuritySettingsFuture", "Result", ss.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsUpdateSecuritySettingsFuture", "Result", resp, "Failure sending request")
- return
- }
- ss, err = client.UpdateSecuritySettingsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsUpdateSecuritySettingsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3851,12 +3353,11 @@ func (future DeviceSettingsUpdateSecuritySettingsFuture) Result(client DeviceSet
// DevicesFailoverFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DevicesFailoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DevicesFailoverFuture) Result(client DevicesClient) (ar autorest.Response, err error) {
+func (future *DevicesFailoverFuture) Result(client DevicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3864,35 +3365,10 @@ func (future DevicesFailoverFuture) Result(client DevicesClient) (ar autorest.Re
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.DevicesFailoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.FailoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesFailoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.DevicesFailoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesFailoverFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.FailoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesFailoverFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3900,12 +3376,11 @@ func (future DevicesFailoverFuture) Result(client DevicesClient) (ar autorest.Re
// operation.
type DevicesInstallUpdatesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DevicesInstallUpdatesFuture) Result(client DevicesClient) (ar autorest.Response, err error) {
+func (future *DevicesInstallUpdatesFuture) Result(client DevicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3913,35 +3388,10 @@ func (future DevicesInstallUpdatesFuture) Result(client DevicesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.DevicesInstallUpdatesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.InstallUpdatesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesInstallUpdatesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.DevicesInstallUpdatesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesInstallUpdatesFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.InstallUpdatesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesInstallUpdatesFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3949,12 +3399,11 @@ func (future DevicesInstallUpdatesFuture) Result(client DevicesClient) (ar autor
// operation.
type DevicesScanForUpdatesFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DevicesScanForUpdatesFuture) Result(client DevicesClient) (ar autorest.Response, err error) {
+func (future *DevicesScanForUpdatesFuture) Result(client DevicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3962,35 +3411,10 @@ func (future DevicesScanForUpdatesFuture) Result(client DevicesClient) (ar autor
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.DevicesScanForUpdatesFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ScanForUpdatesResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesScanForUpdatesFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.DevicesScanForUpdatesFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesScanForUpdatesFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ScanForUpdatesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.DevicesScanForUpdatesFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4333,12 +3757,11 @@ type HardwareComponentGroupProperties struct {
// of a long-running operation.
type HardwareComponentGroupsChangeControllerPowerStateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future HardwareComponentGroupsChangeControllerPowerStateFuture) Result(client HardwareComponentGroupsClient) (ar autorest.Response, err error) {
+func (future *HardwareComponentGroupsChangeControllerPowerStateFuture) Result(client HardwareComponentGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4346,35 +3769,10 @@ func (future HardwareComponentGroupsChangeControllerPowerStateFuture) Result(cli
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.HardwareComponentGroupsChangeControllerPowerStateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.ChangeControllerPowerStateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.HardwareComponentGroupsChangeControllerPowerStateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.HardwareComponentGroupsChangeControllerPowerStateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.HardwareComponentGroupsChangeControllerPowerStateFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.ChangeControllerPowerStateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.HardwareComponentGroupsChangeControllerPowerStateFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4703,12 +4101,11 @@ type JobProperties struct {
// JobsCancelFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobsCancelFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future JobsCancelFuture) Result(client JobsClient) (ar autorest.Response, err error) {
+func (future *JobsCancelFuture) Result(client JobsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4716,35 +4113,10 @@ func (future JobsCancelFuture) Result(client JobsClient) (ar autorest.Response,
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.JobsCancelFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.CancelResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.JobsCancelFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.JobsCancelFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.JobsCancelFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.CancelResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.JobsCancelFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5757,12 +5129,11 @@ type StorageAccountCredentialProperties struct {
// long-running operation.
type StorageAccountCredentialsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future StorageAccountCredentialsCreateOrUpdateFuture) Result(client StorageAccountCredentialsClient) (sac StorageAccountCredential, err error) {
+func (future *StorageAccountCredentialsCreateOrUpdateFuture) Result(client StorageAccountCredentialsClient) (sac StorageAccountCredential, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5770,34 +5141,15 @@ func (future StorageAccountCredentialsCreateOrUpdateFuture) Result(client Storag
return
}
if !done {
- return sac, azure.NewAsyncOpIncompleteError("storsimple.StorageAccountCredentialsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sac, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.StorageAccountCredentialsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.StorageAccountCredentialsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sac.Response.Response, err = future.GetResult(sender); err == nil && sac.Response.Response.StatusCode != http.StatusNoContent {
+ sac, err = client.CreateOrUpdateResponder(sac.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storsimple.StorageAccountCredentialsCreateOrUpdateFuture", "Result", sac.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.StorageAccountCredentialsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- sac, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.StorageAccountCredentialsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -5806,12 +5158,11 @@ func (future StorageAccountCredentialsCreateOrUpdateFuture) Result(client Storag
// operation.
type StorageAccountCredentialsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future StorageAccountCredentialsDeleteFuture) Result(client StorageAccountCredentialsClient) (ar autorest.Response, err error) {
+func (future *StorageAccountCredentialsDeleteFuture) Result(client StorageAccountCredentialsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5819,35 +5170,10 @@ func (future StorageAccountCredentialsDeleteFuture) Result(client StorageAccount
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.StorageAccountCredentialsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.StorageAccountCredentialsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.StorageAccountCredentialsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.StorageAccountCredentialsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.StorageAccountCredentialsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6351,12 +5677,11 @@ type VolumeContainerProperties struct {
// operation.
type VolumeContainersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VolumeContainersCreateOrUpdateFuture) Result(client VolumeContainersClient) (vc VolumeContainer, err error) {
+func (future *VolumeContainersCreateOrUpdateFuture) Result(client VolumeContainersClient) (vc VolumeContainer, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6364,34 +5689,15 @@ func (future VolumeContainersCreateOrUpdateFuture) Result(client VolumeContainer
return
}
if !done {
- return vc, azure.NewAsyncOpIncompleteError("storsimple.VolumeContainersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vc, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.VolumeContainersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.VolumeContainersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
+ vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storsimple.VolumeContainersCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.VolumeContainersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vc, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.VolumeContainersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6400,12 +5706,11 @@ func (future VolumeContainersCreateOrUpdateFuture) Result(client VolumeContainer
// operation.
type VolumeContainersDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VolumeContainersDeleteFuture) Result(client VolumeContainersClient) (ar autorest.Response, err error) {
+func (future *VolumeContainersDeleteFuture) Result(client VolumeContainersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6413,35 +5718,10 @@ func (future VolumeContainersDeleteFuture) Result(client VolumeContainersClient)
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.VolumeContainersDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.VolumeContainersDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.VolumeContainersDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.VolumeContainersDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.VolumeContainersDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -6496,12 +5776,11 @@ type VolumeProperties struct {
// operation.
type VolumesCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VolumesCreateOrUpdateFuture) Result(client VolumesClient) (vVar Volume, err error) {
+func (future *VolumesCreateOrUpdateFuture) Result(client VolumesClient) (vVar Volume, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6509,34 +5788,15 @@ func (future VolumesCreateOrUpdateFuture) Result(client VolumesClient) (vVar Vol
return
}
if !done {
- return vVar, azure.NewAsyncOpIncompleteError("storsimple.VolumesCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- vVar, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.VolumesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.VolumesCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vVar.Response.Response, err = future.GetResult(sender); err == nil && vVar.Response.Response.StatusCode != http.StatusNoContent {
+ vVar, err = client.CreateOrUpdateResponder(vVar.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "storsimple.VolumesCreateOrUpdateFuture", "Result", vVar.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.VolumesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- vVar, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.VolumesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -6544,12 +5804,11 @@ func (future VolumesCreateOrUpdateFuture) Result(client VolumesClient) (vVar Vol
// VolumesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type VolumesDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future VolumesDeleteFuture) Result(client VolumesClient) (ar autorest.Response, err error) {
+func (future *VolumesDeleteFuture) Result(client VolumesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -6557,35 +5816,10 @@ func (future VolumesDeleteFuture) Result(client VolumesClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("storsimple.VolumesDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.VolumesDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("storsimple.VolumesDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.VolumesDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "storsimple.VolumesDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/storageaccountcredentials.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/storageaccountcredentials.go
index fee55ff02..f5e30075a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/storageaccountcredentials.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/storageaccountcredentials.go
@@ -102,15 +102,17 @@ func (client StorageAccountCredentialsClient) CreateOrUpdatePreparer(ctx context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client StorageAccountCredentialsClient) CreateOrUpdateSender(req *http.Request) (future StorageAccountCredentialsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -180,15 +182,17 @@ func (client StorageAccountCredentialsClient) DeletePreparer(ctx context.Context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client StorageAccountCredentialsClient) DeleteSender(req *http.Request) (future StorageAccountCredentialsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumecontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumecontainers.go
index 352ee16b9..111a2d018 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumecontainers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumecontainers.go
@@ -104,15 +104,17 @@ func (client VolumeContainersClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VolumeContainersClient) CreateOrUpdateSender(req *http.Request) (future VolumeContainersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -184,15 +186,17 @@ func (client VolumeContainersClient) DeletePreparer(ctx context.Context, deviceN
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VolumeContainersClient) DeleteSender(req *http.Request) (future VolumeContainersDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumes.go
index ba17acb66..a86a780fe 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumes.go
@@ -105,15 +105,17 @@ func (client VolumesClient) CreateOrUpdatePreparer(ctx context.Context, deviceNa
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VolumesClient) CreateOrUpdateSender(req *http.Request) (future VolumesCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -187,15 +189,17 @@ func (client VolumesClient) DeletePreparer(ctx context.Context, deviceName strin
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VolumesClient) DeleteSender(req *http.Request) (future VolumesDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/functions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/functions.go
index 5b73640b7..0f4018a00 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/functions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/functions.go
@@ -501,15 +501,17 @@ func (client FunctionsClient) TestPreparer(ctx context.Context, resourceGroupNam
// TestSender sends the Test request. The method will close the
// http.Response Body if it receives an error.
func (client FunctionsClient) TestSender(req *http.Request) (future FunctionsTestFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/inputs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/inputs.go
index 789813f79..2c7d3af6f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/inputs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/inputs.go
@@ -422,15 +422,17 @@ func (client InputsClient) TestPreparer(ctx context.Context, resourceGroupName s
// TestSender sends the Test request. The method will close the
// http.Response Body if it receives an error.
func (client InputsClient) TestSender(req *http.Request) (future InputsTestFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/models.go
index 74dffd431..3dfbaca81 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/models.go
@@ -2147,12 +2147,11 @@ func (frddp FunctionRetrieveDefaultDefinitionParameters) AsBasicFunctionRetrieve
// FunctionsTestFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type FunctionsTestFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future FunctionsTestFuture) Result(client FunctionsClient) (rts ResourceTestStatus, err error) {
+func (future *FunctionsTestFuture) Result(client FunctionsClient) (rts ResourceTestStatus, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2160,34 +2159,15 @@ func (future FunctionsTestFuture) Result(client FunctionsClient) (rts ResourceTe
return
}
if !done {
- return rts, azure.NewAsyncOpIncompleteError("streamanalytics.FunctionsTestFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rts, err = client.TestResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.FunctionsTestFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("streamanalytics.FunctionsTestFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rts.Response.Response, err = future.GetResult(sender); err == nil && rts.Response.Response.StatusCode != http.StatusNoContent {
+ rts, err = client.TestResponder(rts.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "streamanalytics.FunctionsTestFuture", "Result", rts.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.FunctionsTestFuture", "Result", resp, "Failure sending request")
- return
- }
- rts, err = client.TestResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.FunctionsTestFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2508,12 +2488,11 @@ func (IP *InputProperties) UnmarshalJSON(body []byte) error {
// InputsTestFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InputsTestFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future InputsTestFuture) Result(client InputsClient) (rts ResourceTestStatus, err error) {
+func (future *InputsTestFuture) Result(client InputsClient) (rts ResourceTestStatus, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2521,34 +2500,15 @@ func (future InputsTestFuture) Result(client InputsClient) (rts ResourceTestStat
return
}
if !done {
- return rts, azure.NewAsyncOpIncompleteError("streamanalytics.InputsTestFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rts, err = client.TestResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.InputsTestFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("streamanalytics.InputsTestFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rts.Response.Response, err = future.GetResult(sender); err == nil && rts.Response.Response.StatusCode != http.StatusNoContent {
+ rts, err = client.TestResponder(rts.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "streamanalytics.InputsTestFuture", "Result", rts.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.InputsTestFuture", "Result", resp, "Failure sending request")
- return
- }
- rts, err = client.TestResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.InputsTestFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3436,12 +3396,11 @@ func (op *OutputProperties) UnmarshalJSON(body []byte) error {
// OutputsTestFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type OutputsTestFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future OutputsTestFuture) Result(client OutputsClient) (rts ResourceTestStatus, err error) {
+func (future *OutputsTestFuture) Result(client OutputsClient) (rts ResourceTestStatus, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3449,34 +3408,15 @@ func (future OutputsTestFuture) Result(client OutputsClient) (rts ResourceTestSt
return
}
if !done {
- return rts, azure.NewAsyncOpIncompleteError("streamanalytics.OutputsTestFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rts, err = client.TestResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.OutputsTestFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("streamanalytics.OutputsTestFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rts.Response.Response, err = future.GetResult(sender); err == nil && rts.Response.Response.StatusCode != http.StatusNoContent {
+ rts, err = client.TestResponder(rts.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "streamanalytics.OutputsTestFuture", "Result", rts.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.OutputsTestFuture", "Result", resp, "Failure sending request")
- return
- }
- rts, err = client.TestResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.OutputsTestFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4603,12 +4543,11 @@ type StreamingJobProperties struct {
// operation.
type StreamingJobsCreateOrReplaceFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future StreamingJobsCreateOrReplaceFuture) Result(client StreamingJobsClient) (sj StreamingJob, err error) {
+func (future *StreamingJobsCreateOrReplaceFuture) Result(client StreamingJobsClient) (sj StreamingJob, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4616,34 +4555,15 @@ func (future StreamingJobsCreateOrReplaceFuture) Result(client StreamingJobsClie
return
}
if !done {
- return sj, azure.NewAsyncOpIncompleteError("streamanalytics.StreamingJobsCreateOrReplaceFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sj, err = client.CreateOrReplaceResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.StreamingJobsCreateOrReplaceFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("streamanalytics.StreamingJobsCreateOrReplaceFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sj.Response.Response, err = future.GetResult(sender); err == nil && sj.Response.Response.StatusCode != http.StatusNoContent {
+ sj, err = client.CreateOrReplaceResponder(sj.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "streamanalytics.StreamingJobsCreateOrReplaceFuture", "Result", sj.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.StreamingJobsCreateOrReplaceFuture", "Result", resp, "Failure sending request")
- return
- }
- sj, err = client.CreateOrReplaceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.StreamingJobsCreateOrReplaceFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4651,12 +4571,11 @@ func (future StreamingJobsCreateOrReplaceFuture) Result(client StreamingJobsClie
// StreamingJobsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type StreamingJobsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future StreamingJobsDeleteFuture) Result(client StreamingJobsClient) (ar autorest.Response, err error) {
+func (future *StreamingJobsDeleteFuture) Result(client StreamingJobsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4664,47 +4583,21 @@ func (future StreamingJobsDeleteFuture) Result(client StreamingJobsClient) (ar a
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("streamanalytics.StreamingJobsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.StreamingJobsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("streamanalytics.StreamingJobsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.StreamingJobsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.StreamingJobsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// StreamingJobsStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type StreamingJobsStartFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future StreamingJobsStartFuture) Result(client StreamingJobsClient) (ar autorest.Response, err error) {
+func (future *StreamingJobsStartFuture) Result(client StreamingJobsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4712,47 +4605,21 @@ func (future StreamingJobsStartFuture) Result(client StreamingJobsClient) (ar au
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("streamanalytics.StreamingJobsStartFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StartResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.StreamingJobsStartFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("streamanalytics.StreamingJobsStartFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.StreamingJobsStartFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StartResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.StreamingJobsStartFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// StreamingJobsStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type StreamingJobsStopFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future StreamingJobsStopFuture) Result(client StreamingJobsClient) (ar autorest.Response, err error) {
+func (future *StreamingJobsStopFuture) Result(client StreamingJobsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4760,35 +4627,10 @@ func (future StreamingJobsStopFuture) Result(client StreamingJobsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("streamanalytics.StreamingJobsStopFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.StopResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.StreamingJobsStopFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("streamanalytics.StreamingJobsStopFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.StreamingJobsStopFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.StopResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "streamanalytics.StreamingJobsStopFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/outputs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/outputs.go
index 211e6aa7f..a55776bb2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/outputs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/outputs.go
@@ -422,15 +422,17 @@ func (client OutputsClient) TestPreparer(ctx context.Context, resourceGroupName
// TestSender sends the Test request. The method will close the
// http.Response Body if it receives an error.
func (client OutputsClient) TestSender(req *http.Request) (future OutputsTestFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/streamingjobs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/streamingjobs.go
index 3c1d570ae..c0c7346ba 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/streamingjobs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics/streamingjobs.go
@@ -100,15 +100,17 @@ func (client StreamingJobsClient) CreateOrReplacePreparer(ctx context.Context, s
// CreateOrReplaceSender sends the CreateOrReplace request. The method will close the
// http.Response Body if it receives an error.
func (client StreamingJobsClient) CreateOrReplaceSender(req *http.Request) (future StreamingJobsCreateOrReplaceFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -170,15 +172,17 @@ func (client StreamingJobsClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client StreamingJobsClient) DeleteSender(req *http.Request) (future StreamingJobsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -519,15 +523,17 @@ func (client StreamingJobsClient) StartPreparer(ctx context.Context, resourceGro
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client StreamingJobsClient) StartSender(req *http.Request) (future StreamingJobsStartFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -589,15 +595,17 @@ func (client StreamingJobsClient) StopPreparer(ctx context.Context, resourceGrou
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client StreamingJobsClient) StopSender(req *http.Request) (future StreamingJobsStopFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/environments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/environments.go
index f0247659d..202aace55 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/environments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/environments.go
@@ -104,15 +104,17 @@ func (client EnvironmentsClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client EnvironmentsClient) CreateOrUpdateSender(req *http.Request) (future EnvironmentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusNotFound))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusNotFound))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -445,15 +447,17 @@ func (client EnvironmentsClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client EnvironmentsClient) UpdateSender(req *http.Request) (future EnvironmentsUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/models.go
index ce17cf847..34b6355c7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/models.go
@@ -704,12 +704,11 @@ type EnvironmentResourceProperties struct {
// operation.
type EnvironmentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EnvironmentsCreateOrUpdateFuture) Result(client EnvironmentsClient) (er EnvironmentResource, err error) {
+func (future *EnvironmentsCreateOrUpdateFuture) Result(client EnvironmentsClient) (er EnvironmentResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -717,34 +716,15 @@ func (future EnvironmentsCreateOrUpdateFuture) Result(client EnvironmentsClient)
return
}
if !done {
- return er, azure.NewAsyncOpIncompleteError("timeseriesinsights.EnvironmentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- er, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("timeseriesinsights.EnvironmentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if er.Response.Response, err = future.GetResult(sender); err == nil && er.Response.Response.StatusCode != http.StatusNoContent {
+ er, err = client.CreateOrUpdateResponder(er.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsCreateOrUpdateFuture", "Result", er.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- er, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -767,12 +747,11 @@ type EnvironmentStatus struct {
// EnvironmentsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type EnvironmentsUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future EnvironmentsUpdateFuture) Result(client EnvironmentsClient) (er EnvironmentResource, err error) {
+func (future *EnvironmentsUpdateFuture) Result(client EnvironmentsClient) (er EnvironmentResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -780,34 +759,15 @@ func (future EnvironmentsUpdateFuture) Result(client EnvironmentsClient) (er Env
return
}
if !done {
- return er, azure.NewAsyncOpIncompleteError("timeseriesinsights.EnvironmentsUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- er, err = client.UpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("timeseriesinsights.EnvironmentsUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if er.Response.Response, err = future.GetResult(sender); err == nil && er.Response.Response.StatusCode != http.StatusNoContent {
+ er, err = client.UpdateResponder(er.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsUpdateFuture", "Result", er.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- er, err = client.UpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/client.go
new file mode 100644
index 000000000..950ec82bb
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/client.go
@@ -0,0 +1,51 @@
+// Package trafficmanager implements the Azure ARM Trafficmanager service API version .
+//
+//
+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"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Trafficmanager
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Trafficmanager.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client.
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/endpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/endpoints.go
new file mode 100644
index 000000000..49d350f97
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/endpoints.go
@@ -0,0 +1,331 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// EndpointsClient is the client for the Endpoints methods of the Trafficmanager service.
+type EndpointsClient struct {
+ BaseClient
+}
+
+// NewEndpointsClient creates an instance of the EndpointsClient client.
+func NewEndpointsClient(subscriptionID string) EndpointsClient {
+ return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the Traffic Manager endpoint to be created or
+// updated.
+// profileName - the name of the Traffic Manager profile.
+// endpointType - the type of the Traffic Manager endpoint to be created or updated.
+// endpointName - the name of the Traffic Manager endpoint to be created or updated.
+// parameters - the Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation.
+func (client EndpointsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, profileName string, endpointType string, endpointName string, parameters Endpoint) (result Endpoint, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, profileName, endpointType, endpointName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client EndpointsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, profileName string, endpointType string, endpointName string, parameters Endpoint) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "endpointName": autorest.Encode("path", endpointName),
+ "endpointType": autorest.Encode("path", endpointType),
+ "profileName": autorest.Encode("path", profileName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client EndpointsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client EndpointsClient) CreateOrUpdateResponder(resp *http.Response) (result Endpoint, 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 Traffic Manager endpoint.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the Traffic Manager endpoint to be deleted.
+// profileName - the name of the Traffic Manager profile.
+// endpointType - the type of the Traffic Manager endpoint to be deleted.
+// endpointName - the name of the Traffic Manager endpoint to be deleted.
+func (client EndpointsClient) Delete(ctx context.Context, resourceGroupName string, profileName string, endpointType string, endpointName string) (result DeleteOperationResult, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, profileName, endpointType, endpointName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client EndpointsClient) DeletePreparer(ctx context.Context, resourceGroupName string, profileName string, endpointType string, endpointName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "endpointName": autorest.Encode("path", endpointName),
+ "endpointType": autorest.Encode("path", endpointType),
+ "profileName": autorest.Encode("path", profileName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client EndpointsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+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 = autorest.Response{Response: resp}
+ return
+}
+
+// Get gets a Traffic Manager endpoint.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the Traffic Manager endpoint.
+// profileName - the name of the Traffic Manager profile.
+// endpointType - the type of the Traffic Manager endpoint.
+// endpointName - the name of the Traffic Manager endpoint.
+func (client EndpointsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointType string, endpointName string) (result Endpoint, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, profileName, endpointType, endpointName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "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.EndpointsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client EndpointsClient) GetPreparer(ctx context.Context, resourceGroupName string, profileName string, endpointType string, endpointName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "endpointName": autorest.Encode("path", endpointName),
+ "endpointType": autorest.Encode("path", endpointType),
+ "profileName": autorest.Encode("path", profileName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client EndpointsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client EndpointsClient) GetResponder(resp *http.Response) (result Endpoint, 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 update a Traffic Manager endpoint.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the Traffic Manager endpoint to be updated.
+// profileName - the name of the Traffic Manager profile.
+// endpointType - the type of the Traffic Manager endpoint to be updated.
+// endpointName - the name of the Traffic Manager endpoint to be updated.
+// parameters - the Traffic Manager endpoint parameters supplied to the Update operation.
+func (client EndpointsClient) Update(ctx context.Context, resourceGroupName string, profileName string, endpointType string, endpointName string, parameters Endpoint) (result Endpoint, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, profileName, endpointType, endpointName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client EndpointsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, profileName string, endpointType string, endpointName string, parameters Endpoint) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "endpointName": autorest.Encode("path", endpointName),
+ "endpointType": autorest.Encode("path", endpointType),
+ "profileName": autorest.Encode("path", profileName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client EndpointsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client EndpointsClient) UpdateResponder(resp *http.Response) (result Endpoint, 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/services/trafficmanager/mgmt/2018-02-01/trafficmanager/geographichierarchies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/geographichierarchies.go
new file mode 100644
index 000000000..9adce0026
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/geographichierarchies.go
@@ -0,0 +1,98 @@
+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 (
+ "context"
+ "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 {
+ BaseClient
+}
+
+// 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(ctx context.Context) (result GeographicHierarchy, err error) {
+ req, err := client.GetDefaultPreparer(ctx)
+ 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(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2018-02-01"
+ 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{}).WithContext(ctx))
+}
+
+// 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,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// 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/services/trafficmanager/mgmt/2018-02-01/trafficmanager/heatmap.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/heatmap.go
new file mode 100644
index 000000000..eb26bd45e
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/heatmap.go
@@ -0,0 +1,131 @@
+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 (
+ "context"
+ "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 {
+ BaseClient
+}
+
+// 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.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the Traffic Manager endpoint.
+// profileName - the name of the Traffic Manager profile.
+// topLeft - the top left latitude,longitude pair of the rectangular viewport to query for.
+// botRight - the bottom right latitude,longitude pair of the rectangular viewport to query for.
+func (client HeatMapClient) Get(ctx context.Context, resourceGroupName string, profileName 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.NewError("trafficmanager.HeatMapClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, profileName, 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(ctx context.Context, resourceGroupName string, profileName string, topLeft []float64, botRight []float64) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "heatMapType": autorest.Encode("path", "default"),
+ "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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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/services/trafficmanager/mgmt/2018-02-01/trafficmanager/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/models.go
new file mode 100644
index 000000000..78d0f1986
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/models.go
@@ -0,0 +1,755 @@
+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 (
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/date"
+)
+
+// EndpointMonitorStatus enumerates the values for endpoint monitor status.
+type EndpointMonitorStatus string
+
+const (
+ // CheckingEndpoint ...
+ CheckingEndpoint EndpointMonitorStatus = "CheckingEndpoint"
+ // Degraded ...
+ Degraded EndpointMonitorStatus = "Degraded"
+ // Disabled ...
+ Disabled EndpointMonitorStatus = "Disabled"
+ // Inactive ...
+ Inactive EndpointMonitorStatus = "Inactive"
+ // Online ...
+ Online EndpointMonitorStatus = "Online"
+ // Stopped ...
+ Stopped EndpointMonitorStatus = "Stopped"
+)
+
+// PossibleEndpointMonitorStatusValues returns an array of possible values for the EndpointMonitorStatus const type.
+func PossibleEndpointMonitorStatusValues() []EndpointMonitorStatus {
+ return []EndpointMonitorStatus{CheckingEndpoint, Degraded, Disabled, Inactive, Online, Stopped}
+}
+
+// EndpointStatus enumerates the values for endpoint status.
+type EndpointStatus string
+
+const (
+ // EndpointStatusDisabled ...
+ EndpointStatusDisabled EndpointStatus = "Disabled"
+ // EndpointStatusEnabled ...
+ EndpointStatusEnabled EndpointStatus = "Enabled"
+)
+
+// PossibleEndpointStatusValues returns an array of possible values for the EndpointStatus const type.
+func PossibleEndpointStatusValues() []EndpointStatus {
+ return []EndpointStatus{EndpointStatusDisabled, EndpointStatusEnabled}
+}
+
+// MonitorProtocol enumerates the values for monitor protocol.
+type MonitorProtocol string
+
+const (
+ // HTTP ...
+ HTTP MonitorProtocol = "HTTP"
+ // HTTPS ...
+ HTTPS MonitorProtocol = "HTTPS"
+ // TCP ...
+ TCP MonitorProtocol = "TCP"
+)
+
+// PossibleMonitorProtocolValues returns an array of possible values for the MonitorProtocol const type.
+func PossibleMonitorProtocolValues() []MonitorProtocol {
+ return []MonitorProtocol{HTTP, HTTPS, TCP}
+}
+
+// ProfileMonitorStatus enumerates the values for profile monitor status.
+type ProfileMonitorStatus string
+
+const (
+ // ProfileMonitorStatusCheckingEndpoints ...
+ ProfileMonitorStatusCheckingEndpoints ProfileMonitorStatus = "CheckingEndpoints"
+ // ProfileMonitorStatusDegraded ...
+ ProfileMonitorStatusDegraded ProfileMonitorStatus = "Degraded"
+ // ProfileMonitorStatusDisabled ...
+ ProfileMonitorStatusDisabled ProfileMonitorStatus = "Disabled"
+ // ProfileMonitorStatusInactive ...
+ ProfileMonitorStatusInactive ProfileMonitorStatus = "Inactive"
+ // ProfileMonitorStatusOnline ...
+ ProfileMonitorStatusOnline ProfileMonitorStatus = "Online"
+)
+
+// PossibleProfileMonitorStatusValues returns an array of possible values for the ProfileMonitorStatus const type.
+func PossibleProfileMonitorStatusValues() []ProfileMonitorStatus {
+ return []ProfileMonitorStatus{ProfileMonitorStatusCheckingEndpoints, ProfileMonitorStatusDegraded, ProfileMonitorStatusDisabled, ProfileMonitorStatusInactive, ProfileMonitorStatusOnline}
+}
+
+// ProfileStatus enumerates the values for profile status.
+type ProfileStatus string
+
+const (
+ // ProfileStatusDisabled ...
+ ProfileStatusDisabled ProfileStatus = "Disabled"
+ // ProfileStatusEnabled ...
+ ProfileStatusEnabled ProfileStatus = "Enabled"
+)
+
+// PossibleProfileStatusValues returns an array of possible values for the ProfileStatus const type.
+func PossibleProfileStatusValues() []ProfileStatus {
+ return []ProfileStatus{ProfileStatusDisabled, ProfileStatusEnabled}
+}
+
+// TrafficRoutingMethod enumerates the values for traffic routing method.
+type TrafficRoutingMethod string
+
+const (
+ // Geographic ...
+ Geographic TrafficRoutingMethod = "Geographic"
+ // Performance ...
+ Performance TrafficRoutingMethod = "Performance"
+ // Priority ...
+ Priority TrafficRoutingMethod = "Priority"
+ // Weighted ...
+ Weighted TrafficRoutingMethod = "Weighted"
+)
+
+// PossibleTrafficRoutingMethodValues returns an array of possible values for the TrafficRoutingMethod const type.
+func PossibleTrafficRoutingMethodValues() []TrafficRoutingMethod {
+ return []TrafficRoutingMethod{Geographic, Performance, Priority, Weighted}
+}
+
+// TrafficViewEnrollmentStatus enumerates the values for traffic view enrollment status.
+type TrafficViewEnrollmentStatus string
+
+const (
+ // TrafficViewEnrollmentStatusDisabled ...
+ TrafficViewEnrollmentStatusDisabled TrafficViewEnrollmentStatus = "Disabled"
+ // TrafficViewEnrollmentStatusEnabled ...
+ TrafficViewEnrollmentStatusEnabled TrafficViewEnrollmentStatus = "Enabled"
+)
+
+// PossibleTrafficViewEnrollmentStatusValues returns an array of possible values for the TrafficViewEnrollmentStatus const type.
+func PossibleTrafficViewEnrollmentStatusValues() []TrafficViewEnrollmentStatus {
+ return []TrafficViewEnrollmentStatus{TrafficViewEnrollmentStatusDisabled, TrafficViewEnrollmentStatusEnabled}
+}
+
+// CheckTrafficManagerRelativeDNSNameAvailabilityParameters parameters supplied to check Traffic Manager name
+// operation.
+type CheckTrafficManagerRelativeDNSNameAvailabilityParameters struct {
+ // Name - The name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource.
+ Type *string `json:"type,omitempty"`
+}
+
+// CloudError an error returned by the Azure Resource Manager
+type CloudError struct {
+ // Error - The content of the error.
+ Error *CloudErrorBody `json:"error,omitempty"`
+}
+
+// CloudErrorBody the content of an error returned by the Azure Resource Manager
+type CloudErrorBody struct {
+ // Code - Error code
+ Code *string `json:"code,omitempty"`
+ // Message - Error message
+ Message *string `json:"message,omitempty"`
+ // Target - Error target
+ Target *string `json:"target,omitempty"`
+ // Details - Error details
+ Details *[]CloudErrorBody `json:"details,omitempty"`
+}
+
+// DeleteOperationResult the result of the request or operation.
+type DeleteOperationResult struct {
+ autorest.Response `json:"-"`
+ // OperationResult - The result of the operation or request.
+ OperationResult *bool `json:"boolean,omitempty"`
+}
+
+// DNSConfig class containing DNS settings in a Traffic Manager profile.
+type DNSConfig struct {
+ // RelativeName - The relative DNS name provided by this Traffic Manager profile. This value is combined with the DNS domain name used by Azure Traffic Manager to form the fully-qualified domain name (FQDN) of the profile.
+ RelativeName *string `json:"relativeName,omitempty"`
+ // Fqdn - The fully-qualified domain name (FQDN) of the Traffic Manager profile. This is formed from the concatenation of the RelativeName with the DNS domain used by Azure Traffic Manager.
+ Fqdn *string `json:"fqdn,omitempty"`
+ // TTL - The DNS Time-To-Live (TTL), in seconds. This informs the local DNS resolvers and DNS clients how long to cache DNS responses provided by this Traffic Manager profile.
+ TTL *int64 `json:"ttl,omitempty"`
+}
+
+// Endpoint class representing a Traffic Manager endpoint.
+type Endpoint struct {
+ autorest.Response `json:"-"`
+ // EndpointProperties - The properties of the Traffic Manager endpoint.
+ *EndpointProperties `json:"properties,omitempty"`
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Endpoint.
+func (e Endpoint) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if e.EndpointProperties != nil {
+ objectMap["properties"] = e.EndpointProperties
+ }
+ if e.ID != nil {
+ objectMap["id"] = e.ID
+ }
+ if e.Name != nil {
+ objectMap["name"] = e.Name
+ }
+ if e.Type != nil {
+ objectMap["type"] = e.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Endpoint struct.
+func (e *Endpoint) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var endpointProperties EndpointProperties
+ err = json.Unmarshal(*v, &endpointProperties)
+ if err != nil {
+ return err
+ }
+ e.EndpointProperties = &endpointProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ e.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ e.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ e.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// EndpointProperties class representing a Traffic Manager endpoint properties.
+type EndpointProperties struct {
+ // TargetResourceID - The Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+ // Target - The fully-qualified DNS name of the endpoint. Traffic Manager returns this value in DNS responses to direct traffic to this endpoint.
+ Target *string `json:"target,omitempty"`
+ // EndpointStatus - The status of the endpoint. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method. Possible values include: 'EndpointStatusEnabled', 'EndpointStatusDisabled'
+ EndpointStatus EndpointStatus `json:"endpointStatus,omitempty"`
+ // Weight - The weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000.
+ Weight *int64 `json:"weight,omitempty"`
+ // Priority - The priority of this endpoint when using the ‘Priority’ traffic routing method. Possible values are from 1 to 1000, lower values represent higher priority. This is an optional parameter. If specified, it must be specified on all endpoints, and no two endpoints can share the same priority value.
+ Priority *int64 `json:"priority,omitempty"`
+ // EndpointLocation - Specifies the location of the external or nested endpoints when using the ‘Performance’ traffic routing method.
+ EndpointLocation *string `json:"endpointLocation,omitempty"`
+ // EndpointMonitorStatus - The monitoring status of the endpoint. Possible values include: 'CheckingEndpoint', 'Online', 'Degraded', 'Disabled', 'Inactive', 'Stopped'
+ EndpointMonitorStatus EndpointMonitorStatus `json:"endpointMonitorStatus,omitempty"`
+ // MinChildEndpoints - The minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'.
+ MinChildEndpoints *int64 `json:"minChildEndpoints,omitempty"`
+ // GeoMapping - The list of countries/regions mapped to this endpoint when using the ‘Geographic’ traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted values.
+ GeoMapping *[]string `json:"geoMapping,omitempty"`
+}
+
+// GeographicHierarchy class representing the Geographic hierarchy used with the Geographic traffic routing method.
+type GeographicHierarchy struct {
+ autorest.Response `json:"-"`
+ // GeographicHierarchyProperties - The properties of the Geographic Hierarchy resource.
+ *GeographicHierarchyProperties `json:"properties,omitempty"`
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GeographicHierarchy.
+func (gh GeographicHierarchy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gh.GeographicHierarchyProperties != nil {
+ objectMap["properties"] = gh.GeographicHierarchyProperties
+ }
+ if gh.ID != nil {
+ objectMap["id"] = gh.ID
+ }
+ if gh.Name != nil {
+ objectMap["name"] = gh.Name
+ }
+ if gh.Type != nil {
+ objectMap["type"] = gh.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GeographicHierarchy struct.
+func (gh *GeographicHierarchy) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var geographicHierarchyProperties GeographicHierarchyProperties
+ err = json.Unmarshal(*v, &geographicHierarchyProperties)
+ if err != nil {
+ return err
+ }
+ gh.GeographicHierarchyProperties = &geographicHierarchyProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gh.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gh.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gh.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// GeographicHierarchyProperties class representing the properties of the Geographic hierarchy used with the
+// Geographic traffic routing method.
+type GeographicHierarchyProperties struct {
+ // GeographicHierarchy - The region at the root of the hierarchy from all the regions in the hierarchy can be retrieved.
+ GeographicHierarchy *Region `json:"geographicHierarchy,omitempty"`
+}
+
+// HeatMapEndpoint class which is a sparse representation of a Traffic Manager endpoint.
+type HeatMapEndpoint struct {
+ // ResourceID - The ARM Resource ID of this Traffic Manager endpoint.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // EndpointID - A number uniquely identifying this endpoint in query experiences.
+ EndpointID *int32 `json:"endpointId,omitempty"`
+}
+
+// HeatMapModel class representing a Traffic Manager HeatMap.
+type HeatMapModel struct {
+ autorest.Response `json:"-"`
+ // HeatMapProperties - The properties of the Traffic Manager HeatMap.
+ *HeatMapProperties `json:"properties,omitempty"`
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for HeatMapModel.
+func (hmm HeatMapModel) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if hmm.HeatMapProperties != nil {
+ objectMap["properties"] = hmm.HeatMapProperties
+ }
+ if hmm.ID != nil {
+ objectMap["id"] = hmm.ID
+ }
+ if hmm.Name != nil {
+ objectMap["name"] = hmm.Name
+ }
+ if hmm.Type != nil {
+ objectMap["type"] = hmm.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for HeatMapModel struct.
+func (hmm *HeatMapModel) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var heatMapProperties HeatMapProperties
+ err = json.Unmarshal(*v, &heatMapProperties)
+ if err != nil {
+ return err
+ }
+ hmm.HeatMapProperties = &heatMapProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ hmm.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ hmm.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ hmm.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// HeatMapProperties class representing a Traffic Manager HeatMap properties.
+type HeatMapProperties struct {
+ // StartTime - The beginning of the time window for this HeatMap, inclusive.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - The ending of the time window for this HeatMap, exclusive.
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // Endpoints - The endpoints used in this HeatMap calculation.
+ Endpoints *[]HeatMapEndpoint `json:"endpoints,omitempty"`
+ // TrafficFlows - The traffic flows produced in this HeatMap calculation.
+ TrafficFlows *[]TrafficFlow `json:"trafficFlows,omitempty"`
+}
+
+// MonitorConfig class containing endpoint monitoring settings in a Traffic Manager profile.
+type MonitorConfig struct {
+ // ProfileMonitorStatus - The profile-level monitoring status of the Traffic Manager profile. Possible values include: 'ProfileMonitorStatusCheckingEndpoints', 'ProfileMonitorStatusOnline', 'ProfileMonitorStatusDegraded', 'ProfileMonitorStatusDisabled', 'ProfileMonitorStatusInactive'
+ ProfileMonitorStatus ProfileMonitorStatus `json:"profileMonitorStatus,omitempty"`
+ // Protocol - The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health. Possible values include: 'HTTP', 'HTTPS', 'TCP'
+ Protocol MonitorProtocol `json:"protocol,omitempty"`
+ // Port - The TCP port used to probe for endpoint health.
+ Port *int64 `json:"port,omitempty"`
+ // Path - The path relative to the endpoint domain name used to probe for endpoint health.
+ Path *string `json:"path,omitempty"`
+ // IntervalInSeconds - The monitor interval for endpoints in this profile. This is the interval at which Traffic Manager will check the health of each endpoint in this profile.
+ IntervalInSeconds *int64 `json:"intervalInSeconds,omitempty"`
+ // TimeoutInSeconds - The monitor timeout for endpoints in this profile. This is the time that Traffic Manager allows endpoints in this profile to response to the health check.
+ TimeoutInSeconds *int64 `json:"timeoutInSeconds,omitempty"`
+ // ToleratedNumberOfFailures - The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check.
+ ToleratedNumberOfFailures *int64 `json:"toleratedNumberOfFailures,omitempty"`
+}
+
+// NameAvailability class representing a Traffic Manager Name Availability response.
+type NameAvailability struct {
+ autorest.Response `json:"-"`
+ // Name - The relative name.
+ Name *string `json:"name,omitempty"`
+ // Type - Traffic Manager profile resource type.
+ Type *string `json:"type,omitempty"`
+ // NameAvailable - Describes whether the relative name is available or not.
+ NameAvailable *bool `json:"nameAvailable,omitempty"`
+ // Reason - The reason why the name is not available, when applicable.
+ Reason *string `json:"reason,omitempty"`
+ // Message - Descriptive message that explains why the name is not available, when applicable.
+ Message *string `json:"message,omitempty"`
+}
+
+// Profile class representing a Traffic Manager profile.
+type Profile struct {
+ autorest.Response `json:"-"`
+ // ProfileProperties - The properties of the Traffic Manager profile.
+ *ProfileProperties `json:"properties,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+ // Location - The Azure Region where the resource lives
+ Location *string `json:"location,omitempty"`
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Profile.
+func (p Profile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if p.ProfileProperties != nil {
+ objectMap["properties"] = p.ProfileProperties
+ }
+ if p.Tags != nil {
+ objectMap["tags"] = p.Tags
+ }
+ if p.Location != nil {
+ objectMap["location"] = p.Location
+ }
+ if p.ID != nil {
+ objectMap["id"] = p.ID
+ }
+ if p.Name != nil {
+ objectMap["name"] = p.Name
+ }
+ if p.Type != nil {
+ objectMap["type"] = p.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Profile struct.
+func (p *Profile) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var profileProperties ProfileProperties
+ err = json.Unmarshal(*v, &profileProperties)
+ if err != nil {
+ return err
+ }
+ p.ProfileProperties = &profileProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ p.Tags = tags
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ p.Location = &location
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ p.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ p.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ p.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// ProfileListResult the list Traffic Manager profiles operation response.
+type ProfileListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets the list of Traffic manager profiles.
+ Value *[]Profile `json:"value,omitempty"`
+}
+
+// ProfileProperties class representing the Traffic Manager profile properties.
+type ProfileProperties struct {
+ // ProfileStatus - The status of the Traffic Manager profile. Possible values include: 'ProfileStatusEnabled', 'ProfileStatusDisabled'
+ ProfileStatus ProfileStatus `json:"profileStatus,omitempty"`
+ // TrafficRoutingMethod - The traffic routing method of the Traffic Manager profile. Possible values include: 'Performance', 'Priority', 'Weighted', 'Geographic'
+ TrafficRoutingMethod TrafficRoutingMethod `json:"trafficRoutingMethod,omitempty"`
+ // DNSConfig - The DNS settings of the Traffic Manager profile.
+ DNSConfig *DNSConfig `json:"dnsConfig,omitempty"`
+ // MonitorConfig - The endpoint monitoring settings of the Traffic Manager profile.
+ MonitorConfig *MonitorConfig `json:"monitorConfig,omitempty"`
+ // Endpoints - The list of endpoints in the Traffic Manager profile.
+ Endpoints *[]Endpoint `json:"endpoints,omitempty"`
+ // TrafficViewEnrollmentStatus - Indicates whether Traffic View is 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates 'Disabled'. Enabling this feature will increase the cost of the Traffic Manage profile. Possible values include: 'TrafficViewEnrollmentStatusEnabled', 'TrafficViewEnrollmentStatusDisabled'
+ TrafficViewEnrollmentStatus TrafficViewEnrollmentStatus `json:"trafficViewEnrollmentStatus,omitempty"`
+}
+
+// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than
+// required location and tags
+type ProxyResource struct {
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles.
+ Type *string `json:"type,omitempty"`
+}
+
+// QueryExperience class representing a Traffic Manager HeatMap query experience properties.
+type QueryExperience struct {
+ // EndpointID - The id of the endpoint from the 'endpoints' array which these queries were routed to.
+ EndpointID *int32 `json:"endpointId,omitempty"`
+ // QueryCount - The number of queries originating from this location.
+ QueryCount *int32 `json:"queryCount,omitempty"`
+ // Latency - The latency experienced by queries originating from this location.
+ Latency *float64 `json:"latency,omitempty"`
+}
+
+// Region class representing a region in the Geographic hierarchy used with the Geographic traffic routing method.
+type Region struct {
+ // Code - The code of the region
+ Code *string `json:"code,omitempty"`
+ // Name - The name of the region
+ Name *string `json:"name,omitempty"`
+ // Regions - The list of Regions grouped under this Region in the Geographic Hierarchy.
+ Regions *[]Region `json:"regions,omitempty"`
+}
+
+// Resource the core properties of ARM resources
+type Resource struct {
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles.
+ Type *string `json:"type,omitempty"`
+}
+
+// TrackedResource the resource model definition for a ARM tracked top level resource
+type TrackedResource struct {
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+ // Location - The Azure Region where the resource lives
+ Location *string `json:"location,omitempty"`
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for TrackedResource.
+func (tr TrackedResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if tr.Tags != nil {
+ objectMap["tags"] = tr.Tags
+ }
+ if tr.Location != nil {
+ objectMap["location"] = tr.Location
+ }
+ if tr.ID != nil {
+ objectMap["id"] = tr.ID
+ }
+ if tr.Name != nil {
+ objectMap["name"] = tr.Name
+ }
+ if tr.Type != nil {
+ objectMap["type"] = tr.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// TrafficFlow class representing a Traffic Manager HeatMap traffic flow properties.
+type TrafficFlow struct {
+ // SourceIP - The IP address that this query experience originated from.
+ SourceIP *string `json:"sourceIp,omitempty"`
+ // Latitude - The approximate latitude that these queries originated from.
+ Latitude *float64 `json:"latitude,omitempty"`
+ // Longitude - The approximate longitude that these queries originated from.
+ Longitude *float64 `json:"longitude,omitempty"`
+ // QueryExperiences - The query experiences produced in this HeatMap calculation.
+ QueryExperiences *[]QueryExperience `json:"queryExperiences,omitempty"`
+}
+
+// UserMetricsKeyModel class representing a Traffic Manager Real User Metrics key response.
+type UserMetricsKeyModel struct {
+ autorest.Response `json:"-"`
+ // Key - The key returned by the Real User Metrics operation.
+ Key *string `json:"key,omitempty"`
+ // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles.
+ Type *string `json:"type,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/profiles.go
new file mode 100644
index 000000000..f7e5918f0
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/profiles.go
@@ -0,0 +1,504 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// ProfilesClient is the client for the Profiles methods of the Trafficmanager service.
+type ProfilesClient struct {
+ BaseClient
+}
+
+// NewProfilesClient creates an instance of the ProfilesClient client.
+func NewProfilesClient(subscriptionID string) ProfilesClient {
+ return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// 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.
+// Parameters:
+// parameters - the Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability
+// operation.
+func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailability(ctx context.Context, parameters CheckTrafficManagerRelativeDNSNameAvailabilityParameters) (result NameAvailability, err error) {
+ req, err := client.CheckTrafficManagerRelativeDNSNameAvailabilityPreparer(ctx, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "CheckTrafficManagerRelativeDNSNameAvailability", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckTrafficManagerRelativeDNSNameAvailabilitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "CheckTrafficManagerRelativeDNSNameAvailability", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckTrafficManagerRelativeDNSNameAvailabilityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "CheckTrafficManagerRelativeDNSNameAvailability", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckTrafficManagerRelativeDNSNameAvailabilityPreparer prepares the CheckTrafficManagerRelativeDNSNameAvailability request.
+func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailabilityPreparer(ctx context.Context, parameters CheckTrafficManagerRelativeDNSNameAvailabilityParameters) (*http.Request, error) {
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Network/checkTrafficManagerNameAvailability"),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CheckTrafficManagerRelativeDNSNameAvailabilitySender sends the CheckTrafficManagerRelativeDNSNameAvailability request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailabilitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CheckTrafficManagerRelativeDNSNameAvailabilityResponder handles the response to the CheckTrafficManagerRelativeDNSNameAvailability request. The method always
+// closes the http.Response Body.
+func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailabilityResponder(resp *http.Response) (result NameAvailability, 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 create or update a Traffic Manager profile.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the Traffic Manager profile.
+// profileName - the name of the Traffic Manager profile.
+// parameters - the Traffic Manager profile parameters supplied to the CreateOrUpdate operation.
+func (client ProfilesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, profileName string, parameters Profile) (result Profile, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, profileName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ProfilesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, profileName string, parameters Profile) (*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 = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProfilesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ProfilesClient) CreateOrUpdateResponder(resp *http.Response) (result Profile, 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 Traffic Manager profile.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the Traffic Manager profile to be deleted.
+// profileName - the name of the Traffic Manager profile to be deleted.
+func (client ProfilesClient) Delete(ctx context.Context, resourceGroupName string, profileName string) (result DeleteOperationResult, err error) {
+ req, err := client.DeletePreparer(ctx, resourceGroupName, profileName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ProfilesClient) DeletePreparer(ctx context.Context, 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 = "2018-02-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/trafficmanagerprofiles/{profileName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProfilesClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+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 = autorest.Response{Response: resp}
+ return
+}
+
+// Get gets a Traffic Manager profile.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the Traffic Manager profile.
+// profileName - the name of the Traffic Manager profile.
+func (client ProfilesClient) Get(ctx context.Context, resourceGroupName string, profileName string) (result Profile, err error) {
+ req, err := client.GetPreparer(ctx, resourceGroupName, profileName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "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.ProfilesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ProfilesClient) GetPreparer(ctx context.Context, 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 = "2018-02-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/trafficmanagerprofiles/{profileName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProfilesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ProfilesClient) GetResponder(resp *http.Response) (result Profile, 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 lists all Traffic Manager profiles within a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the Traffic Manager profiles to be listed.
+func (client ProfilesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ProfileListResult, err error) {
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ProfilesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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/trafficmanagerprofiles", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProfilesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+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(ctx context.Context) (result ProfileListResult, err error) {
+ req, err := client.ListBySubscriptionPreparer(ctx)
+ 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(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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{}).WithContext(ctx))
+}
+
+// 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,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// 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(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Update update a Traffic Manager profile.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the Traffic Manager profile.
+// profileName - the name of the Traffic Manager profile.
+// parameters - the Traffic Manager profile parameters supplied to the Update operation.
+func (client ProfilesClient) Update(ctx context.Context, resourceGroupName string, profileName string, parameters Profile) (result Profile, err error) {
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, profileName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client ProfilesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, profileName string, parameters Profile) (*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 = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProfilesClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client ProfilesClient) UpdateResponder(resp *http.Response) (result Profile, 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/services/trafficmanager/mgmt/2018-02-01/trafficmanager/usermetricskeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/usermetricskeys.go
new file mode 100644
index 000000000..854b7adb4
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/usermetricskeys.go
@@ -0,0 +1,226 @@
+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 (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "net/http"
+)
+
+// UserMetricsKeysClient is the client for the UserMetricsKeys methods of the Trafficmanager service.
+type UserMetricsKeysClient struct {
+ BaseClient
+}
+
+// NewUserMetricsKeysClient creates an instance of the UserMetricsKeysClient client.
+func NewUserMetricsKeysClient(subscriptionID string) UserMetricsKeysClient {
+ return NewUserMetricsKeysClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewUserMetricsKeysClientWithBaseURI creates an instance of the UserMetricsKeysClient client.
+func NewUserMetricsKeysClientWithBaseURI(baseURI string, subscriptionID string) UserMetricsKeysClient {
+ return UserMetricsKeysClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a subscription-level key used for Real User Metrics collection.
+func (client UserMetricsKeysClient) CreateOrUpdate(ctx context.Context) (result UserMetricsKeyModel, err error) {
+ req, err := client.CreateOrUpdatePreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client UserMetricsKeysClient) CreateOrUpdatePreparer(ctx context.Context) (*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.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client UserMetricsKeysClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client UserMetricsKeysClient) CreateOrUpdateResponder(resp *http.Response) (result UserMetricsKeyModel, 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 a subscription-level key used for Real User Metrics collection.
+func (client UserMetricsKeysClient) Delete(ctx context.Context) (result DeleteOperationResult, err error) {
+ req, err := client.DeletePreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client UserMetricsKeysClient) DeletePreparer(ctx context.Context) (*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.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client UserMetricsKeysClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client UserMetricsKeysClient) DeleteResponder(resp *http.Response) (result DeleteOperationResult, 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 the subscription-level key used for Real User Metrics collection.
+func (client UserMetricsKeysClient) Get(ctx context.Context) (result UserMetricsKeyModel, err error) {
+ req, err := client.GetPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "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.UserMetricsKeysClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client UserMetricsKeysClient) GetPreparer(ctx context.Context) (*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/trafficManagerUserMetricsKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client UserMetricsKeysClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client UserMetricsKeysClient) GetResponder(resp *http.Response) (result UserMetricsKeyModel, 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/services/trafficmanager/mgmt/2018-02-01/trafficmanager/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/version.go
new file mode 100644
index 000000000..a83c48c45
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-02-01/trafficmanager/version.go
@@ -0,0 +1,30 @@
+package trafficmanager
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// 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/" + version.Number + " trafficmanager/2018-02-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-03-01/trafficmanager/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-03-01/trafficmanager/models.go
index f2725efb2..b8d1aa62a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-03-01/trafficmanager/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-03-01/trafficmanager/models.go
@@ -133,6 +133,21 @@ func PossibleTrafficRoutingMethodValues() []TrafficRoutingMethod {
return []TrafficRoutingMethod{Geographic, Performance, Priority, Weighted}
}
+// TrafficViewEnrollmentStatus enumerates the values for traffic view enrollment status.
+type TrafficViewEnrollmentStatus string
+
+const (
+ // TrafficViewEnrollmentStatusDisabled ...
+ TrafficViewEnrollmentStatusDisabled TrafficViewEnrollmentStatus = "Disabled"
+ // TrafficViewEnrollmentStatusEnabled ...
+ TrafficViewEnrollmentStatusEnabled TrafficViewEnrollmentStatus = "Enabled"
+)
+
+// PossibleTrafficViewEnrollmentStatusValues returns an array of possible values for the TrafficViewEnrollmentStatus const type.
+func PossibleTrafficViewEnrollmentStatusValues() []TrafficViewEnrollmentStatus {
+ return []TrafficViewEnrollmentStatus{TrafficViewEnrollmentStatusDisabled, TrafficViewEnrollmentStatusEnabled}
+}
+
// CheckTrafficManagerRelativeDNSNameAvailabilityParameters parameters supplied to check Traffic Manager name
// operation.
type CheckTrafficManagerRelativeDNSNameAvailabilityParameters struct {
@@ -664,6 +679,8 @@ type ProfileProperties struct {
MonitorConfig *MonitorConfig `json:"monitorConfig,omitempty"`
// Endpoints - The list of endpoints in the Traffic Manager profile.
Endpoints *[]Endpoint `json:"endpoints,omitempty"`
+ // TrafficViewEnrollmentStatus - Indicates whether Traffic View is 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates 'Disabled'. Enabling this feature will increase the cost of the Traffic Manage profile. Possible values include: 'TrafficViewEnrollmentStatusEnabled', 'TrafficViewEnrollmentStatusDisabled'
+ TrafficViewEnrollmentStatus TrafficViewEnrollmentStatus `json:"trafficViewEnrollmentStatus,omitempty"`
}
// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/apps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/apps.go
index f79664516..414b7700f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/apps.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/apps.go
@@ -924,15 +924,17 @@ func (client AppsClient) CreateFunctionPreparer(ctx context.Context, resourceGro
// 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) (future AppsCreateFunctionFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1009,15 +1011,17 @@ func (client AppsClient) CreateInstanceFunctionSlotPreparer(ctx context.Context,
// 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) (future AppsCreateInstanceFunctionSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1091,15 +1095,17 @@ func (client AppsClient) CreateInstanceMSDeployOperationPreparer(ctx context.Con
// CreateInstanceMSDeployOperationSender sends the CreateInstanceMSDeployOperation request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) CreateInstanceMSDeployOperationSender(req *http.Request) (future AppsCreateInstanceMSDeployOperationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1175,15 +1181,17 @@ func (client AppsClient) CreateInstanceMSDeployOperationSlotPreparer(ctx context
// CreateInstanceMSDeployOperationSlotSender sends the CreateInstanceMSDeployOperationSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) CreateInstanceMSDeployOperationSlotSender(req *http.Request) (future AppsCreateInstanceMSDeployOperationSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1255,15 +1263,17 @@ func (client AppsClient) CreateMSDeployOperationPreparer(ctx context.Context, re
// 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) (future AppsCreateMSDeployOperationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1337,15 +1347,17 @@ func (client AppsClient) CreateMSDeployOperationSlotPreparer(ctx context.Context
// 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) (future AppsCreateMSDeployOperationSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1433,15 +1445,17 @@ func (client AppsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGro
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) CreateOrUpdateSender(req *http.Request) (future AppsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -2547,15 +2561,17 @@ func (client AppsClient) CreateOrUpdateSlotPreparer(ctx context.Context, resourc
// CreateOrUpdateSlotSender sends the CreateOrUpdateSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) CreateOrUpdateSlotSender(req *http.Request) (future AppsCreateOrUpdateSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -2627,15 +2643,17 @@ func (client AppsClient) CreateOrUpdateSourceControlPreparer(ctx context.Context
// CreateOrUpdateSourceControlSender sends the CreateOrUpdateSourceControl request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) CreateOrUpdateSourceControlSender(req *http.Request) (future AppsCreateOrUpdateSourceControlFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -2710,15 +2728,17 @@ func (client AppsClient) CreateOrUpdateSourceControlSlotPreparer(ctx context.Con
// CreateOrUpdateSourceControlSlotSender sends the CreateOrUpdateSourceControlSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) CreateOrUpdateSourceControlSlotSender(req *http.Request) (future AppsCreateOrUpdateSourceControlSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -12530,15 +12550,17 @@ func (client AppsClient) InstallSiteExtensionPreparer(ctx context.Context, resou
// 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) (future AppsInstallSiteExtensionFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -12612,15 +12634,17 @@ func (client AppsClient) InstallSiteExtensionSlotPreparer(ctx context.Context, r
// 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) (future AppsInstallSiteExtensionSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -18665,15 +18689,17 @@ func (client AppsClient) ListPublishingCredentialsPreparer(ctx context.Context,
// ListPublishingCredentialsSender sends the ListPublishingCredentials request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) ListPublishingCredentialsSender(req *http.Request) (future AppsListPublishingCredentialsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -18745,15 +18771,17 @@ func (client AppsClient) ListPublishingCredentialsSlotPreparer(ctx context.Conte
// ListPublishingCredentialsSlotSender sends the ListPublishingCredentialsSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) ListPublishingCredentialsSlotSender(req *http.Request) (future AppsListPublishingCredentialsSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -21266,15 +21294,17 @@ func (client AppsClient) MigrateMySQLPreparer(ctx context.Context, resourceGroup
// MigrateMySQLSender sends the MigrateMySQL request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) MigrateMySQLSender(req *http.Request) (future AppsMigrateMySQLFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -21353,15 +21383,17 @@ func (client AppsClient) MigrateStoragePreparer(ctx context.Context, subscriptio
// MigrateStorageSender sends the MigrateStorage request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) MigrateStorageSender(req *http.Request) (future AppsMigrateStorageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -21437,15 +21469,17 @@ func (client AppsClient) RecoverPreparer(ctx context.Context, resourceGroupName
// RecoverSender sends the Recover request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) RecoverSender(req *http.Request) (future AppsRecoverFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -21677,15 +21711,17 @@ func (client AppsClient) RecoverSlotPreparer(ctx context.Context, resourceGroupN
// RecoverSlotSender sends the RecoverSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) RecoverSlotSender(req *http.Request) (future AppsRecoverSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -22086,15 +22122,17 @@ func (client AppsClient) RestorePreparer(ctx context.Context, resourceGroupName
// RestoreSender sends the Restore request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) RestoreSender(req *http.Request) (future AppsRestoreFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -22176,15 +22214,17 @@ func (client AppsClient) RestoreSlotPreparer(ctx context.Context, resourceGroupN
// RestoreSlotSender sends the RestoreSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) RestoreSlotSender(req *http.Request) (future AppsRestoreSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -23354,15 +23394,17 @@ func (client AppsClient) SwapSlotSlotPreparer(ctx context.Context, resourceGroup
// SwapSlotSlotSender sends the SwapSlotSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) SwapSlotSlotSender(req *http.Request) (future AppsSwapSlotSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -23436,15 +23478,17 @@ func (client AppsClient) SwapSlotWithProductionPreparer(ctx context.Context, res
// SwapSlotWithProductionSender sends the SwapSlotWithProduction request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) SwapSlotWithProductionSender(req *http.Request) (future AppsSwapSlotWithProductionFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go
index f78fcb530..ba9c790ce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go
@@ -102,15 +102,17 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceCertificateOrdersClient) CreateOrUpdateSender(req *http.Request) (future AppServiceCertificateOrdersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -184,15 +186,17 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdateCertificatePrepare
// CreateOrUpdateCertificateSender sends the CreateOrUpdateCertificate request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceCertificateOrdersClient) CreateOrUpdateCertificateSender(req *http.Request) (future AppServiceCertificateOrdersCreateOrUpdateCertificateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appserviceenvironments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appserviceenvironments.go
index 94aaabeff..71e8670b6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appserviceenvironments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appserviceenvironments.go
@@ -102,15 +102,17 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceEnvironmentsClient) CreateOrUpdateSender(req *http.Request) (future AppServiceEnvironmentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -182,15 +184,17 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdateMultiRolePoolPreparer(c
// CreateOrUpdateMultiRolePoolSender sends the CreateOrUpdateMultiRolePool request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceEnvironmentsClient) CreateOrUpdateMultiRolePoolSender(req *http.Request) (future AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -264,15 +268,17 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdateWorkerPoolPreparer(ctx
// CreateOrUpdateWorkerPoolSender sends the CreateOrUpdateWorkerPool request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceEnvironmentsClient) CreateOrUpdateWorkerPoolSender(req *http.Request) (future AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -346,15 +352,17 @@ func (client AppServiceEnvironmentsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceEnvironmentsClient) DeleteSender(req *http.Request) (future AppServiceEnvironmentsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -3337,15 +3345,17 @@ func (client AppServiceEnvironmentsClient) ResumePreparer(ctx context.Context, r
// ResumeSender sends the Resume request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceEnvironmentsClient) ResumeSender(req *http.Request) (future AppServiceEnvironmentsResumeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -3391,7 +3401,6 @@ func (client AppServiceEnvironmentsClient) ResumeComplete(ctx context.Context, r
var future AppServiceEnvironmentsResumeFuture
future, err = client.Resume(ctx, resourceGroupName, name)
result.Future = future.Future
- result.req = future.req
return
}
@@ -3447,15 +3456,17 @@ func (client AppServiceEnvironmentsClient) SuspendPreparer(ctx context.Context,
// SuspendSender sends the Suspend request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceEnvironmentsClient) SuspendSender(req *http.Request) (future AppServiceEnvironmentsSuspendFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -3501,7 +3512,6 @@ func (client AppServiceEnvironmentsClient) SuspendComplete(ctx context.Context,
var future AppServiceEnvironmentsSuspendFuture
future, err = client.Suspend(ctx, resourceGroupName, name)
result.Future = future.Future
- result.req = future.req
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appserviceplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appserviceplans.go
index 626581873..9e55f7e36 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appserviceplans.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appserviceplans.go
@@ -98,15 +98,17 @@ func (client AppServicePlansClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client AppServicePlansClient) CreateOrUpdateSender(req *http.Request) (future AppServicePlansCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/domains.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/domains.go
index 6ddd2a46f..f3e13e731 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/domains.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/domains.go
@@ -219,15 +219,17 @@ func (client DomainsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DomainsClient) CreateOrUpdateSender(req *http.Request) (future DomainsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/models.go
index 5572b29f4..64adf3543 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/models.go
@@ -1712,12 +1712,11 @@ func (page ApplicationStackCollectionPage) Values() []ApplicationStack {
// AppsCreateFunctionFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsCreateFunctionFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateFunctionFuture) Result(client AppsClient) (fe FunctionEnvelope, err error) {
+func (future *AppsCreateFunctionFuture) Result(client AppsClient) (fe FunctionEnvelope, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1725,34 +1724,15 @@ func (future AppsCreateFunctionFuture) Result(client AppsClient) (fe FunctionEnv
return
}
if !done {
- return fe, azure.NewAsyncOpIncompleteError("web.AppsCreateFunctionFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fe, err = client.CreateFunctionResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateFunctionFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fe.Response.Response, err = future.GetResult(sender); err == nil && fe.Response.Response.StatusCode != http.StatusNoContent {
+ fe, err = client.CreateFunctionResponder(fe.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", fe.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", resp, "Failure sending request")
- return
- }
- fe, err = client.CreateFunctionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1761,12 +1741,11 @@ func (future AppsCreateFunctionFuture) Result(client AppsClient) (fe FunctionEnv
// operation.
type AppsCreateInstanceFunctionSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateInstanceFunctionSlotFuture) Result(client AppsClient) (fe FunctionEnvelope, err error) {
+func (future *AppsCreateInstanceFunctionSlotFuture) Result(client AppsClient) (fe FunctionEnvelope, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1774,34 +1753,15 @@ func (future AppsCreateInstanceFunctionSlotFuture) Result(client AppsClient) (fe
return
}
if !done {
- return fe, azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceFunctionSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fe, err = client.CreateInstanceFunctionSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceFunctionSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fe.Response.Response, err = future.GetResult(sender); err == nil && fe.Response.Response.StatusCode != http.StatusNoContent {
+ fe, err = client.CreateInstanceFunctionSlotResponder(fe.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", fe.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- fe, err = client.CreateInstanceFunctionSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1810,12 +1770,11 @@ func (future AppsCreateInstanceFunctionSlotFuture) Result(client AppsClient) (fe
// long-running operation.
type AppsCreateInstanceMSDeployOperationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateInstanceMSDeployOperationFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
+func (future *AppsCreateInstanceMSDeployOperationFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1823,34 +1782,15 @@ func (future AppsCreateInstanceMSDeployOperationFuture) Result(client AppsClient
return
}
if !done {
- return mds, azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mds, err = client.CreateInstanceMSDeployOperationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
+ mds, err = client.CreateInstanceMSDeployOperationResponder(mds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", mds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", resp, "Failure sending request")
- return
- }
- mds, err = client.CreateInstanceMSDeployOperationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1859,12 +1799,11 @@ func (future AppsCreateInstanceMSDeployOperationFuture) Result(client AppsClient
// long-running operation.
type AppsCreateInstanceMSDeployOperationSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateInstanceMSDeployOperationSlotFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
+func (future *AppsCreateInstanceMSDeployOperationSlotFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1872,34 +1811,15 @@ func (future AppsCreateInstanceMSDeployOperationSlotFuture) Result(client AppsCl
return
}
if !done {
- return mds, azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mds, err = client.CreateInstanceMSDeployOperationSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
+ mds, err = client.CreateInstanceMSDeployOperationSlotResponder(mds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", mds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- mds, err = client.CreateInstanceMSDeployOperationSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1908,12 +1828,11 @@ func (future AppsCreateInstanceMSDeployOperationSlotFuture) Result(client AppsCl
// operation.
type AppsCreateMSDeployOperationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateMSDeployOperationFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
+func (future *AppsCreateMSDeployOperationFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1921,34 +1840,15 @@ func (future AppsCreateMSDeployOperationFuture) Result(client AppsClient) (mds M
return
}
if !done {
- return mds, azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mds, err = client.CreateMSDeployOperationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
+ mds, err = client.CreateMSDeployOperationResponder(mds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", mds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", resp, "Failure sending request")
- return
- }
- mds, err = client.CreateMSDeployOperationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1957,12 +1857,11 @@ func (future AppsCreateMSDeployOperationFuture) Result(client AppsClient) (mds M
// operation.
type AppsCreateMSDeployOperationSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateMSDeployOperationSlotFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
+func (future *AppsCreateMSDeployOperationSlotFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1970,34 +1869,15 @@ func (future AppsCreateMSDeployOperationSlotFuture) Result(client AppsClient) (m
return
}
if !done {
- return mds, azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mds, err = client.CreateMSDeployOperationSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
+ mds, err = client.CreateMSDeployOperationSlotResponder(mds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", mds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- mds, err = client.CreateMSDeployOperationSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2005,12 +1885,11 @@ func (future AppsCreateMSDeployOperationSlotFuture) Result(client AppsClient) (m
// AppsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateOrUpdateFuture) Result(client AppsClient) (s Site, err error) {
+func (future *AppsCreateOrUpdateFuture) Result(client AppsClient) (s Site, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2018,34 +1897,15 @@ func (future AppsCreateOrUpdateFuture) Result(client AppsClient) (s Site, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2054,12 +1914,11 @@ func (future AppsCreateOrUpdateFuture) Result(client AppsClient) (s Site, err er
// operation.
type AppsCreateOrUpdateSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateOrUpdateSlotFuture) Result(client AppsClient) (s Site, err error) {
+func (future *AppsCreateOrUpdateSlotFuture) Result(client AppsClient) (s Site, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2067,34 +1926,15 @@ func (future AppsCreateOrUpdateSlotFuture) Result(client AppsClient) (s Site, er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateSlotResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2103,12 +1943,11 @@ func (future AppsCreateOrUpdateSlotFuture) Result(client AppsClient) (s Site, er
// operation.
type AppsCreateOrUpdateSourceControlFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateOrUpdateSourceControlFuture) Result(client AppsClient) (ssc SiteSourceControl, err error) {
+func (future *AppsCreateOrUpdateSourceControlFuture) Result(client AppsClient) (ssc SiteSourceControl, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2116,34 +1955,15 @@ func (future AppsCreateOrUpdateSourceControlFuture) Result(client AppsClient) (s
return
}
if !done {
- return ssc, azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ssc, err = client.CreateOrUpdateSourceControlResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ssc.Response.Response, err = future.GetResult(sender); err == nil && ssc.Response.Response.StatusCode != http.StatusNoContent {
+ ssc, err = client.CreateOrUpdateSourceControlResponder(ssc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", ssc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", resp, "Failure sending request")
- return
- }
- ssc, err = client.CreateOrUpdateSourceControlResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2152,12 +1972,11 @@ func (future AppsCreateOrUpdateSourceControlFuture) Result(client AppsClient) (s
// long-running operation.
type AppsCreateOrUpdateSourceControlSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateOrUpdateSourceControlSlotFuture) Result(client AppsClient) (ssc SiteSourceControl, err error) {
+func (future *AppsCreateOrUpdateSourceControlSlotFuture) Result(client AppsClient) (ssc SiteSourceControl, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2165,34 +1984,15 @@ func (future AppsCreateOrUpdateSourceControlSlotFuture) Result(client AppsClient
return
}
if !done {
- return ssc, azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ssc, err = client.CreateOrUpdateSourceControlSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ssc.Response.Response, err = future.GetResult(sender); err == nil && ssc.Response.Response.StatusCode != http.StatusNoContent {
+ ssc, err = client.CreateOrUpdateSourceControlSlotResponder(ssc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", ssc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- ssc, err = client.CreateOrUpdateSourceControlSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2847,12 +2647,11 @@ func (asco AppServiceCertificateOrderProperties) MarshalJSON() ([]byte, error) {
// results of a long-running operation.
type AppServiceCertificateOrdersCreateOrUpdateCertificateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) Result(client AppServiceCertificateOrdersClient) (ascr AppServiceCertificateResource, err error) {
+func (future *AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) Result(client AppServiceCertificateOrdersClient) (ascr AppServiceCertificateResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2860,34 +2659,15 @@ func (future AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) Result(
return
}
if !done {
- return ascr, azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ascr, err = client.CreateOrUpdateCertificateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ascr.Response.Response, err = future.GetResult(sender); err == nil && ascr.Response.Response.StatusCode != http.StatusNoContent {
+ ascr, err = client.CreateOrUpdateCertificateResponder(ascr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", ascr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", resp, "Failure sending request")
- return
- }
- ascr, err = client.CreateOrUpdateCertificateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2896,12 +2676,11 @@ func (future AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) Result(
// long-running operation.
type AppServiceCertificateOrdersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceCertificateOrdersCreateOrUpdateFuture) Result(client AppServiceCertificateOrdersClient) (asco AppServiceCertificateOrder, err error) {
+func (future *AppServiceCertificateOrdersCreateOrUpdateFuture) Result(client AppServiceCertificateOrdersClient) (asco AppServiceCertificateOrder, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2909,34 +2688,15 @@ func (future AppServiceCertificateOrdersCreateOrUpdateFuture) Result(client AppS
return
}
if !done {
- return asco, azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- asco, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if asco.Response.Response, err = future.GetResult(sender); err == nil && asco.Response.Response.StatusCode != http.StatusNoContent {
+ asco, err = client.CreateOrUpdateResponder(asco.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", asco.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- asco, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3566,12 +3326,11 @@ func (aser *AppServiceEnvironmentResource) UnmarshalJSON(body []byte) error {
// long-running operation.
type AppServiceEnvironmentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsCreateOrUpdateFuture) Result(client AppServiceEnvironmentsClient) (aser AppServiceEnvironmentResource, err error) {
+func (future *AppServiceEnvironmentsCreateOrUpdateFuture) Result(client AppServiceEnvironmentsClient) (aser AppServiceEnvironmentResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3579,34 +3338,15 @@ func (future AppServiceEnvironmentsCreateOrUpdateFuture) Result(client AppServic
return
}
if !done {
- return aser, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- aser, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if aser.Response.Response, err = future.GetResult(sender); err == nil && aser.Response.Response.StatusCode != http.StatusNoContent {
+ aser, err = client.CreateOrUpdateResponder(aser.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", aser.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- aser, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3615,12 +3355,11 @@ func (future AppServiceEnvironmentsCreateOrUpdateFuture) Result(client AppServic
// of a long-running operation.
type AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) Result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) {
+func (future *AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) Result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3628,34 +3367,15 @@ func (future AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) Result(cli
return
}
if !done {
- return wpr, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- wpr, err = client.CreateOrUpdateMultiRolePoolResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if wpr.Response.Response, err = future.GetResult(sender); err == nil && wpr.Response.Response.StatusCode != http.StatusNoContent {
+ wpr, err = client.CreateOrUpdateMultiRolePoolResponder(wpr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", wpr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", resp, "Failure sending request")
- return
- }
- wpr, err = client.CreateOrUpdateMultiRolePoolResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3664,12 +3384,11 @@ func (future AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) Result(cli
// a long-running operation.
type AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) Result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) {
+func (future *AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) Result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3677,34 +3396,15 @@ func (future AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) Result(client
return
}
if !done {
- return wpr, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- wpr, err = client.CreateOrUpdateWorkerPoolResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if wpr.Response.Response, err = future.GetResult(sender); err == nil && wpr.Response.Response.StatusCode != http.StatusNoContent {
+ wpr, err = client.CreateOrUpdateWorkerPoolResponder(wpr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", wpr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", resp, "Failure sending request")
- return
- }
- wpr, err = client.CreateOrUpdateWorkerPoolResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3713,12 +3413,11 @@ func (future AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) Result(client
// operation.
type AppServiceEnvironmentsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsDeleteFuture) Result(client AppServiceEnvironmentsClient) (ar autorest.Response, err error) {
+func (future *AppServiceEnvironmentsDeleteFuture) Result(client AppServiceEnvironmentsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3726,35 +3425,10 @@ func (future AppServiceEnvironmentsDeleteFuture) Result(client AppServiceEnviron
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3762,12 +3436,11 @@ func (future AppServiceEnvironmentsDeleteFuture) Result(client AppServiceEnviron
// operation.
type AppServiceEnvironmentsResumeAllFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsResumeAllFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
+func (future *AppServiceEnvironmentsResumeAllFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3775,34 +3448,15 @@ func (future AppServiceEnvironmentsResumeAllFuture) Result(client AppServiceEnvi
return
}
if !done {
- return acp, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeAllFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- acp, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeAllFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
+ acp, err = client.ResumeResponder(acp.ac.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", resp, "Failure sending request")
- return
- }
- acp, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3811,12 +3465,11 @@ func (future AppServiceEnvironmentsResumeAllFuture) Result(client AppServiceEnvi
// operation.
type AppServiceEnvironmentsResumeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsResumeFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
+func (future *AppServiceEnvironmentsResumeFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3824,34 +3477,15 @@ func (future AppServiceEnvironmentsResumeFuture) Result(client AppServiceEnviron
return
}
if !done {
- return acp, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- acp, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
+ acp, err = client.ResumeResponder(acp.ac.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", resp, "Failure sending request")
- return
- }
- acp, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3860,12 +3494,11 @@ func (future AppServiceEnvironmentsResumeFuture) Result(client AppServiceEnviron
// long-running operation.
type AppServiceEnvironmentsSuspendAllFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsSuspendAllFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
+func (future *AppServiceEnvironmentsSuspendAllFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3873,34 +3506,15 @@ func (future AppServiceEnvironmentsSuspendAllFuture) Result(client AppServiceEnv
return
}
if !done {
- return acp, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendAllFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- acp, err = client.SuspendResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendAllFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
+ acp, err = client.SuspendResponder(acp.ac.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", resp, "Failure sending request")
- return
- }
- acp, err = client.SuspendResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3909,12 +3523,11 @@ func (future AppServiceEnvironmentsSuspendAllFuture) Result(client AppServiceEnv
// operation.
type AppServiceEnvironmentsSuspendFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsSuspendFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
+func (future *AppServiceEnvironmentsSuspendFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3922,34 +3535,15 @@ func (future AppServiceEnvironmentsSuspendFuture) Result(client AppServiceEnviro
return
}
if !done {
- return acp, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- acp, err = client.SuspendResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
+ acp, err = client.SuspendResponder(acp.ac.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", resp, "Failure sending request")
- return
- }
- acp, err = client.SuspendResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4370,12 +3964,11 @@ type AppServicePlanProperties struct {
// operation.
type AppServicePlansCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServicePlansCreateOrUpdateFuture) Result(client AppServicePlansClient) (asp AppServicePlan, err error) {
+func (future *AppServicePlansCreateOrUpdateFuture) Result(client AppServicePlansClient) (asp AppServicePlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4383,34 +3976,15 @@ func (future AppServicePlansCreateOrUpdateFuture) Result(client AppServicePlansC
return
}
if !done {
- return asp, azure.NewAsyncOpIncompleteError("web.AppServicePlansCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- asp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServicePlansCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if asp.Response.Response, err = future.GetResult(sender); err == nil && asp.Response.Response.StatusCode != http.StatusNoContent {
+ asp, err = client.CreateOrUpdateResponder(asp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", asp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- asp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4419,12 +3993,11 @@ func (future AppServicePlansCreateOrUpdateFuture) Result(client AppServicePlansC
// operation.
type AppsInstallSiteExtensionFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsInstallSiteExtensionFuture) Result(client AppsClient) (sei SiteExtensionInfo, err error) {
+func (future *AppsInstallSiteExtensionFuture) Result(client AppsClient) (sei SiteExtensionInfo, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4432,34 +4005,15 @@ func (future AppsInstallSiteExtensionFuture) Result(client AppsClient) (sei Site
return
}
if !done {
- return sei, azure.NewAsyncOpIncompleteError("web.AppsInstallSiteExtensionFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sei, err = client.InstallSiteExtensionResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsInstallSiteExtensionFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sei.Response.Response, err = future.GetResult(sender); err == nil && sei.Response.Response.StatusCode != http.StatusNoContent {
+ sei, err = client.InstallSiteExtensionResponder(sei.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionFuture", "Result", sei.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionFuture", "Result", resp, "Failure sending request")
- return
- }
- sei, err = client.InstallSiteExtensionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4468,12 +4022,11 @@ func (future AppsInstallSiteExtensionFuture) Result(client AppsClient) (sei Site
// operation.
type AppsInstallSiteExtensionSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsInstallSiteExtensionSlotFuture) Result(client AppsClient) (sei SiteExtensionInfo, err error) {
+func (future *AppsInstallSiteExtensionSlotFuture) Result(client AppsClient) (sei SiteExtensionInfo, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4481,34 +4034,15 @@ func (future AppsInstallSiteExtensionSlotFuture) Result(client AppsClient) (sei
return
}
if !done {
- return sei, azure.NewAsyncOpIncompleteError("web.AppsInstallSiteExtensionSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sei, err = client.InstallSiteExtensionSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsInstallSiteExtensionSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sei.Response.Response, err = future.GetResult(sender); err == nil && sei.Response.Response.StatusCode != http.StatusNoContent {
+ sei, err = client.InstallSiteExtensionSlotResponder(sei.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionSlotFuture", "Result", sei.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- sei, err = client.InstallSiteExtensionSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4517,12 +4051,11 @@ func (future AppsInstallSiteExtensionSlotFuture) Result(client AppsClient) (sei
// operation.
type AppsListPublishingCredentialsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsListPublishingCredentialsFuture) Result(client AppsClient) (u User, err error) {
+func (future *AppsListPublishingCredentialsFuture) Result(client AppsClient) (u User, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4530,34 +4063,15 @@ func (future AppsListPublishingCredentialsFuture) Result(client AppsClient) (u U
return
}
if !done {
- return u, azure.NewAsyncOpIncompleteError("web.AppsListPublishingCredentialsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- u, err = client.ListPublishingCredentialsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsListPublishingCredentialsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if u.Response.Response, err = future.GetResult(sender); err == nil && u.Response.Response.StatusCode != http.StatusNoContent {
+ u, err = client.ListPublishingCredentialsResponder(u.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsFuture", "Result", u.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsFuture", "Result", resp, "Failure sending request")
- return
- }
- u, err = client.ListPublishingCredentialsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4566,12 +4080,11 @@ func (future AppsListPublishingCredentialsFuture) Result(client AppsClient) (u U
// long-running operation.
type AppsListPublishingCredentialsSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsListPublishingCredentialsSlotFuture) Result(client AppsClient) (u User, err error) {
+func (future *AppsListPublishingCredentialsSlotFuture) Result(client AppsClient) (u User, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4579,34 +4092,15 @@ func (future AppsListPublishingCredentialsSlotFuture) Result(client AppsClient)
return
}
if !done {
- return u, azure.NewAsyncOpIncompleteError("web.AppsListPublishingCredentialsSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- u, err = client.ListPublishingCredentialsSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsListPublishingCredentialsSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if u.Response.Response, err = future.GetResult(sender); err == nil && u.Response.Response.StatusCode != http.StatusNoContent {
+ u, err = client.ListPublishingCredentialsSlotResponder(u.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsSlotFuture", "Result", u.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- u, err = client.ListPublishingCredentialsSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4614,12 +4108,11 @@ func (future AppsListPublishingCredentialsSlotFuture) Result(client AppsClient)
// AppsMigrateMySQLFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsMigrateMySQLFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsMigrateMySQLFuture) Result(client AppsClient) (o Operation, err error) {
+func (future *AppsMigrateMySQLFuture) Result(client AppsClient) (o Operation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4627,34 +4120,15 @@ func (future AppsMigrateMySQLFuture) Result(client AppsClient) (o Operation, err
return
}
if !done {
- return o, azure.NewAsyncOpIncompleteError("web.AppsMigrateMySQLFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- o, err = client.MigrateMySQLResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsMigrateMySQLFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsMigrateMySQLFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
+ o, err = client.MigrateMySQLResponder(o.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsMigrateMySQLFuture", "Result", o.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsMigrateMySQLFuture", "Result", resp, "Failure sending request")
- return
- }
- o, err = client.MigrateMySQLResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsMigrateMySQLFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4662,12 +4136,11 @@ func (future AppsMigrateMySQLFuture) Result(client AppsClient) (o Operation, err
// AppsMigrateStorageFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsMigrateStorageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsMigrateStorageFuture) Result(client AppsClient) (smr StorageMigrationResponse, err error) {
+func (future *AppsMigrateStorageFuture) Result(client AppsClient) (smr StorageMigrationResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4675,34 +4148,15 @@ func (future AppsMigrateStorageFuture) Result(client AppsClient) (smr StorageMig
return
}
if !done {
- return smr, azure.NewAsyncOpIncompleteError("web.AppsMigrateStorageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- smr, err = client.MigrateStorageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsMigrateStorageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsMigrateStorageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if smr.Response.Response, err = future.GetResult(sender); err == nil && smr.Response.Response.StatusCode != http.StatusNoContent {
+ smr, err = client.MigrateStorageResponder(smr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsMigrateStorageFuture", "Result", smr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsMigrateStorageFuture", "Result", resp, "Failure sending request")
- return
- }
- smr, err = client.MigrateStorageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsMigrateStorageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4710,12 +4164,11 @@ func (future AppsMigrateStorageFuture) Result(client AppsClient) (smr StorageMig
// AppsRecoverFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsRecoverFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsRecoverFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+func (future *AppsRecoverFuture) Result(client AppsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4723,47 +4176,21 @@ func (future AppsRecoverFuture) Result(client AppsClient) (ar autorest.Response,
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppsRecoverFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RecoverResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRecoverFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsRecoverFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRecoverFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RecoverResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRecoverFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// AppsRecoverSlotFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsRecoverSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsRecoverSlotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+func (future *AppsRecoverSlotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4771,47 +4198,21 @@ func (future AppsRecoverSlotFuture) Result(client AppsClient) (ar autorest.Respo
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppsRecoverSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RecoverSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRecoverSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsRecoverSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRecoverSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RecoverSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRecoverSlotFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// AppsRestoreFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsRestoreFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsRestoreFuture) Result(client AppsClient) (rr RestoreResponse, err error) {
+func (future *AppsRestoreFuture) Result(client AppsClient) (rr RestoreResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4819,34 +4220,15 @@ func (future AppsRestoreFuture) Result(client AppsClient) (rr RestoreResponse, e
return
}
if !done {
- return rr, azure.NewAsyncOpIncompleteError("web.AppsRestoreFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rr, err = client.RestoreResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsRestoreFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rr.Response.Response, err = future.GetResult(sender); err == nil && rr.Response.Response.StatusCode != http.StatusNoContent {
+ rr, err = client.RestoreResponder(rr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsRestoreFuture", "Result", rr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreFuture", "Result", resp, "Failure sending request")
- return
- }
- rr, err = client.RestoreResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4854,12 +4236,11 @@ func (future AppsRestoreFuture) Result(client AppsClient) (rr RestoreResponse, e
// AppsRestoreSlotFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsRestoreSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsRestoreSlotFuture) Result(client AppsClient) (rr RestoreResponse, err error) {
+func (future *AppsRestoreSlotFuture) Result(client AppsClient) (rr RestoreResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4867,34 +4248,15 @@ func (future AppsRestoreSlotFuture) Result(client AppsClient) (rr RestoreRespons
return
}
if !done {
- return rr, azure.NewAsyncOpIncompleteError("web.AppsRestoreSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- rr, err = client.RestoreSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsRestoreSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rr.Response.Response, err = future.GetResult(sender); err == nil && rr.Response.Response.StatusCode != http.StatusNoContent {
+ rr, err = client.RestoreSlotResponder(rr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsRestoreSlotFuture", "Result", rr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- rr, err = client.RestoreSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4902,12 +4264,11 @@ func (future AppsRestoreSlotFuture) Result(client AppsClient) (rr RestoreRespons
// AppsSwapSlotSlotFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsSwapSlotSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsSwapSlotSlotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+func (future *AppsSwapSlotSlotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4915,35 +4276,10 @@ func (future AppsSwapSlotSlotFuture) Result(client AppsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppsSwapSlotSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.SwapSlotSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsSwapSlotSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsSwapSlotSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsSwapSlotSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.SwapSlotSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsSwapSlotSlotFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4951,12 +4287,11 @@ func (future AppsSwapSlotSlotFuture) Result(client AppsClient) (ar autorest.Resp
// operation.
type AppsSwapSlotWithProductionFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsSwapSlotWithProductionFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+func (future *AppsSwapSlotWithProductionFuture) Result(client AppsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4964,35 +4299,10 @@ func (future AppsSwapSlotWithProductionFuture) Result(client AppsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppsSwapSlotWithProductionFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.SwapSlotWithProductionResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsSwapSlotWithProductionFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsSwapSlotWithProductionFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsSwapSlotWithProductionFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.SwapSlotWithProductionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsSwapSlotWithProductionFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -9199,12 +8509,11 @@ type DomainRecommendationSearchParameters struct {
// operation.
type DomainsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DomainsCreateOrUpdateFuture) Result(client DomainsClient) (d Domain, err error) {
+func (future *DomainsCreateOrUpdateFuture) Result(client DomainsClient) (d Domain, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9212,34 +8521,15 @@ func (future DomainsCreateOrUpdateFuture) Result(client DomainsClient) (d Domain
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("web.DomainsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.DomainsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.DomainsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.DomainsCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.DomainsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.DomainsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/apps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/apps.go
index 577cdf275..04df7a05f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/apps.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/apps.go
@@ -922,15 +922,17 @@ func (client AppsClient) CreateFunctionPreparer(ctx context.Context, resourceGro
// 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) (future AppsCreateFunctionFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1007,15 +1009,17 @@ func (client AppsClient) CreateInstanceFunctionSlotPreparer(ctx context.Context,
// 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) (future AppsCreateInstanceFunctionSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1089,15 +1093,17 @@ func (client AppsClient) CreateInstanceMSDeployOperationPreparer(ctx context.Con
// CreateInstanceMSDeployOperationSender sends the CreateInstanceMSDeployOperation request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) CreateInstanceMSDeployOperationSender(req *http.Request) (future AppsCreateInstanceMSDeployOperationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1173,15 +1179,17 @@ func (client AppsClient) CreateInstanceMSDeployOperationSlotPreparer(ctx context
// CreateInstanceMSDeployOperationSlotSender sends the CreateInstanceMSDeployOperationSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) CreateInstanceMSDeployOperationSlotSender(req *http.Request) (future AppsCreateInstanceMSDeployOperationSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1253,15 +1261,17 @@ func (client AppsClient) CreateMSDeployOperationPreparer(ctx context.Context, re
// 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) (future AppsCreateMSDeployOperationFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1335,15 +1345,17 @@ func (client AppsClient) CreateMSDeployOperationSlotPreparer(ctx context.Context
// 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) (future AppsCreateMSDeployOperationSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1431,15 +1443,17 @@ func (client AppsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGro
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) CreateOrUpdateSender(req *http.Request) (future AppsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -2527,15 +2541,17 @@ func (client AppsClient) CreateOrUpdateSlotPreparer(ctx context.Context, resourc
// CreateOrUpdateSlotSender sends the CreateOrUpdateSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) CreateOrUpdateSlotSender(req *http.Request) (future AppsCreateOrUpdateSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -2607,15 +2623,17 @@ func (client AppsClient) CreateOrUpdateSourceControlPreparer(ctx context.Context
// CreateOrUpdateSourceControlSender sends the CreateOrUpdateSourceControl request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) CreateOrUpdateSourceControlSender(req *http.Request) (future AppsCreateOrUpdateSourceControlFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -2690,15 +2708,17 @@ func (client AppsClient) CreateOrUpdateSourceControlSlotPreparer(ctx context.Con
// CreateOrUpdateSourceControlSlotSender sends the CreateOrUpdateSourceControlSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) CreateOrUpdateSourceControlSlotSender(req *http.Request) (future AppsCreateOrUpdateSourceControlSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -12662,15 +12682,17 @@ func (client AppsClient) InstallSiteExtensionPreparer(ctx context.Context, resou
// 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) (future AppsInstallSiteExtensionFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -12744,15 +12766,17 @@ func (client AppsClient) InstallSiteExtensionSlotPreparer(ctx context.Context, r
// 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) (future AppsInstallSiteExtensionSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -18795,15 +18819,17 @@ func (client AppsClient) ListPublishingCredentialsPreparer(ctx context.Context,
// ListPublishingCredentialsSender sends the ListPublishingCredentials request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) ListPublishingCredentialsSender(req *http.Request) (future AppsListPublishingCredentialsFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -18875,15 +18901,17 @@ func (client AppsClient) ListPublishingCredentialsSlotPreparer(ctx context.Conte
// ListPublishingCredentialsSlotSender sends the ListPublishingCredentialsSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) ListPublishingCredentialsSlotSender(req *http.Request) (future AppsListPublishingCredentialsSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -21396,15 +21424,17 @@ func (client AppsClient) MigrateMySQLPreparer(ctx context.Context, resourceGroup
// MigrateMySQLSender sends the MigrateMySQL request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) MigrateMySQLSender(req *http.Request) (future AppsMigrateMySQLFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -21483,15 +21513,17 @@ func (client AppsClient) MigrateStoragePreparer(ctx context.Context, subscriptio
// MigrateStorageSender sends the MigrateStorage request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) MigrateStorageSender(req *http.Request) (future AppsMigrateStorageFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -22208,15 +22240,17 @@ func (client AppsClient) RestorePreparer(ctx context.Context, resourceGroupName
// RestoreSender sends the Restore request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) RestoreSender(req *http.Request) (future AppsRestoreFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -22292,15 +22326,17 @@ func (client AppsClient) RestoreFromBackupBlobPreparer(ctx context.Context, reso
// RestoreFromBackupBlobSender sends the RestoreFromBackupBlob request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) RestoreFromBackupBlobSender(req *http.Request) (future AppsRestoreFromBackupBlobFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -22379,15 +22415,17 @@ func (client AppsClient) RestoreFromBackupBlobSlotPreparer(ctx context.Context,
// RestoreFromBackupBlobSlotSender sends the RestoreFromBackupBlobSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) RestoreFromBackupBlobSlotSender(req *http.Request) (future AppsRestoreFromBackupBlobSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -22403,6 +22441,170 @@ func (client AppsClient) RestoreFromBackupBlobSlotResponder(resp *http.Response)
return
}
+// RestoreFromDeletedApp restores a deleted web app to this web app.
+// Parameters:
+// resourceGroupName - name of the resource group to which the resource belongs.
+// name - name of web app.
+// restoreRequest - deleted web app restore information.
+func (client AppsClient) RestoreFromDeletedApp(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest) (result AppsRestoreFromDeletedAppFuture, 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.NewError("web.AppsClient", "RestoreFromDeletedApp", err.Error())
+ }
+
+ req, err := client.RestoreFromDeletedAppPreparer(ctx, resourceGroupName, name, restoreRequest)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedApp", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RestoreFromDeletedAppSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedApp", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RestoreFromDeletedAppPreparer prepares the RestoreFromDeletedApp request.
+func (client AppsClient) RestoreFromDeletedAppPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest) (*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 = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp", pathParameters),
+ autorest.WithJSON(restoreRequest),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RestoreFromDeletedAppSender sends the RestoreFromDeletedApp request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) RestoreFromDeletedAppSender(req *http.Request) (future AppsRestoreFromDeletedAppFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RestoreFromDeletedAppResponder handles the response to the RestoreFromDeletedApp request. The method always
+// closes the http.Response Body.
+func (client AppsClient) RestoreFromDeletedAppResponder(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
+}
+
+// RestoreFromDeletedAppSlot restores a deleted web app to this web app.
+// Parameters:
+// resourceGroupName - name of the resource group to which the resource belongs.
+// name - name of web app.
+// restoreRequest - deleted web app restore information.
+// slot - name of web app slot. If not specified then will default to production slot.
+func (client AppsClient) RestoreFromDeletedAppSlot(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, slot string) (result AppsRestoreFromDeletedAppSlotFuture, 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.NewError("web.AppsClient", "RestoreFromDeletedAppSlot", err.Error())
+ }
+
+ req, err := client.RestoreFromDeletedAppSlotPreparer(ctx, resourceGroupName, name, restoreRequest, slot)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedAppSlot", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RestoreFromDeletedAppSlotSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedAppSlot", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RestoreFromDeletedAppSlotPreparer prepares the RestoreFromDeletedAppSlot request.
+func (client AppsClient) RestoreFromDeletedAppSlotPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, 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 = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp", pathParameters),
+ autorest.WithJSON(restoreRequest),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RestoreFromDeletedAppSlotSender sends the RestoreFromDeletedAppSlot request. The method will close the
+// http.Response Body if it receives an error.
+func (client AppsClient) RestoreFromDeletedAppSlotSender(req *http.Request) (future AppsRestoreFromDeletedAppSlotFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RestoreFromDeletedAppSlotResponder handles the response to the RestoreFromDeletedAppSlot request. The method always
+// closes the http.Response Body.
+func (client AppsClient) RestoreFromDeletedAppSlotResponder(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
+}
+
// RestoreSlot restores a specific backup to another app (or deployment slot, if specified).
// Parameters:
// resourceGroupName - name of the resource group to which the resource belongs.
@@ -22468,15 +22670,17 @@ func (client AppsClient) RestoreSlotPreparer(ctx context.Context, resourceGroupN
// RestoreSlotSender sends the RestoreSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) RestoreSlotSender(req *http.Request) (future AppsRestoreSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -22551,15 +22755,17 @@ func (client AppsClient) RestoreSnapshotPreparer(ctx context.Context, resourceGr
// RestoreSnapshotSender sends the RestoreSnapshot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) RestoreSnapshotSender(req *http.Request) (future AppsRestoreSnapshotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -22636,15 +22842,17 @@ func (client AppsClient) RestoreSnapshotSlotPreparer(ctx context.Context, resour
// RestoreSnapshotSlotSender sends the RestoreSnapshotSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) RestoreSnapshotSlotSender(req *http.Request) (future AppsRestoreSnapshotSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -23813,15 +24021,17 @@ func (client AppsClient) SwapSlotSlotPreparer(ctx context.Context, resourceGroup
// SwapSlotSlotSender sends the SwapSlotSlot request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) SwapSlotSlotSender(req *http.Request) (future AppsSwapSlotSlotFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -23895,15 +24105,17 @@ func (client AppsClient) SwapSlotWithProductionPreparer(ctx context.Context, res
// SwapSlotWithProductionSender sends the SwapSlotWithProduction request. The method will close the
// http.Response Body if it receives an error.
func (client AppsClient) SwapSlotWithProductionSender(req *http.Request) (future AppsSwapSlotWithProductionFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/appservicecertificateorders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/appservicecertificateorders.go
index 97d077d50..77ef0e4f4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/appservicecertificateorders.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/appservicecertificateorders.go
@@ -102,15 +102,17 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceCertificateOrdersClient) CreateOrUpdateSender(req *http.Request) (future AppServiceCertificateOrdersCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -184,15 +186,17 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdateCertificatePrepare
// CreateOrUpdateCertificateSender sends the CreateOrUpdateCertificate request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceCertificateOrdersClient) CreateOrUpdateCertificateSender(req *http.Request) (future AppServiceCertificateOrdersCreateOrUpdateCertificateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/appserviceenvironments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/appserviceenvironments.go
index 747708de9..976c1299d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/appserviceenvironments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/appserviceenvironments.go
@@ -95,15 +95,17 @@ func (client AppServiceEnvironmentsClient) ChangeVnetPreparer(ctx context.Contex
// ChangeVnetSender sends the ChangeVnet request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceEnvironmentsClient) ChangeVnetSender(req *http.Request) (future AppServiceEnvironmentsChangeVnetFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -149,7 +151,6 @@ func (client AppServiceEnvironmentsClient) ChangeVnetComplete(ctx context.Contex
var future AppServiceEnvironmentsChangeVnetFuture
future, err = client.ChangeVnet(ctx, resourceGroupName, name, vnetInfo)
result.Future = future.Future
- result.req = future.req
return
}
@@ -215,15 +216,17 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceEnvironmentsClient) CreateOrUpdateSender(req *http.Request) (future AppServiceEnvironmentsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -295,15 +298,17 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdateMultiRolePoolPreparer(c
// CreateOrUpdateMultiRolePoolSender sends the CreateOrUpdateMultiRolePool request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceEnvironmentsClient) CreateOrUpdateMultiRolePoolSender(req *http.Request) (future AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -377,15 +382,17 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdateWorkerPoolPreparer(ctx
// CreateOrUpdateWorkerPoolSender sends the CreateOrUpdateWorkerPool request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceEnvironmentsClient) CreateOrUpdateWorkerPoolSender(req *http.Request) (future AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -459,15 +466,17 @@ func (client AppServiceEnvironmentsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceEnvironmentsClient) DeleteSender(req *http.Request) (future AppServiceEnvironmentsDeleteFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -3450,15 +3459,17 @@ func (client AppServiceEnvironmentsClient) ResumePreparer(ctx context.Context, r
// ResumeSender sends the Resume request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceEnvironmentsClient) ResumeSender(req *http.Request) (future AppServiceEnvironmentsResumeFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -3504,7 +3515,6 @@ func (client AppServiceEnvironmentsClient) ResumeComplete(ctx context.Context, r
var future AppServiceEnvironmentsResumeFuture
future, err = client.Resume(ctx, resourceGroupName, name)
result.Future = future.Future
- result.req = future.req
return
}
@@ -3560,15 +3570,17 @@ func (client AppServiceEnvironmentsClient) SuspendPreparer(ctx context.Context,
// SuspendSender sends the Suspend request. The method will close the
// http.Response Body if it receives an error.
func (client AppServiceEnvironmentsClient) SuspendSender(req *http.Request) (future AppServiceEnvironmentsSuspendFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -3614,7 +3626,6 @@ func (client AppServiceEnvironmentsClient) SuspendComplete(ctx context.Context,
var future AppServiceEnvironmentsSuspendFuture
future, err = client.Suspend(ctx, resourceGroupName, name)
result.Future = future.Future
- result.req = future.req
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/appserviceplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/appserviceplans.go
index b3dbc1570..18ac30634 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/appserviceplans.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/appserviceplans.go
@@ -95,15 +95,17 @@ func (client AppServicePlansClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client AppServicePlansClient) CreateOrUpdateSender(req *http.Request) (future AppServicePlansCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/domains.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/domains.go
index fbe2c0639..ad436ecae 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/domains.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/domains.go
@@ -219,15 +219,17 @@ func (client DomainsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DomainsClient) CreateOrUpdateSender(req *http.Request) (future DomainsCreateOrUpdateFuture, err error) {
- sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client))
- future.Future = azure.NewFuture(req)
- future.req = req
- _, err = future.Done(sender)
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
- err = autorest.Respond(future.Response(),
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/models.go
index a23c6b561..692456de6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web/models.go
@@ -541,6 +541,23 @@ func PossibleFrequencyUnitValues() []FrequencyUnit {
return []FrequencyUnit{Day, Hour}
}
+// FtpsState enumerates the values for ftps state.
+type FtpsState string
+
+const (
+ // AllAllowed ...
+ AllAllowed FtpsState = "AllAllowed"
+ // Disabled ...
+ Disabled FtpsState = "Disabled"
+ // FtpsOnly ...
+ FtpsOnly FtpsState = "FtpsOnly"
+)
+
+// PossibleFtpsStateValues returns an array of possible values for the FtpsState const type.
+func PossibleFtpsStateValues() []FtpsState {
+ return []FtpsState{AllAllowed, Disabled, FtpsOnly}
+}
+
// HostingEnvironmentStatus enumerates the values for hosting environment status.
type HostingEnvironmentStatus string
@@ -1068,17 +1085,17 @@ func PossibleSolutionTypeValues() []SolutionType {
type SslState string
const (
- // Disabled ...
- Disabled SslState = "Disabled"
- // IPBasedEnabled ...
- IPBasedEnabled SslState = "IpBasedEnabled"
- // SniEnabled ...
- SniEnabled SslState = "SniEnabled"
+ // SslStateDisabled ...
+ SslStateDisabled SslState = "Disabled"
+ // SslStateIPBasedEnabled ...
+ SslStateIPBasedEnabled SslState = "IpBasedEnabled"
+ // SslStateSniEnabled ...
+ SslStateSniEnabled SslState = "SniEnabled"
)
// PossibleSslStateValues returns an array of possible values for the SslState const type.
func PossibleSslStateValues() []SslState {
- return []SslState{Disabled, IPBasedEnabled, SniEnabled}
+ return []SslState{SslStateDisabled, SslStateIPBasedEnabled, SslStateSniEnabled}
}
// StatusOptions enumerates the values for status options.
@@ -1697,12 +1714,11 @@ func (page ApplicationStackCollectionPage) Values() []ApplicationStack {
// AppsCreateFunctionFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsCreateFunctionFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateFunctionFuture) Result(client AppsClient) (fe FunctionEnvelope, err error) {
+func (future *AppsCreateFunctionFuture) Result(client AppsClient) (fe FunctionEnvelope, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1710,34 +1726,15 @@ func (future AppsCreateFunctionFuture) Result(client AppsClient) (fe FunctionEnv
return
}
if !done {
- return fe, azure.NewAsyncOpIncompleteError("web.AppsCreateFunctionFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fe, err = client.CreateFunctionResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateFunctionFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fe.Response.Response, err = future.GetResult(sender); err == nil && fe.Response.Response.StatusCode != http.StatusNoContent {
+ fe, err = client.CreateFunctionResponder(fe.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", fe.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", resp, "Failure sending request")
- return
- }
- fe, err = client.CreateFunctionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1746,12 +1743,11 @@ func (future AppsCreateFunctionFuture) Result(client AppsClient) (fe FunctionEnv
// operation.
type AppsCreateInstanceFunctionSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateInstanceFunctionSlotFuture) Result(client AppsClient) (fe FunctionEnvelope, err error) {
+func (future *AppsCreateInstanceFunctionSlotFuture) Result(client AppsClient) (fe FunctionEnvelope, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1759,34 +1755,15 @@ func (future AppsCreateInstanceFunctionSlotFuture) Result(client AppsClient) (fe
return
}
if !done {
- return fe, azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceFunctionSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- fe, err = client.CreateInstanceFunctionSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceFunctionSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fe.Response.Response, err = future.GetResult(sender); err == nil && fe.Response.Response.StatusCode != http.StatusNoContent {
+ fe, err = client.CreateInstanceFunctionSlotResponder(fe.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", fe.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- fe, err = client.CreateInstanceFunctionSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1795,12 +1772,11 @@ func (future AppsCreateInstanceFunctionSlotFuture) Result(client AppsClient) (fe
// long-running operation.
type AppsCreateInstanceMSDeployOperationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateInstanceMSDeployOperationFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
+func (future *AppsCreateInstanceMSDeployOperationFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1808,34 +1784,15 @@ func (future AppsCreateInstanceMSDeployOperationFuture) Result(client AppsClient
return
}
if !done {
- return mds, azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mds, err = client.CreateInstanceMSDeployOperationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
+ mds, err = client.CreateInstanceMSDeployOperationResponder(mds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", mds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", resp, "Failure sending request")
- return
- }
- mds, err = client.CreateInstanceMSDeployOperationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1844,12 +1801,11 @@ func (future AppsCreateInstanceMSDeployOperationFuture) Result(client AppsClient
// long-running operation.
type AppsCreateInstanceMSDeployOperationSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateInstanceMSDeployOperationSlotFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
+func (future *AppsCreateInstanceMSDeployOperationSlotFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1857,34 +1813,15 @@ func (future AppsCreateInstanceMSDeployOperationSlotFuture) Result(client AppsCl
return
}
if !done {
- return mds, azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mds, err = client.CreateInstanceMSDeployOperationSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
+ mds, err = client.CreateInstanceMSDeployOperationSlotResponder(mds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", mds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- mds, err = client.CreateInstanceMSDeployOperationSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1893,12 +1830,11 @@ func (future AppsCreateInstanceMSDeployOperationSlotFuture) Result(client AppsCl
// operation.
type AppsCreateMSDeployOperationFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateMSDeployOperationFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
+func (future *AppsCreateMSDeployOperationFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1906,34 +1842,15 @@ func (future AppsCreateMSDeployOperationFuture) Result(client AppsClient) (mds M
return
}
if !done {
- return mds, azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mds, err = client.CreateMSDeployOperationResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
+ mds, err = client.CreateMSDeployOperationResponder(mds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", mds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", resp, "Failure sending request")
- return
- }
- mds, err = client.CreateMSDeployOperationResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1942,12 +1859,11 @@ func (future AppsCreateMSDeployOperationFuture) Result(client AppsClient) (mds M
// operation.
type AppsCreateMSDeployOperationSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateMSDeployOperationSlotFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
+func (future *AppsCreateMSDeployOperationSlotFuture) Result(client AppsClient) (mds MSDeployStatus, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -1955,34 +1871,15 @@ func (future AppsCreateMSDeployOperationSlotFuture) Result(client AppsClient) (m
return
}
if !done {
- return mds, azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- mds, err = client.CreateMSDeployOperationSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
+ mds, err = client.CreateMSDeployOperationSlotResponder(mds.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", mds.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- mds, err = client.CreateMSDeployOperationSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -1990,12 +1887,11 @@ func (future AppsCreateMSDeployOperationSlotFuture) Result(client AppsClient) (m
// AppsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateOrUpdateFuture) Result(client AppsClient) (s Site, err error) {
+func (future *AppsCreateOrUpdateFuture) Result(client AppsClient) (s Site, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2003,34 +1899,15 @@ func (future AppsCreateOrUpdateFuture) Result(client AppsClient) (s Site, err er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2039,12 +1916,11 @@ func (future AppsCreateOrUpdateFuture) Result(client AppsClient) (s Site, err er
// operation.
type AppsCreateOrUpdateSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateOrUpdateSlotFuture) Result(client AppsClient) (s Site, err error) {
+func (future *AppsCreateOrUpdateSlotFuture) Result(client AppsClient) (s Site, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2052,34 +1928,15 @@ func (future AppsCreateOrUpdateSlotFuture) Result(client AppsClient) (s Site, er
return
}
if !done {
- return s, azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- s, err = client.CreateOrUpdateSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateSlotResponder(s.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", s.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- s, err = client.CreateOrUpdateSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2088,12 +1945,11 @@ func (future AppsCreateOrUpdateSlotFuture) Result(client AppsClient) (s Site, er
// operation.
type AppsCreateOrUpdateSourceControlFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateOrUpdateSourceControlFuture) Result(client AppsClient) (ssc SiteSourceControl, err error) {
+func (future *AppsCreateOrUpdateSourceControlFuture) Result(client AppsClient) (ssc SiteSourceControl, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2101,34 +1957,15 @@ func (future AppsCreateOrUpdateSourceControlFuture) Result(client AppsClient) (s
return
}
if !done {
- return ssc, azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ssc, err = client.CreateOrUpdateSourceControlResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ssc.Response.Response, err = future.GetResult(sender); err == nil && ssc.Response.Response.StatusCode != http.StatusNoContent {
+ ssc, err = client.CreateOrUpdateSourceControlResponder(ssc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", ssc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", resp, "Failure sending request")
- return
- }
- ssc, err = client.CreateOrUpdateSourceControlResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2137,12 +1974,11 @@ func (future AppsCreateOrUpdateSourceControlFuture) Result(client AppsClient) (s
// long-running operation.
type AppsCreateOrUpdateSourceControlSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsCreateOrUpdateSourceControlSlotFuture) Result(client AppsClient) (ssc SiteSourceControl, err error) {
+func (future *AppsCreateOrUpdateSourceControlSlotFuture) Result(client AppsClient) (ssc SiteSourceControl, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2150,34 +1986,15 @@ func (future AppsCreateOrUpdateSourceControlSlotFuture) Result(client AppsClient
return
}
if !done {
- return ssc, azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ssc, err = client.CreateOrUpdateSourceControlSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ssc.Response.Response, err = future.GetResult(sender); err == nil && ssc.Response.Response.StatusCode != http.StatusNoContent {
+ ssc, err = client.CreateOrUpdateSourceControlSlotResponder(ssc.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", ssc.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- ssc, err = client.CreateOrUpdateSourceControlSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2832,12 +2649,11 @@ func (asco AppServiceCertificateOrderProperties) MarshalJSON() ([]byte, error) {
// results of a long-running operation.
type AppServiceCertificateOrdersCreateOrUpdateCertificateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) Result(client AppServiceCertificateOrdersClient) (ascr AppServiceCertificateResource, err error) {
+func (future *AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) Result(client AppServiceCertificateOrdersClient) (ascr AppServiceCertificateResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2845,34 +2661,15 @@ func (future AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) Result(
return
}
if !done {
- return ascr, azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ascr, err = client.CreateOrUpdateCertificateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ascr.Response.Response, err = future.GetResult(sender); err == nil && ascr.Response.Response.StatusCode != http.StatusNoContent {
+ ascr, err = client.CreateOrUpdateCertificateResponder(ascr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", ascr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", resp, "Failure sending request")
- return
- }
- ascr, err = client.CreateOrUpdateCertificateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -2881,12 +2678,11 @@ func (future AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) Result(
// long-running operation.
type AppServiceCertificateOrdersCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceCertificateOrdersCreateOrUpdateFuture) Result(client AppServiceCertificateOrdersClient) (asco AppServiceCertificateOrder, err error) {
+func (future *AppServiceCertificateOrdersCreateOrUpdateFuture) Result(client AppServiceCertificateOrdersClient) (asco AppServiceCertificateOrder, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -2894,34 +2690,15 @@ func (future AppServiceCertificateOrdersCreateOrUpdateFuture) Result(client AppS
return
}
if !done {
- return asco, azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- asco, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if asco.Response.Response, err = future.GetResult(sender); err == nil && asco.Response.Response.StatusCode != http.StatusNoContent {
+ asco, err = client.CreateOrUpdateResponder(asco.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", asco.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- asco, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3553,12 +3330,11 @@ func (aser *AppServiceEnvironmentResource) UnmarshalJSON(body []byte) error {
// long-running operation.
type AppServiceEnvironmentsChangeVnetAllFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsChangeVnetAllFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
+func (future *AppServiceEnvironmentsChangeVnetAllFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3566,34 +3342,15 @@ func (future AppServiceEnvironmentsChangeVnetAllFuture) Result(client AppService
return
}
if !done {
- return acp, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsChangeVnetAllFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- acp, err = client.ChangeVnetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetAllFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsChangeVnetAllFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
+ acp, err = client.ChangeVnetResponder(acp.ac.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetAllFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetAllFuture", "Result", resp, "Failure sending request")
- return
- }
- acp, err = client.ChangeVnetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetAllFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3602,12 +3359,11 @@ func (future AppServiceEnvironmentsChangeVnetAllFuture) Result(client AppService
// long-running operation.
type AppServiceEnvironmentsChangeVnetFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsChangeVnetFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
+func (future *AppServiceEnvironmentsChangeVnetFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3615,34 +3371,15 @@ func (future AppServiceEnvironmentsChangeVnetFuture) Result(client AppServiceEnv
return
}
if !done {
- return acp, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsChangeVnetFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- acp, err = client.ChangeVnetResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsChangeVnetFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
+ acp, err = client.ChangeVnetResponder(acp.ac.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetFuture", "Result", resp, "Failure sending request")
- return
- }
- acp, err = client.ChangeVnetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsChangeVnetFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3651,12 +3388,11 @@ func (future AppServiceEnvironmentsChangeVnetFuture) Result(client AppServiceEnv
// long-running operation.
type AppServiceEnvironmentsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsCreateOrUpdateFuture) Result(client AppServiceEnvironmentsClient) (aser AppServiceEnvironmentResource, err error) {
+func (future *AppServiceEnvironmentsCreateOrUpdateFuture) Result(client AppServiceEnvironmentsClient) (aser AppServiceEnvironmentResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3664,34 +3400,15 @@ func (future AppServiceEnvironmentsCreateOrUpdateFuture) Result(client AppServic
return
}
if !done {
- return aser, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- aser, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if aser.Response.Response, err = future.GetResult(sender); err == nil && aser.Response.Response.StatusCode != http.StatusNoContent {
+ aser, err = client.CreateOrUpdateResponder(aser.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", aser.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- aser, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3700,12 +3417,11 @@ func (future AppServiceEnvironmentsCreateOrUpdateFuture) Result(client AppServic
// of a long-running operation.
type AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) Result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) {
+func (future *AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) Result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3713,34 +3429,15 @@ func (future AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) Result(cli
return
}
if !done {
- return wpr, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- wpr, err = client.CreateOrUpdateMultiRolePoolResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if wpr.Response.Response, err = future.GetResult(sender); err == nil && wpr.Response.Response.StatusCode != http.StatusNoContent {
+ wpr, err = client.CreateOrUpdateMultiRolePoolResponder(wpr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", wpr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", resp, "Failure sending request")
- return
- }
- wpr, err = client.CreateOrUpdateMultiRolePoolResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3749,12 +3446,11 @@ func (future AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) Result(cli
// a long-running operation.
type AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) Result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) {
+func (future *AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) Result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3762,34 +3458,15 @@ func (future AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) Result(client
return
}
if !done {
- return wpr, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- wpr, err = client.CreateOrUpdateWorkerPoolResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if wpr.Response.Response, err = future.GetResult(sender); err == nil && wpr.Response.Response.StatusCode != http.StatusNoContent {
+ wpr, err = client.CreateOrUpdateWorkerPoolResponder(wpr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", wpr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", resp, "Failure sending request")
- return
- }
- wpr, err = client.CreateOrUpdateWorkerPoolResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3798,12 +3475,11 @@ func (future AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) Result(client
// operation.
type AppServiceEnvironmentsDeleteFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsDeleteFuture) Result(client AppServiceEnvironmentsClient) (ar autorest.Response, err error) {
+func (future *AppServiceEnvironmentsDeleteFuture) Result(client AppServiceEnvironmentsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3811,35 +3487,10 @@ func (future AppServiceEnvironmentsDeleteFuture) Result(client AppServiceEnviron
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsDeleteFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.DeleteResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsDeleteFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsDeleteFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsDeleteFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.DeleteResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsDeleteFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -3847,12 +3498,11 @@ func (future AppServiceEnvironmentsDeleteFuture) Result(client AppServiceEnviron
// operation.
type AppServiceEnvironmentsResumeAllFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsResumeAllFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
+func (future *AppServiceEnvironmentsResumeAllFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3860,34 +3510,15 @@ func (future AppServiceEnvironmentsResumeAllFuture) Result(client AppServiceEnvi
return
}
if !done {
- return acp, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeAllFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- acp, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeAllFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
+ acp, err = client.ResumeResponder(acp.ac.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", resp, "Failure sending request")
- return
- }
- acp, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3896,12 +3527,11 @@ func (future AppServiceEnvironmentsResumeAllFuture) Result(client AppServiceEnvi
// operation.
type AppServiceEnvironmentsResumeFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsResumeFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
+func (future *AppServiceEnvironmentsResumeFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3909,34 +3539,15 @@ func (future AppServiceEnvironmentsResumeFuture) Result(client AppServiceEnviron
return
}
if !done {
- return acp, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- acp, err = client.ResumeResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
+ acp, err = client.ResumeResponder(acp.ac.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", resp, "Failure sending request")
- return
- }
- acp, err = client.ResumeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3945,12 +3556,11 @@ func (future AppServiceEnvironmentsResumeFuture) Result(client AppServiceEnviron
// long-running operation.
type AppServiceEnvironmentsSuspendAllFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsSuspendAllFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
+func (future *AppServiceEnvironmentsSuspendAllFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -3958,34 +3568,15 @@ func (future AppServiceEnvironmentsSuspendAllFuture) Result(client AppServiceEnv
return
}
if !done {
- return acp, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendAllFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- acp, err = client.SuspendResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendAllFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
+ acp, err = client.SuspendResponder(acp.ac.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", resp, "Failure sending request")
- return
- }
- acp, err = client.SuspendResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -3994,12 +3585,11 @@ func (future AppServiceEnvironmentsSuspendAllFuture) Result(client AppServiceEnv
// operation.
type AppServiceEnvironmentsSuspendFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServiceEnvironmentsSuspendFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
+func (future *AppServiceEnvironmentsSuspendFuture) Result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4007,34 +3597,15 @@ func (future AppServiceEnvironmentsSuspendFuture) Result(client AppServiceEnviro
return
}
if !done {
- return acp, azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- acp, err = client.SuspendResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
+ acp, err = client.SuspendResponder(acp.ac.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", resp, "Failure sending request")
- return
- }
- acp, err = client.SuspendResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4455,12 +4026,11 @@ type AppServicePlanProperties struct {
// operation.
type AppServicePlansCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppServicePlansCreateOrUpdateFuture) Result(client AppServicePlansClient) (asp AppServicePlan, err error) {
+func (future *AppServicePlansCreateOrUpdateFuture) Result(client AppServicePlansClient) (asp AppServicePlan, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4468,34 +4038,15 @@ func (future AppServicePlansCreateOrUpdateFuture) Result(client AppServicePlansC
return
}
if !done {
- return asp, azure.NewAsyncOpIncompleteError("web.AppServicePlansCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- asp, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppServicePlansCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if asp.Response.Response, err = future.GetResult(sender); err == nil && asp.Response.Response.StatusCode != http.StatusNoContent {
+ asp, err = client.CreateOrUpdateResponder(asp.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", asp.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- asp, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4504,12 +4055,11 @@ func (future AppServicePlansCreateOrUpdateFuture) Result(client AppServicePlansC
// operation.
type AppsInstallSiteExtensionFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsInstallSiteExtensionFuture) Result(client AppsClient) (sei SiteExtensionInfo, err error) {
+func (future *AppsInstallSiteExtensionFuture) Result(client AppsClient) (sei SiteExtensionInfo, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4517,34 +4067,15 @@ func (future AppsInstallSiteExtensionFuture) Result(client AppsClient) (sei Site
return
}
if !done {
- return sei, azure.NewAsyncOpIncompleteError("web.AppsInstallSiteExtensionFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sei, err = client.InstallSiteExtensionResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsInstallSiteExtensionFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sei.Response.Response, err = future.GetResult(sender); err == nil && sei.Response.Response.StatusCode != http.StatusNoContent {
+ sei, err = client.InstallSiteExtensionResponder(sei.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionFuture", "Result", sei.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionFuture", "Result", resp, "Failure sending request")
- return
- }
- sei, err = client.InstallSiteExtensionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4553,12 +4084,11 @@ func (future AppsInstallSiteExtensionFuture) Result(client AppsClient) (sei Site
// operation.
type AppsInstallSiteExtensionSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsInstallSiteExtensionSlotFuture) Result(client AppsClient) (sei SiteExtensionInfo, err error) {
+func (future *AppsInstallSiteExtensionSlotFuture) Result(client AppsClient) (sei SiteExtensionInfo, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4566,34 +4096,15 @@ func (future AppsInstallSiteExtensionSlotFuture) Result(client AppsClient) (sei
return
}
if !done {
- return sei, azure.NewAsyncOpIncompleteError("web.AppsInstallSiteExtensionSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- sei, err = client.InstallSiteExtensionSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsInstallSiteExtensionSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sei.Response.Response, err = future.GetResult(sender); err == nil && sei.Response.Response.StatusCode != http.StatusNoContent {
+ sei, err = client.InstallSiteExtensionSlotResponder(sei.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionSlotFuture", "Result", sei.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- sei, err = client.InstallSiteExtensionSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4602,12 +4113,11 @@ func (future AppsInstallSiteExtensionSlotFuture) Result(client AppsClient) (sei
// operation.
type AppsListPublishingCredentialsFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsListPublishingCredentialsFuture) Result(client AppsClient) (u User, err error) {
+func (future *AppsListPublishingCredentialsFuture) Result(client AppsClient) (u User, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4615,34 +4125,15 @@ func (future AppsListPublishingCredentialsFuture) Result(client AppsClient) (u U
return
}
if !done {
- return u, azure.NewAsyncOpIncompleteError("web.AppsListPublishingCredentialsFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- u, err = client.ListPublishingCredentialsResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsListPublishingCredentialsFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if u.Response.Response, err = future.GetResult(sender); err == nil && u.Response.Response.StatusCode != http.StatusNoContent {
+ u, err = client.ListPublishingCredentialsResponder(u.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsFuture", "Result", u.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsFuture", "Result", resp, "Failure sending request")
- return
- }
- u, err = client.ListPublishingCredentialsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4651,12 +4142,11 @@ func (future AppsListPublishingCredentialsFuture) Result(client AppsClient) (u U
// long-running operation.
type AppsListPublishingCredentialsSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsListPublishingCredentialsSlotFuture) Result(client AppsClient) (u User, err error) {
+func (future *AppsListPublishingCredentialsSlotFuture) Result(client AppsClient) (u User, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4664,34 +4154,15 @@ func (future AppsListPublishingCredentialsSlotFuture) Result(client AppsClient)
return
}
if !done {
- return u, azure.NewAsyncOpIncompleteError("web.AppsListPublishingCredentialsSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- u, err = client.ListPublishingCredentialsSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsListPublishingCredentialsSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if u.Response.Response, err = future.GetResult(sender); err == nil && u.Response.Response.StatusCode != http.StatusNoContent {
+ u, err = client.ListPublishingCredentialsSlotResponder(u.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsSlotFuture", "Result", u.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- u, err = client.ListPublishingCredentialsSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsSlotFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4699,12 +4170,11 @@ func (future AppsListPublishingCredentialsSlotFuture) Result(client AppsClient)
// AppsMigrateMySQLFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsMigrateMySQLFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsMigrateMySQLFuture) Result(client AppsClient) (o Operation, err error) {
+func (future *AppsMigrateMySQLFuture) Result(client AppsClient) (o Operation, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4712,34 +4182,15 @@ func (future AppsMigrateMySQLFuture) Result(client AppsClient) (o Operation, err
return
}
if !done {
- return o, azure.NewAsyncOpIncompleteError("web.AppsMigrateMySQLFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- o, err = client.MigrateMySQLResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsMigrateMySQLFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsMigrateMySQLFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
+ o, err = client.MigrateMySQLResponder(o.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsMigrateMySQLFuture", "Result", o.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsMigrateMySQLFuture", "Result", resp, "Failure sending request")
- return
- }
- o, err = client.MigrateMySQLResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsMigrateMySQLFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4747,12 +4198,11 @@ func (future AppsMigrateMySQLFuture) Result(client AppsClient) (o Operation, err
// AppsMigrateStorageFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsMigrateStorageFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsMigrateStorageFuture) Result(client AppsClient) (smr StorageMigrationResponse, err error) {
+func (future *AppsMigrateStorageFuture) Result(client AppsClient) (smr StorageMigrationResponse, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4760,34 +4210,15 @@ func (future AppsMigrateStorageFuture) Result(client AppsClient) (smr StorageMig
return
}
if !done {
- return smr, azure.NewAsyncOpIncompleteError("web.AppsMigrateStorageFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- smr, err = client.MigrateStorageResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsMigrateStorageFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsMigrateStorageFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if smr.Response.Response, err = future.GetResult(sender); err == nil && smr.Response.Response.StatusCode != http.StatusNoContent {
+ smr, err = client.MigrateStorageResponder(smr.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.AppsMigrateStorageFuture", "Result", smr.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsMigrateStorageFuture", "Result", resp, "Failure sending request")
- return
- }
- smr, err = client.MigrateStorageResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsMigrateStorageFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -4796,12 +4227,11 @@ func (future AppsMigrateStorageFuture) Result(client AppsClient) (smr StorageMig
// operation.
type AppsRestoreFromBackupBlobFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsRestoreFromBackupBlobFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+func (future *AppsRestoreFromBackupBlobFuture) Result(client AppsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4809,35 +4239,10 @@ func (future AppsRestoreFromBackupBlobFuture) Result(client AppsClient) (ar auto
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppsRestoreFromBackupBlobFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RestoreFromBackupBlobResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreFromBackupBlobFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsRestoreFromBackupBlobFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreFromBackupBlobFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RestoreFromBackupBlobResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreFromBackupBlobFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -4845,12 +4250,11 @@ func (future AppsRestoreFromBackupBlobFuture) Result(client AppsClient) (ar auto
// operation.
type AppsRestoreFromBackupBlobSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsRestoreFromBackupBlobSlotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+func (future *AppsRestoreFromBackupBlobSlotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4858,47 +4262,67 @@ func (future AppsRestoreFromBackupBlobSlotFuture) Result(client AppsClient) (ar
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppsRestoreFromBackupBlobSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RestoreFromBackupBlobSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreFromBackupBlobSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsRestoreFromBackupBlobSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ ar.Response = future.Response()
+ return
+}
+
+// AppsRestoreFromDeletedAppFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type AppsRestoreFromDeletedAppFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *AppsRestoreFromDeletedAppFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreFromBackupBlobSlotFuture", "Result", resp, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "web.AppsRestoreFromDeletedAppFuture", "Result", future.Response(), "Polling failure")
return
}
- ar, err = client.RestoreFromBackupBlobSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreFromBackupBlobSlotFuture", "Result", resp, "Failure responding to request")
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("web.AppsRestoreFromDeletedAppFuture")
+ return
}
+ ar.Response = future.Response()
+ return
+}
+
+// AppsRestoreFromDeletedAppSlotFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type AppsRestoreFromDeletedAppSlotFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *AppsRestoreFromDeletedAppSlotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.AppsRestoreFromDeletedAppSlotFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("web.AppsRestoreFromDeletedAppSlotFuture")
+ return
+ }
+ ar.Response = future.Response()
return
}
// AppsRestoreFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsRestoreFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsRestoreFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+func (future *AppsRestoreFuture) Result(client AppsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4906,47 +4330,21 @@ func (future AppsRestoreFuture) Result(client AppsClient) (ar autorest.Response,
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppsRestoreFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RestoreResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsRestoreFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RestoreResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// AppsRestoreSlotFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsRestoreSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsRestoreSlotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+func (future *AppsRestoreSlotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -4954,47 +4352,21 @@ func (future AppsRestoreSlotFuture) Result(client AppsClient) (ar autorest.Respo
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppsRestoreSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RestoreSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsRestoreSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RestoreSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreSlotFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// AppsRestoreSnapshotFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsRestoreSnapshotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsRestoreSnapshotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+func (future *AppsRestoreSnapshotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5002,35 +4374,10 @@ func (future AppsRestoreSnapshotFuture) Result(client AppsClient) (ar autorest.R
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppsRestoreSnapshotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RestoreSnapshotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreSnapshotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsRestoreSnapshotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreSnapshotFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RestoreSnapshotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreSnapshotFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5038,12 +4385,11 @@ func (future AppsRestoreSnapshotFuture) Result(client AppsClient) (ar autorest.R
// operation.
type AppsRestoreSnapshotSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsRestoreSnapshotSlotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+func (future *AppsRestoreSnapshotSlotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5051,47 +4397,21 @@ func (future AppsRestoreSnapshotSlotFuture) Result(client AppsClient) (ar autore
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppsRestoreSnapshotSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.RestoreSnapshotSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreSnapshotSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsRestoreSnapshotSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreSnapshotSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.RestoreSnapshotSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsRestoreSnapshotSlotFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
// AppsSwapSlotSlotFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AppsSwapSlotSlotFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsSwapSlotSlotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+func (future *AppsSwapSlotSlotFuture) Result(client AppsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5099,35 +4419,10 @@ func (future AppsSwapSlotSlotFuture) Result(client AppsClient) (ar autorest.Resp
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppsSwapSlotSlotFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.SwapSlotSlotResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsSwapSlotSlotFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsSwapSlotSlotFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsSwapSlotSlotFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.SwapSlotSlotResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsSwapSlotSlotFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -5135,12 +4430,11 @@ func (future AppsSwapSlotSlotFuture) Result(client AppsClient) (ar autorest.Resp
// operation.
type AppsSwapSlotWithProductionFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future AppsSwapSlotWithProductionFuture) Result(client AppsClient) (ar autorest.Response, err error) {
+func (future *AppsSwapSlotWithProductionFuture) Result(client AppsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -5148,35 +4442,10 @@ func (future AppsSwapSlotWithProductionFuture) Result(client AppsClient) (ar aut
return
}
if !done {
- return ar, azure.NewAsyncOpIncompleteError("web.AppsSwapSlotWithProductionFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- ar, err = client.SwapSlotWithProductionResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsSwapSlotWithProductionFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.AppsSwapSlotWithProductionFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
- if err != nil {
- return
- }
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsSwapSlotWithProductionFuture", "Result", resp, "Failure sending request")
- return
- }
- ar, err = client.SwapSlotWithProductionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.AppsSwapSlotWithProductionFuture", "Result", resp, "Failure responding to request")
- }
+ ar.Response = future.Response()
return
}
@@ -7304,6 +6573,113 @@ type DefaultErrorResponseErrorDetailsItem struct {
Target *string `json:"target,omitempty"`
}
+// DeletedAppRestoreRequest details about restoring a deleted app.
+type DeletedAppRestoreRequest struct {
+ // DeletedAppRestoreRequestProperties - DeletedAppRestoreRequest resource specific properties
+ *DeletedAppRestoreRequestProperties `json:"properties,omitempty"`
+ // ID - Resource Id.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource Name.
+ Name *string `json:"name,omitempty"`
+ // Kind - Kind of resource.
+ Kind *string `json:"kind,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DeletedAppRestoreRequest.
+func (darr DeletedAppRestoreRequest) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if darr.DeletedAppRestoreRequestProperties != nil {
+ objectMap["properties"] = darr.DeletedAppRestoreRequestProperties
+ }
+ if darr.ID != nil {
+ objectMap["id"] = darr.ID
+ }
+ if darr.Name != nil {
+ objectMap["name"] = darr.Name
+ }
+ if darr.Kind != nil {
+ objectMap["kind"] = darr.Kind
+ }
+ if darr.Type != nil {
+ objectMap["type"] = darr.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DeletedAppRestoreRequest struct.
+func (darr *DeletedAppRestoreRequest) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var deletedAppRestoreRequestProperties DeletedAppRestoreRequestProperties
+ err = json.Unmarshal(*v, &deletedAppRestoreRequestProperties)
+ if err != nil {
+ return err
+ }
+ darr.DeletedAppRestoreRequestProperties = &deletedAppRestoreRequestProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ darr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ darr.Name = &name
+ }
+ case "kind":
+ if v != nil {
+ var kind string
+ err = json.Unmarshal(*v, &kind)
+ if err != nil {
+ return err
+ }
+ darr.Kind = &kind
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ darr.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// DeletedAppRestoreRequestProperties deletedAppRestoreRequest resource specific properties
+type DeletedAppRestoreRequestProperties struct {
+ // DeletedSiteID - ARM resource ID of the deleted app. Example:
+ // /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}
+ DeletedSiteID *string `json:"deletedSiteId,omitempty"`
+ // RecoverConfiguration - If true, deleted site configuration, in addition to content, will be restored.
+ RecoverConfiguration *bool `json:"recoverConfiguration,omitempty"`
+ // SnapshotTime - Point in time to restore the deleted app from, formatted as a DateTime string.
+ // If unspecified, default value is the time that the app was deleted.
+ SnapshotTime *string `json:"snapshotTime,omitempty"`
+}
+
// DeletedSite a deleted app.
type DeletedSite struct {
// DeletedSiteID - Numeric id for the deleted site
@@ -9117,12 +8493,11 @@ type DomainRecommendationSearchParameters struct {
// operation.
type DomainsCreateOrUpdateFuture struct {
azure.Future
- req *http.Request
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
-func (future DomainsCreateOrUpdateFuture) Result(client DomainsClient) (d Domain, err error) {
+func (future *DomainsCreateOrUpdateFuture) Result(client DomainsClient) (d Domain, err error) {
var done bool
done, err = future.Done(client)
if err != nil {
@@ -9130,34 +8505,15 @@ func (future DomainsCreateOrUpdateFuture) Result(client DomainsClient) (d Domain
return
}
if !done {
- return d, azure.NewAsyncOpIncompleteError("web.DomainsCreateOrUpdateFuture")
- }
- if future.PollingMethod() == azure.PollingLocation {
- d, err = client.CreateOrUpdateResponder(future.Response())
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.DomainsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
- }
+ err = azure.NewAsyncOpIncompleteError("web.DomainsCreateOrUpdateFuture")
return
}
- var req *http.Request
- var resp *http.Response
- if future.PollingURL() != "" {
- req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
if err != nil {
- return
+ err = autorest.NewErrorWithError(err, "web.DomainsCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
}
- } else {
- req = autorest.ChangeToGet(future.req)
- }
- resp, err = autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.DomainsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
- return
- }
- d, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "web.DomainsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
}
return
}
@@ -10055,7 +9411,7 @@ type HostNameBindingProperties struct {
CustomHostNameDNSRecordType CustomHostNameDNSRecordType `json:"customHostNameDnsRecordType,omitempty"`
// HostNameType - Hostname type. Possible values include: 'Verified', 'Managed'
HostNameType HostNameType `json:"hostNameType,omitempty"`
- // SslState - SSL type. Possible values include: 'Disabled', 'SniEnabled', 'IPBasedEnabled'
+ // SslState - SSL type. Possible values include: 'SslStateDisabled', 'SslStateSniEnabled', 'SslStateIPBasedEnabled'
SslState SslState `json:"sslState,omitempty"`
// Thumbprint - SSL certificate thumbprint
Thumbprint *string `json:"thumbprint,omitempty"`
@@ -10067,7 +9423,7 @@ type HostNameBindingProperties struct {
type HostNameSslState struct {
// Name - Hostname.
Name *string `json:"name,omitempty"`
- // SslState - SSL type. Possible values include: 'Disabled', 'SniEnabled', 'IPBasedEnabled'
+ // SslState - SSL type. Possible values include: 'SslStateDisabled', 'SslStateSniEnabled', 'SslStateIPBasedEnabled'
SslState SslState `json:"sslState,omitempty"`
// VirtualIP - Virtual IP address assigned to the hostname if IP based SSL is enabled.
VirtualIP *string `json:"virtualIP,omitempty"`
@@ -15675,6 +15031,8 @@ type SiteConfig struct {
HTTP20Enabled *bool `json:"http20Enabled,omitempty"`
// MinTLSVersion - MinTlsVersion: configures the minimum version of TLS required for SSL requests. Possible values include: 'OneFullStopZero', 'OneFullStopOne', 'OneFullStopTwo'
MinTLSVersion SupportedTLSVersions `json:"minTlsVersion,omitempty"`
+ // FtpsState - State of FTP / FTPS service. Possible values include: 'AllAllowed', 'FtpsOnly', 'Disabled'
+ FtpsState FtpsState `json:"ftpsState,omitempty"`
}
// SiteConfigResource web app configuration ARM resource.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/swagger_to_sdk_config.json b/vendor/github.com/Azure/azure-sdk-for-go/swagger_to_sdk_config.json
index e479949eb..aad62018a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/swagger_to_sdk_config.json
+++ b/vendor/github.com/Azure/azure-sdk-for-go/swagger_to_sdk_config.json
@@ -7,7 +7,7 @@
"gofmt -w ./services/"
],
"autorest_options": {
- "use": "@microsoft.azure/autorest.go@~2.1.98",
+ "use": "@microsoft.azure/autorest.go@~2.1.100",
"go": "",
"verbose": "",
"sdkrel:go-sdk-folder": ".",
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
index 0bf03ceee..710f029a7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
@@ -18,4 +18,4 @@ package version
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Number contains the semantic version of this SDK.
-const Number = "v16.2.1"
+const Number = "v17.3.0"
diff --git a/vendor/github.com/Azure/go-autorest/CHANGELOG.md b/vendor/github.com/Azure/go-autorest/CHANGELOG.md
index 21e16adc7..5998c5bb4 100644
--- a/vendor/github.com/Azure/go-autorest/CHANGELOG.md
+++ b/vendor/github.com/Azure/go-autorest/CHANGELOG.md
@@ -1,5 +1,68 @@
# CHANGELOG
+## v10.11.2
+
+### Bug Fixes
+
+- Validation for integers handles int and int64 types.
+
+## v10.11.1
+
+### Bug Fixes
+
+- Adding User information to authorization config as parsed from CLI cache.
+
+## v10.11.0
+
+### New Features
+
+- Added NewServicePrincipalTokenFromManualTokenSecret for creating a new SPT using a manual token and secret
+- Added method ServicePrincipalToken.MarshalTokenJSON() to marshall the inner Token
+
+## v10.10.0
+
+### New Features
+
+- Most ServicePrincipalTokens can now be marshalled/unmarshall to/from JSON (ServicePrincipalCertificateSecret and ServicePrincipalMSISecret are not supported).
+- Added method ServicePrincipalToken.SetRefreshCallbacks().
+
+## v10.9.2
+
+### Bug Fixes
+
+- Refreshing a refresh token obtained from a web app authorization code now works.
+
+## v10.9.1
+
+### Bug Fixes
+
+- The retry logic for MSI token requests now uses exponential backoff per the guidelines.
+- IsTemporaryNetworkError() will return true for errors that don't implement the net.Error interface.
+
+## v10.9.0
+
+### Deprecated Methods
+
+| Old Method | New Method |
+|-------------:|:-----------:|
+|azure.NewFuture() | azure.NewFutureFromResponse()|
+|Future.WaitForCompletion() | Future.WaitForCompletionRef()|
+
+### New Features
+
+- Added azure.NewFutureFromResponse() for creating a Future from the initial response from an async operation.
+- Added Future.GetResult() for making the final GET call to retrieve the result from an async operation.
+
+### Bug Fixes
+
+- Some futures failed to return their results, this should now be fixed.
+
+## v10.8.2
+
+### Bug Fixes
+
+- Add nil-gaurd to token retry logic.
+
## v10.8.1
### Bug Fixes
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/config.go b/vendor/github.com/Azure/go-autorest/autorest/adal/config.go
index f570d540a..bee5e61dd 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/config.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/config.go
@@ -26,10 +26,10 @@ const (
// OAuthConfig represents the endpoints needed
// in OAuth operations
type OAuthConfig struct {
- AuthorityEndpoint url.URL
- AuthorizeEndpoint url.URL
- TokenEndpoint url.URL
- DeviceCodeEndpoint url.URL
+ AuthorityEndpoint url.URL `json:"authorityEndpoint"`
+ AuthorizeEndpoint url.URL `json:"authorizeEndpoint"`
+ TokenEndpoint url.URL `json:"tokenEndpoint"`
+ DeviceCodeEndpoint url.URL `json:"deviceCodeEndpoint"`
}
// IsZero returns true if the OAuthConfig object is zero-initialized.
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
index 67c5a0b0b..50e43044d 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
@@ -22,8 +22,10 @@ import (
"crypto/x509"
"encoding/base64"
"encoding/json"
+ "errors"
"fmt"
"io/ioutil"
+ "math"
"net"
"net/http"
"net/url"
@@ -136,6 +138,12 @@ func (t *Token) OAuthToken() string {
return t.AccessToken
}
+// ServicePrincipalSecret is an interface that allows various secret mechanism to fill the form
+// that is submitted when acquiring an oAuth token.
+type ServicePrincipalSecret interface {
+ SetAuthenticationValues(spt *ServicePrincipalToken, values *url.Values) error
+}
+
// ServicePrincipalNoSecret represents a secret type that contains no secret
// meaning it is not valid for fetching a fresh token. This is used by Manual
type ServicePrincipalNoSecret struct {
@@ -147,15 +155,19 @@ func (noSecret *ServicePrincipalNoSecret) SetAuthenticationValues(spt *ServicePr
return fmt.Errorf("Manually created ServicePrincipalToken does not contain secret material to retrieve a new access token")
}
-// ServicePrincipalSecret is an interface that allows various secret mechanism to fill the form
-// that is submitted when acquiring an oAuth token.
-type ServicePrincipalSecret interface {
- SetAuthenticationValues(spt *ServicePrincipalToken, values *url.Values) error
+// MarshalJSON implements the json.Marshaler interface.
+func (noSecret ServicePrincipalNoSecret) MarshalJSON() ([]byte, error) {
+ type tokenType struct {
+ Type string `json:"type"`
+ }
+ return json.Marshal(tokenType{
+ Type: "ServicePrincipalNoSecret",
+ })
}
// ServicePrincipalTokenSecret implements ServicePrincipalSecret for client_secret type authorization.
type ServicePrincipalTokenSecret struct {
- ClientSecret string
+ ClientSecret string `json:"value"`
}
// SetAuthenticationValues is a method of the interface ServicePrincipalSecret.
@@ -165,49 +177,24 @@ func (tokenSecret *ServicePrincipalTokenSecret) SetAuthenticationValues(spt *Ser
return nil
}
+// MarshalJSON implements the json.Marshaler interface.
+func (tokenSecret ServicePrincipalTokenSecret) MarshalJSON() ([]byte, error) {
+ type tokenType struct {
+ Type string `json:"type"`
+ Value string `json:"value"`
+ }
+ return json.Marshal(tokenType{
+ Type: "ServicePrincipalTokenSecret",
+ Value: tokenSecret.ClientSecret,
+ })
+}
+
// ServicePrincipalCertificateSecret implements ServicePrincipalSecret for generic RSA cert auth with signed JWTs.
type ServicePrincipalCertificateSecret struct {
Certificate *x509.Certificate
PrivateKey *rsa.PrivateKey
}
-// ServicePrincipalMSISecret implements ServicePrincipalSecret for machines running the MSI Extension.
-type ServicePrincipalMSISecret struct {
-}
-
-// ServicePrincipalUsernamePasswordSecret implements ServicePrincipalSecret for username and password auth.
-type ServicePrincipalUsernamePasswordSecret struct {
- Username string
- Password string
-}
-
-// ServicePrincipalAuthorizationCodeSecret implements ServicePrincipalSecret for authorization code auth.
-type ServicePrincipalAuthorizationCodeSecret struct {
- ClientSecret string
- AuthorizationCode string
- RedirectURI string
-}
-
-// SetAuthenticationValues is a method of the interface ServicePrincipalSecret.
-func (secret *ServicePrincipalAuthorizationCodeSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error {
- v.Set("code", secret.AuthorizationCode)
- v.Set("client_secret", secret.ClientSecret)
- v.Set("redirect_uri", secret.RedirectURI)
- return nil
-}
-
-// SetAuthenticationValues is a method of the interface ServicePrincipalSecret.
-func (secret *ServicePrincipalUsernamePasswordSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error {
- v.Set("username", secret.Username)
- v.Set("password", secret.Password)
- return nil
-}
-
-// SetAuthenticationValues is a method of the interface ServicePrincipalSecret.
-func (msiSecret *ServicePrincipalMSISecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error {
- return nil
-}
-
// SignJwt returns the JWT signed with the certificate's private key.
func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalToken) (string, error) {
hasher := sha1.New()
@@ -228,9 +215,9 @@ func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalTo
token := jwt.New(jwt.SigningMethodRS256)
token.Header["x5t"] = thumbprint
token.Claims = jwt.MapClaims{
- "aud": spt.oauthConfig.TokenEndpoint.String(),
- "iss": spt.clientID,
- "sub": spt.clientID,
+ "aud": spt.inner.OauthConfig.TokenEndpoint.String(),
+ "iss": spt.inner.ClientID,
+ "sub": spt.inner.ClientID,
"jti": base64.URLEncoding.EncodeToString(jti),
"nbf": time.Now().Unix(),
"exp": time.Now().Add(time.Hour * 24).Unix(),
@@ -253,21 +240,151 @@ func (secret *ServicePrincipalCertificateSecret) SetAuthenticationValues(spt *Se
return nil
}
+// MarshalJSON implements the json.Marshaler interface.
+func (secret ServicePrincipalCertificateSecret) MarshalJSON() ([]byte, error) {
+ return nil, errors.New("marshalling ServicePrincipalCertificateSecret is not supported")
+}
+
+// ServicePrincipalMSISecret implements ServicePrincipalSecret for machines running the MSI Extension.
+type ServicePrincipalMSISecret struct {
+}
+
+// SetAuthenticationValues is a method of the interface ServicePrincipalSecret.
+func (msiSecret *ServicePrincipalMSISecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error {
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaler interface.
+func (msiSecret ServicePrincipalMSISecret) MarshalJSON() ([]byte, error) {
+ return nil, errors.New("marshalling ServicePrincipalMSISecret is not supported")
+}
+
+// ServicePrincipalUsernamePasswordSecret implements ServicePrincipalSecret for username and password auth.
+type ServicePrincipalUsernamePasswordSecret struct {
+ Username string `json:"username"`
+ Password string `json:"password"`
+}
+
+// SetAuthenticationValues is a method of the interface ServicePrincipalSecret.
+func (secret *ServicePrincipalUsernamePasswordSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error {
+ v.Set("username", secret.Username)
+ v.Set("password", secret.Password)
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaler interface.
+func (secret ServicePrincipalUsernamePasswordSecret) MarshalJSON() ([]byte, error) {
+ type tokenType struct {
+ Type string `json:"type"`
+ Username string `json:"username"`
+ Password string `json:"password"`
+ }
+ return json.Marshal(tokenType{
+ Type: "ServicePrincipalUsernamePasswordSecret",
+ Username: secret.Username,
+ Password: secret.Password,
+ })
+}
+
+// ServicePrincipalAuthorizationCodeSecret implements ServicePrincipalSecret for authorization code auth.
+type ServicePrincipalAuthorizationCodeSecret struct {
+ ClientSecret string `json:"value"`
+ AuthorizationCode string `json:"authCode"`
+ RedirectURI string `json:"redirect"`
+}
+
+// SetAuthenticationValues is a method of the interface ServicePrincipalSecret.
+func (secret *ServicePrincipalAuthorizationCodeSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error {
+ v.Set("code", secret.AuthorizationCode)
+ v.Set("client_secret", secret.ClientSecret)
+ v.Set("redirect_uri", secret.RedirectURI)
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaler interface.
+func (secret ServicePrincipalAuthorizationCodeSecret) MarshalJSON() ([]byte, error) {
+ type tokenType struct {
+ Type string `json:"type"`
+ Value string `json:"value"`
+ AuthCode string `json:"authCode"`
+ Redirect string `json:"redirect"`
+ }
+ return json.Marshal(tokenType{
+ Type: "ServicePrincipalAuthorizationCodeSecret",
+ Value: secret.ClientSecret,
+ AuthCode: secret.AuthorizationCode,
+ Redirect: secret.RedirectURI,
+ })
+}
+
// ServicePrincipalToken encapsulates a Token created for a Service Principal.
type ServicePrincipalToken struct {
- token Token
- secret ServicePrincipalSecret
- oauthConfig OAuthConfig
- clientID string
- resource string
- autoRefresh bool
- refreshLock *sync.RWMutex
- refreshWithin time.Duration
- sender Sender
-
+ inner servicePrincipalToken
+ refreshLock *sync.RWMutex
+ sender Sender
refreshCallbacks []TokenRefreshCallback
}
+// MarshalTokenJSON returns the marshalled inner token.
+func (spt ServicePrincipalToken) MarshalTokenJSON() ([]byte, error) {
+ return json.Marshal(spt.inner.Token)
+}
+
+// SetRefreshCallbacks replaces any existing refresh callbacks with the specified callbacks.
+func (spt *ServicePrincipalToken) SetRefreshCallbacks(callbacks []TokenRefreshCallback) {
+ spt.refreshCallbacks = callbacks
+}
+
+// MarshalJSON implements the json.Marshaler interface.
+func (spt ServicePrincipalToken) MarshalJSON() ([]byte, error) {
+ return json.Marshal(spt.inner)
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface.
+func (spt *ServicePrincipalToken) UnmarshalJSON(data []byte) error {
+ // need to determine the token type
+ raw := map[string]interface{}{}
+ err := json.Unmarshal(data, &raw)
+ if err != nil {
+ return err
+ }
+ secret := raw["secret"].(map[string]interface{})
+ switch secret["type"] {
+ case "ServicePrincipalNoSecret":
+ spt.inner.Secret = &ServicePrincipalNoSecret{}
+ case "ServicePrincipalTokenSecret":
+ spt.inner.Secret = &ServicePrincipalTokenSecret{}
+ case "ServicePrincipalCertificateSecret":
+ return errors.New("unmarshalling ServicePrincipalCertificateSecret is not supported")
+ case "ServicePrincipalMSISecret":
+ return errors.New("unmarshalling ServicePrincipalMSISecret is not supported")
+ case "ServicePrincipalUsernamePasswordSecret":
+ spt.inner.Secret = &ServicePrincipalUsernamePasswordSecret{}
+ case "ServicePrincipalAuthorizationCodeSecret":
+ spt.inner.Secret = &ServicePrincipalAuthorizationCodeSecret{}
+ default:
+ return fmt.Errorf("unrecognized token type '%s'", secret["type"])
+ }
+ err = json.Unmarshal(data, &spt.inner)
+ if err != nil {
+ return err
+ }
+ spt.refreshLock = &sync.RWMutex{}
+ spt.sender = &http.Client{}
+ return nil
+}
+
+// internal type used for marshalling/unmarshalling
+type servicePrincipalToken struct {
+ Token Token `json:"token"`
+ Secret ServicePrincipalSecret `json:"secret"`
+ OauthConfig OAuthConfig `json:"oauth"`
+ ClientID string `json:"clientID"`
+ Resource string `json:"resource"`
+ AutoRefresh bool `json:"autoRefresh"`
+ RefreshWithin time.Duration `json:"refreshWithin"`
+}
+
func validateOAuthConfig(oac OAuthConfig) error {
if oac.IsZero() {
return fmt.Errorf("parameter 'oauthConfig' cannot be zero-initialized")
@@ -290,13 +407,15 @@ func NewServicePrincipalTokenWithSecret(oauthConfig OAuthConfig, id string, reso
return nil, fmt.Errorf("parameter 'secret' cannot be nil")
}
spt := &ServicePrincipalToken{
- oauthConfig: oauthConfig,
- secret: secret,
- clientID: id,
- resource: resource,
- autoRefresh: true,
+ inner: servicePrincipalToken{
+ OauthConfig: oauthConfig,
+ Secret: secret,
+ ClientID: id,
+ Resource: resource,
+ AutoRefresh: true,
+ RefreshWithin: defaultRefresh,
+ },
refreshLock: &sync.RWMutex{},
- refreshWithin: defaultRefresh,
sender: &http.Client{},
refreshCallbacks: callbacks,
}
@@ -327,7 +446,39 @@ func NewServicePrincipalTokenFromManualToken(oauthConfig OAuthConfig, clientID s
return nil, err
}
- spt.token = token
+ spt.inner.Token = token
+
+ return spt, nil
+}
+
+// NewServicePrincipalTokenFromManualTokenSecret creates a ServicePrincipalToken using the supplied token and secret
+func NewServicePrincipalTokenFromManualTokenSecret(oauthConfig OAuthConfig, clientID string, resource string, token Token, secret ServicePrincipalSecret, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
+ if err := validateOAuthConfig(oauthConfig); err != nil {
+ return nil, err
+ }
+ if err := validateStringParam(clientID, "clientID"); err != nil {
+ return nil, err
+ }
+ if err := validateStringParam(resource, "resource"); err != nil {
+ return nil, err
+ }
+ if secret == nil {
+ return nil, fmt.Errorf("parameter 'secret' cannot be nil")
+ }
+ if token.IsZero() {
+ return nil, fmt.Errorf("parameter 'token' cannot be zero-initialized")
+ }
+ spt, err := NewServicePrincipalTokenWithSecret(
+ oauthConfig,
+ clientID,
+ resource,
+ secret,
+ callbacks...)
+ if err != nil {
+ return nil, err
+ }
+
+ spt.inner.Token = token
return spt, nil
}
@@ -495,20 +646,22 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI
msiEndpointURL.RawQuery = v.Encode()
spt := &ServicePrincipalToken{
- oauthConfig: OAuthConfig{
- TokenEndpoint: *msiEndpointURL,
+ inner: servicePrincipalToken{
+ OauthConfig: OAuthConfig{
+ TokenEndpoint: *msiEndpointURL,
+ },
+ Secret: &ServicePrincipalMSISecret{},
+ Resource: resource,
+ AutoRefresh: true,
+ RefreshWithin: defaultRefresh,
},
- secret: &ServicePrincipalMSISecret{},
- resource: resource,
- autoRefresh: true,
refreshLock: &sync.RWMutex{},
- refreshWithin: defaultRefresh,
sender: &http.Client{},
refreshCallbacks: callbacks,
}
if userAssignedID != nil {
- spt.clientID = *userAssignedID
+ spt.inner.ClientID = *userAssignedID
}
return spt, nil
@@ -543,12 +696,12 @@ func (spt *ServicePrincipalToken) EnsureFresh() error {
// EnsureFreshWithContext will refresh the token if it will expire within the refresh window (as set by
// RefreshWithin) and autoRefresh flag is on. This method is safe for concurrent use.
func (spt *ServicePrincipalToken) EnsureFreshWithContext(ctx context.Context) error {
- if spt.autoRefresh && spt.token.WillExpireIn(spt.refreshWithin) {
+ if spt.inner.AutoRefresh && spt.inner.Token.WillExpireIn(spt.inner.RefreshWithin) {
// take the write lock then check to see if the token was already refreshed
spt.refreshLock.Lock()
defer spt.refreshLock.Unlock()
- if spt.token.WillExpireIn(spt.refreshWithin) {
- return spt.refreshInternal(ctx, spt.resource)
+ if spt.inner.Token.WillExpireIn(spt.inner.RefreshWithin) {
+ return spt.refreshInternal(ctx, spt.inner.Resource)
}
}
return nil
@@ -558,7 +711,7 @@ func (spt *ServicePrincipalToken) EnsureFreshWithContext(ctx context.Context) er
func (spt *ServicePrincipalToken) InvokeRefreshCallbacks(token Token) error {
if spt.refreshCallbacks != nil {
for _, callback := range spt.refreshCallbacks {
- err := callback(spt.token)
+ err := callback(spt.inner.Token)
if err != nil {
return fmt.Errorf("adal: TokenRefreshCallback handler failed. Error = '%v'", err)
}
@@ -578,7 +731,7 @@ func (spt *ServicePrincipalToken) Refresh() error {
func (spt *ServicePrincipalToken) RefreshWithContext(ctx context.Context) error {
spt.refreshLock.Lock()
defer spt.refreshLock.Unlock()
- return spt.refreshInternal(ctx, spt.resource)
+ return spt.refreshInternal(ctx, spt.inner.Resource)
}
// RefreshExchange refreshes the token, but for a different resource.
@@ -596,7 +749,7 @@ func (spt *ServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context
}
func (spt *ServicePrincipalToken) getGrantType() string {
- switch spt.secret.(type) {
+ switch spt.inner.Secret.(type) {
case *ServicePrincipalUsernamePasswordSecret:
return OAuthGrantTypeUserPass
case *ServicePrincipalAuthorizationCodeSecret:
@@ -615,22 +768,30 @@ func isIMDS(u url.URL) bool {
}
func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource string) error {
- req, err := http.NewRequest(http.MethodPost, spt.oauthConfig.TokenEndpoint.String(), nil)
+ req, err := http.NewRequest(http.MethodPost, spt.inner.OauthConfig.TokenEndpoint.String(), nil)
if err != nil {
return fmt.Errorf("adal: Failed to build the refresh request. Error = '%v'", err)
}
req = req.WithContext(ctx)
- if !isIMDS(spt.oauthConfig.TokenEndpoint) {
+ if !isIMDS(spt.inner.OauthConfig.TokenEndpoint) {
v := url.Values{}
- v.Set("client_id", spt.clientID)
+ v.Set("client_id", spt.inner.ClientID)
v.Set("resource", resource)
- if spt.token.RefreshToken != "" {
+ if spt.inner.Token.RefreshToken != "" {
v.Set("grant_type", OAuthGrantTypeRefreshToken)
- v.Set("refresh_token", spt.token.RefreshToken)
+ v.Set("refresh_token", spt.inner.Token.RefreshToken)
+ // web apps must specify client_secret when refreshing tokens
+ // see https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-protocols-oauth-code#refreshing-the-access-tokens
+ if spt.getGrantType() == OAuthGrantTypeAuthorizationCode {
+ err := spt.inner.Secret.SetAuthenticationValues(spt, &v)
+ if err != nil {
+ return err
+ }
+ }
} else {
v.Set("grant_type", spt.getGrantType())
- err := spt.secret.SetAuthenticationValues(spt, &v)
+ err := spt.inner.Secret.SetAuthenticationValues(spt, &v)
if err != nil {
return err
}
@@ -643,13 +804,13 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource
req.Body = body
}
- if _, ok := spt.secret.(*ServicePrincipalMSISecret); ok {
+ if _, ok := spt.inner.Secret.(*ServicePrincipalMSISecret); ok {
req.Method = http.MethodGet
req.Header.Set(metadataHeader, "true")
}
var resp *http.Response
- if isIMDS(spt.oauthConfig.TokenEndpoint) {
+ if isIMDS(spt.inner.OauthConfig.TokenEndpoint) {
resp, err = retry(spt.sender, req)
} else {
resp, err = spt.sender.Do(req)
@@ -684,12 +845,13 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource
return fmt.Errorf("adal: Failed to unmarshal the service principal token during refresh. Error = '%v' JSON = '%s'", err, string(rb))
}
- spt.token = token
+ spt.inner.Token = token
return spt.InvokeRefreshCallbacks(token)
}
func retry(sender Sender, req *http.Request) (resp *http.Response, err error) {
+ // copied from client.go due to circular dependency
retries := []int{
http.StatusRequestTimeout, // 408
http.StatusTooManyRequests, // 429
@@ -698,8 +860,10 @@ func retry(sender Sender, req *http.Request) (resp *http.Response, err error) {
http.StatusServiceUnavailable, // 503
http.StatusGatewayTimeout, // 504
}
- // Extra retry status codes requered
- retries = append(retries, http.StatusNotFound,
+ // extra retry status codes specific to IMDS
+ retries = append(retries,
+ http.StatusNotFound,
+ http.StatusGone,
// all remaining 5xx
http.StatusNotImplemented,
http.StatusHTTPVersionNotSupported,
@@ -709,8 +873,13 @@ func retry(sender Sender, req *http.Request) (resp *http.Response, err error) {
http.StatusNotExtended,
http.StatusNetworkAuthenticationRequired)
+ // see https://docs.microsoft.com/en-us/azure/active-directory/managed-service-identity/how-to-use-vm-token#retry-guidance
+
+ const maxAttempts int = 5
+ const maxDelay time.Duration = 60 * time.Second
+
attempt := 0
- maxAttempts := 5
+ delay := time.Duration(0)
for attempt < maxAttempts {
resp, err = sender.Do(req)
@@ -719,26 +888,36 @@ func retry(sender Sender, req *http.Request) (resp *http.Response, err error) {
return
}
- if !delay(resp, req.Context().Done()) {
- select {
- case <-time.After(time.Second):
- attempt++
- case <-req.Context().Done():
- err = req.Context().Err()
- return
- }
+ // perform exponential backoff with a cap.
+ // must increment attempt before calculating delay.
+ attempt++
+ // the base value of 2 is the "delta backoff" as specified in the guidance doc
+ delay += (time.Duration(math.Pow(2, float64(attempt))) * time.Second)
+ if delay > maxDelay {
+ delay = maxDelay
+ }
+
+ select {
+ case <-time.After(delay):
+ // intentionally left blank
+ case <-req.Context().Done():
+ err = req.Context().Err()
+ return
}
}
return
}
+// returns true if the specified error is a temporary network error or false if it's not.
+// if the error doesn't implement the net.Error interface the return value is true.
func isTemporaryNetworkError(err error) bool {
- if netErr, ok := err.(net.Error); ok && netErr.Temporary() {
+ if netErr, ok := err.(net.Error); !ok || (ok && netErr.Temporary()) {
return true
}
return false
}
+// returns true if slice ints contains the value n
func containsInt(ints []int, n int) bool {
for _, i := range ints {
if i == n {
@@ -748,31 +927,15 @@ func containsInt(ints []int, n int) bool {
return false
}
-func delay(resp *http.Response, cancel <-chan struct{}) bool {
- if resp == nil {
- return false
- }
- retryAfter, _ := strconv.Atoi(resp.Header.Get("Retry-After"))
- if resp.StatusCode == http.StatusTooManyRequests && retryAfter > 0 {
- select {
- case <-time.After(time.Duration(retryAfter) * time.Second):
- return true
- case <-cancel:
- return false
- }
- }
- return false
-}
-
// SetAutoRefresh enables or disables automatic refreshing of stale tokens.
func (spt *ServicePrincipalToken) SetAutoRefresh(autoRefresh bool) {
- spt.autoRefresh = autoRefresh
+ spt.inner.AutoRefresh = autoRefresh
}
// SetRefreshWithin sets the interval within which if the token will expire, EnsureFresh will
// refresh the token.
func (spt *ServicePrincipalToken) SetRefreshWithin(d time.Duration) {
- spt.refreshWithin = d
+ spt.inner.RefreshWithin = d
return
}
@@ -784,12 +947,12 @@ func (spt *ServicePrincipalToken) SetSender(s Sender) { spt.sender = s }
func (spt *ServicePrincipalToken) OAuthToken() string {
spt.refreshLock.RLock()
defer spt.refreshLock.RUnlock()
- return spt.token.OAuthToken()
+ return spt.inner.Token.OAuthToken()
}
// Token returns a copy of the current token.
func (spt *ServicePrincipalToken) Token() Token {
spt.refreshLock.RLock()
defer spt.refreshLock.RUnlock()
- return spt.token
+ return spt.inner.Token
}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token_test.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token_test.go
index 6f15ed784..5a2ab8c02 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/token_test.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token_test.go
@@ -20,6 +20,7 @@ import (
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
+ "encoding/json"
"fmt"
"io/ioutil"
"math/big"
@@ -87,12 +88,12 @@ func TestTokenWillExpireIn(t *testing.T) {
func TestServicePrincipalTokenSetAutoRefresh(t *testing.T) {
spt := newServicePrincipalToken()
- if !spt.autoRefresh {
+ if !spt.inner.AutoRefresh {
t.Fatal("adal: ServicePrincipalToken did not default to automatic token refreshing")
}
spt.SetAutoRefresh(false)
- if spt.autoRefresh {
+ if spt.inner.AutoRefresh {
t.Fatal("adal: ServicePrincipalToken#SetAutoRefresh did not disable automatic token refreshing")
}
}
@@ -100,12 +101,12 @@ func TestServicePrincipalTokenSetAutoRefresh(t *testing.T) {
func TestServicePrincipalTokenSetRefreshWithin(t *testing.T) {
spt := newServicePrincipalToken()
- if spt.refreshWithin != defaultRefresh {
+ if spt.inner.RefreshWithin != defaultRefresh {
t.Fatal("adal: ServicePrincipalToken did not correctly set the default refresh interval")
}
spt.SetRefreshWithin(2 * defaultRefresh)
- if spt.refreshWithin != 2*defaultRefresh {
+ if spt.inner.RefreshWithin != 2*defaultRefresh {
t.Fatal("adal: ServicePrincipalToken#SetRefreshWithin did not set the refresh interval")
}
}
@@ -354,6 +355,19 @@ func TestServicePrincipalTokenAuthorizationCodeRefreshSetsBody(t *testing.T) {
t.Fatalf("adal: ServicePrincipalTokenAuthorizationCode#Refresh did not correctly set the HTTP Request Body.")
}
})
+ testServicePrincipalTokenRefreshSetsBody(t, spt, func(t *testing.T, b []byte) {
+ body := string(b)
+
+ values, _ := url.ParseQuery(body)
+ if values["client_id"][0] != "id" ||
+ values["grant_type"][0] != OAuthGrantTypeRefreshToken ||
+ values["code"][0] != "code" ||
+ values["client_secret"][0] != "clientSecret" ||
+ values["redirect_uri"][0] != "http://redirectUri/getToken" ||
+ values["resource"][0] != "resource" {
+ t.Fatalf("adal: ServicePrincipalTokenAuthorizationCode#Refresh did not correctly set the HTTP Request Body.")
+ }
+ })
}
func TestServicePrincipalTokenSecretRefreshSetsBody(t *testing.T) {
@@ -479,12 +493,12 @@ func TestServicePrincipalTokenRefreshUnmarshals(t *testing.T) {
err := spt.Refresh()
if err != nil {
t.Fatalf("adal: ServicePrincipalToken#Refresh returned an unexpected error (%v)", err)
- } else if spt.token.AccessToken != "accessToken" ||
- spt.token.ExpiresIn != "3600" ||
- spt.token.ExpiresOn != expiresOn ||
- spt.token.NotBefore != expiresOn ||
- spt.token.Resource != "resource" ||
- spt.token.Type != "Bearer" {
+ } else if spt.inner.Token.AccessToken != "accessToken" ||
+ spt.inner.Token.ExpiresIn != "3600" ||
+ spt.inner.Token.ExpiresOn != expiresOn ||
+ spt.inner.Token.NotBefore != expiresOn ||
+ spt.inner.Token.Resource != "resource" ||
+ spt.inner.Token.Type != "Bearer" {
t.Fatalf("adal: ServicePrincipalToken#Refresh failed correctly unmarshal the JSON -- expected %v, received %v",
j, *spt)
}
@@ -492,7 +506,7 @@ func TestServicePrincipalTokenRefreshUnmarshals(t *testing.T) {
func TestServicePrincipalTokenEnsureFreshRefreshes(t *testing.T) {
spt := newServicePrincipalToken()
- expireToken(&spt.token)
+ expireToken(&spt.inner.Token)
body := mocks.NewBody(newTokenJSON("test", "test"))
resp := mocks.NewResponseWithBodyAndStatus(body, http.StatusOK, "OK")
@@ -520,7 +534,7 @@ func TestServicePrincipalTokenEnsureFreshRefreshes(t *testing.T) {
func TestServicePrincipalTokenEnsureFreshFails(t *testing.T) {
spt := newServicePrincipalToken()
- expireToken(&spt.token)
+ expireToken(&spt.inner.Token)
c := mocks.NewSender()
c.SetError(fmt.Errorf("some failure"))
@@ -537,7 +551,7 @@ func TestServicePrincipalTokenEnsureFreshFails(t *testing.T) {
func TestServicePrincipalTokenEnsureFreshSkipsIfFresh(t *testing.T) {
spt := newServicePrincipalToken()
- setTokenToExpireIn(&spt.token, 1000*time.Second)
+ setTokenToExpireIn(&spt.inner.Token, 1000*time.Second)
f := false
c := mocks.NewSender()
@@ -604,7 +618,7 @@ func TestRefreshCallbackErrorPropagates(t *testing.T) {
// This demonstrates the danger of manual token without a refresh token
func TestServicePrincipalTokenManualRefreshFailsWithoutRefresh(t *testing.T) {
spt := newServicePrincipalTokenManual()
- spt.token.RefreshToken = ""
+ spt.inner.Token.RefreshToken = ""
err := spt.Refresh()
if err == nil {
t.Fatalf("adal: ServicePrincipalToken#Refresh should have failed with a ManualTokenSecret without a refresh token")
@@ -621,11 +635,11 @@ func TestNewServicePrincipalTokenFromMSI(t *testing.T) {
}
// check some of the SPT fields
- if _, ok := spt.secret.(*ServicePrincipalMSISecret); !ok {
+ if _, ok := spt.inner.Secret.(*ServicePrincipalMSISecret); !ok {
t.Fatal("SPT secret was not of MSI type")
}
- if spt.resource != resource {
+ if spt.inner.Resource != resource {
t.Fatal("SPT came back with incorrect resource")
}
@@ -645,11 +659,11 @@ func TestNewServicePrincipalTokenFromMSIWithUserAssignedID(t *testing.T) {
}
// check some of the SPT fields
- if _, ok := spt.secret.(*ServicePrincipalMSISecret); !ok {
+ if _, ok := spt.inner.Secret.(*ServicePrincipalMSISecret); !ok {
t.Fatal("SPT secret was not of MSI type")
}
- if spt.resource != resource {
+ if spt.inner.Resource != resource {
t.Fatal("SPT came back with incorrect resource")
}
@@ -657,11 +671,34 @@ func TestNewServicePrincipalTokenFromMSIWithUserAssignedID(t *testing.T) {
t.Fatal("SPT had incorrect refresh callbacks.")
}
- if spt.clientID != userID {
+ if spt.inner.ClientID != userID {
t.Fatal("SPT had incorrect client ID")
}
}
+func TestNewServicePrincipalTokenFromManualTokenSecret(t *testing.T) {
+ token := newToken()
+ secret := &ServicePrincipalAuthorizationCodeSecret{
+ ClientSecret: "clientSecret",
+ AuthorizationCode: "code123",
+ RedirectURI: "redirect",
+ }
+
+ spt, err := NewServicePrincipalTokenFromManualTokenSecret(TestOAuthConfig, "id", "resource", *token, secret, nil)
+ if err != nil {
+ t.Fatalf("Failed creating new SPT: %s", err)
+ }
+
+ if !reflect.DeepEqual(*token, spt.inner.Token) {
+ t.Fatalf("Tokens do not match: %s, %s", *token, spt.inner.Token)
+ }
+
+ if !reflect.DeepEqual(secret, spt.inner.Secret) {
+ t.Fatalf("Secrets do not match: %s, %s", secret, spt.inner.Secret)
+ }
+
+}
+
func TestGetVMEndpoint(t *testing.T) {
endpoint, err := GetMSIVMEndpoint()
if err != nil {
@@ -673,6 +710,129 @@ func TestGetVMEndpoint(t *testing.T) {
}
}
+func TestMarshalServicePrincipalNoSecret(t *testing.T) {
+ spt := newServicePrincipalTokenManual()
+ b, err := json.Marshal(spt)
+ if err != nil {
+ t.Fatalf("failed to marshal token: %+v", err)
+ }
+ var spt2 *ServicePrincipalToken
+ err = json.Unmarshal(b, &spt2)
+ if err != nil {
+ t.Fatalf("failed to unmarshal token: %+v", err)
+ }
+ if !reflect.DeepEqual(spt, spt2) {
+ t.Fatal("tokens don't match")
+ }
+}
+
+func TestMarshalServicePrincipalTokenSecret(t *testing.T) {
+ spt := newServicePrincipalToken()
+ b, err := json.Marshal(spt)
+ if err != nil {
+ t.Fatalf("failed to marshal token: %+v", err)
+ }
+ var spt2 *ServicePrincipalToken
+ err = json.Unmarshal(b, &spt2)
+ if err != nil {
+ t.Fatalf("failed to unmarshal token: %+v", err)
+ }
+ if !reflect.DeepEqual(spt, spt2) {
+ t.Fatal("tokens don't match")
+ }
+}
+
+func TestMarshalServicePrincipalCertificateSecret(t *testing.T) {
+ spt := newServicePrincipalTokenCertificate(t)
+ b, err := json.Marshal(spt)
+ if err == nil {
+ t.Fatal("expected error when marshalling certificate token")
+ }
+ var spt2 *ServicePrincipalToken
+ err = json.Unmarshal(b, &spt2)
+ if err == nil {
+ t.Fatal("expected error when unmarshalling certificate token")
+ }
+}
+
+func TestMarshalServicePrincipalMSISecret(t *testing.T) {
+ spt, err := newServicePrincipalTokenFromMSI("http://msiendpoint/", "https://resource", nil)
+ if err != nil {
+ t.Fatalf("failed to get MSI SPT: %+v", err)
+ }
+ b, err := json.Marshal(spt)
+ if err == nil {
+ t.Fatal("expected error when marshalling MSI token")
+ }
+ var spt2 *ServicePrincipalToken
+ err = json.Unmarshal(b, &spt2)
+ if err == nil {
+ t.Fatal("expected error when unmarshalling MSI token")
+ }
+}
+
+func TestMarshalServicePrincipalUsernamePasswordSecret(t *testing.T) {
+ spt := newServicePrincipalTokenUsernamePassword(t)
+ b, err := json.Marshal(spt)
+ if err != nil {
+ t.Fatalf("failed to marshal token: %+v", err)
+ }
+ var spt2 *ServicePrincipalToken
+ err = json.Unmarshal(b, &spt2)
+ if err != nil {
+ t.Fatalf("failed to unmarshal token: %+v", err)
+ }
+ if !reflect.DeepEqual(spt, spt2) {
+ t.Fatal("tokens don't match")
+ }
+}
+
+func TestMarshalServicePrincipalAuthorizationCodeSecret(t *testing.T) {
+ spt := newServicePrincipalTokenAuthorizationCode(t)
+ b, err := json.Marshal(spt)
+ if err != nil {
+ t.Fatalf("failed to marshal token: %+v", err)
+ }
+ var spt2 *ServicePrincipalToken
+ err = json.Unmarshal(b, &spt2)
+ if err != nil {
+ t.Fatalf("failed to unmarshal token: %+v", err)
+ }
+ if !reflect.DeepEqual(spt, spt2) {
+ t.Fatal("tokens don't match")
+ }
+}
+
+func TestMarshalInnerToken(t *testing.T) {
+ spt := newServicePrincipalTokenManual()
+ tokenJSON, err := spt.MarshalTokenJSON()
+ if err != nil {
+ t.Fatalf("failed to marshal token: %+v", err)
+ }
+
+ testToken := newToken()
+ testToken.RefreshToken = "refreshtoken"
+
+ testTokenJSON, err := json.Marshal(testToken)
+ if err != nil {
+ t.Fatalf("failed to marshal test token: %+v", err)
+ }
+
+ if !reflect.DeepEqual(tokenJSON, testTokenJSON) {
+ t.Fatalf("tokens don't match: %s, %s", tokenJSON, testTokenJSON)
+ }
+
+ var t1 *Token
+ err = json.Unmarshal(tokenJSON, &t1)
+ if err != nil {
+ t.Fatalf("failed to unmarshal token: %+v", err)
+ }
+
+ if !reflect.DeepEqual(t1, testToken) {
+ t.Fatalf("tokens don't match: %s, %s", t1, testToken)
+ }
+}
+
func newToken() *Token {
return &Token{
AccessToken: "ASECRETVALUE",
@@ -688,7 +848,8 @@ func newTokenJSON(expiresOn string, resource string) string {
"expires_on" : "%s",
"not_before" : "%s",
"resource" : "%s",
- "token_type" : "Bearer"
+ "token_type" : "Bearer",
+ "refresh_token": "ABC123"
}`,
expiresOn, expiresOn, resource)
}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go
index a58e5ef3f..290752708 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go
@@ -21,11 +21,11 @@ import (
"fmt"
"io/ioutil"
"net/http"
+ "net/url"
"strings"
"time"
"github.com/Azure/go-autorest/autorest"
- "github.com/Azure/go-autorest/autorest/date"
)
const (
@@ -44,84 +44,85 @@ var pollingCodes = [...]int{http.StatusNoContent, http.StatusAccepted, http.Stat
// Future provides a mechanism to access the status and results of an asynchronous request.
// Since futures are stateful they should be passed by value to avoid race conditions.
type Future struct {
- req *http.Request
- resp *http.Response
- ps pollingState
+ req *http.Request // legacy
+ pt pollingTracker
}
// NewFuture returns a new Future object initialized with the specified request.
+// Deprecated: Please use NewFutureFromResponse instead.
func NewFuture(req *http.Request) Future {
return Future{req: req}
}
-// Response returns the last HTTP response or nil if there isn't one.
+// NewFutureFromResponse returns a new Future object initialized
+// with the initial response from an asynchronous operation.
+func NewFutureFromResponse(resp *http.Response) (Future, error) {
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ return Future{}, err
+ }
+ return Future{pt: pt}, nil
+}
+
+// Response returns the last HTTP response.
func (f Future) Response() *http.Response {
- return f.resp
+ if f.pt == nil {
+ return nil
+ }
+ return f.pt.latestResponse()
}
// Status returns the last status message of the operation.
func (f Future) Status() string {
- if f.ps.State == "" {
- return "Unknown"
+ if f.pt == nil {
+ return ""
}
- return f.ps.State
+ return f.pt.pollingStatus()
}
// PollingMethod returns the method used to monitor the status of the asynchronous operation.
func (f Future) PollingMethod() PollingMethodType {
- return f.ps.PollingMethod
+ if f.pt == nil {
+ return PollingUnknown
+ }
+ return f.pt.pollingMethod()
}
// Done queries the service to see if the operation has completed.
func (f *Future) Done(sender autorest.Sender) (bool, error) {
- // exit early if this future has terminated
- if f.ps.hasTerminated() {
- return true, f.errorInfo()
+ // support for legacy Future implementation
+ if f.req != nil {
+ resp, err := sender.Do(f.req)
+ if err != nil {
+ return false, err
+ }
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ return false, err
+ }
+ f.pt = pt
+ f.req = nil
}
- resp, err := sender.Do(f.req)
- f.resp = resp
- if err != nil {
+ // end legacy
+ if f.pt == nil {
+ return false, autorest.NewError("Future", "Done", "future is not initialized")
+ }
+ if f.pt.hasTerminated() {
+ return true, f.pt.pollingError()
+ }
+ if err := f.pt.pollForStatus(sender); err != nil {
return false, err
}
-
- if !autorest.ResponseHasStatusCode(resp, pollingCodes[:]...) {
- // check response body for error content
- if resp.Body != nil {
- type respErr struct {
- ServiceError ServiceError `json:"error"`
- }
- re := respErr{}
-
- defer resp.Body.Close()
- b, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- return false, err
- }
- err = json.Unmarshal(b, &re)
- if err != nil {
- return false, err
- }
- return false, re.ServiceError
- }
-
- // try to return something meaningful
- return false, ServiceError{
- Code: fmt.Sprintf("%v", resp.StatusCode),
- Message: resp.Status,
- }
+ if err := f.pt.checkForErrors(); err != nil {
+ return f.pt.hasTerminated(), err
}
-
- err = updatePollingState(resp, &f.ps)
- if err != nil {
+ if err := f.pt.updatePollingState(f.pt.provisioningStateApplicable()); err != nil {
return false, err
}
-
- if f.ps.hasTerminated() {
- return true, f.errorInfo()
+ if err := f.pt.updateHeaders(); err != nil {
+ return false, err
}
-
- f.req, err = newPollingRequest(f.ps)
- return false, err
+ return f.pt.hasTerminated(), f.pt.pollingError()
}
// GetPollingDelay returns a duration the application should wait before checking
@@ -129,11 +130,15 @@ func (f *Future) Done(sender autorest.Sender) (bool, error) {
// the service via the Retry-After response header. If the header wasn't returned
// then the function returns the zero-value time.Duration and false.
func (f Future) GetPollingDelay() (time.Duration, bool) {
- if f.resp == nil {
+ if f.pt == nil {
+ return 0, false
+ }
+ resp := f.pt.latestResponse()
+ if resp == nil {
return 0, false
}
- retry := f.resp.Header.Get(autorest.HeaderRetryAfter)
+ retry := resp.Header.Get(autorest.HeaderRetryAfter)
if retry == "" {
return 0, false
}
@@ -150,14 +155,22 @@ func (f Future) GetPollingDelay() (time.Duration, bool) {
// running operation has completed, the provided context is cancelled, or the client's
// polling duration has been exceeded. It will retry failed polling attempts based on
// the retry value defined in the client up to the maximum retry attempts.
+// Deprecated: Please use WaitForCompletionRef() instead.
func (f Future) WaitForCompletion(ctx context.Context, client autorest.Client) error {
+ return f.WaitForCompletionRef(ctx, client)
+}
+
+// WaitForCompletionRef will return when one of the following conditions is met: the long
+// running operation has completed, the provided context is cancelled, or the client's
+// polling duration has been exceeded. It will retry failed polling attempts based on
+// the retry value defined in the client up to the maximum retry attempts.
+func (f *Future) WaitForCompletionRef(ctx context.Context, client autorest.Client) error {
ctx, cancel := context.WithTimeout(ctx, client.PollingDuration)
defer cancel()
-
done, err := f.Done(client)
for attempts := 0; !done; done, err = f.Done(client) {
if attempts >= client.RetryAttempts {
- return autorest.NewErrorWithError(err, "azure", "WaitForCompletion", f.resp, "the number of retries has been exceeded")
+ return autorest.NewErrorWithError(err, "Future", "WaitForCompletion", f.pt.latestResponse(), "the number of retries has been exceeded")
}
// we want delayAttempt to be zero in the non-error case so
// that DelayForBackoff doesn't perform exponential back-off
@@ -181,162 +194,686 @@ func (f Future) WaitForCompletion(ctx context.Context, client autorest.Client) e
// wait until the delay elapses or the context is cancelled
delayElapsed := autorest.DelayForBackoff(delay, delayAttempt, ctx.Done())
if !delayElapsed {
- return autorest.NewErrorWithError(ctx.Err(), "azure", "WaitForCompletion", f.resp, "context has been cancelled")
+ return autorest.NewErrorWithError(ctx.Err(), "Future", "WaitForCompletion", f.pt.latestResponse(), "context has been cancelled")
}
}
return err
}
-// if the operation failed the polling state will contain
-// error information and implements the error interface
-func (f *Future) errorInfo() error {
- if !f.ps.hasSucceeded() {
- return f.ps
- }
- return nil
-}
-
// MarshalJSON implements the json.Marshaler interface.
func (f Future) MarshalJSON() ([]byte, error) {
- return json.Marshal(&f.ps)
+ return json.Marshal(f.pt)
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (f *Future) UnmarshalJSON(data []byte) error {
- err := json.Unmarshal(data, &f.ps)
+ // unmarshal into JSON object to determine the tracker type
+ obj := map[string]interface{}{}
+ err := json.Unmarshal(data, &obj)
if err != nil {
return err
}
- f.req, err = newPollingRequest(f.ps)
- return err
+ if obj["method"] == nil {
+ return autorest.NewError("Future", "UnmarshalJSON", "missing 'method' property")
+ }
+ method := obj["method"].(string)
+ switch strings.ToUpper(method) {
+ case http.MethodDelete:
+ f.pt = &pollingTrackerDelete{}
+ case http.MethodPatch:
+ f.pt = &pollingTrackerPatch{}
+ case http.MethodPost:
+ f.pt = &pollingTrackerPost{}
+ case http.MethodPut:
+ f.pt = &pollingTrackerPut{}
+ default:
+ return autorest.NewError("Future", "UnmarshalJSON", "unsupoorted method '%s'", method)
+ }
+ // now unmarshal into the tracker
+ return json.Unmarshal(data, &f.pt)
}
// PollingURL returns the URL used for retrieving the status of the long-running operation.
-// For LROs that use the Location header the final URL value is used to retrieve the result.
func (f Future) PollingURL() string {
- return f.ps.URI
+ if f.pt == nil {
+ return ""
+ }
+ return f.pt.pollingURL()
+}
+
+// GetResult should be called once polling has completed successfully.
+// It makes the final GET call to retrieve the resultant payload.
+func (f Future) GetResult(sender autorest.Sender) (*http.Response, error) {
+ if f.pt.finalGetURL() == "" {
+ return nil, nil
+ }
+ req, err := http.NewRequest(http.MethodGet, f.pt.finalGetURL(), nil)
+ if err != nil {
+ return nil, err
+ }
+ return sender.Do(req)
+}
+
+type pollingTracker interface {
+ // these methods can differ per tracker
+
+ // checks the response headers and status code to determine the polling mechanism
+ updateHeaders() error
+
+ // checks the response for tracker-specific error conditions
+ checkForErrors() error
+
+ // returns true if provisioning state should be checked
+ provisioningStateApplicable() bool
+
+ // methods common to all trackers
+
+ // initializes the tracker's internal state, call this when the tracker is created
+ initializeState() error
+
+ // makes an HTTP request to check the status of the LRO
+ pollForStatus(sender autorest.Sender) error
+
+ // updates internal tracker state, call this after each call to pollForStatus
+ updatePollingState(provStateApl bool) error
+
+ // returns the error response from the service, can be nil
+ pollingError() error
+
+ // returns the polling method being used
+ pollingMethod() PollingMethodType
+
+ // returns the state of the LRO as returned from the service
+ pollingStatus() string
+
+ // returns the URL used for polling status
+ pollingURL() string
+
+ // returns the URL used for the final GET to retrieve the resource
+ finalGetURL() string
+
+ // returns true if the LRO is in a terminal state
+ hasTerminated() bool
+
+ // returns true if the LRO is in a failed terminal state
+ hasFailed() bool
+
+ // returns true if the LRO is in a successful terminal state
+ hasSucceeded() bool
+
+ // returns the cached HTTP response after a call to pollForStatus(), can be nil
+ latestResponse() *http.Response
+}
+
+type pollingTrackerBase struct {
+ // resp is the last response, either from the submission of the LRO or from polling
+ resp *http.Response
+
+ // method is the HTTP verb, this is needed for deserialization
+ Method string `json:"method"`
+
+ // rawBody is the raw JSON response body
+ rawBody map[string]interface{}
+
+ // denotes if polling is using async-operation or location header
+ Pm PollingMethodType `json:"pollingMethod"`
+
+ // the URL to poll for status
+ URI string `json:"pollingURI"`
+
+ // the state of the LRO as returned from the service
+ State string `json:"lroState"`
+
+ // the URL to GET for the final result
+ FinalGetURI string `json:"resultURI"`
+
+ // used to hold an error object returned from the service
+ Err *ServiceError `json:"error,omitempty"`
+}
+
+func (pt *pollingTrackerBase) initializeState() error {
+ // determine the initial polling state based on response body and/or HTTP status
+ // code. this is applicable to the initial LRO response, not polling responses!
+ pt.Method = pt.resp.Request.Method
+ if err := pt.updateRawBody(); err != nil {
+ return err
+ }
+ switch pt.resp.StatusCode {
+ case http.StatusOK:
+ if ps := pt.getProvisioningState(); ps != nil {
+ pt.State = *ps
+ } else {
+ pt.State = operationSucceeded
+ }
+ case http.StatusCreated:
+ if ps := pt.getProvisioningState(); ps != nil {
+ pt.State = *ps
+ } else {
+ pt.State = operationInProgress
+ }
+ case http.StatusAccepted:
+ pt.State = operationInProgress
+ case http.StatusNoContent:
+ pt.State = operationSucceeded
+ default:
+ pt.State = operationFailed
+ pt.updateErrorFromResponse()
+ }
+ return nil
+}
+
+func (pt pollingTrackerBase) getProvisioningState() *string {
+ if pt.rawBody != nil && pt.rawBody["properties"] != nil {
+ p := pt.rawBody["properties"].(map[string]interface{})
+ if ps := p["provisioningState"]; ps != nil {
+ s := ps.(string)
+ return &s
+ }
+ }
+ return nil
+}
+
+func (pt *pollingTrackerBase) updateRawBody() error {
+ pt.rawBody = map[string]interface{}{}
+ if pt.resp.ContentLength != 0 {
+ defer pt.resp.Body.Close()
+ b, err := ioutil.ReadAll(pt.resp.Body)
+ if err != nil {
+ return autorest.NewErrorWithError(err, "pollingTrackerBase", "updateRawBody", nil, "failed to read response body")
+ }
+ // put the body back so it's available to other callers
+ pt.resp.Body = ioutil.NopCloser(bytes.NewReader(b))
+ if err = json.Unmarshal(b, &pt.rawBody); err != nil {
+ return autorest.NewErrorWithError(err, "pollingTrackerBase", "updateRawBody", nil, "failed to unmarshal response body")
+ }
+ }
+ return nil
+}
+
+func (pt *pollingTrackerBase) pollForStatus(sender autorest.Sender) error {
+ req, err := http.NewRequest(http.MethodGet, pt.URI, nil)
+ if err != nil {
+ return autorest.NewErrorWithError(err, "pollingTrackerBase", "pollForStatus", nil, "failed to create HTTP request")
+ }
+ // attach the context from the original request if available (it will be absent for deserialized futures)
+ if pt.resp != nil {
+ req = req.WithContext(pt.resp.Request.Context())
+ }
+ pt.resp, err = sender.Do(req)
+ if err != nil {
+ return autorest.NewErrorWithError(err, "pollingTrackerBase", "pollForStatus", nil, "failed to send HTTP request")
+ }
+ if autorest.ResponseHasStatusCode(pt.resp, pollingCodes[:]...) {
+ // reset the service error on success case
+ pt.Err = nil
+ err = pt.updateRawBody()
+ } else {
+ // check response body for error content
+ pt.updateErrorFromResponse()
+ }
+ return err
+}
+
+// attempts to unmarshal a ServiceError type from the response body.
+// if that fails then make a best attempt at creating something meaningful.
+func (pt *pollingTrackerBase) updateErrorFromResponse() {
+ var err error
+ if pt.resp.ContentLength != 0 {
+ type respErr struct {
+ ServiceError *ServiceError `json:"error"`
+ }
+ re := respErr{}
+ defer pt.resp.Body.Close()
+ var b []byte
+ b, err = ioutil.ReadAll(pt.resp.Body)
+ if err != nil {
+ goto Default
+ }
+ if err = json.Unmarshal(b, &re); err != nil {
+ goto Default
+ }
+ // unmarshalling the error didn't yield anything, try unwrapped error
+ if re.ServiceError == nil {
+ err = json.Unmarshal(b, &re.ServiceError)
+ if err != nil {
+ goto Default
+ }
+ }
+ if re.ServiceError != nil {
+ pt.Err = re.ServiceError
+ return
+ }
+ }
+Default:
+ se := &ServiceError{
+ Code: fmt.Sprintf("HTTP status code %v", pt.resp.StatusCode),
+ Message: pt.resp.Status,
+ }
+ if err != nil {
+ se.InnerError = make(map[string]interface{})
+ se.InnerError["unmarshalError"] = err.Error()
+ }
+ pt.Err = se
+}
+
+func (pt *pollingTrackerBase) updatePollingState(provStateApl bool) error {
+ if pt.Pm == PollingAsyncOperation && pt.rawBody["status"] != nil {
+ pt.State = pt.rawBody["status"].(string)
+ } else {
+ if pt.resp.StatusCode == http.StatusAccepted {
+ pt.State = operationInProgress
+ } else if provStateApl {
+ if ps := pt.getProvisioningState(); ps != nil {
+ pt.State = *ps
+ } else {
+ pt.State = operationSucceeded
+ }
+ } else {
+ return autorest.NewError("pollingTrackerBase", "updatePollingState", "the response from the async operation has an invalid status code")
+ }
+ }
+ // if the operation has failed update the error state
+ if pt.hasFailed() {
+ pt.updateErrorFromResponse()
+ }
+ return nil
+}
+
+func (pt pollingTrackerBase) pollingError() error {
+ if pt.Err == nil {
+ return nil
+ }
+ return pt.Err
+}
+
+func (pt pollingTrackerBase) pollingMethod() PollingMethodType {
+ return pt.Pm
+}
+
+func (pt pollingTrackerBase) pollingStatus() string {
+ return pt.State
+}
+
+func (pt pollingTrackerBase) pollingURL() string {
+ return pt.URI
+}
+
+func (pt pollingTrackerBase) finalGetURL() string {
+ return pt.FinalGetURI
+}
+
+func (pt pollingTrackerBase) hasTerminated() bool {
+ return strings.EqualFold(pt.State, operationCanceled) || strings.EqualFold(pt.State, operationFailed) || strings.EqualFold(pt.State, operationSucceeded)
+}
+
+func (pt pollingTrackerBase) hasFailed() bool {
+ return strings.EqualFold(pt.State, operationCanceled) || strings.EqualFold(pt.State, operationFailed)
+}
+
+func (pt pollingTrackerBase) hasSucceeded() bool {
+ return strings.EqualFold(pt.State, operationSucceeded)
+}
+
+func (pt pollingTrackerBase) latestResponse() *http.Response {
+ return pt.resp
+}
+
+// error checking common to all trackers
+func (pt pollingTrackerBase) baseCheckForErrors() error {
+ // for Azure-AsyncOperations the response body cannot be nil or empty
+ if pt.Pm == PollingAsyncOperation {
+ if pt.resp.Body == nil || pt.resp.ContentLength == 0 {
+ return autorest.NewError("pollingTrackerBase", "baseCheckForErrors", "for Azure-AsyncOperation response body cannot be nil")
+ }
+ if pt.rawBody["status"] == nil {
+ return autorest.NewError("pollingTrackerBase", "baseCheckForErrors", "missing status property in Azure-AsyncOperation response body")
+ }
+ }
+ return nil
+}
+
+// DELETE
+
+type pollingTrackerDelete struct {
+ pollingTrackerBase
+}
+
+func (pt *pollingTrackerDelete) updateHeaders() error {
+ // for 201 the Location header is required
+ if pt.resp.StatusCode == http.StatusCreated {
+ if lh, err := getURLFromLocationHeader(pt.resp); err != nil {
+ return err
+ } else if lh == "" {
+ return autorest.NewError("pollingTrackerDelete", "updateHeaders", "missing Location header in 201 response")
+ } else {
+ pt.URI = lh
+ }
+ pt.Pm = PollingLocation
+ pt.FinalGetURI = pt.URI
+ }
+ // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary
+ if pt.resp.StatusCode == http.StatusAccepted {
+ ao, err := getURLFromAsyncOpHeader(pt.resp)
+ if err != nil {
+ return err
+ } else if ao != "" {
+ pt.URI = ao
+ pt.Pm = PollingAsyncOperation
+ }
+ // if the Location header is invalid and we already have a polling URL
+ // then we don't care if the Location header URL is malformed.
+ if lh, err := getURLFromLocationHeader(pt.resp); err != nil && pt.URI == "" {
+ return err
+ } else if lh != "" {
+ if ao == "" {
+ pt.URI = lh
+ pt.Pm = PollingLocation
+ }
+ // when both headers are returned we use the value in the Location header for the final GET
+ pt.FinalGetURI = lh
+ }
+ // make sure a polling URL was found
+ if pt.URI == "" {
+ return autorest.NewError("pollingTrackerPost", "updateHeaders", "didn't get any suitable polling URLs in 202 response")
+ }
+ }
+ return nil
+}
+
+func (pt pollingTrackerDelete) checkForErrors() error {
+ return pt.baseCheckForErrors()
+}
+
+func (pt pollingTrackerDelete) provisioningStateApplicable() bool {
+ return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusNoContent
+}
+
+// PATCH
+
+type pollingTrackerPatch struct {
+ pollingTrackerBase
+}
+
+func (pt *pollingTrackerPatch) updateHeaders() error {
+ // by default we can use the original URL for polling and final GET
+ if pt.URI == "" {
+ pt.URI = pt.resp.Request.URL.String()
+ }
+ if pt.FinalGetURI == "" {
+ pt.FinalGetURI = pt.resp.Request.URL.String()
+ }
+ if pt.Pm == PollingUnknown {
+ pt.Pm = PollingRequestURI
+ }
+ // for 201 it's permissible for no headers to be returned
+ if pt.resp.StatusCode == http.StatusCreated {
+ if ao, err := getURLFromAsyncOpHeader(pt.resp); err != nil {
+ return err
+ } else if ao != "" {
+ pt.URI = ao
+ pt.Pm = PollingAsyncOperation
+ }
+ }
+ // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary
+ // note the absense of the "final GET" mechanism for PATCH
+ if pt.resp.StatusCode == http.StatusAccepted {
+ ao, err := getURLFromAsyncOpHeader(pt.resp)
+ if err != nil {
+ return err
+ } else if ao != "" {
+ pt.URI = ao
+ pt.Pm = PollingAsyncOperation
+ }
+ if ao == "" {
+ if lh, err := getURLFromLocationHeader(pt.resp); err != nil {
+ return err
+ } else if lh == "" {
+ return autorest.NewError("pollingTrackerPatch", "updateHeaders", "didn't get any suitable polling URLs in 202 response")
+ } else {
+ pt.URI = lh
+ pt.Pm = PollingLocation
+ }
+ }
+ }
+ return nil
+}
+
+func (pt pollingTrackerPatch) checkForErrors() error {
+ return pt.baseCheckForErrors()
+}
+
+func (pt pollingTrackerPatch) provisioningStateApplicable() bool {
+ return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusCreated
+}
+
+// POST
+
+type pollingTrackerPost struct {
+ pollingTrackerBase
+}
+
+func (pt *pollingTrackerPost) updateHeaders() error {
+ // 201 requires Location header
+ if pt.resp.StatusCode == http.StatusCreated {
+ if lh, err := getURLFromLocationHeader(pt.resp); err != nil {
+ return err
+ } else if lh == "" {
+ return autorest.NewError("pollingTrackerPost", "updateHeaders", "missing Location header in 201 response")
+ } else {
+ pt.URI = lh
+ pt.FinalGetURI = lh
+ pt.Pm = PollingLocation
+ }
+ }
+ // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary
+ if pt.resp.StatusCode == http.StatusAccepted {
+ ao, err := getURLFromAsyncOpHeader(pt.resp)
+ if err != nil {
+ return err
+ } else if ao != "" {
+ pt.URI = ao
+ pt.Pm = PollingAsyncOperation
+ }
+ // if the Location header is invalid and we already have a polling URL
+ // then we don't care if the Location header URL is malformed.
+ if lh, err := getURLFromLocationHeader(pt.resp); err != nil && pt.URI == "" {
+ return err
+ } else if lh != "" {
+ if ao == "" {
+ pt.URI = lh
+ pt.Pm = PollingLocation
+ }
+ // when both headers are returned we use the value in the Location header for the final GET
+ pt.FinalGetURI = lh
+ }
+ // make sure a polling URL was found
+ if pt.URI == "" {
+ return autorest.NewError("pollingTrackerPost", "updateHeaders", "didn't get any suitable polling URLs in 202 response")
+ }
+ }
+ return nil
+}
+
+func (pt pollingTrackerPost) checkForErrors() error {
+ return pt.baseCheckForErrors()
+}
+
+func (pt pollingTrackerPost) provisioningStateApplicable() bool {
+ return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusNoContent
+}
+
+// PUT
+
+type pollingTrackerPut struct {
+ pollingTrackerBase
+}
+
+func (pt *pollingTrackerPut) updateHeaders() error {
+ // by default we can use the original URL for polling and final GET
+ if pt.URI == "" {
+ pt.URI = pt.resp.Request.URL.String()
+ }
+ if pt.FinalGetURI == "" {
+ pt.FinalGetURI = pt.resp.Request.URL.String()
+ }
+ if pt.Pm == PollingUnknown {
+ pt.Pm = PollingRequestURI
+ }
+ // for 201 it's permissible for no headers to be returned
+ if pt.resp.StatusCode == http.StatusCreated {
+ if ao, err := getURLFromAsyncOpHeader(pt.resp); err != nil {
+ return err
+ } else if ao != "" {
+ pt.URI = ao
+ pt.Pm = PollingAsyncOperation
+ }
+ }
+ // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary
+ if pt.resp.StatusCode == http.StatusAccepted {
+ ao, err := getURLFromAsyncOpHeader(pt.resp)
+ if err != nil {
+ return err
+ } else if ao != "" {
+ pt.URI = ao
+ pt.Pm = PollingAsyncOperation
+ }
+ // if the Location header is invalid and we already have a polling URL
+ // then we don't care if the Location header URL is malformed.
+ if lh, err := getURLFromLocationHeader(pt.resp); err != nil && pt.URI == "" {
+ return err
+ } else if lh != "" {
+ if ao == "" {
+ pt.URI = lh
+ pt.Pm = PollingLocation
+ }
+ // when both headers are returned we use the value in the Location header for the final GET
+ pt.FinalGetURI = lh
+ }
+ // make sure a polling URL was found
+ if pt.URI == "" {
+ return autorest.NewError("pollingTrackerPut", "updateHeaders", "didn't get any suitable polling URLs in 202 response")
+ }
+ }
+ return nil
+}
+
+func (pt pollingTrackerPut) checkForErrors() error {
+ err := pt.baseCheckForErrors()
+ if err != nil {
+ return err
+ }
+ // if there are no LRO headers then the body cannot be empty
+ ao, err := getURLFromAsyncOpHeader(pt.resp)
+ if err != nil {
+ return err
+ }
+ lh, err := getURLFromLocationHeader(pt.resp)
+ if err != nil {
+ return err
+ }
+ if ao == "" && lh == "" && len(pt.rawBody) == 0 {
+ return autorest.NewError("pollingTrackerPut", "checkForErrors", "the response did not contain a body")
+ }
+ return nil
+}
+
+func (pt pollingTrackerPut) provisioningStateApplicable() bool {
+ return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusCreated
+}
+
+// creates a polling tracker based on the verb of the original request
+func createPollingTracker(resp *http.Response) (pollingTracker, error) {
+ var pt pollingTracker
+ switch strings.ToUpper(resp.Request.Method) {
+ case http.MethodDelete:
+ pt = &pollingTrackerDelete{pollingTrackerBase: pollingTrackerBase{resp: resp}}
+ case http.MethodPatch:
+ pt = &pollingTrackerPatch{pollingTrackerBase: pollingTrackerBase{resp: resp}}
+ case http.MethodPost:
+ pt = &pollingTrackerPost{pollingTrackerBase: pollingTrackerBase{resp: resp}}
+ case http.MethodPut:
+ pt = &pollingTrackerPut{pollingTrackerBase: pollingTrackerBase{resp: resp}}
+ default:
+ return nil, autorest.NewError("azure", "createPollingTracker", "unsupported HTTP method %s", resp.Request.Method)
+ }
+ if err := pt.initializeState(); err != nil {
+ return pt, err
+ }
+ // this initializes the polling header values, we do this during creation in case the
+ // initial response send us invalid values; this way the API call will return a non-nil
+ // error (not doing this means the error shows up in Future.Done)
+ return pt, pt.updateHeaders()
+}
+
+// gets the polling URL from the Azure-AsyncOperation header.
+// ensures the URL is well-formed and absolute.
+func getURLFromAsyncOpHeader(resp *http.Response) (string, error) {
+ s := resp.Header.Get(http.CanonicalHeaderKey(headerAsyncOperation))
+ if s == "" {
+ return "", nil
+ }
+ if !isValidURL(s) {
+ return "", autorest.NewError("azure", "getURLFromAsyncOpHeader", "invalid polling URL '%s'", s)
+ }
+ return s, nil
+}
+
+// gets the polling URL from the Location header.
+// ensures the URL is well-formed and absolute.
+func getURLFromLocationHeader(resp *http.Response) (string, error) {
+ s := resp.Header.Get(http.CanonicalHeaderKey(autorest.HeaderLocation))
+ if s == "" {
+ return "", nil
+ }
+ if !isValidURL(s) {
+ return "", autorest.NewError("azure", "getURLFromLocationHeader", "invalid polling URL '%s'", s)
+ }
+ return s, nil
+}
+
+// verify that the URL is valid and absolute
+func isValidURL(s string) bool {
+ u, err := url.Parse(s)
+ return err == nil && u.IsAbs()
}
// DoPollForAsynchronous returns a SendDecorator that polls if the http.Response is for an Azure
// long-running operation. It will delay between requests for the duration specified in the
-// RetryAfter header or, if the header is absent, the passed delay. Polling may be canceled by
-// closing the optional channel on the http.Request.
+// RetryAfter header or, if the header is absent, the passed delay. Polling may be canceled via
+// the context associated with the http.Request.
+// Deprecated: Prefer using Futures to allow for non-blocking async operations.
func DoPollForAsynchronous(delay time.Duration) autorest.SendDecorator {
return func(s autorest.Sender) autorest.Sender {
- return autorest.SenderFunc(func(r *http.Request) (resp *http.Response, err error) {
- resp, err = s.Do(r)
+ return autorest.SenderFunc(func(r *http.Request) (*http.Response, error) {
+ resp, err := s.Do(r)
if err != nil {
return resp, err
}
if !autorest.ResponseHasStatusCode(resp, pollingCodes[:]...) {
return resp, nil
}
-
- ps := pollingState{}
- for err == nil {
- err = updatePollingState(resp, &ps)
- if err != nil {
- break
- }
- if ps.hasTerminated() {
- if !ps.hasSucceeded() {
- err = ps
- }
- break
- }
-
- r, err = newPollingRequest(ps)
- if err != nil {
- return resp, err
- }
- r = r.WithContext(resp.Request.Context())
-
- delay = autorest.GetRetryAfter(resp, delay)
- resp, err = autorest.SendWithSender(s, r,
- autorest.AfterDelay(delay))
+ future, err := NewFutureFromResponse(resp)
+ if err != nil {
+ return resp, err
}
-
- return resp, err
+ // retry until either the LRO completes or we receive an error
+ var done bool
+ for done, err = future.Done(s); !done && err == nil; done, err = future.Done(s) {
+ // check for Retry-After delay, if not present use the specified polling delay
+ if pd, ok := future.GetPollingDelay(); ok {
+ delay = pd
+ }
+ // wait until the delay elapses or the context is cancelled
+ if delayElapsed := autorest.DelayForBackoff(delay, 0, r.Context().Done()); !delayElapsed {
+ return future.Response(),
+ autorest.NewErrorWithError(r.Context().Err(), "azure", "DoPollForAsynchronous", future.Response(), "context has been cancelled")
+ }
+ }
+ return future.Response(), err
})
}
}
-func getAsyncOperation(resp *http.Response) string {
- return resp.Header.Get(http.CanonicalHeaderKey(headerAsyncOperation))
-}
-
-func hasSucceeded(state string) bool {
- return strings.EqualFold(state, operationSucceeded)
-}
-
-func hasTerminated(state string) bool {
- return strings.EqualFold(state, operationCanceled) || strings.EqualFold(state, operationFailed) || strings.EqualFold(state, operationSucceeded)
-}
-
-func hasFailed(state string) bool {
- return strings.EqualFold(state, operationFailed)
-}
-
-type provisioningTracker interface {
- state() string
- hasSucceeded() bool
- hasTerminated() bool
-}
-
-type operationResource struct {
- // Note:
- // The specification states services should return the "id" field. However some return it as
- // "operationId".
- ID string `json:"id"`
- OperationID string `json:"operationId"`
- Name string `json:"name"`
- Status string `json:"status"`
- Properties map[string]interface{} `json:"properties"`
- OperationError ServiceError `json:"error"`
- StartTime date.Time `json:"startTime"`
- EndTime date.Time `json:"endTime"`
- PercentComplete float64 `json:"percentComplete"`
-}
-
-func (or operationResource) state() string {
- return or.Status
-}
-
-func (or operationResource) hasSucceeded() bool {
- return hasSucceeded(or.state())
-}
-
-func (or operationResource) hasTerminated() bool {
- return hasTerminated(or.state())
-}
-
-type provisioningProperties struct {
- ProvisioningState string `json:"provisioningState"`
-}
-
-type provisioningStatus struct {
- Properties provisioningProperties `json:"properties,omitempty"`
- ProvisioningError ServiceError `json:"error,omitempty"`
-}
-
-func (ps provisioningStatus) state() string {
- return ps.Properties.ProvisioningState
-}
-
-func (ps provisioningStatus) hasSucceeded() bool {
- return hasSucceeded(ps.state())
-}
-
-func (ps provisioningStatus) hasTerminated() bool {
- return hasTerminated(ps.state())
-}
-
-func (ps provisioningStatus) hasProvisioningError() bool {
- // code and message are required fields so only check them
- return len(ps.ProvisioningError.Code) > 0 ||
- len(ps.ProvisioningError.Message) > 0
-}
-
// PollingMethodType defines a type used for enumerating polling mechanisms.
type PollingMethodType string
@@ -347,151 +884,13 @@ const (
// PollingLocation indicates the polling method uses the Location header.
PollingLocation PollingMethodType = "Location"
+ // PollingRequestURI indicates the polling method uses the original request URI.
+ PollingRequestURI PollingMethodType = "RequestURI"
+
// PollingUnknown indicates an unknown polling method and is the default value.
PollingUnknown PollingMethodType = ""
)
-type pollingState struct {
- PollingMethod PollingMethodType `json:"pollingMethod"`
- URI string `json:"uri"`
- State string `json:"state"`
- ServiceError *ServiceError `json:"error,omitempty"`
-}
-
-func (ps pollingState) hasSucceeded() bool {
- return hasSucceeded(ps.State)
-}
-
-func (ps pollingState) hasTerminated() bool {
- return hasTerminated(ps.State)
-}
-
-func (ps pollingState) hasFailed() bool {
- return hasFailed(ps.State)
-}
-
-func (ps pollingState) Error() string {
- s := fmt.Sprintf("Long running operation terminated with status '%s'", ps.State)
- if ps.ServiceError != nil {
- s = fmt.Sprintf("%s: %+v", s, *ps.ServiceError)
- }
- return s
-}
-
-// updatePollingState maps the operation status -- retrieved from either a provisioningState
-// field, the status field of an OperationResource, or inferred from the HTTP status code --
-// into a well-known states. Since the process begins from the initial request, the state
-// always comes from either a the provisioningState returned or is inferred from the HTTP
-// status code. Subsequent requests will read an Azure OperationResource object if the
-// service initially returned the Azure-AsyncOperation header. The responseFormat field notes
-// the expected response format.
-func updatePollingState(resp *http.Response, ps *pollingState) error {
- // Determine the response shape
- // -- The first response will always be a provisioningStatus response; only the polling requests,
- // depending on the header returned, may be something otherwise.
- var pt provisioningTracker
- if ps.PollingMethod == PollingAsyncOperation {
- pt = &operationResource{}
- } else {
- pt = &provisioningStatus{}
- }
-
- // If this is the first request (that is, the polling response shape is unknown), determine how
- // to poll and what to expect
- if ps.PollingMethod == PollingUnknown {
- req := resp.Request
- if req == nil {
- return autorest.NewError("azure", "updatePollingState", "Azure Polling Error - Original HTTP request is missing")
- }
-
- // Prefer the Azure-AsyncOperation header
- ps.URI = getAsyncOperation(resp)
- if ps.URI != "" {
- ps.PollingMethod = PollingAsyncOperation
- } else {
- ps.PollingMethod = PollingLocation
- }
-
- // Else, use the Location header
- if ps.URI == "" {
- ps.URI = autorest.GetLocation(resp)
- }
-
- // Lastly, requests against an existing resource, use the last request URI
- if ps.URI == "" {
- m := strings.ToUpper(req.Method)
- if m == http.MethodPatch || m == http.MethodPut || m == http.MethodGet {
- ps.URI = req.URL.String()
- }
- }
- }
-
- // Read and interpret the response (saving the Body in case no polling is necessary)
- b := &bytes.Buffer{}
- err := autorest.Respond(resp,
- autorest.ByCopying(b),
- autorest.ByUnmarshallingJSON(pt),
- autorest.ByClosing())
- resp.Body = ioutil.NopCloser(b)
- if err != nil {
- return err
- }
-
- // Interpret the results
- // -- Terminal states apply regardless
- // -- Unknown states are per-service inprogress states
- // -- Otherwise, infer state from HTTP status code
- if pt.hasTerminated() {
- ps.State = pt.state()
- } else if pt.state() != "" {
- ps.State = operationInProgress
- } else {
- switch resp.StatusCode {
- case http.StatusAccepted:
- ps.State = operationInProgress
-
- case http.StatusNoContent, http.StatusCreated, http.StatusOK:
- ps.State = operationSucceeded
-
- default:
- ps.State = operationFailed
- }
- }
-
- if strings.EqualFold(ps.State, operationInProgress) && ps.URI == "" {
- return autorest.NewError("azure", "updatePollingState", "Azure Polling Error - Unable to obtain polling URI for %s %s", resp.Request.Method, resp.Request.URL)
- }
-
- // For failed operation, check for error code and message in
- // -- Operation resource
- // -- Response
- // -- Otherwise, Unknown
- if ps.hasFailed() {
- if or, ok := pt.(*operationResource); ok {
- ps.ServiceError = &or.OperationError
- } else if p, ok := pt.(*provisioningStatus); ok && p.hasProvisioningError() {
- ps.ServiceError = &p.ProvisioningError
- } else {
- ps.ServiceError = &ServiceError{
- Code: "Unknown",
- Message: "None",
- }
- }
- }
- return nil
-}
-
-func newPollingRequest(ps pollingState) (*http.Request, error) {
- reqPoll, err := autorest.Prepare(&http.Request{},
- autorest.AsGet(),
- autorest.WithBaseURL(ps.URI))
- if err != nil {
- return nil, autorest.NewErrorWithError(err, "azure", "newPollingRequest", nil, "Failure creating poll request to %s", ps.URI)
- }
-
- return reqPoll, nil
-}
-
// AsyncOpIncompleteError is the type that's returned from a future that has not completed.
type AsyncOpIncompleteError struct {
// FutureType is the name of the type composed of a azure.Future.
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/async_test.go b/vendor/github.com/Azure/go-autorest/autorest/azure/async_test.go
index f24b1e589..91e61c3cf 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/async_test.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/async_test.go
@@ -19,10 +19,8 @@ import (
"encoding/json"
"errors"
"fmt"
- "io/ioutil"
"net/http"
"reflect"
- "strings"
"sync"
"testing"
"time"
@@ -31,449 +29,630 @@ import (
"github.com/Azure/go-autorest/autorest/mocks"
)
-func TestGetAsyncOperation_ReturnsAzureAsyncOperationHeader(t *testing.T) {
- r := newAsynchronousResponse()
-
- if getAsyncOperation(r) != mocks.TestAzureAsyncURL {
- t.Fatalf("azure: getAsyncOperation failed to extract the Azure-AsyncOperation header -- expected %v, received %v", mocks.TestURL, getAsyncOperation(r))
- }
-}
-
-func TestGetAsyncOperation_ReturnsEmptyStringIfHeaderIsAbsent(t *testing.T) {
- r := mocks.NewResponse()
-
- if len(getAsyncOperation(r)) != 0 {
- t.Fatalf("azure: getAsyncOperation failed to return empty string when the Azure-AsyncOperation header is absent -- received %v", getAsyncOperation(r))
- }
-}
-
-func TestHasSucceeded_ReturnsTrueForSuccess(t *testing.T) {
- if !hasSucceeded(operationSucceeded) {
- t.Fatal("azure: hasSucceeded failed to return true for success")
- }
-}
-
-func TestHasSucceeded_ReturnsFalseOtherwise(t *testing.T) {
- if hasSucceeded("not a success string") {
- t.Fatal("azure: hasSucceeded returned true for a non-success")
- }
-}
-
-func TestHasTerminated_ReturnsTrueForValidTerminationStates(t *testing.T) {
- for _, state := range []string{operationSucceeded, operationCanceled, operationFailed} {
- if !hasTerminated(state) {
- t.Fatalf("azure: hasTerminated failed to return true for the '%s' state", state)
- }
- }
-}
-
-func TestHasTerminated_ReturnsFalseForUnknownStates(t *testing.T) {
- if hasTerminated("not a known state") {
- t.Fatal("azure: hasTerminated returned true for an unknown state")
- }
-}
-
-func TestOperationError_ErrorReturnsAString(t *testing.T) {
- s := (ServiceError{Code: "server code", Message: "server error"}).Error()
- if s == "" {
- t.Fatalf("azure: operationError#Error failed to return an error")
- }
- if !strings.Contains(s, "server code") || !strings.Contains(s, "server error") {
- t.Fatalf("azure: operationError#Error returned a malformed error -- error='%v'", s)
- }
-}
-
-func TestOperationResource_StateReturnsState(t *testing.T) {
- if (operationResource{Status: "state"}).state() != "state" {
- t.Fatalf("azure: operationResource#state failed to return the correct state")
- }
-}
-
-func TestOperationResource_HasSucceededReturnsFalseIfNotSuccess(t *testing.T) {
- if (operationResource{Status: "not a success string"}).hasSucceeded() {
- t.Fatalf("azure: operationResource#hasSucceeded failed to return false for a canceled operation")
- }
-}
-
-func TestOperationResource_HasSucceededReturnsTrueIfSuccessful(t *testing.T) {
- if !(operationResource{Status: operationSucceeded}).hasSucceeded() {
- t.Fatalf("azure: operationResource#hasSucceeded failed to return true for a successful operation")
- }
-}
-
-func TestOperationResource_HasTerminatedReturnsTrueForKnownStates(t *testing.T) {
- for _, state := range []string{operationSucceeded, operationCanceled, operationFailed} {
- if !(operationResource{Status: state}).hasTerminated() {
- t.Fatalf("azure: operationResource#hasTerminated failed to return true for the '%s' state", state)
- }
- }
-}
-
-func TestOperationResource_HasTerminatedReturnsFalseForUnknownStates(t *testing.T) {
- if (operationResource{Status: "not a known state"}).hasTerminated() {
- t.Fatalf("azure: operationResource#hasTerminated returned true for a non-terminal operation")
- }
-}
-
-func TestProvisioningStatus_StateReturnsState(t *testing.T) {
- if (provisioningStatus{Properties: provisioningProperties{"state"}}).state() != "state" {
- t.Fatalf("azure: provisioningStatus#state failed to return the correct state")
- }
-}
-
-func TestProvisioningStatus_HasSucceededReturnsFalseIfNotSuccess(t *testing.T) {
- if (provisioningStatus{Properties: provisioningProperties{"not a success string"}}).hasSucceeded() {
- t.Fatalf("azure: provisioningStatus#hasSucceeded failed to return false for a canceled operation")
- }
-}
-
-func TestProvisioningStatus_HasSucceededReturnsTrueIfSuccessful(t *testing.T) {
- if !(provisioningStatus{Properties: provisioningProperties{operationSucceeded}}).hasSucceeded() {
- t.Fatalf("azure: provisioningStatus#hasSucceeded failed to return true for a successful operation")
- }
-}
-
-func TestProvisioningStatus_HasTerminatedReturnsTrueForKnownStates(t *testing.T) {
- for _, state := range []string{operationSucceeded, operationCanceled, operationFailed} {
- if !(provisioningStatus{Properties: provisioningProperties{state}}).hasTerminated() {
- t.Fatalf("azure: provisioningStatus#hasTerminated failed to return true for the '%s' state", state)
- }
- }
-}
-
-func TestProvisioningStatus_HasTerminatedReturnsFalseForUnknownStates(t *testing.T) {
- if (provisioningStatus{Properties: provisioningProperties{"not a known state"}}).hasTerminated() {
- t.Fatalf("azure: provisioningStatus#hasTerminated returned true for a non-terminal operation")
- }
-}
-
-func TestPollingState_HasSucceededReturnsFalseIfNotSuccess(t *testing.T) {
- if (pollingState{State: "not a success string"}).hasSucceeded() {
- t.Fatalf("azure: pollingState#hasSucceeded failed to return false for a canceled operation")
- }
-}
-
-func TestPollingState_HasSucceededReturnsTrueIfSuccessful(t *testing.T) {
- if !(pollingState{State: operationSucceeded}).hasSucceeded() {
- t.Fatalf("azure: pollingState#hasSucceeded failed to return true for a successful operation")
- }
-}
-
-func TestPollingState_HasTerminatedReturnsTrueForKnownStates(t *testing.T) {
- for _, state := range []string{operationSucceeded, operationCanceled, operationFailed} {
- if !(pollingState{State: state}).hasTerminated() {
- t.Fatalf("azure: pollingState#hasTerminated failed to return true for the '%s' state", state)
- }
- }
-}
-
-func TestPollingState_HasTerminatedReturnsFalseForUnknownStates(t *testing.T) {
- if (pollingState{State: "not a known state"}).hasTerminated() {
- t.Fatalf("azure: pollingState#hasTerminated returned true for a non-terminal operation")
- }
-}
-
-func TestUpdatePollingState_ReturnsAnErrorIfOneOccurs(t *testing.T) {
- resp := mocks.NewResponseWithContent(operationResourceIllegal)
- err := updatePollingState(resp, &pollingState{})
+func TestCreateFromInvalidRequestVerb(t *testing.T) {
+ resp := mocks.NewResponseWithBodyAndStatus(nil, http.StatusOK, "some status")
+ resp.Request = mocks.NewRequestWithParams(http.MethodGet, mocks.TestURL, nil)
+ _, err := createPollingTracker(resp)
if err == nil {
- t.Fatalf("azure: updatePollingState failed to return an error after a JSON parsing error")
+ t.Fatal("unexpected nil error")
}
}
-func TestUpdatePollingState_ReturnsTerminatedForKnownProvisioningStates(t *testing.T) {
- for _, state := range []string{operationSucceeded, operationCanceled, operationFailed} {
- resp := mocks.NewResponseWithContent(fmt.Sprintf(pollingStateFormat, state))
- resp.StatusCode = 42
- ps := &pollingState{PollingMethod: PollingLocation}
- updatePollingState(resp, ps)
- if !ps.hasTerminated() {
- t.Fatalf("azure: updatePollingState failed to return a terminating pollingState for the '%s' state", state)
- }
- }
-}
-
-func TestUpdatePollingState_ReturnsSuccessForSuccessfulProvisioningState(t *testing.T) {
- resp := mocks.NewResponseWithContent(fmt.Sprintf(pollingStateFormat, operationSucceeded))
- resp.StatusCode = 42
- ps := &pollingState{PollingMethod: PollingLocation}
- updatePollingState(resp, ps)
- if !ps.hasSucceeded() {
- t.Fatalf("azure: updatePollingState failed to return a successful pollingState for the '%s' state", operationSucceeded)
- }
-}
-
-func TestUpdatePollingState_ReturnsInProgressForAllOtherProvisioningStates(t *testing.T) {
- s := "not a recognized state"
- resp := mocks.NewResponseWithContent(fmt.Sprintf(pollingStateFormat, s))
- resp.StatusCode = 42
- ps := &pollingState{PollingMethod: PollingLocation}
- updatePollingState(resp, ps)
- if ps.hasTerminated() {
- t.Fatalf("azure: updatePollingState returned terminated for unknown state '%s'", s)
- }
-}
-
-func TestUpdatePollingState_ReturnsSuccessWhenProvisioningStateFieldIsAbsentForSuccessStatusCodes(t *testing.T) {
- for _, sc := range []int{http.StatusOK, http.StatusCreated, http.StatusNoContent} {
- resp := mocks.NewResponseWithContent(pollingStateEmpty)
- resp.StatusCode = sc
- ps := &pollingState{PollingMethod: PollingLocation}
- updatePollingState(resp, ps)
- if !ps.hasSucceeded() {
- t.Fatalf("azure: updatePollingState failed to return success when the provisionState field is absent for Status Code %d", sc)
- }
- }
-}
-
-func TestUpdatePollingState_ReturnsInProgressWhenProvisioningStateFieldIsAbsentForAccepted(t *testing.T) {
- resp := mocks.NewResponseWithContent(pollingStateEmpty)
- resp.StatusCode = http.StatusAccepted
- ps := &pollingState{PollingMethod: PollingLocation}
- updatePollingState(resp, ps)
- if ps.hasTerminated() {
- t.Fatalf("azure: updatePollingState returned terminated when the provisionState field is absent for Status Code Accepted")
- }
-}
-
-func TestUpdatePollingState_ReturnsFailedWhenProvisioningStateFieldIsAbsentForUnknownStatusCodes(t *testing.T) {
- resp := mocks.NewResponseWithContent(pollingStateEmpty)
- resp.StatusCode = 42
- ps := &pollingState{PollingMethod: PollingLocation}
- updatePollingState(resp, ps)
- if !ps.hasTerminated() || ps.hasSucceeded() {
- t.Fatalf("azure: updatePollingState did not return failed when the provisionState field is absent for an unknown Status Code")
- }
-}
-
-func TestUpdatePollingState_ReturnsTerminatedForKnownOperationResourceStates(t *testing.T) {
- for _, state := range []string{operationSucceeded, operationCanceled, operationFailed} {
- resp := mocks.NewResponseWithContent(fmt.Sprintf(operationResourceFormat, state))
- resp.StatusCode = 42
- ps := &pollingState{PollingMethod: PollingAsyncOperation}
- updatePollingState(resp, ps)
- if !ps.hasTerminated() {
- t.Fatalf("azure: updatePollingState failed to return a terminating pollingState for the '%s' state", state)
- }
- }
-}
-
-func TestUpdatePollingState_ReturnsSuccessForSuccessfulOperationResourceState(t *testing.T) {
- resp := mocks.NewResponseWithContent(fmt.Sprintf(operationResourceFormat, operationSucceeded))
- resp.StatusCode = 42
- ps := &pollingState{PollingMethod: PollingAsyncOperation}
- updatePollingState(resp, ps)
- if !ps.hasSucceeded() {
- t.Fatalf("azure: updatePollingState failed to return a successful pollingState for the '%s' state", operationSucceeded)
- }
-}
-
-func TestUpdatePollingState_ReturnsInProgressForAllOtherOperationResourceStates(t *testing.T) {
- s := "not a recognized state"
- resp := mocks.NewResponseWithContent(fmt.Sprintf(operationResourceFormat, s))
- resp.StatusCode = 42
- ps := &pollingState{PollingMethod: PollingAsyncOperation}
- updatePollingState(resp, ps)
- if ps.hasTerminated() {
- t.Fatalf("azure: updatePollingState returned terminated for unknown state '%s'", s)
- }
-}
-
-func TestUpdatePollingState_CopiesTheResponseBody(t *testing.T) {
- s := fmt.Sprintf(pollingStateFormat, operationSucceeded)
- resp := mocks.NewResponseWithContent(s)
- resp.StatusCode = 42
- ps := &pollingState{PollingMethod: PollingAsyncOperation}
- updatePollingState(resp, ps)
- b, err := ioutil.ReadAll(resp.Body)
+// DELETE
+func TestCreateDeleteTracker201Success(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodDelete, nil), http.StatusCreated, nil)
+ mocks.SetLocationHeader(resp, mocks.TestLocationURL)
+ pt, err := createPollingTracker(resp)
if err != nil {
- t.Fatalf("azure: updatePollingState failed to replace the http.Response Body -- Error='%v'", err)
+ t.Fatalf("failed to create tracker: %v", err)
}
- if string(b) != s {
- t.Fatalf("azure: updatePollingState failed to copy the http.Response Body -- Expected='%s' Received='%s'", s, string(b))
+ if pt.pollingMethod() != PollingLocation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestLocationURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
}
}
-func TestUpdatePollingState_ClosesTheOriginalResponseBody(t *testing.T) {
- resp := mocks.NewResponse()
- b := resp.Body.(*mocks.Body)
- ps := &pollingState{PollingMethod: PollingLocation}
- updatePollingState(resp, ps)
- if b.IsOpen() {
- t.Fatal("azure: updatePollingState failed to close the original http.Response Body")
- }
-}
-
-func TestUpdatePollingState_FailsWhenResponseLacksRequest(t *testing.T) {
- resp := newAsynchronousResponse()
- resp.Request = nil
-
- ps := pollingState{}
- err := updatePollingState(resp, &ps)
+func TestCreateDeleteTracker201FailNoLocation(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodDelete, nil), http.StatusCreated, nil)
+ _, err := createPollingTracker(resp)
if err == nil {
- t.Fatal("azure: updatePollingState failed to return an error when the http.Response lacked the original http.Request")
+ t.Fatal("unexpected nil error")
}
}
-func TestUpdatePollingState_SetsThePollingMethodWhenUsingTheAzureAsyncOperationHeader(t *testing.T) {
- ps := pollingState{}
- updatePollingState(newAsynchronousResponse(), &ps)
-
- if ps.PollingMethod != PollingAsyncOperation {
- t.Fatal("azure: updatePollingState failed to set the correct response format when using the Azure-AsyncOperation header")
- }
-}
-
-func TestUpdatePollingState_SetsThePollingMethodWhenUsingTheAzureAsyncOperationHeaderIsMissing(t *testing.T) {
- resp := newAsynchronousResponse()
- resp.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
-
- ps := pollingState{}
- updatePollingState(resp, &ps)
-
- if ps.PollingMethod != PollingLocation {
- t.Fatal("azure: updatePollingState failed to set the correct response format when the Azure-AsyncOperation header is absent")
- }
-}
-
-func TestUpdatePollingState_DoesNotChangeAnExistingReponseFormat(t *testing.T) {
- resp := newAsynchronousResponse()
- resp.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
-
- ps := pollingState{PollingMethod: PollingAsyncOperation}
- updatePollingState(resp, &ps)
-
- if ps.PollingMethod != PollingAsyncOperation {
- t.Fatal("azure: updatePollingState failed to leave an existing response format setting")
- }
-}
-
-func TestUpdatePollingState_PrefersTheAzureAsyncOperationHeader(t *testing.T) {
- resp := newAsynchronousResponse()
-
- ps := pollingState{}
- updatePollingState(resp, &ps)
-
- if ps.URI != mocks.TestAzureAsyncURL {
- t.Fatal("azure: updatePollingState failed to prefer the Azure-AsyncOperation header")
- }
-}
-
-func TestUpdatePollingState_PrefersLocationWhenTheAzureAsyncOperationHeaderMissing(t *testing.T) {
- resp := newAsynchronousResponse()
- resp.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
-
- ps := pollingState{}
- updatePollingState(resp, &ps)
-
- if ps.URI != mocks.TestLocationURL {
- t.Fatal("azure: updatePollingState failed to prefer the Location header when the Azure-AsyncOperation header is missing")
- }
-}
-
-func TestUpdatePollingState_UsesTheObjectLocationIfAsyncHeadersAreMissing(t *testing.T) {
- resp := newAsynchronousResponse()
- resp.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- resp.Header.Del(http.CanonicalHeaderKey(autorest.HeaderLocation))
- resp.Request.Method = http.MethodPatch
-
- ps := pollingState{}
- updatePollingState(resp, &ps)
-
- if ps.URI != mocks.TestURL {
- t.Fatal("azure: updatePollingState failed to use the Object URL when the asynchronous headers are missing")
- }
-}
-
-func TestUpdatePollingState_RecognizesLowerCaseHTTPVerbs(t *testing.T) {
- for _, m := range []string{strings.ToLower(http.MethodPatch), strings.ToLower(http.MethodPut), strings.ToLower(http.MethodGet)} {
- resp := newAsynchronousResponse()
- resp.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- resp.Header.Del(http.CanonicalHeaderKey(autorest.HeaderLocation))
- resp.Request.Method = m
-
- ps := pollingState{}
- updatePollingState(resp, &ps)
-
- if ps.URI != mocks.TestURL {
- t.Fatalf("azure: updatePollingState failed to recognize the lower-case HTTP verb '%s'", m)
- }
- }
-}
-
-func TestUpdatePollingState_ReturnsAnErrorIfAsyncHeadersAreMissingForANewOrDeletedObject(t *testing.T) {
- resp := newAsynchronousResponse()
- resp.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- resp.Header.Del(http.CanonicalHeaderKey(autorest.HeaderLocation))
-
- for _, m := range []string{http.MethodDelete, http.MethodPost} {
- resp.Request.Method = m
- err := updatePollingState(resp, &pollingState{})
- if err == nil {
- t.Fatalf("azure: updatePollingState failed to return an error even though it could not determine the polling URL for Method '%s'", m)
- }
- }
-}
-
-func TestNewPollingRequest_ReturnsAnErrorWhenPrepareFails(t *testing.T) {
- _, err := newPollingRequest(pollingState{PollingMethod: PollingAsyncOperation, URI: mocks.TestBadURL})
+func TestCreateDeleteTracker201FailBadLocation(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodDelete, nil), http.StatusCreated, nil)
+ mocks.SetLocationHeader(resp, mocks.TestBadURL)
+ _, err := createPollingTracker(resp)
if err == nil {
- t.Fatal("azure: newPollingRequest failed to return an error when Prepare fails")
+ t.Fatal("unexpected nil error")
}
}
-func TestNewPollingRequest_DoesNotReturnARequestWhenPrepareFails(t *testing.T) {
- req, _ := newPollingRequest(pollingState{PollingMethod: PollingAsyncOperation, URI: mocks.TestBadURL})
- if req != nil {
- t.Fatal("azure: newPollingRequest returned an http.Request when Prepare failed")
+func TestCreateDeleteTracker202SuccessAsyncOp(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodDelete, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestAzureAsyncURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != "" {
+ t.Fatal("expected empty GET URL")
}
}
-func TestNewPollingRequest_ReturnsAGetRequest(t *testing.T) {
- req, _ := newPollingRequest(pollingState{PollingMethod: PollingAsyncOperation, URI: mocks.TestAzureAsyncURL})
- if req.Method != "GET" {
- t.Fatalf("azure: newPollingRequest did not create an HTTP GET request -- actual method %v", req.Method)
+func TestCreateDeleteTracker202SuccessLocation(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodDelete, nil), http.StatusAccepted, nil)
+ mocks.SetLocationHeader(resp, mocks.TestLocationURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingLocation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestLocationURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
}
}
-func TestDoPollForAsynchronous_IgnoresUnspecifiedStatusCodes(t *testing.T) {
- client := mocks.NewSender()
-
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Duration(0)))
-
- if client.Attempts() != 1 {
- t.Fatalf("azure: DoPollForAsynchronous polled for unspecified status code")
+func TestCreateDeleteTracker202SuccessBoth(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodDelete, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestAzureAsyncURL)
+ mocks.SetLocationHeader(resp, mocks.TestLocationURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestLocationURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
}
-
- autorest.Respond(r,
- autorest.ByClosing())
}
-func TestDoPollForAsynchronous_PollsForSpecifiedStatusCodes(t *testing.T) {
- client := mocks.NewSender()
- client.AppendResponse(newAsynchronousResponse())
+func TestCreateDeleteTracker202SuccessBadLocation(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodDelete, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestAzureAsyncURL)
+ mocks.SetLocationHeader(resp, mocks.TestBadURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != "" {
+ t.Fatal("expected empty GET URL")
+ }
+}
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
+func TestCreateDeleteTracker202FailBadAsyncOp(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodDelete, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestBadURL)
+ _, err := createPollingTracker(resp)
+ if err == nil {
+ t.Fatal("unexpected nil error")
+ }
+}
- if client.Attempts() != 2 {
- t.Fatalf("azure: DoPollForAsynchronous failed to poll for specified status code")
+func TestCreateDeleteTracker202FailBadLocation(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodDelete, nil), http.StatusAccepted, nil)
+ mocks.SetLocationHeader(resp, mocks.TestBadURL)
+ _, err := createPollingTracker(resp)
+ if err == nil {
+ t.Fatal("unexpected nil error")
+ }
+}
+
+// PATCH
+
+func TestCreatePatchTracker201Success(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPatch, nil), http.StatusCreated, nil)
+ setAsyncOpHeader(resp, mocks.TestAzureAsyncURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePatchTracker201SuccessNoHeaders(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPatch, nil), http.StatusCreated, nil)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingRequestURI {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePatchTracker201FailBadAsyncOp(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPatch, nil), http.StatusCreated, nil)
+ setAsyncOpHeader(resp, mocks.TestBadURL)
+ _, err := createPollingTracker(resp)
+ if err == nil {
+ t.Fatal("unexpected nil error")
+ }
+}
+
+func TestCreatePatchTracker202SuccessAsyncOp(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPatch, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestAzureAsyncURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePatchTracker202SuccessLocation(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPatch, nil), http.StatusAccepted, nil)
+ mocks.SetLocationHeader(resp, mocks.TestLocationURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingLocation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePatchTracker202SuccessBoth(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPatch, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestAzureAsyncURL)
+ mocks.SetLocationHeader(resp, mocks.TestLocationURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePatchTracker202FailBadAsyncOp(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPatch, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestBadURL)
+ _, err := createPollingTracker(resp)
+ if err == nil {
+ t.Fatal("unexpected nil error")
+ }
+}
+
+func TestCreatePatchTracker202FailBadLocation(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPatch, nil), http.StatusAccepted, nil)
+ mocks.SetLocationHeader(resp, mocks.TestBadURL)
+ _, err := createPollingTracker(resp)
+ if err == nil {
+ t.Fatal("unexpected nil error")
+ }
+}
+
+// POST
+
+func TestCreatePostTracker201Success(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPost, nil), http.StatusCreated, nil)
+ mocks.SetLocationHeader(resp, mocks.TestLocationURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingLocation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestLocationURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePostTracker201FailNoHeader(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPost, nil), http.StatusCreated, nil)
+ _, err := createPollingTracker(resp)
+ if err == nil {
+ t.Fatal("unexpected nil err")
+ }
+}
+
+func TestCreatePostTracker201FailBadHeader(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPost, nil), http.StatusCreated, nil)
+ mocks.SetLocationHeader(resp, mocks.TestBadURL)
+ _, err := createPollingTracker(resp)
+ if err == nil {
+ t.Fatal("unexpected nil err")
+ }
+}
+
+func TestCreatePostTracker202SuccessAsyncOp(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPost, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestAzureAsyncURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != "" {
+ t.Fatal("expected empty final GET URL")
+ }
+}
+
+func TestCreatePostTracker202SuccessLocation(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPost, nil), http.StatusAccepted, nil)
+ mocks.SetLocationHeader(resp, mocks.TestLocationURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingLocation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestLocationURL {
+ t.Fatalf("wrong final GET URI: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePostTracker202SuccessBoth(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPost, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestAzureAsyncURL)
+ mocks.SetLocationHeader(resp, mocks.TestLocationURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestLocationURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePostTracker202SuccessBadLocation(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPost, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestAzureAsyncURL)
+ mocks.SetLocationHeader(resp, mocks.TestBadURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != "" {
+ t.Fatal("expected empty final GET URL")
+ }
+}
+
+func TestCreatePostTracker202FailBadAsyncOp(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPost, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestBadURL)
+ _, err := createPollingTracker(resp)
+ if err == nil {
+ t.Fatal("unexpected nil error")
+ }
+}
+
+func TestCreatePostTracker202FailBadLocation(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPost, nil), http.StatusAccepted, nil)
+ _, err := createPollingTracker(resp)
+ mocks.SetLocationHeader(resp, mocks.TestBadURL)
+ if err == nil {
+ t.Fatal("unexpected nil error")
+ }
+}
+
+// PUT
+
+func TestCreatePutTracker201SuccessAsyncOp(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPut, nil), http.StatusCreated, nil)
+ setAsyncOpHeader(resp, mocks.TestAzureAsyncURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePutTracker201SuccessNoHeaders(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPut, nil), http.StatusCreated, nil)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingRequestURI {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePutTracker201FailBadAsyncOp(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPut, nil), http.StatusCreated, nil)
+ setAsyncOpHeader(resp, mocks.TestBadURL)
+ _, err := createPollingTracker(resp)
+ if err == nil {
+ t.Fatal("unexpected nil error")
+ }
+}
+
+func TestCreatePutTracker202SuccessAsyncOp(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPut, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestAzureAsyncURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePutTracker202SuccessLocation(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPut, nil), http.StatusAccepted, nil)
+ mocks.SetLocationHeader(resp, mocks.TestLocationURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingLocation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestLocationURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePutTracker202SuccessBoth(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPut, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestAzureAsyncURL)
+ mocks.SetLocationHeader(resp, mocks.TestLocationURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestLocationURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePutTracker202SuccessBadLocation(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPut, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestAzureAsyncURL)
+ mocks.SetLocationHeader(resp, mocks.TestBadURL)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ if pt.pollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong polling method: %s", pt.pollingMethod())
+ }
+ if pt.finalGetURL() != mocks.TestURL {
+ t.Fatalf("wrong final GET URL: %s", pt.finalGetURL())
+ }
+}
+
+func TestCreatePutTracker202FailBadAsyncOp(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPut, nil), http.StatusAccepted, nil)
+ setAsyncOpHeader(resp, mocks.TestBadURL)
+ _, err := createPollingTracker(resp)
+ if err == nil {
+ t.Fatal("unexpected nil error")
+ }
+}
+
+func TestPollPutTrackerSuccessNoHeaders(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPut, nil), http.StatusAccepted, nil)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ sender := mocks.NewSender()
+ sender.AppendResponse(newProvisioningStatusResponse("InProgress"))
+ err = pt.pollForStatus(sender)
+ if err != nil {
+ t.Fatalf("failed to poll for status: %v", err)
+ }
+ err = pt.checkForErrors()
+ if err != nil {
+ t.Fatalf("unexpected error: %v", err)
+ }
+}
+
+func TestPollPutTrackerFailNoHeadersEmptyBody(t *testing.T) {
+ resp := newAsyncResp(newAsyncReq(http.MethodPut, nil), http.StatusAccepted, nil)
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ sender := mocks.NewSender()
+ sender.AppendResponse(mocks.NewResponseWithBodyAndStatus(&mocks.Body{}, http.StatusOK, "status ok"))
+ err = pt.pollForStatus(sender)
+ if err != nil {
+ t.Fatalf("failed to poll for status: %v", err)
+ }
+ err = pt.checkForErrors()
+ if err == nil {
+ t.Fatalf("unexpected nil error")
+ }
+}
+
+// errors
+
+func TestAsyncPollingReturnsWrappedError(t *testing.T) {
+ resp := newSimpleAsyncResp()
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ sender := mocks.NewSender()
+ sender.AppendResponse(newOperationResourceErrorResponse("Failed"))
+ err = pt.pollForStatus(sender)
+ if err != nil {
+ t.Fatalf("failed to poll for status: %v", err)
+ }
+ err = pt.pollingError()
+ if err == nil {
+ t.Fatal("unexpected nil polling error")
+ }
+ if se, ok := err.(*ServiceError); !ok {
+ t.Fatal("incorrect error type")
+ } else if se.Code == "" {
+ t.Fatal("empty service error code")
+ } else if se.Message == "" {
+ t.Fatal("empty service error message")
+ }
+}
+
+func TestLocationPollingReturnsWrappedError(t *testing.T) {
+ resp := newSimpleLocationResp()
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ sender := mocks.NewSender()
+ sender.AppendResponse(newProvisioningStatusErrorResponse("Failed"))
+ err = pt.pollForStatus(sender)
+ if err != nil {
+ t.Fatalf("failed to poll for status: %v", err)
+ }
+ err = pt.pollingError()
+ if err == nil {
+ t.Fatal("unexpected nil polling error")
+ }
+ if se, ok := err.(*ServiceError); !ok {
+ t.Fatal("incorrect error type")
+ } else if se.Code == "" {
+ t.Fatal("empty service error code")
+ } else if se.Message == "" {
+ t.Fatal("empty service error message")
+ }
+}
+
+func TestLocationPollingReturnsUnwrappedError(t *testing.T) {
+ resp := newSimpleLocationResp()
+ pt, err := createPollingTracker(resp)
+ if err != nil {
+ t.Fatalf("failed to create tracker: %v", err)
+ }
+ sender := mocks.NewSender()
+ sender.AppendResponse(newProvisioningStatusUnwrappedErrorResponse("Failed"))
+ err = pt.pollForStatus(sender)
+ if err != nil {
+ t.Fatalf("failed to poll for status: %v", err)
+ }
+ err = pt.pollingError()
+ if err == nil {
+ t.Fatal("unexpected nil polling error")
+ }
+ if se, ok := err.(*ServiceError); !ok {
+ t.Fatal("incorrect error type")
+ } else if se.Code == "" {
+ t.Fatal("empty service error code")
+ } else if se.Message == "" {
+ t.Fatal("empty service error message")
+ }
+}
+
+// DoPollForAsynchronous (legacy so not many tests plus it builds on Future which has more tests)
+
+func TestDoPollForAsynchronous_Success(t *testing.T) {
+ r1 := newSimpleAsyncResp()
+ r2 := newOperationResourceResponse("busy")
+ r3 := newOperationResourceResponse(operationSucceeded)
+
+ sender := mocks.NewSender()
+ sender.AppendResponse(r1)
+ sender.AppendAndRepeatResponse(r2, 2)
+ sender.AppendAndRepeatResponse(r3, 1)
+
+ r, err := autorest.SendWithSender(sender, newAsyncReq(http.MethodPut, nil), DoPollForAsynchronous(time.Millisecond))
+ if err != nil {
+ t.Fatalf("failed to poll for status: %v", err)
}
- autorest.Respond(r,
- autorest.ByClosing())
+ if sender.Attempts() < sender.NumResponses() {
+ t.Fatal("DoPollForAsynchronous stopped polling before receiving a terminated OperationResource")
+ }
+ autorest.Respond(r, autorest.ByClosing())
+}
+
+func TestDoPollForAsynchronous_Failed(t *testing.T) {
+ r1 := newSimpleAsyncResp()
+ r2 := newOperationResourceResponse("busy")
+ r3 := newOperationResourceErrorResponse(operationFailed)
+
+ sender := mocks.NewSender()
+ sender.AppendResponse(r1)
+ sender.AppendAndRepeatResponse(r2, 2)
+ sender.AppendAndRepeatResponse(r3, 1)
+
+ r, err := autorest.SendWithSender(sender, newAsyncReq(http.MethodPut, nil), DoPollForAsynchronous(time.Millisecond))
+ if err == nil {
+ t.Fatal("unexpected nil error when polling")
+ }
+ if se, ok := err.(*ServiceError); !ok {
+ t.Fatal("incorrect error type")
+ } else if se.Code == "" {
+ t.Fatal("empty service error code")
+ } else if se.Message == "" {
+ t.Fatal("empty service error message")
+ }
+
+ if sender.Attempts() < sender.NumResponses() {
+ t.Fatalf("DoPollForAsynchronous stopped polling before receiving a terminated OperationResource")
+ }
+ autorest.Respond(r, autorest.ByClosing())
}
func TestDoPollForAsynchronous_CanBeCanceled(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
delay := 5 * time.Second
- r1 := newAsynchronousResponse()
+ r1 := newSimpleAsyncResp()
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(newOperationResourceResponse("Busy"), -1)
+ sender := mocks.NewSender()
+ sender.AppendResponse(r1)
+ sender.AppendAndRepeatResponse(newOperationResourceResponse("Busy"), -1)
var wg sync.WaitGroup
wg.Add(1)
@@ -481,14 +660,11 @@ func TestDoPollForAsynchronous_CanBeCanceled(t *testing.T) {
end := time.Now()
var err error
go func() {
- req := mocks.NewRequest()
+ req := newAsyncReq(http.MethodPut, nil)
req = req.WithContext(ctx)
-
var r *http.Response
- r, err = autorest.SendWithSender(client, req,
- DoPollForAsynchronous(delay))
- autorest.Respond(r,
- autorest.ByClosing())
+ r, err = autorest.SendWithSender(sender, req, DoPollForAsynchronous(delay))
+ autorest.Respond(r, autorest.ByClosing())
end = time.Now()
wg.Done()
}()
@@ -496,554 +672,32 @@ func TestDoPollForAsynchronous_CanBeCanceled(t *testing.T) {
wg.Wait()
time.Sleep(5 * time.Millisecond)
if err == nil {
- t.Fatalf("azure: DoPollForAsynchronous didn't cancel")
+ t.Fatalf("DoPollForAsynchronous didn't cancel")
}
if end.Sub(start) >= delay {
- t.Fatalf("azure: DoPollForAsynchronous failed to cancel")
+ t.Fatalf("DoPollForAsynchronous failed to cancel")
}
}
-func TestDoPollForAsynchronous_ClosesAllNonreturnedResponseBodiesWhenPolling(t *testing.T) {
- r1 := newAsynchronousResponse()
- b1 := r1.Body.(*mocks.Body)
- r2 := newOperationResourceResponse("busy")
- b2 := r2.Body.(*mocks.Body)
- r3 := newOperationResourceResponse(operationSucceeded)
- b3 := r3.Body.(*mocks.Body)
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendResponse(r3)
-
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if b1.IsOpen() || b2.IsOpen() || b3.IsOpen() {
- t.Fatalf("azure: DoPollForAsynchronous did not close unreturned response bodies")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_LeavesLastResponseBodyOpen(t *testing.T) {
- r1 := newAsynchronousResponse()
- r2 := newOperationResourceResponse("busy")
- r3 := newOperationResourceResponse(operationSucceeded)
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendResponse(r3)
-
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- b, err := ioutil.ReadAll(r.Body)
- if len(b) <= 0 || err != nil {
- t.Fatalf("azure: DoPollForAsynchronous did not leave open the body of the last response - Error='%v'", err)
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_DoesNotPollIfOriginalRequestReturnedAnError(t *testing.T) {
- r1 := newAsynchronousResponse()
- r2 := newOperationResourceResponse("busy")
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendResponse(r2)
- client.SetError(fmt.Errorf("Faux Error"))
-
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if client.Attempts() != 1 {
- t.Fatalf("azure: DoPollForAsynchronous tried to poll after receiving an error")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_DoesNotPollIfCreatingOperationRequestFails(t *testing.T) {
- r1 := newAsynchronousResponse()
- mocks.SetResponseHeader(r1, http.CanonicalHeaderKey(headerAsyncOperation), mocks.TestBadURL)
- r2 := newOperationResourceResponse("busy")
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
-
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if client.Attempts() > 1 {
- t.Fatalf("azure: DoPollForAsynchronous polled with an invalidly formed operation request")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_StopsPollingAfterAnError(t *testing.T) {
- r1 := newAsynchronousResponse()
- r2 := newOperationResourceResponse("busy")
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.SetError(fmt.Errorf("Faux Error"))
- client.SetEmitErrorAfter(2)
-
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if client.Attempts() > 3 {
- t.Fatalf("azure: DoPollForAsynchronous failed to stop polling after receiving an error")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_ReturnsPollingError(t *testing.T) {
- client := mocks.NewSender()
- client.AppendAndRepeatResponse(newAsynchronousResponse(), 5)
- client.SetError(fmt.Errorf("Faux Error"))
- client.SetEmitErrorAfter(1)
-
- r, err := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if err == nil {
- t.Fatalf("azure: DoPollForAsynchronous failed to return error from polling")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_PollsForStatusAccepted(t *testing.T) {
- r1 := newAsynchronousResponse()
- r1.Status = "202 Accepted"
- r1.StatusCode = http.StatusAccepted
- r2 := newOperationResourceResponse("busy")
- r3 := newOperationResourceResponse(operationCanceled)
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 1)
-
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if client.Attempts() < client.NumResponses() {
- t.Fatalf("azure: DoPollForAsynchronous stopped polling before receiving a terminated OperationResource")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_PollsForStatusCreated(t *testing.T) {
- r1 := newAsynchronousResponse()
- r1.Status = "201 Created"
- r1.StatusCode = http.StatusCreated
- r2 := newOperationResourceResponse("busy")
- r3 := newOperationResourceResponse(operationCanceled)
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 1)
-
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if client.Attempts() < client.NumResponses() {
- t.Fatalf("azure: DoPollForAsynchronous stopped polling before receiving a terminated OperationResource")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_PollsUntilProvisioningStatusTerminates(t *testing.T) {
- r1 := newAsynchronousResponse()
- r1.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r2 := newProvisioningStatusResponse("busy")
- r2.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r3 := newProvisioningStatusResponse(operationCanceled)
- r3.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 1)
-
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if client.Attempts() < client.NumResponses() {
- t.Fatalf("azure: DoPollForAsynchronous stopped polling before receiving a terminated OperationResource")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_PollsUntilProvisioningStatusSucceeds(t *testing.T) {
- r1 := newAsynchronousResponse()
- r1.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r2 := newProvisioningStatusResponse("busy")
- r2.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r3 := newProvisioningStatusResponse(operationSucceeded)
- r3.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 1)
-
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if client.Attempts() < client.NumResponses() {
- t.Fatalf("azure: DoPollForAsynchronous stopped polling before receiving a terminated OperationResource")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_PollsUntilOperationResourceHasTerminated(t *testing.T) {
- r1 := newAsynchronousResponse()
- r2 := newOperationResourceResponse("busy")
- r3 := newOperationResourceResponse(operationCanceled)
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 1)
-
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if client.Attempts() < client.NumResponses() {
- t.Fatalf("azure: DoPollForAsynchronous stopped polling before receiving a terminated OperationResource")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_PollsUntilOperationResourceHasSucceeded(t *testing.T) {
- r1 := newAsynchronousResponse()
- r2 := newOperationResourceResponse("busy")
- r3 := newOperationResourceResponse(operationSucceeded)
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 1)
-
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if client.Attempts() < client.NumResponses() {
- t.Fatalf("azure: DoPollForAsynchronous stopped polling before receiving a terminated OperationResource")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_StopsPollingWhenOperationResourceHasTerminated(t *testing.T) {
- r1 := newAsynchronousResponse()
- r2 := newOperationResourceResponse("busy")
- r3 := newOperationResourceResponse(operationCanceled)
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 2)
-
- r, _ := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if client.Attempts() > 4 {
- t.Fatalf("azure: DoPollForAsynchronous failed to stop after receiving a terminated OperationResource")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_ReturnsAnErrorForCanceledOperations(t *testing.T) {
- r1 := newAsynchronousResponse()
- r2 := newOperationResourceResponse("busy")
- r3 := newOperationResourceErrorResponse(operationCanceled)
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 1)
-
- r, err := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if err == nil || !strings.Contains(fmt.Sprintf("%v", err), "Canceled") {
- t.Fatalf("azure: DoPollForAsynchronous failed to return an appropriate error for a canceled OperationResource")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_ReturnsAnErrorForFailedOperations(t *testing.T) {
- r1 := newAsynchronousResponse()
- r2 := newOperationResourceResponse("busy")
- r3 := newOperationResourceErrorResponse(operationFailed)
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 1)
-
- r, err := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if err == nil || !strings.Contains(fmt.Sprintf("%v", err), "Failed") {
- t.Fatalf("azure: DoPollForAsynchronous failed to return an appropriate error for a canceled OperationResource")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_WithNilURI(t *testing.T) {
- r1 := newAsynchronousResponse()
- r1.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r1.Header.Del(http.CanonicalHeaderKey(autorest.HeaderLocation))
-
- r2 := newOperationResourceResponse("busy")
- r2.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r2.Header.Del(http.CanonicalHeaderKey(autorest.HeaderLocation))
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendResponse(r2)
-
- req, _ := http.NewRequest("POST", "https://microsoft.com/a/b/c/", mocks.NewBody(""))
- r, err := autorest.SendWithSender(client, req,
- DoPollForAsynchronous(time.Millisecond))
-
- if err == nil {
- t.Fatalf("azure: DoPollForAsynchronous failed to return error for nil URI. got: nil; want: Azure Polling Error - Unable to obtain polling URI for POST")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_ReturnsAnUnknownErrorForFailedOperations(t *testing.T) {
- // Return unknown error if error not present in last response
- r1 := newAsynchronousResponse()
- r1.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r2 := newProvisioningStatusResponse("busy")
- r2.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r3 := newProvisioningStatusResponse(operationFailed)
- r3.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 1)
-
- r, err := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- expected := makeLongRunningOperationErrorString("Unknown", "None")
- if err.Error() != expected {
- t.Fatalf("azure: DoPollForAsynchronous failed to return an appropriate error message for an unknown error. \n expected=%q \n got=%q",
- expected, err.Error())
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_ReturnsErrorForLastErrorResponse(t *testing.T) {
- // Return error code and message if error present in last response
- r1 := newAsynchronousResponse()
- r1.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r2 := newProvisioningStatusResponse("busy")
- r2.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r3 := newAsynchronousResponseWithError("400 Bad Request", http.StatusBadRequest)
- r3.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 1)
-
- r, err := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- expected := makeLongRunningOperationErrorString("InvalidParameter", "tom-service-DISCOVERY-server-base-v1.core.local' is not a valid captured VHD blob name prefix.")
- if err.Error() != expected {
- t.Fatalf("azure: DoPollForAsynchronous failed to return an appropriate error message for an unknown error. \n expected=%q \n got=%q",
- expected, err.Error())
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_ReturnsOperationResourceErrorForFailedOperations(t *testing.T) {
- // Return Operation resource response with error code and message in last operation resource response
- r1 := newAsynchronousResponse()
- r2 := newOperationResourceResponse("busy")
- r3 := newOperationResourceErrorResponse(operationFailed)
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 1)
-
- r, err := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- expected := makeLongRunningOperationErrorString("BadArgument", "The provided database 'foo' has an invalid username.")
- if err.Error() != expected {
- t.Fatalf("azure: DoPollForAsynchronous failed to return an appropriate error message for a failed Operations. \n expected=%q \n got=%q",
- expected, err.Error())
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_ReturnsErrorForFirstPutRequest(t *testing.T) {
- // Return 400 bad response with error code and message in first put
- r1 := newAsynchronousResponseWithError("400 Bad Request", http.StatusBadRequest)
- client := mocks.NewSender()
- client.AppendResponse(r1)
-
- res, err := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
- if err != nil {
- t.Fatalf("azure: DoPollForAsynchronous failed to return an appropriate error message for a failed Operations. \n expected=%q \n got=%q",
- errorResponse, err.Error())
- }
-
- err = autorest.Respond(res,
- WithErrorUnlessStatusCode(http.StatusAccepted, http.StatusCreated, http.StatusOK),
- autorest.ByClosing())
-
- reqError, ok := err.(*RequestError)
- if !ok {
- t.Fatalf("azure: returned error is not azure.RequestError: %T", err)
- }
-
- expected := &RequestError{
- ServiceError: &ServiceError{
- Code: "InvalidParameter",
- Message: "tom-service-DISCOVERY-server-base-v1.core.local' is not a valid captured VHD blob name prefix.",
- },
- DetailedError: autorest.DetailedError{
- StatusCode: 400,
- },
- }
- if !reflect.DeepEqual(reqError, expected) {
- t.Fatalf("azure: wrong error. expected=%q\ngot=%q", expected, reqError)
- }
-
- defer res.Body.Close()
- b, err := ioutil.ReadAll(res.Body)
- if err != nil {
- t.Fatal(err)
- }
- if string(b) != errorResponse {
- t.Fatalf("azure: Response body is wrong. got=%q expected=%q", string(b), errorResponse)
- }
-
-}
-
-func TestDoPollForAsynchronous_ReturnsNoErrorForSuccessfulOperations(t *testing.T) {
- r1 := newAsynchronousResponse()
- r2 := newOperationResourceResponse("busy")
- r3 := newOperationResourceErrorResponse(operationSucceeded)
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 1)
-
- r, err := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if err != nil {
- t.Fatalf("azure: DoPollForAsynchronous returned an error for a successful OperationResource")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
-func TestDoPollForAsynchronous_StopsPollingIfItReceivesAnInvalidOperationResource(t *testing.T) {
- r1 := newAsynchronousResponse()
- r2 := newOperationResourceResponse("busy")
- r3 := newOperationResourceResponse("busy")
- r3.Body = mocks.NewBody(operationResourceIllegal)
- r4 := newOperationResourceResponse(operationSucceeded)
-
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendAndRepeatResponse(r3, 1)
- client.AppendAndRepeatResponse(r4, 1)
-
- r, err := autorest.SendWithSender(client, mocks.NewRequest(),
- DoPollForAsynchronous(time.Millisecond))
-
- if client.Attempts() > 4 {
- t.Fatalf("azure: DoPollForAsynchronous failed to stop polling after receiving an invalid OperationResource")
- }
- if err == nil {
- t.Fatalf("azure: DoPollForAsynchronous failed to return an error after receving an invalid OperationResource")
- }
-
- autorest.Respond(r,
- autorest.ByClosing())
-}
-
func TestFuture_PollsUntilProvisioningStatusSucceeds(t *testing.T) {
- r1 := newAsynchronousResponse()
- r1.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r2 := newProvisioningStatusResponse("busy")
- r2.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r3 := newProvisioningStatusResponse(operationSucceeded)
- r3.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
+ r2 := newOperationResourceResponse("busy")
+ r3 := newOperationResourceResponse(operationSucceeded)
- client := mocks.NewSender()
- client.AppendResponse(r1)
- client.AppendAndRepeatResponse(r2, 2)
- client.AppendResponse(r3)
+ sender := mocks.NewSender()
+ sender.AppendAndRepeatResponse(r2, 2)
+ sender.AppendResponse(r3)
- future := NewFuture(mocks.NewRequest())
+ future, err := NewFutureFromResponse(newSimpleAsyncResp())
+ if err != nil {
+ t.Fatalf("failed to create future: %v", err)
+ }
- for done, err := future.Done(client); !done; done, err = future.Done(client) {
- if future.PollingMethod() != PollingLocation {
- t.Fatalf("azure: wrong future polling method")
+ for done, err := future.Done(sender); !done; done, err = future.Done(sender) {
+ if future.PollingMethod() != PollingAsyncOperation {
+ t.Fatalf("wrong future polling method: %s", future.PollingMethod())
}
if err != nil {
- t.Fatalf("azure: TestFuture polling Done failed")
+ t.Fatalf("polling Done failed: %v", err)
}
delay, ok := future.GetPollingDelay()
if !ok {
@@ -1052,92 +706,93 @@ func TestFuture_PollsUntilProvisioningStatusSucceeds(t *testing.T) {
time.Sleep(delay)
}
- if client.Attempts() < client.NumResponses() {
- t.Fatalf("azure: TestFuture stopped polling before receiving a terminated OperationResource")
+ if sender.Attempts() < sender.NumResponses() {
+ t.Fatalf("stopped polling before receiving a terminated OperationResource")
}
autorest.Respond(future.Response(),
autorest.ByClosing())
}
-func TestFuture_Marshalling(t *testing.T) {
- client := mocks.NewSender()
- client.AppendResponse(newAsynchronousResponse())
-
- future := NewFuture(mocks.NewRequest())
- done, err := future.Done(client)
+func TestFuture_MarshallingSuccess(t *testing.T) {
+ future, err := NewFutureFromResponse(newSimpleAsyncResp())
if err != nil {
- t.Fatalf("azure: TestFuture marshalling Done failed")
- }
- if done {
- t.Fatalf("azure: TestFuture marshalling shouldn't be done")
- }
- if future.PollingMethod() != PollingAsyncOperation {
- t.Fatalf("azure: wrong future polling method")
+ t.Fatalf("failed to create future: %v", err)
}
data, err := json.Marshal(future)
if err != nil {
- t.Fatalf("azure: TestFuture failed to marshal")
+ t.Fatalf("failed to marshal: %v", err)
}
var future2 Future
err = json.Unmarshal(data, &future2)
if err != nil {
- t.Fatalf("azure: TestFuture failed to unmarshal")
+ t.Fatalf("failed to unmarshal: %v", err)
}
- if future.ps.ServiceError != future2.ps.ServiceError {
- t.Fatalf("azure: TestFuture marshalling ServiceError don't match")
+ if reflect.DeepEqual(future.pt, future2.pt) {
+ t.Fatalf("marshalling unexpected match")
}
- if future.ps.PollingMethod != future2.ps.PollingMethod {
- t.Fatalf("azure: TestFuture marshalling response formats don't match")
- }
- if future.ps.State != future2.ps.State {
- t.Fatalf("azure: TestFuture marshalling states don't match")
- }
- if future.ps.URI != future2.ps.URI {
- t.Fatalf("azure: TestFuture marshalling URIs don't match")
+
+ // these fields don't get marshalled so nil them before deep comparison
+ future.pt.(*pollingTrackerPut).resp = nil
+ future.pt.(*pollingTrackerPut).rawBody = nil
+ if !reflect.DeepEqual(future.pt, future2.pt) {
+ t.Fatalf("marshalling futures don't match")
}
}
-func TestFuture_MarshallingWithServiceError(t *testing.T) {
- client := mocks.NewSender()
- client.AppendResponse(newAsynchronousResponseWithError("400 Bad Request", http.StatusBadRequest))
+func TestFuture_MarshallingWithError(t *testing.T) {
+ future, err := NewFutureFromResponse(newAsyncResponseWithError(http.MethodPut))
+ if err != nil {
+ t.Fatalf("failed to create future: %v", err)
+ }
- future := NewFuture(mocks.NewRequest())
- done, err := future.Done(client)
+ data, err := json.Marshal(future)
+ if err != nil {
+ t.Fatalf("failed to marshal: %v", err)
+ }
+
+ var future2 Future
+ err = json.Unmarshal(data, &future2)
+ if err != nil {
+ t.Fatalf("failed to unmarshal: %v", err)
+ }
+
+ if reflect.DeepEqual(future.pt, future2.pt) {
+ t.Fatalf("marshalling unexpected match")
+ }
+
+ // these fields don't get marshalled so nil them before deep comparison
+ future.pt.(*pollingTrackerPut).resp = nil
+ future.pt.(*pollingTrackerPut).rawBody = nil
+ if !reflect.DeepEqual(future.pt, future2.pt) {
+ t.Fatalf("marshalling futures don't match")
+ }
+}
+
+func TestFuture_CreateFromFailedOperation(t *testing.T) {
+ future, err := NewFutureFromResponse(newAsyncResponseWithError(http.MethodPut))
+ if err != nil {
+ t.Fatalf("failed to create future: %v", err)
+ }
+ done, err := future.Done(mocks.NewSender())
if err == nil {
- t.Fatalf("azure: TestFuture marshalling didn't fail")
+ t.Fatalf("Done should have returned an error")
}
- if done {
- t.Fatalf("azure: TestFuture marshalling shouldn't be done")
- }
- if future.PollingMethod() != "" {
- t.Fatalf("azure: future shouldn't have polling method")
+ if !done {
+ t.Fatalf("should be done")
}
}
func TestFuture_WaitForCompletion(t *testing.T) {
- r1 := newAsynchronousResponse()
- r1.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r2 := newProvisioningStatusResponse("busy")
- r2.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r3 := newAsynchronousResponseWithError("Internal server error", http.StatusInternalServerError)
- r3.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r3.Header.Del(http.CanonicalHeaderKey("Retry-After"))
- r4 := newProvisioningStatusResponse(operationSucceeded)
- r4.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
+ r2 := newOperationResourceResponse("busy")
+ r3 := newOperationResourceResponse(operationSucceeded)
sender := mocks.NewSender()
- sender.AppendResponse(r1)
- sender.AppendError(errors.New("transient network failure"))
sender.AppendAndRepeatResponse(r2, 2)
sender.AppendResponse(r3)
- sender.AppendResponse(r4)
-
- future := NewFuture(mocks.NewRequest())
-
client := autorest.Client{
PollingDelay: 1 * time.Second,
PollingDuration: autorest.DefaultPollingDuration,
@@ -1146,13 +801,51 @@ func TestFuture_WaitForCompletion(t *testing.T) {
Sender: sender,
}
- err := future.WaitForCompletion(context.Background(), client)
+ future, err := NewFutureFromResponse(newSimpleAsyncResp())
if err != nil {
- t.Fatalf("azure: WaitForCompletion returned non-nil error")
+ t.Fatalf("failed to create future: %v", err)
+ }
+
+ err = future.WaitForCompletion(context.Background(), client)
+ if err != nil {
+ t.Fatalf("WaitForCompletion returned non-nil error")
}
if sender.Attempts() < sender.NumResponses() {
- t.Fatalf("azure: TestFuture stopped polling before receiving a terminated OperationResource")
+ t.Fatalf("stopped polling before receiving a terminated OperationResource")
+ }
+
+ autorest.Respond(future.Response(),
+ autorest.ByClosing())
+}
+
+func TestFuture_WaitForCompletionRef(t *testing.T) {
+ r2 := newOperationResourceResponse("busy")
+ r3 := newOperationResourceResponse(operationSucceeded)
+
+ sender := mocks.NewSender()
+ sender.AppendAndRepeatResponse(r2, 2)
+ sender.AppendResponse(r3)
+ client := autorest.Client{
+ PollingDelay: 1 * time.Second,
+ PollingDuration: autorest.DefaultPollingDuration,
+ RetryAttempts: autorest.DefaultRetryAttempts,
+ RetryDuration: 1 * time.Second,
+ Sender: sender,
+ }
+
+ future, err := NewFutureFromResponse(newSimpleAsyncResp())
+ if err != nil {
+ t.Fatalf("failed to create future: %v", err)
+ }
+
+ err = future.WaitForCompletionRef(context.Background(), client)
+ if err != nil {
+ t.Fatalf("WaitForCompletion returned non-nil error")
+ }
+
+ if sender.Attempts() < sender.NumResponses() {
+ t.Fatalf("stopped polling before receiving a terminated OperationResource")
}
autorest.Respond(future.Response(),
@@ -1160,16 +853,15 @@ func TestFuture_WaitForCompletion(t *testing.T) {
}
func TestFuture_WaitForCompletionTimedOut(t *testing.T) {
- r1 := newAsynchronousResponse()
- r1.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
r2 := newProvisioningStatusResponse("busy")
- r2.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
sender := mocks.NewSender()
- sender.AppendResponse(r1)
sender.AppendAndRepeatResponseWithDelay(r2, 1*time.Second, 5)
- future := NewFuture(mocks.NewRequest())
+ future, err := NewFutureFromResponse(newSimpleAsyncResp())
+ if err != nil {
+ t.Fatalf("failed to create future: %v", err)
+ }
client := autorest.Client{
PollingDelay: autorest.DefaultPollingDelay,
@@ -1179,21 +871,23 @@ func TestFuture_WaitForCompletionTimedOut(t *testing.T) {
Sender: sender,
}
- err := future.WaitForCompletion(context.Background(), client)
+ err = future.WaitForCompletionRef(context.Background(), client)
if err == nil {
- t.Fatalf("azure: WaitForCompletion returned nil error, should have timed out")
+ t.Fatalf("WaitForCompletion returned nil error, should have timed out")
}
}
func TestFuture_WaitForCompletionRetriesExceeded(t *testing.T) {
- r1 := newAsynchronousResponse()
- r1.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
+ r1 := newProvisioningStatusResponse("InProgress")
sender := mocks.NewSender()
sender.AppendResponse(r1)
sender.AppendAndRepeatError(errors.New("transient network failure"), autorest.DefaultRetryAttempts+1)
- future := NewFuture(mocks.NewRequest())
+ future, err := NewFutureFromResponse(newSimpleAsyncResp())
+ if err != nil {
+ t.Fatalf("failed to create future: %v", err)
+ }
client := autorest.Client{
PollingDelay: autorest.DefaultPollingDelay,
@@ -1203,23 +897,22 @@ func TestFuture_WaitForCompletionRetriesExceeded(t *testing.T) {
Sender: sender,
}
- err := future.WaitForCompletion(context.Background(), client)
+ err = future.WaitForCompletionRef(context.Background(), client)
if err == nil {
- t.Fatalf("azure: WaitForCompletion returned nil error, should have errored out")
+ t.Fatalf("WaitForCompletion returned nil error, should have errored out")
}
}
func TestFuture_WaitForCompletionCancelled(t *testing.T) {
- r1 := newAsynchronousResponse()
- r1.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
- r2 := newProvisioningStatusResponse("busy")
- r2.Header.Del(http.CanonicalHeaderKey(headerAsyncOperation))
+ r1 := newProvisioningStatusResponse("InProgress")
sender := mocks.NewSender()
- sender.AppendResponse(r1)
- sender.AppendAndRepeatResponseWithDelay(r2, 1*time.Second, 5)
+ sender.AppendAndRepeatResponseWithDelay(r1, 1*time.Second, 5)
- future := NewFuture(mocks.NewRequest())
+ future, err := NewFutureFromResponse(newSimpleAsyncResp())
+ if err != nil {
+ t.Fatalf("failed to create future: %v", err)
+ }
client := autorest.Client{
PollingDelay: autorest.DefaultPollingDelay,
@@ -1235,9 +928,9 @@ func TestFuture_WaitForCompletionCancelled(t *testing.T) {
cancel()
}()
- err := future.WaitForCompletion(ctx, client)
+ err = future.WaitForCompletionRef(ctx, client)
if err == nil {
- t.Fatalf("azure: WaitForCompletion returned nil error, should have been cancelled")
+ t.Fatalf("WaitForCompletion returned nil error, should have been cancelled")
}
}
@@ -1245,6 +938,8 @@ const (
operationResourceIllegal = `
This is not JSON and should fail...badly.
`
+
+ // returned from LROs that use Location header
pollingStateFormat = `
{
"unused" : {
@@ -1256,6 +951,7 @@ const (
}
`
+ // returned from LROs that use Location header
errorResponse = `
{
"error" : {
@@ -1265,6 +961,15 @@ const (
}
`
+ // returned from LROs that use Location header
+ unwrappedErrorResponse = `
+ {
+ "code" : "InvalidParameter",
+ "message" : "tom-service-DISCOVERY-server-base-v1.core.local' is not a valid captured VHD blob name prefix."
+ }
+ `
+
+ // returned from LROs that use Location header
pollingStateEmpty = `
{
"unused" : {
@@ -1275,6 +980,7 @@ const (
}
`
+ // returned from LROs that use Azure-AsyncOperation header
operationResourceFormat = `
{
"id": "/subscriptions/id/locations/westus/operationsStatus/sameguid",
@@ -1283,11 +989,13 @@ const (
"startTime" : "2006-01-02T15:04:05Z",
"endTime" : "2006-01-02T16:04:05Z",
"percentComplete" : 50.00,
-
- "properties" : {}
+ "properties" : {
+ "foo": "bar"
+ }
}
`
+ // returned from LROs that use Azure-AsyncOperation header
operationResourceErrorFormat = `
{
"id": "/subscriptions/id/locations/westus/operationsStatus/sameguid",
@@ -1296,7 +1004,6 @@ const (
"startTime" : "2006-01-02T15:04:05Z",
"endTime" : "2006-01-02T16:04:05Z",
"percentComplete" : 50.00,
-
"properties" : {},
"error" : {
"code" : "BadArgument",
@@ -1306,42 +1013,79 @@ const (
`
)
-func newAsynchronousResponse() *http.Response {
- r := mocks.NewResponseWithStatus("201 Created", http.StatusCreated)
- r.Body = mocks.NewBody(fmt.Sprintf(pollingStateFormat, operationInProgress))
- mocks.SetResponseHeader(r, http.CanonicalHeaderKey(headerAsyncOperation), mocks.TestAzureAsyncURL)
- mocks.SetResponseHeader(r, http.CanonicalHeaderKey(autorest.HeaderLocation), mocks.TestLocationURL)
- mocks.SetRetryHeader(r, retryDelay)
- r.Request = mocks.NewRequestForURL(mocks.TestURL)
+// creates an async request with the specified body.
+func newAsyncReq(reqMethod string, body *mocks.Body) *http.Request {
+ return mocks.NewRequestWithParams(reqMethod, mocks.TestURL, body)
+}
+
+// creates an async response with the specified body.
+// the req param is the originating LRO request.
+func newAsyncResp(req *http.Request, statusCode int, body *mocks.Body) *http.Response {
+ status := "Unknown"
+ switch statusCode {
+ case http.StatusOK, http.StatusNoContent:
+ status = "Completed"
+ case http.StatusCreated:
+ status = "Creating"
+ case http.StatusAccepted:
+ status = "In progress"
+ case http.StatusBadRequest:
+ status = "Bad request"
+ }
+ r := mocks.NewResponseWithBodyAndStatus(body, statusCode, status)
+ r.Request = req
return r
}
-func newAsynchronousResponseWithError(response string, status int) *http.Response {
- r := mocks.NewResponseWithStatus(response, status)
- mocks.SetRetryHeader(r, retryDelay)
- r.Request = mocks.NewRequestForURL(mocks.TestURL)
- r.Body = mocks.NewBody(errorResponse)
+// creates a simple LRO response, PUT/201 with Azure-AsyncOperation header
+func newSimpleAsyncResp() *http.Response {
+ r := newAsyncResp(newAsyncReq(http.MethodPut, nil), http.StatusCreated, mocks.NewBody(fmt.Sprintf(operationResourceFormat, operationInProgress)))
+ mocks.SetResponseHeader(r, headerAsyncOperation, mocks.TestAzureAsyncURL)
return r
}
+// creates a simple LRO response, POST/201 with Location header
+func newSimpleLocationResp() *http.Response {
+ r := newAsyncResp(newAsyncReq(http.MethodPost, nil), http.StatusCreated, mocks.NewBody(fmt.Sprintf(pollingStateFormat, operationInProgress)))
+ mocks.SetResponseHeader(r, autorest.HeaderLocation, mocks.TestLocationURL)
+ return r
+}
+
+// creates an async response that contains an error (HTTP 400 + error response body)
+func newAsyncResponseWithError(reqMethod string) *http.Response {
+ return newAsyncResp(newAsyncReq(reqMethod, nil), http.StatusBadRequest, mocks.NewBody(errorResponse))
+}
+
+// creates a LRO polling response using the operation resource format (Azure-AsyncOperation LROs)
func newOperationResourceResponse(status string) *http.Response {
- r := newAsynchronousResponse()
- r.Body = mocks.NewBody(fmt.Sprintf(operationResourceFormat, status))
+ r := mocks.NewResponseWithBodyAndStatus(mocks.NewBody(fmt.Sprintf(operationResourceFormat, status)), http.StatusOK, status)
+ mocks.SetRetryHeader(r, retryDelay)
return r
}
+// creates a LRO polling error response using the operation resource format (Azure-AsyncOperation LROs)
func newOperationResourceErrorResponse(status string) *http.Response {
- r := newAsynchronousResponse()
- r.Body = mocks.NewBody(fmt.Sprintf(operationResourceErrorFormat, status))
- return r
+ return mocks.NewResponseWithBodyAndStatus(mocks.NewBody(fmt.Sprintf(operationResourceErrorFormat, status)), http.StatusBadRequest, status)
}
+// creates a LRO polling response using the provisioning state format (Location LROs)
func newProvisioningStatusResponse(status string) *http.Response {
- r := newAsynchronousResponse()
- r.Body = mocks.NewBody(fmt.Sprintf(pollingStateFormat, status))
+ r := mocks.NewResponseWithBodyAndStatus(mocks.NewBody(fmt.Sprintf(pollingStateFormat, status)), http.StatusOK, status)
+ mocks.SetRetryHeader(r, retryDelay)
return r
}
-func makeLongRunningOperationErrorString(code string, message string) string {
- return fmt.Sprintf("Long running operation terminated with status 'Failed': Code=%q Message=%q", code, message)
+// creates a LRO polling error response using the provisioning state format (Location LROs)
+func newProvisioningStatusErrorResponse(status string) *http.Response {
+ return mocks.NewResponseWithBodyAndStatus(mocks.NewBody(errorResponse), http.StatusBadRequest, status)
+}
+
+// creates a LRO polling unwrapped error response using the provisioning state format (Location LROs)
+func newProvisioningStatusUnwrappedErrorResponse(status string) *http.Response {
+ return mocks.NewResponseWithBodyAndStatus(mocks.NewBody(unwrappedErrorResponse), http.StatusBadRequest, status)
+}
+
+// adds the Azure-AsyncOperation header with the specified location to the response
+func setAsyncOpHeader(resp *http.Response, location string) {
+ mocks.SetResponseHeader(resp, http.CanonicalHeaderKey(headerAsyncOperation), location)
}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go
index 3e226fe9b..b62bf03ba 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go
@@ -38,6 +38,13 @@ type Subscription struct {
Name string `json:"name"`
State string `json:"state"`
TenantID string `json:"tenantId"`
+ User *User `json:"user"`
+}
+
+// User represents a User from the Azure CLI
+type User struct {
+ Name string `json:"name"`
+ Type string `json:"type"`
}
// ProfilePath returns the path where the Azure Profile is stored from the Azure CLI
diff --git a/vendor/github.com/Azure/go-autorest/autorest/mocks/helpers.go b/vendor/github.com/Azure/go-autorest/autorest/mocks/helpers.go
index 7b1f00d3f..e2aab19c9 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/mocks/helpers.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/mocks/helpers.go
@@ -16,6 +16,7 @@ package mocks
import (
"fmt"
+ "io"
"net/http"
"time"
)
@@ -72,7 +73,12 @@ func NewRequestWithCloseBodyContent(c string) *http.Request {
// NewRequestForURL instantiates a new request using the passed URL.
func NewRequestForURL(u string) *http.Request {
- r, err := http.NewRequest("GET", u, NewBody(""))
+ return NewRequestWithParams("GET", u, NewBody(""))
+}
+
+// NewRequestWithParams instantiates a new request using the provided parameters.
+func NewRequestWithParams(method, u string, body io.Reader) *http.Request {
+ r, err := http.NewRequest(method, u, body)
if err != nil {
panic(fmt.Sprintf("mocks: ERROR (%v) parsing testing URL %s", err, u))
}
@@ -111,6 +117,7 @@ func NewResponseWithStatus(s string, c int) *http.Response {
func NewResponseWithBodyAndStatus(body *Body, c int, s string) *http.Response {
resp := NewResponse()
resp.Body = body
+ resp.ContentLength = body.Length()
resp.Status = s
resp.StatusCode = c
return resp
diff --git a/vendor/github.com/Azure/go-autorest/autorest/mocks/mocks.go b/vendor/github.com/Azure/go-autorest/autorest/mocks/mocks.go
index 9557ab5e4..cc1579e0f 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/mocks/mocks.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/mocks/mocks.go
@@ -80,6 +80,14 @@ func (body *Body) reset() *Body {
return body
}
+// Length returns the number of bytes in the body.
+func (body *Body) Length() int64 {
+ if body == nil {
+ return 0
+ }
+ return int64(len(body.b))
+}
+
type response struct {
r *http.Response
e error
diff --git a/vendor/github.com/Azure/go-autorest/autorest/sender_test.go b/vendor/github.com/Azure/go-autorest/autorest/sender_test.go
index a4ebcb986..4c2f0e9a8 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/sender_test.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/sender_test.go
@@ -851,7 +851,7 @@ func TestDoRetryForStatusCodes_NilResponseTemporaryError(t *testing.T) {
}
}
-func TestDoRetryForStatusCodes_NilResponseFatalError(t *testing.T) {
+func TestDoRetryForStatusCodes_NilResponseTemporaryError2(t *testing.T) {
client := mocks.NewSender()
client.AppendResponse(nil)
client.SetError(fmt.Errorf("faux error"))
@@ -860,6 +860,40 @@ func TestDoRetryForStatusCodes_NilResponseFatalError(t *testing.T) {
DoRetryForStatusCodes(3, time.Duration(1*time.Second), StatusCodesForRetry...),
)
+ Respond(r,
+ ByDiscardingBody(),
+ ByClosing())
+
+ if err != nil || client.Attempts() != 2 {
+ t.Fatalf("autorest: Sender#TestDoRetryForStatusCodes_NilResponseTemporaryError2 -- Got: nil error or wrong number of attempts - %v", err)
+ }
+}
+
+type fatalError struct {
+ message string
+}
+
+func (fe fatalError) Error() string {
+ return fe.message
+}
+
+func (fe fatalError) Timeout() bool {
+ return false
+}
+
+func (fe fatalError) Temporary() bool {
+ return false
+}
+
+func TestDoRetryForStatusCodes_NilResponseFatalError(t *testing.T) {
+ client := mocks.NewSender()
+ client.AppendResponse(nil)
+ client.SetError(fatalError{"fatal error"})
+
+ r, err := SendWithSender(client, mocks.NewRequest(),
+ DoRetryForStatusCodes(3, time.Duration(1*time.Second), StatusCodesForRetry...),
+ )
+
Respond(r,
ByDiscardingBody(),
ByClosing())
diff --git a/vendor/github.com/Azure/go-autorest/autorest/utility.go b/vendor/github.com/Azure/go-autorest/autorest/utility.go
index f3a42bfc2..bfddd90b5 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/utility.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/utility.go
@@ -218,9 +218,10 @@ func IsTokenRefreshError(err error) bool {
return false
}
-// IsTemporaryNetworkError returns true if the specified error is a temporary network error.
+// IsTemporaryNetworkError returns true if the specified error is a temporary network error or false
+// if it's not. If the error doesn't implement the net.Error interface the return value is true.
func IsTemporaryNetworkError(err error) bool {
- if netErr, ok := err.(net.Error); ok && netErr.Temporary() {
+ if netErr, ok := err.(net.Error); !ok || (ok && netErr.Temporary()) {
return true
}
return false
diff --git a/vendor/github.com/Azure/go-autorest/autorest/utility_test.go b/vendor/github.com/Azure/go-autorest/autorest/utility_test.go
index cc4919b5f..166654439 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/utility_test.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/utility_test.go
@@ -18,6 +18,7 @@ import (
"bytes"
"encoding/json"
"encoding/xml"
+ "errors"
"fmt"
"net/http"
"net/url"
@@ -326,6 +327,45 @@ func TestMapToValuesWithArrayValues(t *testing.T) {
}
}
+type someTempError struct{}
+
+func (s someTempError) Error() string {
+ return "temporary error"
+}
+func (s someTempError) Timeout() bool {
+ return true
+}
+func (s someTempError) Temporary() bool {
+ return true
+}
+
+func TestIsTemporaryNetworkErrorTrue(t *testing.T) {
+ if !IsTemporaryNetworkError(someTempError{}) {
+ t.Fatal("expected someTempError to be a temporary network error")
+ }
+ if !IsTemporaryNetworkError(errors.New("non-temporary network error")) {
+ t.Fatal("expected random error to be a temporary network error")
+ }
+}
+
+type someFatalError struct{}
+
+func (s someFatalError) Error() string {
+ return "fatal error"
+}
+func (s someFatalError) Timeout() bool {
+ return false
+}
+func (s someFatalError) Temporary() bool {
+ return false
+}
+
+func TestIsTemporaryNetworkErrorFalse(t *testing.T) {
+ if IsTemporaryNetworkError(someFatalError{}) {
+ t.Fatal("expected someFatalError to be a fatal network error")
+ }
+}
+
func isEqual(v, u url.Values) bool {
for key, value := range v {
if len(u[key]) == 0 {
diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go b/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go
index d886e0b3f..ae987f8fa 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go
@@ -136,29 +136,29 @@ func validatePtr(x reflect.Value, v Constraint) error {
func validateInt(x reflect.Value, v Constraint) error {
i := x.Int()
- r, ok := v.Rule.(int)
+ r, ok := toInt64(v.Rule)
if !ok {
return createError(x, v, fmt.Sprintf("rule must be integer value for %v constraint; got: %v", v.Name, v.Rule))
}
switch v.Name {
case MultipleOf:
- if i%int64(r) != 0 {
+ if i%r != 0 {
return createError(x, v, fmt.Sprintf("value must be a multiple of %v", r))
}
case ExclusiveMinimum:
- if i <= int64(r) {
+ if i <= r {
return createError(x, v, fmt.Sprintf("value must be greater than %v", r))
}
case ExclusiveMaximum:
- if i >= int64(r) {
+ if i >= r {
return createError(x, v, fmt.Sprintf("value must be less than %v", r))
}
case InclusiveMinimum:
- if i < int64(r) {
+ if i < r {
return createError(x, v, fmt.Sprintf("value must be greater than or equal to %v", r))
}
case InclusiveMaximum:
- if i > int64(r) {
+ if i > r {
return createError(x, v, fmt.Sprintf("value must be less than or equal to %v", r))
}
default:
@@ -388,6 +388,17 @@ func createError(x reflect.Value, v Constraint, err string) error {
v.Target, v.Name, getInterfaceValue(x), err)
}
+func toInt64(v interface{}) (int64, bool) {
+ if i64, ok := v.(int64); ok {
+ return i64, true
+ }
+ // older generators emit max constants as int, so if int64 fails fall back to int
+ if i32, ok := v.(int); ok {
+ return int64(i32), true
+ }
+ return 0, false
+}
+
// NewErrorWithValidationError appends package type and method name in
// validation error.
//
diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/validation_test.go b/vendor/github.com/Azure/go-autorest/autorest/validation/validation_test.go
index 694e7c10f..e452e3af2 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/validation/validation_test.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/validation/validation_test.go
@@ -1090,7 +1090,7 @@ func TestValidateInt_inclusiveMaximumConstraintValid(t *testing.T) {
c := Constraint{
Target: "str",
Name: InclusiveMaximum,
- Rule: 2,
+ Rule: int64(2),
Chain: nil,
}
require.Nil(t, validateInt(reflect.ValueOf(1), c))
@@ -1101,7 +1101,7 @@ func TestValidateInt_inclusiveMaximumConstraintInvalid(t *testing.T) {
c := Constraint{
Target: "str",
Name: InclusiveMaximum,
- Rule: 1,
+ Rule: int64(1),
Chain: nil,
}
require.Equal(t, validateInt(reflect.ValueOf(x), c).Error(),
@@ -1112,7 +1112,7 @@ func TestValidateInt_inclusiveMaximumConstraintBoundary(t *testing.T) {
c := Constraint{
Target: "str",
Name: InclusiveMaximum,
- Rule: 1,
+ Rule: int64(1),
Chain: nil,
}
require.Nil(t, validateInt(reflect.ValueOf(1), c))
diff --git a/vendor/github.com/Azure/go-autorest/autorest/version.go b/vendor/github.com/Azure/go-autorest/autorest/version.go
index d265055f5..0eee44027 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/version.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/version.go
@@ -16,5 +16,5 @@ package autorest
// Version returns the semantic version (see http://semver.org).
func Version() string {
- return "v10.8.1"
+ return "v10.11.2"
}
diff --git a/vendor/github.com/aws/aws-sdk-go/.github/ISSUE_TEMPLATE.md b/vendor/github.com/aws/aws-sdk-go/.github/ISSUE_TEMPLATE.md
index 1ecb636bf..245949d00 100644
--- a/vendor/github.com/aws/aws-sdk-go/.github/ISSUE_TEMPLATE.md
+++ b/vendor/github.com/aws/aws-sdk-go/.github/ISSUE_TEMPLATE.md
@@ -10,5 +10,5 @@ Please fill out the sections below to help us address your issue.
### Steps to reproduce
-If you have have an runnable example, please include it.
+If you have an runnable example, please include it.
diff --git a/vendor/github.com/aws/aws-sdk-go/.godoc_config b/vendor/github.com/aws/aws-sdk-go/.godoc_config
index 395878d6c..0c6400bc7 100644
--- a/vendor/github.com/aws/aws-sdk-go/.godoc_config
+++ b/vendor/github.com/aws/aws-sdk-go/.godoc_config
@@ -3,7 +3,7 @@
"Pattern": "/sdk-for-go/api/",
"StripPrefix": "/sdk-for-go/api",
"Include": ["/src/github.com/aws/aws-sdk-go/aws", "/src/github.com/aws/aws-sdk-go/service"],
- "Exclude": ["/src/cmd", "/src/github.com/aws/aws-sdk-go/awstesting", "/src/github.com/aws/aws-sdk-go/awsmigrate"],
+ "Exclude": ["/src/cmd", "/src/github.com/aws/aws-sdk-go/awstesting", "/src/github.com/aws/aws-sdk-go/awsmigrate", "/src/github.com/aws/aws-sdk-go/private"],
"IgnoredSuffixes": ["iface"]
},
"Github": {
diff --git a/vendor/github.com/aws/aws-sdk-go/.travis.yml b/vendor/github.com/aws/aws-sdk-go/.travis.yml
index 7659cd7d5..0b34640df 100644
--- a/vendor/github.com/aws/aws-sdk-go/.travis.yml
+++ b/vendor/github.com/aws/aws-sdk-go/.travis.yml
@@ -40,11 +40,8 @@ matrix:
- os: osx
go: tip
-install:
- - make get-deps
-
script:
- - make unit-with-race-cover
+ - make ci-test
branches:
only:
diff --git a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
index 8f6918965..68324ce71 100644
--- a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
@@ -1,3 +1,278 @@
+Release v1.14.8 (2018-06-15)
+===
+
+### Service Client Updates
+* `service/mediaconvert`: Updates service API and documentation
+ * This release adds language code support according to the ISO-639-3 standard. Custom 3-character language codes are now supported on input and output for both audio and captions.
+
+Release v1.14.7 (2018-06-14)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * Support for PRIVATE endpoint configuration type
+* `service/dynamodb`: Updates service API and documentation
+ * Added two new fields SSEType and KMSMasterKeyArn to SSEDescription block in describe-table output.
+* `service/iotanalytics`: Updates service API and documentation
+
+Release v1.14.6 (2018-06-13)
+===
+
+### Service Client Updates
+* `service/servicecatalog`: Updates service API
+ * Introduced new length limitations for few of the product fields.
+* `service/ssm`: Updates service API and documentation
+ * Added support for new parameter, CloudWatchOutputConfig, for SendCommand API. Users can now have RunCommand output sent to CloudWatchLogs.
+
+Release v1.14.5 (2018-06-12)
+===
+
+### Service Client Updates
+* `service/devicefarm`: Updates service API and documentation
+ * Adding VPCEndpoint support for Remote access. Allows customers to be able to access their private endpoints/services running in their VPC during remote access.
+* `service/ecs`: Updates service API and documentation
+ * Introduces daemon scheduling capability to deploy one task per instance on selected instances in a cluster. Adds a "force" flag to the DeleteService API to delete a service without requiring to scale down the number of tasks to zero.
+
+### SDK Enhancements
+* `service/rds/rdsutils`: Clean up the rdsutils package and adds a new builder to construct connection strings ([#1985](https://github.com/aws/aws-sdk-go/pull/1985))
+ * Rewords documentation to be more useful and provides links to prior setup needed to support authentication tokens. Introduces a builder that allows for building connection strings
+
+### SDK Bugs
+* `aws/signer/v4`: Fix X-Amz-Content-Sha256 being in to query for presign ([#1976](https://github.com/aws/aws-sdk-go/pull/1976))
+ * Fixes the bug which would allow the X-Amz-Content-Sha256 header to be promoted to the query string when presigning a S3 request. This bug also was preventing users from setting their own sha256 value for a presigned URL. Presigned requests generated with the custom sha256 would of always failed with invalid signature.
+ * Fixes [#1974](https://github.com/aws/aws-sdk-go/pull/1974)
+Release v1.14.4 (2018-06-11)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API and documentation
+ * Amazon Cloud Directory now supports optional attributes on Typed Links, giving users the ability to associate and manage data on Typed Links.
+* `service/rds`: Updates service documentation
+ * Changed lists of valid EngineVersion values to links to the RDS User Guide.
+* `service/storagegateway`: Updates service API and documentation
+ * AWS Storage Gateway now enables you to create cached volumes and tapes with AWS KMS support.
+
+Release v1.14.3 (2018-06-08)
+===
+
+### Service Client Updates
+* `service/mediatailor`: Updates service API
+
+Release v1.14.2 (2018-06-07)
+===
+
+### Service Client Updates
+* `service/medialive`: Updates service API, documentation, and paginators
+ * AWS Elemental MediaLive now makes channel log information available through Amazon CloudWatch Logs. You can set up each MediaLive channel with a logging level; when the channel is run, logs will automatically be published to your account on Amazon CloudWatch Logs
+
+Release v1.14.1 (2018-06-05)
+===
+
+### Service Client Updates
+* `service/ce`: Updates service API and documentation
+* `service/polly`: Updates service API and documentation
+ * Amazon Polly adds new French voice - "Lea"
+* `service/rds`: Updates service API and documentation
+ * This release adds customizable processor features for RDS instances.
+* `service/secretsmanager`: Updates service documentation
+ * Documentation updates for secretsmanager
+* `service/shield`: Updates service API and documentation
+ * DDoS Response Team access management for AWS Shield
+
+Release v1.14.0 (2018-06-04)
+===
+
+### Service Client Updates
+* `service/AWSMigrationHub`: Updates service documentation
+* `service/appstream`: Updates service API and documentation
+ * Amazon AppStream 2.0 adds support for Google Drive for G Suite. With this feature, customers will be able to connect their G Suite accounts with AppStream 2.0 and enable Google Drive access for an AppStream 2.0 stack. Users of the stack can then link their Google Drive using their G Suite login credentials and use their existing files stored in Drive with their AppStream 2.0 applications. File changes will be synced automatically to Google cloud.
+* `service/ec2`: Updates service API and documentation
+ * You are now able to use instance storage (up to 3600 GB of NVMe based SSD) on M5 instances, the next generation of EC2's General Purpose instances in us-east-1, us-west-2, us-east-2, eu-west-1 and ca-central-1. M5 instances offer up to 96 vCPUs, 384 GiB of DDR4 instance memory, 25 Gbps in Network bandwidth and improved EBS and Networking bandwidth on smaller instance sizes and provide a balance of compute, memory and network resources for many applications.
+* `service/eks`: Adds new service
+* `service/mediaconvert`: Updates service API and documentation
+ * This release adds the support for Common Media Application Format (CMAF) fragmented outputs, RF64 WAV audio output format, and HEV1 or HEVC1 MP4 packaging types when using HEVC in DASH or CMAF outputs.
+* `service/sagemaker`: Updates service API, documentation, and paginators
+ * Amazon SageMaker has added the ability to run hyperparameter tuning jobs. A hyperparameter tuning job will create and evaluate multiple training jobs while tuning algorithm hyperparameters, to optimize a customer specified objective metric.
+
+### SDK Features
+* Add support for EventStream based APIs (S3 SelectObjectContent) ([#1941](https://github.com/aws/aws-sdk-go/pull/1941))
+ * Adds support for EventStream asynchronous APIs such as S3 SelectObjectContents API. This API allows your application to receiving multiple events asynchronously from the API response. Your application recieves these events from a channel on the API response.
+ * See PR [#1941](https://github.com/aws/aws-sdk-go/pull/1941) for example.
+ * Fixes [#1895](https://github.com/aws/aws-sdk-go/issues/1895)
+
+Release v1.13.60 (2018-06-01)
+===
+
+### Service Client Updates
+* `service/ds`: Updates service API and documentation
+ * Added ResetUserPassword API. Customers can now reset their users' passwords without providing the old passwords in Simple AD and Microsoft AD.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/iot`: Updates service API and documentation
+ * We are releasing force CancelJob and CancelJobExecution functionalities to customers.
+* `service/mediatailor`: Adds new service
+* `service/redshift`: Updates service documentation
+ * Documentation updates for redshift
+* `service/sns`: Updates service API, documentation, and paginators
+ * The SNS Subscribe API has been updated with two new optional parameters: Attributes and ReturnSubscriptionArn. Attributes is a map of subscription attributes which can be one or more of: FilterPolicy, DeliveryPolicy, and RawMessageDelivery. ReturnSubscriptionArn is a boolean parameter that overrides the default behavior of returning "pending confirmation" for subscriptions that require confirmation instead of returning the subscription ARN.
+
+### SDK Bugs
+* `private/mode/api`: Fix error code constants being generated incorrectly.([#1958](https://github.com/aws/aws-sdk-go/issues/1958))
+ * Fixes the SDK's code generation to not modify the error code text value when generating error code constants. This prevents generating error code values which are invalid and will never be sent by the service. This change does not change the error code constant variable name generated by the SDK, only the value of the error code.
+ * Fixes [#1856](https://github.com/aws/aws-sdk-go/issues/1856)
+Release v1.13.59 (2018-05-31)
+===
+
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+Release v1.13.58 (2018-05-30)
+===
+
+### Service Client Updates
+* `service/elasticloadbalancingv2`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/neptune`: Adds new service
+ * Amazon Neptune is a fast, reliable graph database service that makes it easy to build and run applications that work with highly connected datasets. Neptune supports popular graph models Property Graph and W3C's Resource Description Frame (RDF), and their respective query languages Apache TinkerPop Gremlin 3.3.2 and SPARQL 1.1.
+
+Release v1.13.57 (2018-05-29)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/pi`: Adds new service
+
+Release v1.13.56 (2018-05-25)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * This API update enables customers to control whether users can transfer data between their local devices and their streaming applications through file uploads and downloads, clipboard operations, or printing to local devices
+* `service/config`: Updates service API and documentation
+* `service/glue`: Updates service API and documentation
+ * AWS Glue now sends a delay notification to Amazon CloudWatch Events when an ETL job runs longer than the specified delay notification threshold.
+* `service/iot`: Updates service API
+ * We are exposing DELETION_IN_PROGRESS as a new job status in regards to the release of DeleteJob API.
+
+Release v1.13.55 (2018-05-24)
+===
+
+### Service Client Updates
+* `service/codebuild`: Updates service API
+ * AWS CodeBuild Adds Support for Windows Builds.
+* `service/elasticloadbalancingv2`: Updates service documentation
+* `service/rds`: Updates service API and documentation
+ * This release adds CloudWatch Logs integration capabilities to RDS Aurora MySQL clusters
+* `service/secretsmanager`: Updates service documentation
+ * Documentation updates for secretsmanager
+
+Release v1.13.54 (2018-05-22)
+===
+
+### Service Client Updates
+* `service/ecs`: Updates service API and documentation
+ * Amazon Elastic Container Service (ECS) adds service discovery for services that use host or bridged network mode. ECS can now also register instance IPs for active tasks using bridged and host networking with Route 53, making them available via DNS.
+* `service/inspector`: Updates service API
+ * We are launching the ability to target all EC2 instances. With this launch, resourceGroupArn is now optional for CreateAssessmentTarget and UpdateAssessmentTarget. If resourceGroupArn is not specified, all EC2 instances in the account in the AWS region are included in the assessment target.
+
+Release v1.13.53 (2018-05-21)
+===
+
+### Service Client Updates
+* `service/cloudformation`: Updates service API and documentation
+ * 1) Filtered Update for StackSet based on Accounts and Regions: This feature will allow flexibility for the customers to roll out updates on a StackSet based on specific Accounts and Regions. 2) Support for customized ExecutionRoleName: This feature will allow customers to attach ExecutionRoleName to the StackSet thus ensuring more security and controlling the behavior of any AWS resources in the target accounts.
+
+Release v1.13.52 (2018-05-18)
+===
+
+### Service Client Updates
+* `service/email`: Updates service documentation
+ * Fixed a broken link in the documentation for S3Action.
+* `service/iot`: Updates service API and documentation
+ * We are releasing DeleteJob and DeleteJobExecution APIs to allow customer to delete resources created using AWS IoT Jobs.
+
+Release v1.13.51 (2018-05-17)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service documentation
+ * Documentation updates for codedeploy
+* `service/cognito-idp`: Updates service API and documentation
+* `service/ec2`: Updates service API and documentation
+ * You are now able to use instance storage (up to 1800 GB of NVMe based SSD) on C5 instances, the next generation of EC2's compute optimized instances in us-east-1, us-west-2, us-east-2, eu-west-1 and ca-central-1. C5 instances offer up to 72 vCPUs, 144 GiB of DDR4 instance memory, 25 Gbps in Network bandwidth and improved EBS and Networking bandwidth on smaller instance sizes to deliver improved performance for compute-intensive workloads.You can now run bare metal workloads on EC2 with i3.metal instances. As a new instance size belonging to the I3 instance family, i3.metal instances have the same characteristics as other instances in the family, including NVMe SSD-backed instance storage optimized for low latency, very high random I/O performance, and high sequential read throughput. I3.metal instances are powered by 2.3 GHz Intel Xeon processors, offering 36 hyper-threaded cores (72 logical processors), 512 GiB of memory, and 15.2 TB of NVMe SSD-backed instance storage. These instances deliver high networking throughput and lower latency with up to 25 Gbps of aggregate network bandwidth using Elastic Network Adapter (ENA)-based Enhanced Networking.
+
+Release v1.13.50 (2018-05-16)
+===
+
+### Service Client Updates
+* `service/secretsmanager`: Updates service documentation
+ * Documentation updates for secretsmanager
+* `service/servicecatalog`: Updates service API and documentation
+ * Users can now pass a new option to ListAcceptedPortfolioShares called portfolio-share-type with a value of AWS_SERVICECATALOG in order to access Getting Started Portfolios that contain selected products representing common customer use cases.
+
+Release v1.13.49 (2018-05-15)
+===
+
+### Service Client Updates
+* `service/config`: Updates service API
+
+Release v1.13.48 (2018-05-14)
+===
+
+### Service Client Updates
+* `service/codebuild`: Updates service API and documentation
+ * Adding support for more override fields for StartBuild API, add support for idempotency token field for StartBuild API in AWS CodeBuild.
+* `service/iot1click-devices`: Adds new service
+* `service/iot1click-projects`: Adds new service
+* `service/organizations`: Updates service documentation
+ * Documentation updates for organizations
+
+Release v1.13.47 (2018-05-10)
+===
+
+### Service Client Updates
+* `service/firehose`: Updates service API and documentation
+ * With this release, Amazon Kinesis Data Firehose can convert the format of your input data from JSON to Apache Parquet or Apache ORC before storing the data in Amazon S3. Parquet and ORC are columnar data formats that save space and enable faster queries compared to row-oriented formats like JSON.
+
+Release v1.13.46 (2018-05-10)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/gamelift`: Updates service API and documentation
+ * AutoScaling Target Tracking scaling simplification along with StartFleetActions and StopFleetActions APIs to suspend and resume automatic scaling at will.
+
+Release v1.13.45 (2018-05-10)
+===
+
+### Service Client Updates
+* `service/budgets`: Updates service API and documentation
+ * Updating the regex for the NumericValue fields.
+* `service/ec2`: Updates service API and documentation
+ * Enable support for latest flag with Get Console Output
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service API and documentation
+ * Changes to support the Aurora MySQL Backtrack feature.
+
+Release v1.13.44 (2018-05-08)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * Enable support for specifying CPU options during instance launch.
+* `service/rds`: Updates service documentation
+ * Correction to the documentation about copying unencrypted snapshots.
+
+Release v1.13.43 (2018-05-07)
+===
+
+### Service Client Updates
+* `service/alexaforbusiness`: Updates service API
+* `service/budgets`: Updates service API and documentation
+ * "With this release, customers can use AWS Budgets to monitor how much of their Amazon EC2, Amazon RDS, Amazon Redshift, and Amazon ElastiCache instance usage is covered by reservations, and receive alerts when their coverage falls below the threshold they define."
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/es`: Updates service API, documentation, and paginators
+ * This change brings support for Reserved Instances to AWS Elasticsearch.
+* `service/s3`: Updates service API and documentation
+ * Added BytesReturned details for Progress and Stats Events for Amazon S3 Select .
+
Release v1.13.42 (2018-05-04)
===
@@ -266,7 +541,7 @@ Release v1.13.19 (2018-03-22)
### SDK Bugs
* `aws/endpoints`: Use service metadata for fallback signing name ([#1854](https://github.com/aws/aws-sdk-go/pull/1854))
- * Updates the SDK's endpoint resolution to fallback deriving the service's signing name from the service's modeled metadata in addition the the endpoints modeled data.
+ * Updates the SDK's endpoint resolution to fallback deriving the service's signing name from the service's modeled metadata in addition the endpoints modeled data.
* Fixes [#1850](https://github.com/aws/aws-sdk-go/issues/1850)
Release v1.13.18 (2018-03-21)
===
@@ -1003,7 +1278,7 @@ Release v1.12.31 (2017-11-20)
* DescribeGroups API and miscellaneous enhancements
### SDK Bugs
-* `aws/client`: Retry delays for throttled exception were not limited to 5 mintues [#1654](https://github.com/aws/aws-sdk-go/pull/1654)
+* `aws/client`: Retry delays for throttled exception were not limited to 5 minutes [#1654](https://github.com/aws/aws-sdk-go/pull/1654)
* Fixes [#1653](https://github.com/aws/aws-sdk-go/issues/1653)
Release v1.12.30 (2017-11-17)
===
@@ -1135,7 +1410,7 @@ Release v1.12.21 (2017-11-02)
* `aws/endpoints`: Updated Regions and Endpoints metadata.
### SDK Bugs
-* `aws/request`: Fix bug in request presign creating invalide URL ([#1624](https://github.com/aws/aws-sdk-go/pull/1624))
+* `aws/request`: Fix bug in request presign creating invalid URL ([#1624](https://github.com/aws/aws-sdk-go/pull/1624))
* Fixes a bug the Request Presign and PresignRequest methods that would allow a invalid expire duration as input. A expire time of 0 would be interpreted by the SDK to generate a normal request signature, not a presigned URL. This caused the returned URL unusable.
* Fixes [#1617](https://github.com/aws/aws-sdk-go/issues/1617)
Release v1.12.20 (2017-11-01)
diff --git a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
index 6f422a95e..9f4a0c14c 100644
--- a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
+++ b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
@@ -89,7 +89,7 @@ go test -tags codegen ./private/...
See the `Makefile` for additional testing tags that can be used in testing.
To test on multiple platform the SDK includes several DockerFiles under the
-`awstesting/sandbox` folder, and associated make recipes to to execute
+`awstesting/sandbox` folder, and associated make recipes to execute
unit testing within environments configured for specific Go versions.
```
diff --git a/vendor/github.com/aws/aws-sdk-go/Makefile b/vendor/github.com/aws/aws-sdk-go/Makefile
index 83ccc1e62..89f4b7a82 100644
--- a/vendor/github.com/aws/aws-sdk-go/Makefile
+++ b/vendor/github.com/aws/aws-sdk-go/Makefile
@@ -13,6 +13,7 @@ SDK_ONLY_PKGS=$(shell go list ./... | grep -v "/vendor/")
SDK_UNIT_TEST_ONLY_PKGS=$(shell go list -tags ${UNIT_TEST_TAGS} ./... | grep -v "/vendor/")
SDK_GO_1_4=$(shell go version | grep "go1.4")
SDK_GO_1_5=$(shell go version | grep "go1.5")
+SDK_GO_1_6=$(shell go version | grep "go1.6")
SDK_GO_VERSION=$(shell go version | awk '''{print $$3}''' | tr -d '''\n''')
all: get-deps generate unit
@@ -35,7 +36,7 @@ help:
@echo " get-deps-tests to get the SDK's test dependencies"
@echo " get-deps-verify to get the SDK's verification dependencies"
-generate: gen-test gen-endpoints gen-services
+generate: cleanup-models gen-test gen-endpoints gen-services
gen-test: gen-protocol-test
@@ -48,6 +49,10 @@ gen-protocol-test:
gen-endpoints:
go generate ./models/endpoints/
+cleanup-models:
+ @echo "Cleaning up stale model versions"
+ @./cleanup_models.sh
+
build:
@echo "go build SDK and vendor packages"
@go build ${SDK_ONLY_PKGS}
@@ -60,6 +65,18 @@ unit-with-race-cover: get-deps-tests build verify
@echo "go test SDK and vendor packages"
@go test -tags ${UNIT_TEST_TAGS} -race -cpu=1,2,4 $(SDK_UNIT_TEST_ONLY_PKGS)
+ci-test: ci-test-generate unit-with-race-cover ci-test-generate-validate
+
+ci-test-generate: get-deps
+ @echo "CI test generated code"
+ @if [ \( -z "${SDK_GO_1_6}" \) -a \( -z "${SDK_GO_1_5}" \) ]; then make generate; else echo "skipping generate"; fi
+
+ci-test-generate-validate:
+ @echo "CI test validate no generated code changes"
+ @gitstatus=`if [ \( -z "${SDK_GO_1_6}" \) -a \( -z "${SDK_GO_1_5}" \) ]; then git status --porcelain; else echo "skipping validation"; fi`; \
+ echo "$$gitstatus"; \
+ if [ "$$gitstatus" != "" ] && [ "$$gitstatus" != "skipping validation" ]; then git diff; exit 1; fi
+
integration: get-deps-tests integ-custom smoke-tests performance
integ-custom:
@@ -118,6 +135,13 @@ sandbox-go19: sandbox-build-go19
sandbox-test-go19: sandbox-build-go19
docker run -t aws-sdk-go-1.9
+sandbox-build-go110:
+ docker build -f ./awstesting/sandbox/Dockerfile.test.go1.8 -t "aws-sdk-go-1.10" .
+sandbox-go110: sandbox-build-go110
+ docker run -i -t aws-sdk-go-1.10 bash
+sandbox-test-go110: sandbox-build-go110
+ docker run -t aws-sdk-go-1.10
+
sandbox-build-gotip:
@echo "Run make update-aws-golang-tip, if this test fails because missing aws-golang:tip container"
docker build -f ./awstesting/sandbox/Dockerfile.test.gotip -t "aws-sdk-go-tip" .
diff --git a/vendor/github.com/aws/aws-sdk-go/README.md b/vendor/github.com/aws/aws-sdk-go/README.md
index 9f10e76f3..3200765ea 100644
--- a/vendor/github.com/aws/aws-sdk-go/README.md
+++ b/vendor/github.com/aws/aws-sdk-go/README.md
@@ -334,7 +334,7 @@ take a callback function that will be called for each page of the API's response
```
Waiter helper methods provide the functionality to wait for an AWS resource
-state. These methods abstract the logic needed to to check the state of an
+state. These methods abstract the logic needed to check the state of an
AWS resource, and wait until that resource is in a desired state. The waiter
will block until the resource is in the state that is desired, an error occurs,
or the waiter times out. If a resource times out the error code returned will
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go b/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
index 4778056dd..920e9fddf 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
@@ -3,6 +3,7 @@ package metadata
// ClientInfo wraps immutable data from the client.Client structure.
type ClientInfo struct {
ServiceName string
+ ServiceID string
APIVersion string
Endpoint string
SigningName string
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
index 42416fc2f..ed086992f 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
@@ -178,7 +178,8 @@ func (e *Expiry) IsExpired() bool {
type Credentials struct {
creds Value
forceRefresh bool
- m sync.Mutex
+
+ m sync.RWMutex
provider Provider
}
@@ -201,6 +202,17 @@ func NewCredentials(provider Provider) *Credentials {
// If Credentials.Expire() was called the credentials Value will be force
// expired, and the next call to Get() will cause them to be refreshed.
func (c *Credentials) Get() (Value, error) {
+ // Check the cached credentials first with just the read lock.
+ c.m.RLock()
+ if !c.isExpired() {
+ creds := c.creds
+ c.m.RUnlock()
+ return creds, nil
+ }
+ c.m.RUnlock()
+
+ // Credentials are expired need to retrieve the credentials taking the full
+ // lock.
c.m.Lock()
defer c.m.Unlock()
@@ -234,8 +246,8 @@ func (c *Credentials) Expire() {
// If the Credentials were forced to be expired with Expire() this will
// reflect that override.
func (c *Credentials) IsExpired() bool {
- c.m.Lock()
- defer c.m.Unlock()
+ c.m.RLock()
+ defer c.m.RUnlock()
return c.isExpired()
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials_bench_test.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials_bench_test.go
new file mode 100644
index 000000000..01a5d633b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials_bench_test.go
@@ -0,0 +1,90 @@
+// +build go1.9
+
+package credentials
+
+import (
+ "fmt"
+ "strconv"
+ "sync"
+ "testing"
+ "time"
+)
+
+func BenchmarkCredentials_Get(b *testing.B) {
+ stub := &stubProvider{}
+
+ cases := []int{1, 10, 100, 500, 1000, 10000}
+
+ for _, c := range cases {
+ b.Run(strconv.Itoa(c), func(b *testing.B) {
+ creds := NewCredentials(stub)
+ var wg sync.WaitGroup
+ wg.Add(c)
+ for i := 0; i < c; i++ {
+ go func() {
+ for j := 0; j < b.N; j++ {
+ v, err := creds.Get()
+ if err != nil {
+ b.Fatalf("expect no error %v, %v", v, err)
+ }
+ }
+ wg.Done()
+ }()
+ }
+ b.ResetTimer()
+
+ wg.Wait()
+ })
+ }
+}
+
+func BenchmarkCredentials_Get_Expire(b *testing.B) {
+ p := &blockProvider{}
+
+ expRates := []int{10000, 1000, 100}
+ cases := []int{1, 10, 100, 500, 1000, 10000}
+
+ for _, expRate := range expRates {
+ for _, c := range cases {
+ b.Run(fmt.Sprintf("%d-%d", expRate, c), func(b *testing.B) {
+ creds := NewCredentials(p)
+ var wg sync.WaitGroup
+ wg.Add(c)
+ for i := 0; i < c; i++ {
+ go func(id int) {
+ for j := 0; j < b.N; j++ {
+ v, err := creds.Get()
+ if err != nil {
+ b.Fatalf("expect no error %v, %v", v, err)
+ }
+ // periodically expire creds to cause rwlock
+ if id == 0 && j%expRate == 0 {
+ creds.Expire()
+ }
+ }
+ wg.Done()
+ }(i)
+ }
+ b.ResetTimer()
+
+ wg.Wait()
+ })
+ }
+ }
+}
+
+type blockProvider struct {
+ creds Value
+ expired bool
+ err error
+}
+
+func (s *blockProvider) Retrieve() (Value, error) {
+ s.expired = false
+ s.creds.ProviderName = "blockProvider"
+ time.Sleep(time.Millisecond)
+ return s.creds, s.err
+}
+func (s *blockProvider) IsExpired() bool {
+ return s.expired
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go
new file mode 100644
index 000000000..152d785b3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go
@@ -0,0 +1,46 @@
+// Package csm provides Client Side Monitoring (CSM) which enables sending metrics
+// via UDP connection. Using the Start function will enable the reporting of
+// metrics on a given port. If Start is called, with different parameters, again,
+// a panic will occur.
+//
+// Pause can be called to pause any metrics publishing on a given port. Sessions
+// that have had their handlers modified via InjectHandlers may still be used.
+// However, the handlers will act as a no-op meaning no metrics will be published.
+//
+// Example:
+// r, err := csm.Start("clientID", ":31000")
+// if err != nil {
+// panic(fmt.Errorf("failed starting CSM: %v", err))
+// }
+//
+// sess, err := session.NewSession(&aws.Config{})
+// if err != nil {
+// panic(fmt.Errorf("failed loading session: %v", err))
+// }
+//
+// r.InjectHandlers(&sess.Handlers)
+//
+// client := s3.New(sess)
+// resp, err := client.GetObject(&s3.GetObjectInput{
+// Bucket: aws.String("bucket"),
+// Key: aws.String("key"),
+// })
+//
+// // Will pause monitoring
+// r.Pause()
+// resp, err = client.GetObject(&s3.GetObjectInput{
+// Bucket: aws.String("bucket"),
+// Key: aws.String("key"),
+// })
+//
+// // Resume monitoring
+// r.Continue()
+//
+// Start returns a Reporter that is used to enable or disable monitoring. If
+// access to the Reporter is required later, calling Get will return the Reporter
+// singleton.
+//
+// Example:
+// r := csm.Get()
+// r.Continue()
+package csm
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go
new file mode 100644
index 000000000..2f0c6eac9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go
@@ -0,0 +1,67 @@
+package csm
+
+import (
+ "fmt"
+ "sync"
+)
+
+var (
+ lock sync.Mutex
+)
+
+// Client side metric handler names
+const (
+ APICallMetricHandlerName = "awscsm.SendAPICallMetric"
+ APICallAttemptMetricHandlerName = "awscsm.SendAPICallAttemptMetric"
+)
+
+// Start will start the a long running go routine to capture
+// client side metrics. Calling start multiple time will only
+// start the metric listener once and will panic if a different
+// client ID or port is passed in.
+//
+// Example:
+// r, err := csm.Start("clientID", "127.0.0.1:8094")
+// if err != nil {
+// panic(fmt.Errorf("expected no error, but received %v", err))
+// }
+// sess := session.NewSession()
+// r.InjectHandlers(sess.Handlers)
+//
+// svc := s3.New(sess)
+// out, err := svc.GetObject(&s3.GetObjectInput{
+// Bucket: aws.String("bucket"),
+// Key: aws.String("key"),
+// })
+func Start(clientID string, url string) (*Reporter, error) {
+ lock.Lock()
+ defer lock.Unlock()
+
+ if sender == nil {
+ sender = newReporter(clientID, url)
+ } else {
+ if sender.clientID != clientID {
+ panic(fmt.Errorf("inconsistent client IDs. %q was expected, but received %q", sender.clientID, clientID))
+ }
+
+ if sender.url != url {
+ panic(fmt.Errorf("inconsistent URLs. %q was expected, but received %q", sender.url, url))
+ }
+ }
+
+ if err := connect(url); err != nil {
+ sender = nil
+ return nil, err
+ }
+
+ return sender, nil
+}
+
+// Get will return a reporter if one exists, if one does not exist, nil will
+// be returned.
+func Get() *Reporter {
+ lock.Lock()
+ defer lock.Unlock()
+
+ return sender
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/enable_test.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable_test.go
new file mode 100644
index 000000000..a7504d3f9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable_test.go
@@ -0,0 +1,74 @@
+package csm
+
+import (
+ "encoding/json"
+ "fmt"
+ "net"
+ "testing"
+)
+
+func startUDPServer(done chan struct{}, fn func([]byte)) (string, error) {
+ addr, err := net.ResolveUDPAddr("udp", "127.0.0.1:0")
+ if err != nil {
+ return "", err
+ }
+
+ conn, err := net.ListenUDP("udp", addr)
+ if err != nil {
+ return "", err
+ }
+
+ buf := make([]byte, 1024)
+ go func() {
+ defer conn.Close()
+
+ for {
+ select {
+ case <-done:
+ return
+ default:
+ }
+
+ n, _, err := conn.ReadFromUDP(buf)
+ fn(buf[:n])
+
+ if err != nil {
+ panic(err)
+ }
+ }
+ }()
+
+ return conn.LocalAddr().String(), nil
+}
+
+func TestDifferentParams(t *testing.T) {
+ defer func() {
+ if r := recover(); r == nil {
+ t.Errorf("expected panic with different parameters")
+ }
+ }()
+ Start("clientID2", ":0")
+}
+
+var MetricsCh = make(chan map[string]interface{}, 1)
+var Done = make(chan struct{})
+
+func init() {
+ url, err := startUDPServer(Done, func(b []byte) {
+ m := map[string]interface{}{}
+ if err := json.Unmarshal(b, &m); err != nil {
+ panic(fmt.Sprintf("expected no error, but received %v", err))
+ }
+
+ MetricsCh <- m
+ })
+
+ if err != nil {
+ panic(err)
+ }
+
+ _, err = Start("clientID", url)
+ if err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/example_test.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/example_test.go
new file mode 100644
index 000000000..3da43dccd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/example_test.go
@@ -0,0 +1,40 @@
+package csm_test
+
+import (
+ "fmt"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/csm"
+ "github.com/aws/aws-sdk-go/aws/session"
+ "github.com/aws/aws-sdk-go/service/s3"
+)
+
+func ExampleStart() {
+ r, err := csm.Start("clientID", ":31000")
+ if err != nil {
+ panic(fmt.Errorf("failed starting CSM: %v", err))
+ }
+
+ sess, err := session.NewSession(&aws.Config{})
+ if err != nil {
+ panic(fmt.Errorf("failed loading session: %v", err))
+ }
+
+ r.InjectHandlers(&sess.Handlers)
+
+ client := s3.New(sess)
+ client.GetObject(&s3.GetObjectInput{
+ Bucket: aws.String("bucket"),
+ Key: aws.String("key"),
+ })
+
+ // Pauses monitoring
+ r.Pause()
+ client.GetObject(&s3.GetObjectInput{
+ Bucket: aws.String("bucket"),
+ Key: aws.String("key"),
+ })
+
+ // Resume monitoring
+ r.Continue()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go
new file mode 100644
index 000000000..4b0d630e4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go
@@ -0,0 +1,51 @@
+package csm
+
+import (
+ "strconv"
+ "time"
+)
+
+type metricTime time.Time
+
+func (t metricTime) MarshalJSON() ([]byte, error) {
+ ns := time.Duration(time.Time(t).UnixNano())
+ return []byte(strconv.FormatInt(int64(ns/time.Millisecond), 10)), nil
+}
+
+type metric struct {
+ ClientID *string `json:"ClientId,omitempty"`
+ API *string `json:"Api,omitempty"`
+ Service *string `json:"Service,omitempty"`
+ Timestamp *metricTime `json:"Timestamp,omitempty"`
+ Type *string `json:"Type,omitempty"`
+ Version *int `json:"Version,omitempty"`
+
+ AttemptCount *int `json:"AttemptCount,omitempty"`
+ Latency *int `json:"Latency,omitempty"`
+
+ Fqdn *string `json:"Fqdn,omitempty"`
+ UserAgent *string `json:"UserAgent,omitempty"`
+ AttemptLatency *int `json:"AttemptLatency,omitempty"`
+
+ SessionToken *string `json:"SessionToken,omitempty"`
+ Region *string `json:"Region,omitempty"`
+ AccessKey *string `json:"AccessKey,omitempty"`
+ HTTPStatusCode *int `json:"HttpStatusCode,omitempty"`
+ XAmzID2 *string `json:"XAmzId2,omitempty"`
+ XAmzRequestID *string `json:"XAmznRequestId,omitempty"`
+
+ AWSException *string `json:"AwsException,omitempty"`
+ AWSExceptionMessage *string `json:"AwsExceptionMessage,omitempty"`
+ SDKException *string `json:"SdkException,omitempty"`
+ SDKExceptionMessage *string `json:"SdkExceptionMessage,omitempty"`
+
+ DestinationIP *string `json:"DestinationIp,omitempty"`
+ ConnectionReused *int `json:"ConnectionReused,omitempty"`
+
+ AcquireConnectionLatency *int `json:"AcquireConnectionLatency,omitempty"`
+ ConnectLatency *int `json:"ConnectLatency,omitempty"`
+ RequestLatency *int `json:"RequestLatency,omitempty"`
+ DNSLatency *int `json:"DnsLatency,omitempty"`
+ TCPLatency *int `json:"TcpLatency,omitempty"`
+ SSLLatency *int `json:"SslLatency,omitempty"`
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan.go
new file mode 100644
index 000000000..514fc3739
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan.go
@@ -0,0 +1,54 @@
+package csm
+
+import (
+ "sync/atomic"
+)
+
+const (
+ runningEnum = iota
+ pausedEnum
+)
+
+var (
+ // MetricsChannelSize of metrics to hold in the channel
+ MetricsChannelSize = 100
+)
+
+type metricChan struct {
+ ch chan metric
+ paused int64
+}
+
+func newMetricChan(size int) metricChan {
+ return metricChan{
+ ch: make(chan metric, size),
+ }
+}
+
+func (ch *metricChan) Pause() {
+ atomic.StoreInt64(&ch.paused, pausedEnum)
+}
+
+func (ch *metricChan) Continue() {
+ atomic.StoreInt64(&ch.paused, runningEnum)
+}
+
+func (ch *metricChan) IsPaused() bool {
+ v := atomic.LoadInt64(&ch.paused)
+ return v == pausedEnum
+}
+
+// Push will push metrics to the metric channel if the channel
+// is not paused
+func (ch *metricChan) Push(m metric) bool {
+ if ch.IsPaused() {
+ return false
+ }
+
+ select {
+ case ch.ch <- m:
+ return true
+ default:
+ return false
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan_test.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan_test.go
new file mode 100644
index 000000000..81bdb25c8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan_test.go
@@ -0,0 +1,72 @@
+package csm
+
+import (
+ "testing"
+)
+
+func TestMetricChanPush(t *testing.T) {
+ ch := newMetricChan(5)
+ defer close(ch.ch)
+
+ pushed := ch.Push(metric{})
+ if !pushed {
+ t.Errorf("expected metrics to be pushed")
+ }
+
+ if e, a := 1, len(ch.ch); e != a {
+ t.Errorf("expected %d, but received %d", e, a)
+ }
+}
+
+func TestMetricChanPauseContinue(t *testing.T) {
+ ch := newMetricChan(5)
+ defer close(ch.ch)
+ ch.Pause()
+
+ if !ch.IsPaused() {
+ t.Errorf("expected to be paused, but did not pause properly")
+ }
+
+ ch.Continue()
+ if ch.IsPaused() {
+ t.Errorf("expected to be not paused, but did not continue properly")
+ }
+
+ pushed := ch.Push(metric{})
+ if !pushed {
+ t.Errorf("expected metrics to be pushed")
+ }
+
+ if e, a := 1, len(ch.ch); e != a {
+ t.Errorf("expected %d, but received %d", e, a)
+ }
+}
+
+func TestMetricChanPushWhenPaused(t *testing.T) {
+ ch := newMetricChan(5)
+ defer close(ch.ch)
+ ch.Pause()
+
+ pushed := ch.Push(metric{})
+ if pushed {
+ t.Errorf("expected metrics to not be pushed")
+ }
+
+ if e, a := 0, len(ch.ch); e != a {
+ t.Errorf("expected %d, but received %d", e, a)
+ }
+}
+
+func TestMetricChanNonBlocking(t *testing.T) {
+ ch := newMetricChan(0)
+ defer close(ch.ch)
+
+ pushed := ch.Push(metric{})
+ if pushed {
+ t.Errorf("expected metrics to be not pushed")
+ }
+
+ if e, a := 0, len(ch.ch); e != a {
+ t.Errorf("expected %d, but received %d", e, a)
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go
new file mode 100644
index 000000000..1484c8fc5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go
@@ -0,0 +1,230 @@
+package csm
+
+import (
+ "encoding/json"
+ "net"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/aws/request"
+)
+
+const (
+ // DefaultPort is used when no port is specified
+ DefaultPort = "31000"
+)
+
+// Reporter will gather metrics of API requests made and
+// send those metrics to the CSM endpoint.
+type Reporter struct {
+ clientID string
+ url string
+ conn net.Conn
+ metricsCh metricChan
+ done chan struct{}
+}
+
+var (
+ sender *Reporter
+)
+
+func connect(url string) error {
+ const network = "udp"
+ if err := sender.connect(network, url); err != nil {
+ return err
+ }
+
+ if sender.done == nil {
+ sender.done = make(chan struct{})
+ go sender.start()
+ }
+
+ return nil
+}
+
+func newReporter(clientID, url string) *Reporter {
+ return &Reporter{
+ clientID: clientID,
+ url: url,
+ metricsCh: newMetricChan(MetricsChannelSize),
+ }
+}
+
+func (rep *Reporter) sendAPICallAttemptMetric(r *request.Request) {
+ if rep == nil {
+ return
+ }
+
+ now := time.Now()
+ creds, _ := r.Config.Credentials.Get()
+
+ m := metric{
+ ClientID: aws.String(rep.clientID),
+ API: aws.String(r.Operation.Name),
+ Service: aws.String(r.ClientInfo.ServiceID),
+ Timestamp: (*metricTime)(&now),
+ UserAgent: aws.String(r.HTTPRequest.Header.Get("User-Agent")),
+ Region: r.Config.Region,
+ Type: aws.String("ApiCallAttempt"),
+ Version: aws.Int(1),
+
+ XAmzRequestID: aws.String(r.RequestID),
+
+ AttemptCount: aws.Int(r.RetryCount + 1),
+ AttemptLatency: aws.Int(int(now.Sub(r.AttemptTime).Nanoseconds() / int64(time.Millisecond))),
+ AccessKey: aws.String(creds.AccessKeyID),
+ }
+
+ if r.HTTPResponse != nil {
+ m.HTTPStatusCode = aws.Int(r.HTTPResponse.StatusCode)
+ }
+
+ if r.Error != nil {
+ if awserr, ok := r.Error.(awserr.Error); ok {
+ setError(&m, awserr)
+ }
+ }
+
+ rep.metricsCh.Push(m)
+}
+
+func setError(m *metric, err awserr.Error) {
+ msg := err.Message()
+ code := err.Code()
+
+ switch code {
+ case "RequestError",
+ "SerializationError",
+ request.CanceledErrorCode:
+
+ m.SDKException = &code
+ m.SDKExceptionMessage = &msg
+ default:
+ m.AWSException = &code
+ m.AWSExceptionMessage = &msg
+ }
+}
+
+func (rep *Reporter) sendAPICallMetric(r *request.Request) {
+ if rep == nil {
+ return
+ }
+
+ now := time.Now()
+ m := metric{
+ ClientID: aws.String(rep.clientID),
+ API: aws.String(r.Operation.Name),
+ Service: aws.String(r.ClientInfo.ServiceID),
+ Timestamp: (*metricTime)(&now),
+ Type: aws.String("ApiCall"),
+ AttemptCount: aws.Int(r.RetryCount + 1),
+ Latency: aws.Int(int(time.Now().Sub(r.Time) / time.Millisecond)),
+ XAmzRequestID: aws.String(r.RequestID),
+ }
+
+ // TODO: Probably want to figure something out for logging dropped
+ // metrics
+ rep.metricsCh.Push(m)
+}
+
+func (rep *Reporter) connect(network, url string) error {
+ if rep.conn != nil {
+ rep.conn.Close()
+ }
+
+ conn, err := net.Dial(network, url)
+ if err != nil {
+ return awserr.New("UDPError", "Could not connect", err)
+ }
+
+ rep.conn = conn
+
+ return nil
+}
+
+func (rep *Reporter) close() {
+ if rep.done != nil {
+ close(rep.done)
+ }
+
+ rep.metricsCh.Pause()
+}
+
+func (rep *Reporter) start() {
+ defer func() {
+ rep.metricsCh.Pause()
+ }()
+
+ for {
+ select {
+ case <-rep.done:
+ rep.done = nil
+ return
+ case m := <-rep.metricsCh.ch:
+ // TODO: What to do with this error? Probably should just log
+ b, err := json.Marshal(m)
+ if err != nil {
+ continue
+ }
+
+ rep.conn.Write(b)
+ }
+ }
+}
+
+// Pause will pause the metric channel preventing any new metrics from
+// being added.
+func (rep *Reporter) Pause() {
+ lock.Lock()
+ defer lock.Unlock()
+
+ if rep == nil {
+ return
+ }
+
+ rep.close()
+}
+
+// Continue will reopen the metric channel and allow for monitoring
+// to be resumed.
+func (rep *Reporter) Continue() {
+ lock.Lock()
+ defer lock.Unlock()
+ if rep == nil {
+ return
+ }
+
+ if !rep.metricsCh.IsPaused() {
+ return
+ }
+
+ rep.metricsCh.Continue()
+}
+
+// InjectHandlers will will enable client side metrics and inject the proper
+// handlers to handle how metrics are sent.
+//
+// Example:
+// // Start must be called in order to inject the correct handlers
+// r, err := csm.Start("clientID", "127.0.0.1:8094")
+// if err != nil {
+// panic(fmt.Errorf("expected no error, but received %v", err))
+// }
+//
+// sess := session.NewSession()
+// r.InjectHandlers(&sess.Handlers)
+//
+// // create a new service client with our client side metric session
+// svc := s3.New(sess)
+func (rep *Reporter) InjectHandlers(handlers *request.Handlers) {
+ if rep == nil {
+ return
+ }
+
+ apiCallHandler := request.NamedHandler{Name: APICallMetricHandlerName, Fn: rep.sendAPICallMetric}
+ handlers.Complete.PushFrontNamed(apiCallHandler)
+
+ apiCallAttemptHandler := request.NamedHandler{Name: APICallAttemptMetricHandlerName, Fn: rep.sendAPICallAttemptMetric}
+ handlers.AfterRetry.PushFrontNamed(apiCallAttemptHandler)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter_test.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter_test.go
new file mode 100644
index 000000000..7e93479f7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter_test.go
@@ -0,0 +1,233 @@
+package csm_test
+
+import (
+ "fmt"
+ "net"
+ "net/http"
+ "net/http/httptest"
+ "testing"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/client"
+ "github.com/aws/aws-sdk-go/aws/client/metadata"
+ "github.com/aws/aws-sdk-go/aws/csm"
+ "github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/aws/session"
+ "github.com/aws/aws-sdk-go/aws/signer/v4"
+ "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
+)
+
+func startUDPServer(done chan struct{}, fn func([]byte)) (string, error) {
+ addr, err := net.ResolveUDPAddr("udp", "127.0.0.1:0")
+ if err != nil {
+ return "", err
+ }
+
+ conn, err := net.ListenUDP("udp", addr)
+ if err != nil {
+ return "", err
+ }
+
+ buf := make([]byte, 1024)
+ i := 0
+ go func() {
+ defer conn.Close()
+ for {
+ i++
+ select {
+ case <-done:
+ return
+ default:
+ }
+
+ n, _, err := conn.ReadFromUDP(buf)
+ fn(buf[:n])
+
+ if err != nil {
+ panic(err)
+ }
+ }
+ }()
+
+ return conn.LocalAddr().String(), nil
+}
+
+func TestReportingMetrics(t *testing.T) {
+ reporter := csm.Get()
+ if reporter == nil {
+ t.Errorf("expected non-nil reporter")
+ }
+
+ sess := session.New()
+ sess.Handlers.Clear()
+ reporter.InjectHandlers(&sess.Handlers)
+
+ md := metadata.ClientInfo{}
+ op := &request.Operation{}
+ r := request.New(*sess.Config, md, sess.Handlers, client.DefaultRetryer{NumMaxRetries: 0}, op, nil, nil)
+ sess.Handlers.Complete.Run(r)
+ m := <-csm.MetricsCh
+
+ for k, v := range m {
+ switch k {
+ case "Timestamp":
+ if _, ok := v.(float64); !ok {
+ t.Errorf("expected a float value, but received %T", v)
+ }
+ case "Type":
+ if e, a := "ApiCall", v.(string); e != a {
+ t.Errorf("expected %q, but received %q", e, a)
+ }
+ }
+ }
+}
+
+type mockService struct {
+ *client.Client
+}
+
+type input struct{}
+type output struct{}
+
+func (s *mockService) Request(i input) *request.Request {
+ op := &request.Operation{
+ Name: "foo",
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ o := output{}
+ req := s.NewRequest(op, &i, &o)
+ return req
+}
+
+func BenchmarkWithCSM(b *testing.B) {
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ w.Write([]byte(fmt.Sprintf("{}")))
+ }))
+
+ cfg := aws.Config{
+ Endpoint: aws.String(server.URL),
+ }
+
+ sess := session.New(&cfg)
+ r := csm.Get()
+
+ r.InjectHandlers(&sess.Handlers)
+
+ c := sess.ClientConfig("id", &cfg)
+
+ svc := mockService{
+ client.New(
+ *c.Config,
+ metadata.ClientInfo{
+ ServiceName: "service",
+ ServiceID: "id",
+ SigningName: "signing",
+ SigningRegion: "region",
+ Endpoint: server.URL,
+ APIVersion: "0",
+ JSONVersion: "1.1",
+ TargetPrefix: "prefix",
+ },
+ c.Handlers,
+ ),
+ }
+
+ svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
+ svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
+ svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
+ svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
+ svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
+
+ for i := 0; i < b.N; i++ {
+ req := svc.Request(input{})
+ req.Send()
+ }
+}
+
+func BenchmarkWithCSMNoUDPConnection(b *testing.B) {
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ w.Write([]byte(fmt.Sprintf("{}")))
+ }))
+
+ cfg := aws.Config{
+ Endpoint: aws.String(server.URL),
+ }
+
+ sess := session.New(&cfg)
+ r := csm.Get()
+ r.Pause()
+ r.InjectHandlers(&sess.Handlers)
+ defer r.Pause()
+
+ c := sess.ClientConfig("id", &cfg)
+
+ svc := mockService{
+ client.New(
+ *c.Config,
+ metadata.ClientInfo{
+ ServiceName: "service",
+ ServiceID: "id",
+ SigningName: "signing",
+ SigningRegion: "region",
+ Endpoint: server.URL,
+ APIVersion: "0",
+ JSONVersion: "1.1",
+ TargetPrefix: "prefix",
+ },
+ c.Handlers,
+ ),
+ }
+
+ svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
+ svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
+ svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
+ svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
+ svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
+
+ for i := 0; i < b.N; i++ {
+ req := svc.Request(input{})
+ req.Send()
+ }
+}
+
+func BenchmarkWithoutCSM(b *testing.B) {
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ w.Write([]byte(fmt.Sprintf("{}")))
+ }))
+
+ cfg := aws.Config{
+ Endpoint: aws.String(server.URL),
+ }
+ sess := session.New(&cfg)
+ c := sess.ClientConfig("id", &cfg)
+
+ svc := mockService{
+ client.New(
+ *c.Config,
+ metadata.ClientInfo{
+ ServiceName: "service",
+ ServiceID: "id",
+ SigningName: "signing",
+ SigningRegion: "region",
+ Endpoint: server.URL,
+ APIVersion: "0",
+ JSONVersion: "1.1",
+ TargetPrefix: "prefix",
+ },
+ c.Handlers,
+ ),
+ }
+
+ svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
+ svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
+ svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
+ svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
+ svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
+
+ for i := 0; i < b.N; i++ {
+ req := svc.Request(input{})
+ req.Send()
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
index fbbfd0184..c3043279d 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
@@ -48,6 +48,7 @@ const (
A4bServiceID = "a4b" // A4b.
AcmServiceID = "acm" // Acm.
AcmPcaServiceID = "acm-pca" // AcmPca.
+ ApiMediatailorServiceID = "api.mediatailor" // ApiMediatailor.
ApiPricingServiceID = "api.pricing" // ApiPricing.
ApigatewayServiceID = "apigateway" // Apigateway.
ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling.
@@ -123,12 +124,14 @@ const (
MediaconvertServiceID = "mediaconvert" // Mediaconvert.
MedialiveServiceID = "medialive" // Medialive.
MediapackageServiceID = "mediapackage" // Mediapackage.
+ MediastoreServiceID = "mediastore" // Mediastore.
MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace.
MghServiceID = "mgh" // Mgh.
MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics.
ModelsLexServiceID = "models.lex" // ModelsLex.
MonitoringServiceID = "monitoring" // Monitoring.
MturkRequesterServiceID = "mturk-requester" // MturkRequester.
+ NeptuneServiceID = "neptune" // Neptune.
OpsworksServiceID = "opsworks" // Opsworks.
OpsworksCmServiceID = "opsworks-cm" // OpsworksCm.
OrganizationsServiceID = "organizations" // Organizations.
@@ -306,6 +309,16 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "api.mediatailor": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ },
+ },
"api.pricing": service{
Defaults: endpoint{
CredentialScope: credentialScope{
@@ -433,6 +446,7 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
@@ -1045,6 +1059,7 @@ var awsPartition = partition{
"elasticfilesystem": service{
Endpoints: endpoints{
+ "ap-northeast-2": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
@@ -1241,11 +1256,13 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -1345,6 +1362,7 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
@@ -1437,12 +1455,15 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -1504,6 +1525,7 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-west-1": endpoint{},
@@ -1526,6 +1548,17 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "mediastore": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"metering.marketplace": service{
Defaults: endpoint{
CredentialScope: credentialScope{
@@ -1606,6 +1639,35 @@ var awsPartition = partition{
"us-east-1": endpoint{},
},
},
+ "neptune": service{
+
+ Endpoints: endpoints{
+ "eu-west-1": endpoint{
+ Hostname: "rds.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ "us-east-1": endpoint{
+ Hostname: "rds.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "us-east-2": endpoint{
+ Hostname: "rds.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "us-west-2": endpoint{
+ Hostname: "rds.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
"opsworks": service{
Endpoints: endpoints{
@@ -1789,10 +1851,11 @@ var awsPartition = partition{
"runtime.sagemaker": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"s3": service{
@@ -1857,10 +1920,11 @@ var awsPartition = partition{
"sagemaker": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"sdb": service{
@@ -2065,6 +2129,10 @@ var awsPartition = partition{
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
+ "fips-us-east-1": endpoint{},
+ "fips-us-east-2": endpoint{},
+ "fips-us-west-1": endpoint{},
+ "fips-us-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{
SSLCommonName: "queue.{dnsSuffix}",
@@ -2098,6 +2166,7 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
@@ -2106,6 +2175,7 @@ var awsPartition = partition{
"eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -2268,6 +2338,7 @@ var awsPartition = partition{
Protocols: []string{"https"},
},
Endpoints: endpoints{
+ "eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -2294,6 +2365,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
"us-west-1": endpoint{},
"us-west-2": endpoint{},
},
@@ -2487,13 +2559,15 @@ var awscnPartition = partition{
"ecr": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"ecs": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"elasticache": service{
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/logger.go
index 3babb5abd..6ed15b2ec 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/logger.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/logger.go
@@ -71,6 +71,12 @@ const (
// LogDebugWithRequestErrors states the SDK should log when service requests fail
// to build, send, validate, or unmarshal.
LogDebugWithRequestErrors
+
+ // LogDebugWithEventStreamBody states the SDK should log EventStream
+ // request and response bodys. This should be used to log the EventStream
+ // wire unmarshaled message content of requests and responses made while
+ // using the SDK Will also enable LogDebug.
+ LogDebugWithEventStreamBody
)
// A Logger is a minimalistic interface for the SDK to log messages to. Should
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
index 802ac88ad..605a72d3c 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
@@ -14,6 +14,7 @@ type Handlers struct {
Send HandlerList
ValidateResponse HandlerList
Unmarshal HandlerList
+ UnmarshalStream HandlerList
UnmarshalMeta HandlerList
UnmarshalError HandlerList
Retry HandlerList
@@ -30,6 +31,7 @@ func (h *Handlers) Copy() Handlers {
Send: h.Send.copy(),
ValidateResponse: h.ValidateResponse.copy(),
Unmarshal: h.Unmarshal.copy(),
+ UnmarshalStream: h.UnmarshalStream.copy(),
UnmarshalError: h.UnmarshalError.copy(),
UnmarshalMeta: h.UnmarshalMeta.copy(),
Retry: h.Retry.copy(),
@@ -45,6 +47,7 @@ func (h *Handlers) Clear() {
h.Send.Clear()
h.Sign.Clear()
h.Unmarshal.Clear()
+ h.UnmarshalStream.Clear()
h.UnmarshalMeta.Clear()
h.UnmarshalError.Clear()
h.ValidateResponse.Clear()
@@ -172,6 +175,21 @@ func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool) {
return swapped
}
+// Swap will swap out all handlers matching the name passed in. The matched
+// handlers will be swapped in. True is returned if the handlers were swapped.
+func (l *HandlerList) Swap(name string, replace NamedHandler) bool {
+ var swapped bool
+
+ for i := 0; i < len(l.list); i++ {
+ if l.list[i].Name == name {
+ l.list[i] = replace
+ swapped = true
+ }
+ }
+
+ return swapped
+}
+
// SetBackNamed will replace the named handler if it exists in the handler list.
// If the handler does not exist the handler will be added to the end of the list.
func (l *HandlerList) SetBackNamed(n NamedHandler) {
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
index 69b7a01ad..75f0fe077 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
@@ -46,6 +46,7 @@ type Request struct {
Handlers Handlers
Retryer
+ AttemptTime time.Time
Time time.Time
Operation *Operation
HTTPRequest *http.Request
@@ -121,6 +122,7 @@ func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers,
Handlers: handlers.Copy(),
Retryer: retryer,
+ AttemptTime: time.Now(),
Time: time.Now(),
ExpireTime: 0,
Operation: operation,
@@ -368,9 +370,9 @@ func (r *Request) Build() error {
return r.Error
}
-// Sign will sign the request returning error if errors are encountered.
+// Sign will sign the request, returning error if errors are encountered.
//
-// Send will build the request prior to signing. All Sign Handlers will
+// Sign will build the request prior to signing. All Sign Handlers will
// be executed in the order they were set.
func (r *Request) Sign() error {
r.Build()
@@ -440,7 +442,7 @@ func (r *Request) GetBody() io.ReadSeeker {
return r.safeBody
}
-// Send will send the request returning error if errors are encountered.
+// Send will send the request, returning error if errors are encountered.
//
// Send will sign the request prior to sending. All Send Handlers will
// be executed in the order they were set.
@@ -461,6 +463,7 @@ func (r *Request) Send() error {
}()
for {
+ r.AttemptTime = time.Now()
if aws.BoolValue(r.Retryable) {
if r.Config.LogLevel.Matches(aws.LogDebugWithRequestRetries) {
r.Config.Logger.Log(fmt.Sprintf("DEBUG: Retrying Request %s/%s, attempt %d",
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
index 869b97a1a..e36e468b7 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
@@ -21,7 +21,7 @@ func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil }
var NoBody = noBody{}
// ResetBody rewinds the request body back to its starting position, and
-// set's the HTTP Request body reference. When the body is read prior
+// sets the HTTP Request body reference. When the body is read prior
// to being sent in the HTTP request it will need to be rewound.
//
// ResetBody will automatically be called by the SDK's build handler, but if
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go
index c32fc69bc..7c6a8000f 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go
@@ -11,7 +11,7 @@ import (
var NoBody = http.NoBody
// ResetBody rewinds the request body back to its starting position, and
-// set's the HTTP Request body reference. When the body is read prior
+// sets the HTTP Request body reference. When the body is read prior
// to being sent in the HTTP request it will need to be rewound.
//
// ResetBody will automatically be called by the SDK's build handler, but if
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
index 159518a75..a633ed5ac 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
@@ -35,8 +35,12 @@ type Pagination struct {
// NewRequest should always be built from the same API operations. It is
// undefined if different API operations are returned on subsequent calls.
NewRequest func() (*Request, error)
+ // EndPageOnSameToken, when enabled, will allow the paginator to stop on
+ // token that are the same as its previous tokens.
+ EndPageOnSameToken bool
started bool
+ prevTokens []interface{}
nextTokens []interface{}
err error
@@ -49,7 +53,15 @@ type Pagination struct {
//
// Will always return true if Next has not been called yet.
func (p *Pagination) HasNextPage() bool {
- return !(p.started && len(p.nextTokens) == 0)
+ if !p.started {
+ return true
+ }
+
+ hasNextPage := len(p.nextTokens) != 0
+ if p.EndPageOnSameToken {
+ return hasNextPage && !awsutil.DeepEqual(p.nextTokens, p.prevTokens)
+ }
+ return hasNextPage
}
// Err returns the error Pagination encountered when retrieving the next page.
@@ -96,6 +108,7 @@ func (p *Pagination) Next() bool {
return false
}
+ p.prevTokens = p.nextTokens
p.nextTokens = req.nextPageTokens()
p.curPage = req.Data
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go
index b942e014f..03aed301a 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go
@@ -466,20 +466,48 @@ func TestPagination_Standalone(t *testing.T) {
Value, PrevToken, NextToken *string
}
- cases := [][]testCase{
+ type testCaseList struct {
+ StopOnSameToken bool
+ Cases []testCase
+ }
+
+ cases := []testCaseList{
{
- testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")},
- testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")},
- testCase{aws.String("ThirdValue"), aws.String("SecondToken"), nil},
+ Cases: []testCase{
+ testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")},
+ testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")},
+ testCase{aws.String("ThirdValue"), aws.String("SecondToken"), nil},
+ },
+ StopOnSameToken: false,
},
{
- testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")},
- testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")},
- testCase{aws.String("ThirdValue"), aws.String("SecondToken"), aws.String("")},
+ Cases: []testCase{
+ testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")},
+ testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")},
+ testCase{aws.String("ThirdValue"), aws.String("SecondToken"), aws.String("")},
+ },
+ StopOnSameToken: false,
+ },
+ {
+ Cases: []testCase{
+ testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")},
+ testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")},
+ testCase{nil, aws.String("SecondToken"), aws.String("SecondToken")},
+ },
+ StopOnSameToken: true,
+ },
+ {
+ Cases: []testCase{
+ testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")},
+ testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")},
+ testCase{aws.String("SecondValue"), aws.String("SecondToken"), aws.String("SecondToken")},
+ },
+ StopOnSameToken: true,
},
}
- for _, c := range cases {
+ for _, testcase := range cases {
+ c := testcase.Cases
input := testPageInput{
NextToken: c[0].PrevToken,
}
@@ -487,6 +515,7 @@ func TestPagination_Standalone(t *testing.T) {
svc := awstesting.NewClient()
i := 0
p := request.Pagination{
+ EndPageOnSameToken: testcase.StopOnSameToken,
NewRequest: func() (*request.Request, error) {
r := svc.NewRequest(
&request.Operation{
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
index 12b452177..82e04d76c 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
@@ -96,9 +96,23 @@ type envConfig struct {
//
// AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle
CustomCABundle string
+
+ csmEnabled string
+ CSMEnabled bool
+ CSMPort string
+ CSMClientID string
}
var (
+ csmEnabledEnvKey = []string{
+ "AWS_CSM_ENABLED",
+ }
+ csmPortEnvKey = []string{
+ "AWS_CSM_PORT",
+ }
+ csmClientIDEnvKey = []string{
+ "AWS_CSM_CLIENT_ID",
+ }
credAccessEnvKey = []string{
"AWS_ACCESS_KEY_ID",
"AWS_ACCESS_KEY",
@@ -157,6 +171,12 @@ func envConfigLoad(enableSharedConfig bool) envConfig {
setFromEnvVal(&cfg.Creds.SecretAccessKey, credSecretEnvKey)
setFromEnvVal(&cfg.Creds.SessionToken, credSessionEnvKey)
+ // CSM environment variables
+ setFromEnvVal(&cfg.csmEnabled, csmEnabledEnvKey)
+ setFromEnvVal(&cfg.CSMPort, csmPortEnvKey)
+ setFromEnvVal(&cfg.CSMClientID, csmClientIDEnvKey)
+ cfg.CSMEnabled = len(cfg.csmEnabled) > 0
+
// Require logical grouping of credentials
if len(cfg.Creds.AccessKeyID) == 0 || len(cfg.Creds.SecretAccessKey) == 0 {
cfg.Creds = credentials.Value{}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
index 259b5c0fe..51f305563 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
@@ -15,6 +15,7 @@ import (
"github.com/aws/aws-sdk-go/aws/corehandlers"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
+ "github.com/aws/aws-sdk-go/aws/csm"
"github.com/aws/aws-sdk-go/aws/defaults"
"github.com/aws/aws-sdk-go/aws/endpoints"
"github.com/aws/aws-sdk-go/aws/request"
@@ -81,10 +82,16 @@ func New(cfgs ...*aws.Config) *Session {
r.Error = err
})
}
+
return s
}
- return deprecatedNewSession(cfgs...)
+ s := deprecatedNewSession(cfgs...)
+ if envCfg.CSMEnabled {
+ enableCSM(&s.Handlers, envCfg.CSMClientID, envCfg.CSMPort, s.Config.Logger)
+ }
+
+ return s
}
// NewSession returns a new Session created from SDK defaults, config files,
@@ -300,10 +307,22 @@ func deprecatedNewSession(cfgs ...*aws.Config) *Session {
}
initHandlers(s)
-
return s
}
+func enableCSM(handlers *request.Handlers, clientID string, port string, logger aws.Logger) {
+ logger.Log("Enabling CSM")
+ if len(port) == 0 {
+ port = csm.DefaultPort
+ }
+
+ r, err := csm.Start(clientID, "127.0.0.1:"+port)
+ if err != nil {
+ return
+ }
+ r.InjectHandlers(handlers)
+}
+
func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, error) {
cfg := defaults.Config()
handlers := defaults.Handlers()
@@ -343,6 +362,9 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session,
}
initHandlers(s)
+ if envCfg.CSMEnabled {
+ enableCSM(&s.Handlers, envCfg.CSMClientID, envCfg.CSMPort, s.Config.Logger)
+ }
// Setup HTTP client with custom cert bundle if enabled
if opts.CustomCABundle != nil {
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go
index 93d664b23..817494522 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go
@@ -48,7 +48,7 @@ func TestPresignHandler(t *testing.T) {
expectedHost := "bucket.s3.mock-region.amazonaws.com"
expectedDate := "19700101T000000Z"
expectedHeaders := "content-disposition;host;x-amz-acl"
- expectedSig := "a46583256431b09eb45ba4af2e6286d96a9835ed13721023dc8076dfdcb90fcb"
+ expectedSig := "2d76a414208c0eac2a23ef9c834db9635ecd5a0fbb447a00ad191f82d854f55b"
expectedCred := "AKID/19700101/mock-region/s3/aws4_request"
u, _ := url.Parse(urlstr)
@@ -71,8 +71,8 @@ func TestPresignHandler(t *testing.T) {
if e, a := "300", urlQ.Get("X-Amz-Expires"); e != a {
t.Errorf("expect %v, got %v", e, a)
}
- if e, a := "UNSIGNED-PAYLOAD", urlQ.Get("X-Amz-Content-Sha256"); e != a {
- t.Errorf("expect %v, got %v", e, a)
+ if a := urlQ.Get("X-Amz-Content-Sha256"); len(a) != 0 {
+ t.Errorf("expect no content sha256 got %v", a)
}
if e, a := "+", urlstr; strings.Contains(a, e) { // + encoded as %20
@@ -98,7 +98,7 @@ func TestPresignRequest(t *testing.T) {
expectedHost := "bucket.s3.mock-region.amazonaws.com"
expectedDate := "19700101T000000Z"
expectedHeaders := "content-disposition;host;x-amz-acl"
- expectedSig := "a46583256431b09eb45ba4af2e6286d96a9835ed13721023dc8076dfdcb90fcb"
+ expectedSig := "2d76a414208c0eac2a23ef9c834db9635ecd5a0fbb447a00ad191f82d854f55b"
expectedCred := "AKID/19700101/mock-region/s3/aws4_request"
expectedHeaderMap := http.Header{
"x-amz-acl": []string{"public-read"},
@@ -128,8 +128,8 @@ func TestPresignRequest(t *testing.T) {
if e, a := "300", urlQ.Get("X-Amz-Expires"); e != a {
t.Errorf("expect %v, got %v", e, a)
}
- if e, a := "UNSIGNED-PAYLOAD", urlQ.Get("X-Amz-Content-Sha256"); e != a {
- t.Errorf("expect %v, got %v", e, a)
+ if a := urlQ.Get("X-Amz-Content-Sha256"); len(a) != 0 {
+ t.Errorf("expect no content sha256 got %v", a)
}
if e, a := "+", urlstr; strings.Contains(a, e) { // + encoded as %20
@@ -169,7 +169,7 @@ func TestStandaloneSign_WithPort(t *testing.T) {
cases := []struct {
description string
- url string
+ url string
expectedSig string
}{
{
@@ -213,7 +213,7 @@ func TestStandalonePresign_WithPort(t *testing.T) {
cases := []struct {
description string
- url string
+ url string
expectedSig string
}{
{
@@ -241,7 +241,7 @@ func TestStandalonePresign_WithPort(t *testing.T) {
for _, c := range cases {
signer := v4.NewSigner(unit.Session.Config.Credentials)
req, _ := http.NewRequest("GET", c.url, nil)
- _, err := signer.Presign(req, nil, "es", "us-east-1", 5 * time.Minute, time.Unix(0, 0))
+ _, err := signer.Presign(req, nil, "es", "us-east-1", 5*time.Minute, time.Unix(0, 0))
if err != nil {
t.Fatalf("expect no error, got %v", err)
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
index 6e4637612..f35861315 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
@@ -135,6 +135,7 @@ var requiredSignedHeaders = rules{
"X-Amz-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
"X-Amz-Storage-Class": struct{}{},
"X-Amz-Website-Redirect-Location": struct{}{},
+ "X-Amz-Content-Sha256": struct{}{},
},
},
patterns{"X-Amz-Meta-"},
@@ -671,8 +672,15 @@ func (ctx *signingCtx) buildSignature() {
func (ctx *signingCtx) buildBodyDigest() error {
hash := ctx.Request.Header.Get("X-Amz-Content-Sha256")
if hash == "" {
- if ctx.unsignedPayload || (ctx.isPresign && ctx.ServiceName == "s3") {
+ includeSHA256Header := ctx.unsignedPayload ||
+ ctx.ServiceName == "s3" ||
+ ctx.ServiceName == "glacier"
+
+ s3Presign := ctx.isPresign && ctx.ServiceName == "s3"
+
+ if ctx.unsignedPayload || s3Presign {
hash = "UNSIGNED-PAYLOAD"
+ includeSHA256Header = !s3Presign
} else if ctx.Body == nil {
hash = emptyStringSHA256
} else {
@@ -681,7 +689,8 @@ func (ctx *signingCtx) buildBodyDigest() error {
}
hash = hex.EncodeToString(makeSha256Reader(ctx.Body))
}
- if ctx.unsignedPayload || ctx.ServiceName == "s3" || ctx.ServiceName == "glacier" {
+
+ if includeSHA256Header {
ctx.Request.Header.Set("X-Amz-Content-Sha256", hash)
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go
index 16bc7378a..09c054d06 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go
@@ -223,16 +223,36 @@ func TestSignBodyGlacier(t *testing.T) {
}
}
-func TestPresignEmptyBodyS3(t *testing.T) {
- req, body := buildRequest("s3", "us-east-1", "hello")
+func TestPresign_SignedPayload(t *testing.T) {
+ req, body := buildRequest("glacier", "us-east-1", "hello")
signer := buildSigner()
- signer.Presign(req, body, "s3", "us-east-1", 5*time.Minute, time.Now())
+ signer.Presign(req, body, "glacier", "us-east-1", 5*time.Minute, time.Now())
+ hash := req.Header.Get("X-Amz-Content-Sha256")
+ if e, a := "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", hash; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+}
+
+func TestPresign_UnsignedPayload(t *testing.T) {
+ req, body := buildRequest("service-name", "us-east-1", "hello")
+ signer := buildSigner()
+ signer.UnsignedPayload = true
+ signer.Presign(req, body, "service-name", "us-east-1", 5*time.Minute, time.Now())
hash := req.Header.Get("X-Amz-Content-Sha256")
if e, a := "UNSIGNED-PAYLOAD", hash; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
+func TestPresign_UnsignedPayload_S3(t *testing.T) {
+ req, body := buildRequest("s3", "us-east-1", "hello")
+ signer := buildSigner()
+ signer.Presign(req, body, "s3", "us-east-1", 5*time.Minute, time.Now())
+ if a := req.Header.Get("X-Amz-Content-Sha256"); len(a) != 0 {
+ t.Errorf("expect no content sha256 got %v", a)
+ }
+}
+
func TestSignUnseekableBody(t *testing.T) {
req, body := buildRequestWithBodyReader("mock-service", "mock-region", bytes.NewBuffer([]byte("hello")))
signer := buildSigner()
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go
index 4b7f07a38..c05626e29 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/version.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go
@@ -5,4 +5,4 @@ package aws
const SDKName = "aws-sdk-go"
// SDKVersion is the version of this SDK
-const SDKVersion = "1.13.42"
+const SDKVersion = "1.14.8"
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/eventstream_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/eventstream_test.go
new file mode 100644
index 000000000..0e1c67a0d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/eventstream_test.go
@@ -0,0 +1,188 @@
+// +build integration
+
+package s3
+
+import (
+ "bytes"
+ "encoding/csv"
+ "fmt"
+ "io"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/service/s3"
+)
+
+func TestSelectObjectContent(t *testing.T) {
+ keyName := "selectObject.csv"
+ putTestFile(t, filepath.Join("testdata", "positive_select.csv"), keyName)
+
+ resp, err := svc.SelectObjectContent(&s3.SelectObjectContentInput{
+ Bucket: bucketName,
+ Key: &keyName,
+ Expression: aws.String("Select * from S3Object"),
+ ExpressionType: aws.String(s3.ExpressionTypeSql),
+ InputSerialization: &s3.InputSerialization{
+ CSV: &s3.CSVInput{
+ FieldDelimiter: aws.String(","),
+ FileHeaderInfo: aws.String(s3.FileHeaderInfoIgnore),
+ },
+ },
+ OutputSerialization: &s3.OutputSerialization{
+ CSV: &s3.CSVOutput{
+ FieldDelimiter: aws.String(","),
+ },
+ },
+ })
+ if err != nil {
+ t.Fatalf("expect no error, %v", err)
+ }
+ defer resp.EventStream.Close()
+
+ var sum int64
+ var processed int64
+ for event := range resp.EventStream.Events() {
+ switch tv := event.(type) {
+ case *s3.RecordsEvent:
+ sum += int64(len(tv.Payload))
+ case *s3.StatsEvent:
+ processed = *tv.Details.BytesProcessed
+ }
+ }
+
+ if sum == 0 {
+ t.Errorf("expect selected content, got none")
+ }
+
+ if processed == 0 {
+ t.Errorf("expect selected status bytes processed, got none")
+ }
+
+ if err := resp.EventStream.Err(); err != nil {
+ t.Fatalf("exect no error, %v", err)
+ }
+}
+
+func TestSelectObjectContent_Error(t *testing.T) {
+ keyName := "negativeSelect.csv"
+
+ buf := make([]byte, 0, 1024*1024*6)
+ buf = append(buf, []byte("name,number\n")...)
+ line := []byte("jj,0\n")
+ for i := 0; i < (cap(buf)/len(line))-2; i++ {
+ buf = append(buf, line...)
+ }
+ buf = append(buf, []byte("gg,NaN\n")...)
+
+ putTestContent(t, bytes.NewReader(buf), keyName)
+
+ resp, err := svc.SelectObjectContent(&s3.SelectObjectContentInput{
+ Bucket: bucketName,
+ Key: &keyName,
+ Expression: aws.String("SELECT name FROM S3Object WHERE cast(number as int) < 1"),
+ ExpressionType: aws.String(s3.ExpressionTypeSql),
+ InputSerialization: &s3.InputSerialization{
+ CSV: &s3.CSVInput{
+ FileHeaderInfo: aws.String(s3.FileHeaderInfoUse),
+ },
+ },
+ OutputSerialization: &s3.OutputSerialization{
+ CSV: &s3.CSVOutput{
+ FieldDelimiter: aws.String(","),
+ },
+ },
+ })
+ if err != nil {
+ t.Fatalf("expect no error, %v", err)
+ }
+ defer resp.EventStream.Close()
+
+ var sum int64
+ for event := range resp.EventStream.Events() {
+ switch tv := event.(type) {
+ case *s3.RecordsEvent:
+ sum += int64(len(tv.Payload))
+ }
+ }
+
+ if sum == 0 {
+ t.Errorf("expect selected content")
+ }
+
+ err = resp.EventStream.Err()
+ if err == nil {
+ t.Fatalf("exepct error")
+ }
+
+ aerr := err.(awserr.Error)
+ if a := aerr.Code(); len(a) == 0 {
+ t.Errorf("expect, error code")
+ }
+ if a := aerr.Message(); len(a) == 0 {
+ t.Errorf("expect, error message")
+ }
+}
+
+func TestSelectObjectContent_Stream(t *testing.T) {
+ keyName := "selectGopher.csv"
+
+ buf := `name,number
+gopher,0
+ᵷodɥǝɹ,1
+`
+ // Put a mock CSV file to the S3 bucket so that its contents can be
+ // selected.
+ putTestContent(t, strings.NewReader(buf), keyName)
+
+ // Make the Select Object Content API request using the object uploaded.
+ resp, err := svc.SelectObjectContent(&s3.SelectObjectContentInput{
+ Bucket: bucketName,
+ Key: &keyName,
+ Expression: aws.String("SELECT name FROM S3Object WHERE cast(number as int) < 1"),
+ ExpressionType: aws.String(s3.ExpressionTypeSql),
+ InputSerialization: &s3.InputSerialization{
+ CSV: &s3.CSVInput{
+ FileHeaderInfo: aws.String(s3.FileHeaderInfoUse),
+ },
+ },
+ OutputSerialization: &s3.OutputSerialization{
+ CSV: &s3.CSVOutput{},
+ },
+ })
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "failed making API request, %v\n", err)
+ return
+ }
+ defer resp.EventStream.Close()
+
+ results, resultWriter := io.Pipe()
+ go func() {
+ defer resultWriter.Close()
+ for event := range resp.EventStream.Events() {
+ switch e := event.(type) {
+ case *s3.RecordsEvent:
+ resultWriter.Write(e.Payload)
+ case *s3.StatsEvent:
+ fmt.Printf("Processed %d bytes\n", *e.Details.BytesProcessed)
+ }
+ }
+ }()
+
+ // Printout the results
+ resReader := csv.NewReader(results)
+ for {
+ record, err := resReader.Read()
+ if err == io.EOF {
+ break
+ }
+ fmt.Println(record)
+ }
+
+ if err := resp.EventStream.Err(); err != nil {
+ fmt.Fprintf(os.Stderr, "reading from event stream failed, %v\n", err)
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/shared_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/shared_test.go
index 5e00b46cf..58ef0042b 100644
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/shared_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/shared_test.go
@@ -4,6 +4,7 @@ package s3
import (
"fmt"
+ "io"
"os"
"testing"
@@ -65,3 +66,24 @@ func teardown() {
svc.DeleteBucket(&s3.DeleteBucketInput{Bucket: bucketName})
}
+
+func putTestFile(t *testing.T, filename, key string) {
+ f, err := os.Open(filename)
+ if err != nil {
+ t.Fatalf("failed to open testfile, %v", err)
+ }
+ defer f.Close()
+
+ putTestContent(t, f, key)
+}
+
+func putTestContent(t *testing.T, reader io.ReadSeeker, key string) {
+ _, err := svc.PutObject(&s3.PutObjectInput{
+ Bucket: bucketName,
+ Key: aws.String(key),
+ Body: reader,
+ })
+ if err != nil {
+ t.Errorf("expect no error, got %v", err)
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/testdata/positive_select.csv b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/testdata/positive_select.csv
new file mode 100644
index 000000000..f14f901e3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/testdata/positive_select.csv
@@ -0,0 +1,556 @@
+A,B,C,D,E,F,G,H,I,J
+0,0,0.5,217.371,217.658,218.002,269.445,487.447,2.106,489.554
+0,0,490.077,0.657,0.84,1.588,121.092,122.681,2.185,124.867
+0,9,490.077,1.602,1.676,1.977,184.155,186.132,1.198,187.331
+0,6,490.384,1.787,1.962,2.451,270.592,273.044,4.158,277.202
+0,5,491.125,0.693,0.877,1.9,295.589,297.49,19.456,316.946
+0,8,491.348,1.833,1.924,66.432,250.035,316.467,2.379,318.847
+0,0,614.955,0.455,0.507,8.554,229.261,237.815,15.761,253.577
+0,9,677.418,0.493,0.546,14.288,176.628,190.917,6.522,197.44
+0,3,491.864,1.034,1.109,250.552,132.254,382.806,2.485,385.291
+0,2,491.351,1.763,1.807,276.239,122.283,398.523,26.436,424.96
+0,4,490.154,1.867,1.935,341.544,86.243,427.787,15.659,443.447
+0,8,810.203,0.381,0.453,21.4,101.836,123.236,9.01,132.246
+0,6,767.595,0.54,0.592,68.928,105.705,174.633,0.93,175.564
+0,0,868.54,0.384,0.483,8.721,82.83,91.552,37.154,128.706
+0,9,874.866,0.472,0.574,41.728,80.617,122.345,11.14,133.486
+0,1,490.757,2.284,2.336,426.145,91.084,517.229,0.507,517.736
+0,7,490.755,1.652,1.816,426.521,90.913,517.435,2.244,519.679
+0,6,943.165,0.324,0.391,2.676,116.421,119.098,0.452,119.551
+0,2,916.32,0.609,0.884,81.097,83.55,164.647,1.342,165.989
+0,8,942.462,0.374,0.464,55.682,84.915,140.597,46.844,187.442
+0,4,933.61,0.377,0.451,64.784,131.147,195.932,9.997,205.929
+0,5,808.083,0.565,0.641,190.27,140.808,331.078,0.465,331.543
+0,3,877.165,0.47,0.546,121.153,141.078,262.231,2.558,264.789
+0,7,1010.442,0.372,0.441,2.201,129.116,131.318,7.148,138.467
+0,6,1062.725,0.483,0.581,6.402,80.848,87.251,45.416,132.668
+0,1,1008.502,1.579,1.706,65.348,121.324,186.672,1.251,187.924
+0,0,997.256,0.402,0.832,76.472,121.367,197.839,18.513,216.353
+0,9,1008.364,1.428,1.582,70.936,133.941,204.878,2.255,207.133
+0,8,1129.916,0.458,0.551,19.07,113.216,132.287,0.38,132.667
+0,4,1139.547,0.388,0.457,9.775,113.036,122.812,1.531,124.343
+0,2,1082.318,0.352,0.43,67.775,112.768,180.543,22.578,203.122
+0,5,1139.629,0.416,0.466,10.429,135.269,145.699,2.425,148.124
+0,3,1141.962,0.394,0.472,53.375,92.295,145.67,0.212,145.883
+0,0,1213.618,0.408,0.481,2.655,112.525,115.18,0.547,115.728
+0,9,1215.504,0.427,0.672,2.233,111.382,113.615,1.145,114.761
+0,6,1195.403,0.437,0.511,25.098,109.564,134.662,22.852,157.515
+0,7,1148.919,0.486,1.021,138.981,91.884,230.865,16.504,247.369
+0,4,1263.894,0.711,0.788,33.761,98.396,132.158,0.671,132.83
+0,1,1196.433,0.301,0.364,100.757,99.252,200.01,1.116,201.126
+0,8,1262.594,0.964,1.248,66.394,96.747,163.141,1.173,164.315
+0,2,1285.445,0.209,0.254,43.808,97.338,141.146,0.548,141.694
+0,9,1330.271,0.288,0.355,35.329,84.511,119.84,16.98,136.821
+0,6,1352.928,0.474,0.579,12.904,100.981,113.886,0.517,114.403
+0,0,1329.353,0.294,0.366,36.781,100.857,137.638,0.532,138.171
+0,2,1427.143,0.532,0.58,9.336,79.756,89.093,1.239,90.332
+0,4,1396.736,0.503,0.592,44.925,80.622,125.548,10.972,136.52
+0,8,1426.921,0.631,0.71,15.906,90.068,105.975,1.38,107.356
+0,5,1287.759,0.278,0.316,181.454,80.529,261.984,10.774,272.759
+0,1,1397.566,0.268,0.324,99.635,82.55,182.186,8.445,190.632
+0,0,1467.53,1.354,1.536,33.298,87.09,120.388,0.517,120.905
+0,7,1396.3,0.593,0.684,104.729,87.108,191.838,1.133,192.971
+0,9,1467.103,1.422,1.546,42.719,82.771,125.491,9.398,134.89
+0,3,1287.85,0.245,0.272,248.437,79.849,328.286,9.318,337.605
+0,6,1467.339,0.933,1.132,69.074,88.797,157.871,0.891,158.762
+0,4,1533.267,0.449,0.548,42.003,81.379,123.383,9.108,132.491
+0,2,1517.483,0.32,0.399,56.455,91.585,148.04,0.44,148.48
+0,8,1534.284,0.425,0.48,39.738,91.427,131.166,1.247,132.413
+0,5,1560.528,0.396,0.499,19.318,86.69,106.008,1.54,107.548
+0,6,1626.109,0.34,0.43,6.88,82.575,89.455,0.568,90.023
+0,1,1588.231,0.451,0.541,44.902,84.635,129.537,24.285,153.823
+0,7,1589.279,0.288,0.352,57.597,94.892,152.489,0.555,153.044
+0,9,1602.002,0.424,0.68,45.095,94.862,139.957,0.797,140.755
+0,5,1668.084,0.29,0.351,29.143,84.196,113.34,26.201,139.542
+0,4,1665.766,0.373,0.457,34.457,107.029,141.486,0.715,142.201
+0,2,1665.971,0.303,0.375,47.175,94.572,141.748,0.861,142.609
+0,0,1588.445,0.517,0.625,154.081,80.415,234.496,7.112,241.608
+0,3,1625.463,0.647,0.751,143.666,83.075,226.742,21.951,248.694
+0,7,1742.325,0.53,0.624,25.438,84.393,109.831,22.061,131.893
+0,1,1742.079,0.555,0.659,34.769,97.152,131.921,0.364,132.286
+0,8,1666.705,0.883,1.046,113.237,94.162,207.4,1.118,208.519
+0,2,1808.586,0.3,0.362,21.568,78.537,100.106,1.979,102.085
+0,0,1830.064,0.405,0.481,7.114,81.532,88.647,2.392,91.04
+0,6,1716.143,0.49,0.557,121.371,87.089,208.46,14.395,222.856
+0,5,1807.634,0.442,0.527,36.463,94.602,131.065,1.369,132.434
+0,8,1875.228,0.164,0.198,3.582,79.597,83.179,1.504,84.684
+0,1,1874.367,0.562,0.645,28.304,79.054,107.358,0.456,107.815
+0,4,1807.975,0.4,0.482,99.4,81.109,180.509,1.133,181.643
+0,9,1742.773,0.339,0.39,168.948,80.077,249.025,2.367,251.393
+0,3,1874.166,0.495,0.593,38.988,84.602,123.59,7.982,131.572
+0,8,1959.921,0.415,0.494,9.861,82.855,92.717,2.765,95.483
+0,2,1910.682,0.995,1.109,69.161,85.346,154.507,1.625,156.133
+0,0,1921.114,0.394,0.473,92.984,80.599,173.584,1.153,174.738
+0,3,2005.748,0.476,0.556,7.441,83.841,91.283,1.422,92.705
+0,5,1940.076,0.325,0.401,73.91,84.342,158.253,1.718,159.972
+0,7,1874.22,0.557,0.642,140.027,91.031,231.059,1.754,232.814
+0,6,1939.008,0.377,0.455,95.473,81.569,177.042,1.072,178.115
+0,4,1989.626,0.314,0.388,51.23,81.724,132.955,11.694,144.65
+0,9,1994.183,0.321,0.394,57.158,82.743,139.902,0.758,140.66
+0,2,2066.819,0.204,0.259,13.808,84.448,98.256,1.366,99.623
+0,1,1982.189,0.295,0.368,99.448,85.395,184.843,1.56,186.403
+0,8,2055.408,0.203,0.253,51.567,82.101,133.668,1.073,134.741
+0,9,2134.846,0.25,0.306,16.106,85.649,101.755,0.176,101.931
+0,1,2168.598,0.229,0.302,6.826,81.481,88.307,1.143,89.45
+0,4,2134.304,0.373,0.492,45.962,81.137,127.099,0.549,127.648
+0,7,2107.039,0.483,0.555,73.813,81.641,155.455,1.562,157.017
+0,6,2117.128,0.208,0.255,63.776,83.028,146.805,1.656,148.461
+0,8,2190.154,0.225,0.285,29.098,80.996,110.094,1.344,111.439
+0,9,2236.784,0.256,0.32,4.01,82.88,86.89,2.12,89.011
+0,2,2166.449,0.317,0.395,80.763,84.208,164.971,2.32,167.291
+0,5,2100.052,0.294,0.365,146.743,86.973,233.716,0.672,234.389
+0,3,2098.458,0.241,0.3,150.5,84.733,235.234,1.292,236.526
+0,0,2095.857,0.215,0.271,153.005,85.917,238.923,0.534,239.458
+0,6,2265.593,0.182,0.218,20.159,80.738,100.897,1.449,102.347
+0,4,2261.957,0.207,0.256,42.386,82.309,124.696,1.433,126.13
+0,7,2264.061,0.243,0.288,51.339,80.631,131.97,0.973,132.943
+0,8,2301.604,0.391,0.474,24.05,81.886,105.937,1.805,107.743
+0,1,2258.053,0.206,0.26,93.644,81.876,175.52,1.331,176.852
+0,0,2335.321,0.204,0.245,21.603,81.849,103.452,0.941,104.394
+0,6,2367.949,0.434,0.515,6.274,83.161,89.435,4.495,93.931
+0,3,2334.991,0.332,0.403,58.507,88.463,146.971,1.116,148.088
+0,8,2409.356,0.385,0.463,13.78,83.24,97.02,0.344,97.364
+0,5,2334.448,0.364,0.451,106.034,82.488,188.523,1.39,189.914
+0,9,2325.809,0.429,0.506,114.736,84.279,199.015,1.209,200.225
+0,2,2333.745,0.423,0.517,106.853,85.698,192.551,1.745,194.296
+0,4,2388.097,0.399,0.498,67.532,84.096,151.628,0.599,152.228
+0,3,2483.086,0.35,0.427,19.21,81.612,100.822,3.51,104.333
+0,1,2434.913,0.435,0.577,86.727,83.002,169.729,1.902,171.632
+0,7,2397.012,0.331,0.416,142.874,80.866,223.74,1.672,225.413
+0,6,2461.891,0.36,0.441,78.194,82.238,160.433,0.613,161.046
+0,9,2526.038,0.665,0.74,32.614,86.809,119.423,1.275,120.699
+0,4,2540.332,0.326,0.387,42.093,80.618,122.711,2.268,124.979
+0,8,2506.727,0.378,0.456,99.838,79.225,179.064,0.294,179.358
+0,6,2622.939,0.33,0.385,1.186,81.73,82.917,2.248,85.165
+0,3,2587.429,0.61,0.72,59.939,82.437,142.376,0.97,143.346
+0,1,2606.549,0.391,0.459,40.636,83.436,124.072,2.096,126.169
+0,7,2622.432,0.383,0.463,30.735,80.765,111.501,0.733,112.234
+0,2,2528.046,0.199,0.244,128.905,85.696,214.602,0.334,214.936
+0,4,2665.318,0.312,0.399,26.866,81.414,108.281,0.222,108.504
+0,5,2524.369,0.329,0.413,167.907,84.934,252.841,1.305,254.147
+0,8,2686.096,0.401,0.494,7.747,85.181,92.928,2.125,95.053
+0,0,2439.722,0.357,0.696,254.259,89.099,343.358,2.809,346.167
+0,9,2646.75,0.681,0.799,73.064,84.639,157.704,3.532,161.236
+0,6,2708.115,0.4,0.481,14.501,86.758,101.259,0.934,102.194
+0,3,2730.783,0.303,0.377,35.013,88.845,123.858,1.666,125.524
+0,1,2732.726,0.318,0.414,53.138,78.873,132.011,0.237,132.249
+0,0,2785.893,0.375,0.447,25.451,83.295,108.746,4.165,112.911
+0,9,2807.993,0.31,0.384,35.981,91.657,127.639,0.466,128.106
+0,2,2742.992,0.403,0.56,101.119,91.707,192.827,5.458,198.285
+0,8,2781.157,0.365,0.446,70.781,90.886,161.667,0.817,162.484
+0,1,2864.982,0.311,0.402,19.474,86.691,106.165,3.435,109.601
+0,3,2856.319,0.429,0.493,54.672,82.88,137.553,0.33,137.884
+0,5,2778.523,0.309,0.392,132.818,84.58,217.399,1.527,218.927
+0,0,2898.815,0.362,0.463,12.416,86.002,98.418,1.107,99.525
+0,7,2734.674,0.744,0.873,195.477,83.728,279.205,7.848,287.053
+0,4,2773.831,0.339,0.428,156.128,91.457,247.585,1.311,248.897
+0,6,2810.317,0.339,0.432,125.657,102.335,227.993,2.034,230.027
+0,2,2941.285,0.294,0.367,38.02,79.84,117.86,1.696,119.556
+0,8,2943.648,0.293,0.373,38.288,79.728,118.016,2.042,120.058
+0,9,2936.108,0.466,0.563,63.933,82.084,146.017,1.602,147.619
+0,4,3022.735,0.269,0.339,3.697,87.616,91.313,0.516,91.83
+0,3,2994.213,0.418,0.495,42.946,81.806,124.752,0.29,125.043
+0,1,2974.591,0.641,0.762,72.809,81.187,153.997,1.512,155.51
+0,9,3083.737,0.352,0.425,15.144,84.807,99.951,1.383,101.335
+0,6,3040.353,0.399,0.48,61.605,83.294,144.899,9.906,154.806
+0,2,3060.852,0.407,0.487,40.928,92.521,133.449,0.893,134.342
+0,0,2998.348,0.336,0.417,115.561,82.329,197.89,2.808,200.698
+0,8,3063.714,0.314,0.391,50.53,84.619,135.15,28.56,163.71
+0,1,3130.111,0.381,0.484,36.604,82.182,118.787,1.306,120.094
+0,5,2997.458,0.349,0.427,169.477,83.501,252.978,2.447,255.425
+0,7,3021.738,0.425,0.518,148.774,83.974,232.748,0.411,233.16
+0,3,3119.263,0.315,0.392,50.462,85,135.463,4.92,140.383
+0,4,3114.576,0.397,0.465,66.492,81.543,148.035,1.216,149.251
+0,9,3185.086,0.49,0.563,0.843,79.106,79.95,28.271,108.222
+0,6,3195.164,0.659,0.878,41.861,81.999,123.86,0.305,124.166
+0,8,3227.436,0.588,0.685,13.471,80.559,94.03,0.675,94.705
+0,0,3199.056,0.344,0.417,55.856,81.147,137.003,2.313,139.317
+0,2,3195.197,0.89,0.993,59.866,83.95,143.817,2.518,146.336
+0,1,3250.212,0.555,0.641,53.457,80.43,133.887,1.541,135.428
+0,5,3252.89,0.347,0.424,55.768,81.876,137.644,2.326,139.971
+0,9,3293.317,0.516,0.622,39.115,78.826,117.941,1.674,119.615
+0,2,3341.541,0.379,0.456,26.056,81.181,107.238,1.453,108.691
+0,4,3263.836,0.304,0.385,109.176,79.223,188.399,1.336,189.736
+0,6,3319.341,0.424,0.509,52.086,83.572,135.658,1.93,137.589
+0,3,3259.654,0.318,0.4,115.781,84.483,200.264,2.851,203.116
+0,9,3412.942,0.36,0.432,19.904,83.186,103.091,0.294,103.386
+0,5,3392.869,0.364,0.438,46.674,81.708,128.382,2.336,130.718
+0,7,3254.902,0.434,0.504,184.8,83.725,268.526,1.536,270.063
+0,0,3338.38,0.334,0.412,104.769,84.635,189.405,0.579,189.984
+0,8,3322.15,0.363,0.429,120.337,85.709,206.047,1.064,207.111
+0,3,3462.777,0.285,0.363,32.857,78.802,111.659,3.064,114.724
+0,2,3450.24,0.329,0.416,53.507,82.338,135.845,0.291,136.137
+0,1,3385.654,0.404,0.479,125.574,82.017,207.591,1.116,208.708
+0,6,3456.937,0.306,0.374,58.496,80.921,139.418,1.87,141.288
+0,4,3453.579,0.31,0.387,61.685,82.969,144.655,1.418,146.073
+0,8,3529.268,0.324,0.408,31.325,78.86,110.186,1.213,111.4
+0,5,3523.596,0.334,0.417,39.494,83.382,122.877,0.347,123.225
+0,7,3524.971,0.36,0.472,47.432,80.801,128.234,0.953,129.187
+0,4,3599.659,0.319,0.398,27.195,80.69,107.885,1.895,109.781
+0,3,3577.512,0.571,0.652,51.889,82.948,134.837,1.141,135.979
+0,1,3594.371,0.341,0.422,42.685,81.099,123.785,1.473,125.259
+0,7,3654.167,0.306,0.383,15.528,81.986,97.515,2.405,99.92
+0,9,3516.338,0.397,0.472,178.897,79.745,258.642,2.238,260.881
+0,2,3586.389,1.185,1.333,109.11,81.551,190.661,2.03,192.692
+0,5,3646.833,0.424,0.488,56.484,81.305,137.789,1.209,138.999
+0,0,3528.372,0.397,0.487,176.378,80.819,257.198,0.746,257.944
+0,6,3598.234,0.336,0.428,102.676,85.142,187.818,1.845,189.664
+0,8,3640.677,0.476,0.58,83.915,81.6,165.515,12.681,178.196
+0,4,3709.449,0.415,0.495,25.988,83.141,109.13,1.996,111.126
+0,3,3713.499,0.322,0.402,55.534,81.807,137.341,0.906,138.248
+0,0,3786.324,0.919,1.147,3.983,80.348,84.331,1.885,86.217
+0,7,3754.097,0.438,0.543,36.421,81.782,118.204,1.217,119.421
+0,9,3777.227,0.339,0.419,18.041,81.599,99.641,2.512,102.154
+0,1,3719.638,0.353,0.419,112.793,82.398,195.191,1.433,196.624
+0,4,3820.583,0.299,0.38,14.112,83.485,97.598,1.551,99.149
+0,6,3787.905,0.358,0.44,49.391,82.265,131.656,1.218,132.874
+0,2,3779.087,0.323,0.402,81.512,79.373,160.885,3.793,164.679
+0,5,3785.843,1.116,1.253,82.986,77.901,160.888,1.176,162.064
+0,8,3818.882,0.383,0.46,80.581,80.539,161.121,2.24,163.361
+0,9,3879.424,0.314,0.394,21.002,81.687,102.689,1.579,104.268
+0,6,3920.787,0.287,0.38,3.32,80.808,84.129,2.54,86.669
+0,7,3873.527,0.371,0.436,60.962,79.343,140.305,1.693,141.998
+0,5,3947.917,0.324,0.401,18.55,86.417,104.968,1.132,106.101
+0,3,3851.755,0.345,0.42,114.969,87.007,201.977,0.317,202.294
+0,9,3983.709,0.467,0.534,6.466,81.73,88.196,0.443,88.64
+0,8,3982.255,0.767,0.998,14.279,81.449,95.729,1.705,97.435
+0,4,3919.74,0.346,0.424,85.31,79.932,165.243,0.644,165.887
+0,7,4015.534,0.333,0.409,17.541,80.366,97.907,1.668,99.575
+0,1,3916.272,0.432,0.512,128.903,84.8,213.703,2.03,215.733
+0,0,3872.552,0.463,0.605,190.345,81.085,271.43,2.323,273.754
+0,2,3943.776,0.456,0.565,124.062,79.417,203.479,2.947,206.427
+0,5,4054.025,0.473,0.519,16.707,81.618,98.325,2.546,100.872
+0,4,4085.637,0.444,0.528,14.533,83.168,97.701,1.309,99.01
+0,7,4115.136,0.466,0.563,10.979,80.789,91.768,1.994,93.762
+0,9,4072.356,0.332,0.411,61.405,81.35,142.756,1.96,144.716
+0,6,4007.465,0.323,0.404,173.194,81.587,254.782,1.562,256.344
+0,0,4146.315,0.415,0.495,47.446,82.791,130.237,1.332,131.569
+0,3,4054.052,0.334,0.407,140.693,83.369,224.063,5.103,229.166
+0,8,4079.697,0.352,0.431,114.177,84.118,198.295,7.426,205.722
+0,4,4184.657,0.346,0.42,13.748,86.813,100.561,0.308,100.869
+0,2,4150.211,0.297,0.391,50.058,85.067,135.125,2.111,137.237
+0,9,4217.079,0.289,0.372,15.913,78.546,94.459,1.492,95.952
+0,7,4208.903,0.592,0.799,46.416,79.377,125.794,1.363,127.157
+0,5,4154.904,0.378,0.458,105.65,86.733,192.384,0.306,192.69
+0,1,4132.012,0.351,0.423,128.658,87.255,215.914,1.377,217.291
+0,6,4263.817,0.316,0.392,7.054,80.022,87.076,2.867,89.944
+0,2,4287.456,0.418,0.519,13.658,77.869,91.528,1.837,93.365
+0,8,4285.427,0.371,0.448,46.607,81.282,127.89,1.193,129.083
+0,6,4353.769,0.428,0.512,12.728,83.385,96.114,1.372,97.486
+0,9,4313.041,0.452,0.544,65.025,81.466,146.492,1.454,147.947
+0,7,4336.069,0.547,0.631,62.669,80.678,143.347,1.741,145.089
+0,4,4285.532,0.421,0.489,126.035,80.128,206.164,1.865,208.029
+0,1,4349.311,0.344,0.419,83.199,81.257,164.457,2.457,166.915
+0,5,4347.602,0.336,0.415,84.785,84.577,169.362,0.205,169.568
+0,3,4283.225,0.311,0.39,165.412,81.631,247.043,2.736,249.779
+0,6,4451.266,0.349,0.435,16.483,81.492,97.976,1.693,99.669
+0,2,4380.832,0.957,1.096,87.309,82.649,169.959,1.588,171.547
+0,8,4414.518,0.362,0.479,53.482,84.438,137.92,1.534,139.454
+0,0,4277.9,0.615,0.698,190.489,85.361,275.85,1.139,276.99
+0,4,4493.572,0.353,0.433,5.668,79.869,85.538,1.985,87.523
+0,9,4460.995,0.297,0.379,72.698,82.185,154.884,1.312,156.196
+0,7,4481.166,0.353,0.43,52.934,82.767,135.702,0.9,136.602
+0,1,4516.236,0.426,0.513,21.016,82.575,103.591,1.242,104.834
+0,0,4554.897,0.284,0.36,14.035,80.027,94.063,0.644,94.708
+0,2,4552.387,0.34,0.416,49.053,82.256,131.309,1.498,132.807
+0,6,4550.944,0.374,0.452,58.083,82.241,140.324,0.226,140.55
+0,5,4517.178,0.287,0.348,92.038,83.638,175.677,2.136,177.813
+0,3,4533.015,0.387,0.482,81.677,80.321,161.999,0.881,162.88
+0,8,4553.982,0.403,0.5,92.788,79.698,172.487,2.855,175.343
+0,0,4649.615,0.455,0.528,19.45,84.334,103.785,1.69,105.475
+0,4,4581.108,0.727,0.888,88.144,85.538,173.683,0.515,174.198
+0,7,4617.775,0.309,0.38,57.266,80.933,138.2,1.523,139.723
+0,9,4617.201,0.408,0.513,79.382,81.334,160.716,0.872,161.589
+0,1,4621.077,0.313,0.394,79.38,80.484,159.864,1.538,161.403
+0,5,4695,0.323,0.398,26.916,80.04,106.957,1.254,108.212
+0,8,4729.336,0.417,0.504,8.58,81.443,90.024,1.481,91.506
+0,6,4691.503,0.315,0.393,52.131,81.54,133.672,1.764,135.436
+0,7,4757.506,0.336,0.402,8.604,82.634,91.239,2.208,93.447
+0,3,4695.901,0.364,0.612,110.355,79.703,190.059,2.086,192.145
+0,4,4755.316,0.387,0.444,71.444,80.424,151.868,1.02,152.889
+0,1,4782.487,0.804,0.913,71.209,80.168,151.377,1.373,152.751
+0,2,4685.202,0.318,0.395,168.695,81.247,249.943,1.572,251.515
+0,0,4755.102,0.475,0.548,109.227,80.705,189.933,0.478,190.411
+0,7,4850.962,0.47,0.583,25.01,82.997,108.007,1.157,109.164
+0,5,4803.219,0.334,0.445,72.976,85.095,158.071,1.135,159.207
+0,9,4778.799,0.486,0.589,120.634,80.375,201.009,1.331,202.341
+0,4,4908.214,0.415,0.488,15.698,82.28,97.979,1.139,99.118
+0,6,4826.949,0.393,0.479,97.059,83.146,180.206,1.672,181.879
+0,8,4820.854,0.484,0.577,109.039,81.594,190.634,0.318,190.953
+0,2,4936.725,0.354,0.431,6.303,83.521,89.824,1.867,91.692
+0,3,4888.057,0.498,0.577,71.038,81.397,152.435,0.342,152.777
+0,5,4962.434,0.279,0.331,14.723,82.679,97.402,0.279,97.682
+0,7,4960.133,0.327,0.397,44.946,83.613,128.56,0.245,128.805
+0,3,5040.845,0.439,0.546,14.402,85.033,99.435,2.166,101.602
+0,8,5011.814,0.411,0.481,59.326,83.914,143.24,1.398,144.639
+0,2,5028.425,0.366,0.446,42.929,84.889,127.819,0.305,128.124
+0,0,4945.521,0.346,0.418,150.986,80.727,231.713,2.023,233.737
+0,9,4981.151,0.45,0.557,115.5,82.904,198.405,2.823,201.228
+0,5,5060.124,0.398,0.501,64.278,83.236,147.514,2.355,149.869
+0,6,5008.836,0.28,0.353,115.728,85.538,201.267,0.603,201.871
+0,1,4935.247,0.379,0.458,189.72,85.303,275.023,0.465,275.488
+0,4,5007.34,0.542,0.741,117.463,85.645,203.108,2.146,205.255
+0,7,5088.946,0.313,0.394,49.444,81.597,131.042,1.646,132.688
+0,3,5142.457,0.399,0.478,5.147,81.287,86.435,0.881,87.317
+0,2,5156.557,0.291,0.362,5.203,81.382,86.585,1.92,88.505
+0,8,5156.462,0.521,0.69,19.219,80.308,99.528,1.821,101.349
+0,9,5182.387,0.32,0.399,23.899,80.953,104.852,1.121,105.973
+0,7,5221.642,0.307,0.391,5.745,81.815,87.561,1.817,89.378
+0,0,5179.266,0.363,0.443,49.741,84.892,134.633,2.054,136.688
+0,5,5210.018,0.568,0.643,61.334,81.577,142.911,1.418,144.33
+0,3,5229.782,0.339,0.44,49.632,85.029,134.661,1.34,136.002
+0,1,5210.738,0.792,1.471,86.688,81.747,168.435,0.87,169.305
+0,9,5288.37,0.428,0.512,5.724,86.497,92.221,2.111,94.333
+0,2,5245.07,0.351,0.431,61.536,81.418,142.954,1.728,144.682
+0,0,5315.961,0.382,0.447,20.382,79.869,100.252,1.409,101.661
+0,8,5257.815,0.423,0.49,92.566,80.892,173.459,1.496,174.955
+0,7,5311.029,0.435,0.516,52.528,81.313,133.841,1.413,135.255
+0,6,5210.712,1.532,1.63,151.833,85.155,236.989,1.118,238.107
+0,3,5365.791,0.299,0.377,50.784,81.585,132.369,1.452,133.822
+0,2,5389.757,0.474,0.554,26.667,82.959,109.627,1.814,111.441
+0,0,5417.631,0.784,0.907,8.897,81.026,89.924,1.412,91.336
+0,4,5212.602,0.386,0.447,217.003,82.217,299.221,1.166,300.387
+0,9,5382.712,0.311,0.389,75.127,83.211,158.339,1.983,160.323
+0,5,5354.356,0.305,0.39,112.1,80.95,193.05,1.376,194.427
+0,7,5446.296,0.356,0.432,36.105,80.157,116.262,0.92,117.183
+0,1,5380.053,0.405,0.494,111.048,85.12,196.168,1.345,197.514
+0,6,5448.827,0.315,0.388,42.469,86.109,128.578,0.571,129.149
+0,8,5432.778,0.329,0.409,64.109,83.938,148.048,0.344,148.393
+0,4,5512.997,0.298,0.374,12.336,81.353,93.69,2.014,95.704
+0,3,5499.624,0.486,0.595,59.894,82.285,142.179,1.619,143.799
+0,5,5548.792,0.428,0.535,10.625,83.853,94.479,1.992,96.472
+0,2,5501.208,0.575,0.684,90.412,78.346,168.759,0.685,169.444
+0,4,5608.705,0.558,0.815,8.557,78.683,87.24,1.117,88.358
+0,1,5577.576,0.426,0.513,55.869,79.618,135.487,1.607,137.095
+0,0,5508.975,0.328,0.404,126.867,81.307,208.175,1.943,210.118
+0,9,5543.047,0.36,0.436,90.905,85.163,176.069,2.65,178.719
+0,2,5670.662,0.41,0.496,11.867,80.168,92.035,2.243,94.278
+0,7,5563.487,0.303,0.384,127.359,84.02,211.379,1.073,212.452
+0,6,5577.982,0.339,0.414,117.634,83.729,201.363,0.301,201.665
+0,5,5645.292,0.373,0.455,50.568,84.436,135.005,1.355,136.36
+0,4,5697.074,0.417,0.514,14.751,79.581,94.332,2.424,96.757
+0,3,5643.43,0.367,0.462,102.833,81.493,184.327,2.916,187.244
+0,0,5719.101,0.348,0.427,42.935,78.555,121.491,1.886,123.377
+0,8,5581.178,0.307,0.381,181.001,83.057,264.059,1.295,265.354
+0,9,5721.773,0.324,0.406,46.37,81.578,127.949,1.29,129.239
+0,2,5764.95,0.399,0.477,28.761,79.071,107.832,2.316,110.149
+0,1,5714.679,0.318,0.404,98.197,82.491,180.689,1.885,182.574
+0,4,5793.839,0.314,0.382,30.597,81.38,111.978,1.234,113.212
+0,7,5775.948,0.332,0.413,51.577,84.088,135.665,0.377,136.043
+0,3,5830.686,0.955,1.072,11.735,81.606,93.341,1.701,95.043
+0,9,5851.02,0.333,0.414,18.739,81.701,100.441,1.33,101.771
+0,2,5875.109,0.396,0.478,15.164,81.893,97.058,1.217,98.275
+0,5,5781.659,0.318,0.386,119.27,83.15,202.42,0.376,202.797
+0,7,5911.998,0.339,0.418,11.726,82.093,93.82,1.495,95.315
+0,3,5925.738,0.447,0.516,21.925,79.87,101.795,0.344,102.14
+0,0,5842.488,0.338,0.409,124.073,81.734,205.807,2.047,207.855
+0,6,5779.654,0.326,0.406,188.882,82.945,271.828,0.958,272.786
+0,1,5897.261,0.301,0.377,74.047,81.4,155.448,0.967,156.415
+0,8,5846.539,0.337,0.429,140.2,79.976,220.176,2.328,222.505
+0,9,5952.801,0.344,0.421,54.536,79.755,134.291,1.41,135.702
+0,7,6007.318,0.522,0.618,14.816,79.956,94.772,16.419,111.192
+0,2,5973.394,0.518,0.592,60.307,84.753,145.06,0.75,145.81
+0,5,5984.463,0.449,0.524,50.467,84.478,134.945,1.93,136.876
+0,4,5907.056,0.402,0.484,129.229,84.9,214.129,1.722,215.851
+0,3,6027.888,0.42,0.494,39.048,80.015,119.064,1.978,121.042
+0,0,6050.355,1.316,1.485,29.107,82.111,111.218,1.742,112.96
+0,1,6053.684,0.311,0.379,47.288,81.844,129.132,1.182,130.315
+0,6,6052.444,0.503,0.615,67.027,81.05,148.077,1.152,149.229
+0,5,6121.346,0.337,0.446,23.684,78.068,101.752,2.019,103.772
+0,8,6069.053,0.397,0.478,79.682,79.537,159.219,1.582,160.802
+0,9,6088.518,0.344,0.419,65.681,81.3,146.982,13.495,160.477
+0,7,6118.543,0.547,0.608,50.691,81.862,132.554,0.377,132.931
+0,3,6148.938,0.351,0.416,38.998,82.443,121.442,10.62,132.062
+0,1,6184.009,0.625,0.847,30.097,79.57,109.667,2.015,111.682
+0,4,6122.915,0.478,0.554,133.957,92.839,226.796,1.7,228.497
+0,2,6119.207,0.42,0.468,136.749,95.595,232.345,3.165,235.51
+0,5,6225.127,0.307,0.389,30.625,98.714,129.339,0.471,129.811
+0,8,6229.86,0.669,0.746,51.831,97.397,149.228,1.67,150.898
+0,6,6201.683,0.393,0.475,85.686,96.242,181.928,5.483,187.412
+0,9,6249.004,0.394,0.467,68.533,82.42,150.954,0.531,151.485
+0,0,6163.324,0.47,0.577,154.586,83.082,237.668,12.538,250.207
+0,7,6251.483,0.329,0.409,71.341,90.405,161.747,0.44,162.188
+0,3,6281.008,0.413,0.572,45.589,86.798,132.388,1.088,133.476
+0,1,6295.702,0.418,0.499,51.953,79.591,131.545,1.322,132.867
+0,4,6351.453,0.526,0.622,1.002,79.648,80.651,2.773,83.424
+0,2,6354.728,0.554,0.647,34.466,80.677,115.143,0.939,116.083
+0,5,6354.95,0.507,0.659,65.208,80.513,145.721,4.54,150.262
+0,6,6389.103,0.371,0.453,31.17,84.714,115.884,0.492,116.376
+0,0,6413.542,0.446,0.573,10.238,84.236,94.475,0.223,94.699
+0,1,6428.577,0.312,0.401,27.804,81.855,109.659,1.676,111.336
+0,7,6413.677,0.485,0.6,45.942,80.918,126.86,2.002,128.863
+0,2,6470.818,0.322,0.4,18.925,81.521,100.446,0.952,101.399
+0,4,6434.885,0.367,0.43,63.441,84.026,147.468,2.273,149.741
+0,0,6508.249,0.291,0.367,14.539,80.234,94.774,2.012,96.787
+0,9,6400.496,0.321,0.422,124.092,86.419,210.512,2.121,212.633
+0,6,6505.483,0.332,0.395,50.891,82.623,133.515,2.367,135.883
+0,5,6505.215,0.47,0.546,66.876,80.667,147.543,1.659,149.202
+0,2,6572.224,0.316,0.376,17.54,84.437,101.978,0.329,102.308
+0,4,6584.634,0.383,0.482,15.541,81.204,96.746,1.192,97.939
+0,9,6613.139,0.441,0.554,10.492,79.826,90.318,1.596,91.915
+0,7,6542.547,0.337,0.417,113.17,80.125,193.295,1.239,194.535
+0,0,6605.043,0.334,0.415,57.477,82.496,139.973,1.355,141.329
+0,3,6414.491,0.775,0.919,247.767,84.12,331.888,2.017,333.905
+0,8,6380.768,0.437,0.526,281.598,85.832,367.431,0.649,368.081
+0,5,6654.422,0.74,0.895,7.715,86.517,94.233,1.298,95.531
+0,1,6539.923,0.391,0.483,149.274,83.239,232.513,2.996,235.509
+0,4,6682.579,0.336,0.416,6.481,86.19,92.672,10.253,102.925
+0,6,6641.381,0.317,0.393,59.657,84.226,143.884,0.521,144.405
+0,9,6705.064,0.411,0.478,19.864,80.4,100.264,1.428,101.693
+0,2,6674.542,0.419,0.494,53.331,81.556,134.888,1.243,136.131
+0,7,6737.093,0.433,0.512,18.865,80.421,99.287,0.362,99.649
+0,8,6748.856,0.377,0.434,17.681,84.385,102.067,0.776,102.843
+0,6,6785.795,0.516,0.607,9.629,79.503,89.133,2.355,91.488
+0,5,6749.962,0.412,0.48,73.922,79.8,153.722,1.568,155.291
+0,0,6746.38,0.315,0.39,110.351,80.636,190.987,1.112,192.1
+0,7,6836.754,0.55,0.613,24.537,80.93,105.467,2.694,108.162
+0,8,6851.707,0.33,0.393,20.472,81.812,102.285,1.242,103.527
+0,6,6877.293,0.396,0.464,12.523,81.162,93.686,1.659,95.345
+0,4,6785.508,0.589,0.692,115.734,86.656,202.391,0.733,203.124
+0,1,6775.441,0.33,0.414,130.532,83.319,213.851,1.687,215.538
+0,9,6806.765,0.34,0.423,99.015,85.013,184.029,3.078,187.108
+0,3,6748.406,0.486,0.618,174.309,81.219,255.529,4.272,259.801
+0,5,6905.264,0.568,0.647,23.753,80.364,104.118,0.631,104.749
+0,8,6955.243,0.326,0.406,2.524,80.645,83.169,0.755,83.925
+0,0,6938.49,0.461,0.541,27.562,81.761,109.323,1.228,110.552
+0,2,6810.68,0.93,1.1,197.267,80.838,278.105,1.271,279.376
+0,7,6944.924,0.37,0.455,63.266,82.346,145.613,1.637,147.251
+0,4,6988.643,0.466,0.606,34.89,83.461,118.352,3.998,122.35
+0,3,7008.212,0.533,0.621,66.77,79.833,146.603,1.377,147.98
+0,0,7049.053,0.377,0.459,25.731,82.163,107.895,1.657,109.553
+0,6,6972.667,0.354,0.428,119.457,80.472,199.93,0.336,200.266
+0,7,7092.184,0.337,0.406,4.213,82.36,86.573,1.179,87.752
+0,9,6993.88,0.439,0.511,110.675,82.611,193.287,1.277,194.564
+0,1,6990.987,0.309,0.389,131.279,80.628,211.907,1.199,213.107
+0,8,7039.181,1.011,1.109,91.879,83.571,175.451,1.855,177.306
+0,2,7090.066,0.356,0.455,51.305,82.594,133.899,1.56,135.459
+0,4,7111.004,0.415,0.497,30.584,84.877,115.461,1.764,117.225
+0,5,7010.022,0.464,0.541,141.61,82.79,224.4,2.016,226.417
+0,0,7158.615,0.364,0.442,4.359,80.082,84.441,1.28,85.722
+0,6,7172.942,0.521,0.598,26.196,79.661,105.858,1.066,106.924
+0,3,7156.204,0.42,0.502,53.726,79.747,133.473,1.584,135.058
+0,1,7204.101,0.331,0.416,26.093,81.632,107.725,2,109.726
+0,0,7244.345,0.32,0.398,21.466,80.972,102.438,1.166,103.605
+0,5,7236.446,0.493,0.55,41.039,79.52,120.56,2.102,122.662
+0,9,7188.454,0.601,0.747,110.165,80.817,190.983,0.996,191.979
+0,8,7216.494,0.341,0.427,81.98,80.888,162.869,2.197,165.067
+0,7,7179.945,0.403,0.485,119.842,81.613,201.455,0.476,201.931
+0,2,7225.536,0.484,0.582,74.136,81.65,155.786,1.136,156.923
+0,1,7313.837,0.452,0.567,18.595,83.189,101.784,2.503,104.288
+0,6,7279.875,0.328,0.411,61.184,81.339,142.524,2.233,144.757
+0,5,7359.116,0.325,0.402,6.764,82.524,89.288,1.53,90.819
+0,4,7228.237,0.716,0.876,138.937,84.177,223.115,0.301,223.416
+0,7,7381.883,0.288,0.383,22.346,80.881,103.228,1.238,104.466
+0,3,7291.272,0.443,0.52,113.137,81.756,194.893,1.745,196.639
+0,8,7381.568,0.403,0.472,54.796,80.499,135.296,0.451,135.748
+0,0,7347.958,0.324,0.405,118.366,81.119,199.485,1.507,200.992
+0,9,7380.444,0.554,0.68,93.055,79.533,172.588,1.514,174.103
+0,4,7451.66,0.316,0.384,22.329,80.797,103.127,2.351,105.478
+0,3,7487.919,0.325,0.403,15.077,82.38,97.457,17.729,115.187
+0,1,7418.133,0.432,0.498,97.07,87.573,184.644,0.619,185.263
+0,8,7517.326,0.441,0.512,15.017,86.247,101.265,0.225,101.49
+0,6,7424.648,0.311,0.394,113.912,82.157,196.07,0.29,196.361
+0,5,7449.946,0.966,1.145,91.384,80.285,171.67,1.546,173.216
+0,2,7382.465,0.311,0.368,155.965,84.581,240.547,6.505,247.052
+0,7,7486.358,0.32,0.403,62.472,82.007,144.479,5.539,150.018
+0,4,7557.146,0.366,0.452,15.698,80.87,96.568,13.833,110.402
+0,0,7548.957,0.315,0.408,53.927,80.333,134.26,1.998,136.259
+0,9,7554.554,0.424,0.512,48.698,81.789,130.488,2.084,132.572
+0,3,7603.119,0.564,0.632,66.287,80.673,146.961,1.472,148.433
+0,6,7621.016,0.287,0.361,50.611,79.755,130.366,2.06,132.427
+0,1,7603.404,0.35,0.44,71.549,81.794,153.343,1.394,154.737
+0,7,7636.385,0.328,0.393,38.377,83.192,121.569,7.821,129.391
+0,8,7618.824,0.315,0.391,58.371,88.394,146.766,0.268,147.034
+0,4,7667.559,0.458,0.544,41.885,80.925,122.811,2.257,125.068
+0,0,7685.224,0.379,0.462,51.5,85.236,136.737,1.835,138.572
+0,5,7623.17,0.345,0.429,113.716,86.773,200.489,2.099,202.589
+0,9,7687.135,0.365,0.44,55.114,83.348,138.463,1.93,140.394
+0,2,7629.525,0.75,0.881,112.85,84.984,197.834,1.481,199.316
+0,6,7753.451,0.348,0.443,19.425,81.92,101.345,0.235,101.581
+0,8,7765.861,0.295,0.382,42.989,83.301,126.291,0.309,126.6
+0,3,7751.56,0.371,0.447,57.895,83.908,141.804,1.772,143.577
+0,1,7758.148,0.305,0.375,61.756,83.904,145.661,0.303,145.964
+0,4,7792.635,0.385,0.467,48.907,82.184,131.091,1.903,132.995
+0,7,7765.787,0.508,0.598,82.233,80.202,162.436,0.937,163.373
+0,5,7825.768,0.352,0.433,48.817,83.915,132.733,1.856,134.59
+0,0,7823.804,0.347,0.42,81.14,78.737,159.878,2.87,162.748
+0,3,7895.144,0.324,0.404,19.162,79.062,98.225,1.353,99.579
+0,1,7904.124,0.531,0.75,44.278,80.547,124.825,2.869,127.694
+0,7,7929.169,0.305,0.4,22.345,80.727,103.073,0.274,103.347
+0,9,7827.535,0.315,0.398,125.914,79.985,205.899,1.407,207.306
+0,4,7925.637,0.295,0.37,55.306,79.662,134.969,1.413,136.382
+0,6,7855.04,0.348,0.424,129.077,82.84,211.917,1.083,213
+0,2,7828.844,0.332,0.377,154.911,84.522,239.433,0.778,240.211
+0,8,7892.473,0.449,0.525,91.578,85.603,177.182,9.727,186.909
+0,5,7960.366,0.389,0.468,55.094,82.706,137.801,1.851,139.652
+0,3,7994.732,0.337,0.41,22.79,83.043,105.834,1.32,107.154
+0,7,8032.525,0.351,0.425,16.842,80.964,97.806,3.531,101.338
+0,0,7986.561,0.295,0.37,65.496,81.656,147.152,1.49,148.643
+0,9,8034.848,0.327,0.409,49.351,81.008,130.359,9.179,139.539
+0,4,8062.031,0.837,1.09,46.288,82.287,128.575,3.955,132.531
+0,5,8100.03,0.389,0.486,18.157,82.12,100.278,2.442,102.72
+0,1,8031.827,0.478,0.608,96.665,82.449,179.114,1.973,181.087
+0,2,8069.062,0.342,0.407,85.309,81.496,166.805,0.329,167.135
+0,9,8174.399,0.474,0.569,11.749,83.111,94.861,1.975,96.836
+0,3,8101.893,0.317,0.394,85.135,84.047,169.183,2.215,171.398
+0,8,8079.389,0.343,0.409,114.95,81.574,196.524,0.902,197.427
+0,1,8212.925,0.393,0.494,5.508,81.466,86.974,2.467,89.442
+0,6,8068.049,0.4,0.476,153.286,83.743,237.03,1.172,238.202
+0,4,8194.572,0.388,0.455,46.45,82.449,128.899,3.487,132.387
+0,7,8133.87,0.316,0.402,127.895,81.295,209.19,0.378,209.569
+0,0,8135.211,0.37,0.49,149.827,95.401,245.228,0.525,245.753
+0,5,8202.758,0.299,0.378,83.997,93.829,177.826,0.433,178.259
+0,2,8236.206,0.419,0.527,47.407,97.117,144.525,0.519,145.044
+0,6,8306.259,0.336,0.413,3.622,81.754,85.377,3.954,89.331
+0,9,8271.247,0.468,1.138,48.801,82.285,131.086,5.775,136.861
+0,7,8343.45,0.445,0.55,7.533,83.535,91.069,12.373,103.442
+0,1,8302.377,0.352,0.429,54.306,89.95,144.257,1.044,145.301
+0,8,8276.825,0.397,0.494,104.45,87.657,192.107,1.003,193.111
+0,3,8273.295,0.582,0.657,107.827,88.457,196.284,0.432,196.717
+0,4,8326.967,0.382,0.454,55.066,88.862,143.928,3.529,147.457
+0,9,8408.118,0.387,0.47,10.387,81.323,91.711,2.096,93.808
+0,5,8381.02,0.737,0.809,72.154,82.173,154.327,2.08,156.408
+0,6,8395.599,0.31,0.381,60.746,88.193,148.94,0.223,149.163
+0,1,8447.686,0.287,0.348,15.042,82.895,97.937,3.174,101.111
+0,0,8380.969,0.55,0.685,84.005,88.633,172.638,1.193,173.831
+0,4,8474.432,0.295,0.375,10.992,87.808,98.8,15.063,113.864
+0,8,8469.946,0.996,1.127,55.763,87.871,143.635,0.35,143.985
+0,0,8554.808,0.306,0.389,4.062,97.274,101.336,1.629,102.966
+0,9,8501.936,0.364,0.441,57.994,97.65,155.644,0.333,155.977
+0,5,8537.438,0.409,0.487,24.686,95.581,120.268,0.765,121.034
+0,7,8446.903,0.418,0.538,166.93,82.688,249.618,12.816,262.434
+0,3,8470.014,1.107,1.204,144.07,95.186,239.257,0.458,239.715
+0,1,8548.805,0.291,0.366,65.599,95.008,160.607,1.759,162.367
+0,2,8381.252,0.64,0.703,232.706,95.11,327.816,2.124,329.941
+0,4,8588.308,0.451,0.53,47.676,81.686,129.363,19.95,149.313
+0,6,8544.77,0.425,0.514,94.256,98.361,192.617,1.175,193.793
+0,8,8613.935,0.482,0.648,66.74,79.822,146.562,13.637,160.199
+0,5,8658.478,0.364,0.461,23.727,91.555,115.283,0.678,115.961
+0,0,8657.783,0.359,0.437,29.469,86.909,116.378,1.615,117.994
+0,9,8657.92,0.434,0.494,52.377,80.121,132.499,2.162,134.661
+0,7,8709.341,1.143,1.286,2.176,84.412,86.589,18.531,105.121
+0,0,8775.784,0.34,0.447,2.582,677.582,680.165,1.972,682.138
+0,4,8737.632,0.477,0.553,40.936,679.191,720.127,46.877,767.005
+0,1,8711.177,0.458,0.532,46.203,746.914,793.118,0.676,793.795
+0,2,8711.197,0.549,0.614,36.637,756.865,793.503,0.62,794.123
+0,3,8709.732,0.968,1.401,729.574,148.167,877.741,1.855,879.597
+0,9,8792.592,0.382,0.461,647.063,212.999,860.063,2.327,862.391
+0,5,8774.449,0.442,0.497,665.322,278.888,944.21,1.71,945.921
+0,8,8774.139,0.542,0.675,666.023,348.013,1014.037,3.225,1017.262
+0,7,8814.472,0.42,0.499,625.747,350.894,976.641,1.077,977.719
+0,3,9589.338,0.74,0.84,52.156,212.561,264.717,1.988,266.706
+0,1,9504.98,0.395,0.478,199.746,152.4,352.146,1.436,353.583
+0,2,9505.326,0.369,0.408,200.027,212.787,412.815,0.346,413.162
+0,5,9720.381,0.408,0.468,50.974,150.027,201.002,0.889,201.892
+0,9,9654.994,0.436,0.496,119.325,206.595,325.92,1.9,327.82
+0,7,9792.196,0.259,0.853,45.479,147.983,193.463,1.292,194.756
+0,8,9791.412,0.416,0.474,47.556,209.663,257.22,1.399,258.62
+0,1,9858.571,0.332,0.388,47.169,146.521,193.691,1.358,195.049
+0,6,8738.566,0.293,0.349,1167.354,156.58,1323.935,0.934,1324.869
+0,5,9922.281,0.382,0.438,49.221,145.247,194.469,1.392,195.862
+0,7,9986.962,0.364,0.42,47.021,150.528,197.549,1.334,198.884
+0,0,9457.939,0.316,0.395,578.457,150.278,728.735,1.254,729.99
+0,9,9982.825,0.43,0.5,64.168,199.563,263.731,0.345,264.077
+0,3,9856.054,0.416,0.472,247.039,147.388,394.428,1.72,396.148
+0,4,9504.641,0.548,0.619,664.554,141.019,805.573,1.417,806.991
+0,2,9918.499,0.404,0.459,250.86,142.241,393.101,1.155,394.257
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/secretsmanager/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/secretsmanager/client.go
new file mode 100644
index 000000000..014fd62cb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/secretsmanager/client.go
@@ -0,0 +1,16 @@
+// +build integration
+
+//Package secretsmanager provides gucumber integration tests support.
+package secretsmanager
+
+import (
+ "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
+ "github.com/aws/aws-sdk-go/service/secretsmanager"
+ "github.com/gucumber/gucumber"
+)
+
+func init() {
+ gucumber.Before("@secretsmanager", func() {
+ gucumber.World["client"] = secretsmanager.New(smoke.Session)
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/secretsmanager/secretsmanager.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/secretsmanager/secretsmanager.feature
new file mode 100644
index 000000000..31824c86a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/secretsmanager/secretsmanager.feature
@@ -0,0 +1,13 @@
+# language: en
+@smoke @secretsmanager
+Feature: Amazon SecretsManager
+
+ Scenario: Making a request
+ When I call the "ListSecrets" API
+ Then the request should be successful
+
+ Scenario: Handling errors
+ When I attempt to call the "DescribeSecret" API with:
+ | SecretId | fake-secret-id |
+ Then I expect the response error code to be "ResourceNotFoundException"
+
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.10 b/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.10
new file mode 100644
index 000000000..7cf47942d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.10
@@ -0,0 +1,11 @@
+FROM ubuntu:12.04
+FROM golang:1.10
+
+ADD . /go/src/github.com/aws/aws-sdk-go
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+ vim \
+ && rm -rf /var/list/apt/lists/*
+
+WORKDIR /go/src/github.com/aws/aws-sdk-go
+CMD ["make", "unit"]
diff --git a/vendor/github.com/aws/aws-sdk-go/buildspec.yml b/vendor/github.com/aws/aws-sdk-go/buildspec.yml
index 427208edf..2defb7f6c 100644
--- a/vendor/github.com/aws/aws-sdk-go/buildspec.yml
+++ b/vendor/github.com/aws/aws-sdk-go/buildspec.yml
@@ -10,7 +10,7 @@ phases:
- mkdir -p /go/src/github.com/aws
- ln -s $SDK_CB_ROOT $SDK_GO_ROOT
- cd $SDK_GO_ROOT
- - make unit
+ - make ci-test
- cd $SDK_CB_ROOT
- #echo Compiling the Go code...
post_build:
diff --git a/vendor/github.com/aws/aws-sdk-go/cleanup_models.sh b/vendor/github.com/aws/aws-sdk-go/cleanup_models.sh
new file mode 100755
index 000000000..184ec40a9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/cleanup_models.sh
@@ -0,0 +1,9 @@
+#/usr/bin/env bash
+
+# Deletes all but the most current model version.
+for v in $(ls ./models/apis | grep -v '.go' ); do
+ for vm in $(ls -r models/apis/$v/ | sed -n '1!p' ); do
+ echo "rm -r models/apis/$v/$vm"
+ rm -r models/apis/$v/$vm
+ done
+done
diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html
index fbaaa8111..979569685 100644
--- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html
+++ b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html
@@ -158,7 +158,7 @@ window.onload = function() {
-
+